/* /werke/ — Produktionsstandort-Detailseiten
   Reuse: .brand-hero, .product-grid, .brand-grid aus styles.css
   Neu: .werk-map-stage (Karten-Container), .werk-map-bg (PNG-Hintergrund),
        .werk-map-overlay (SVG-Marker-Layer), .werk-info-box,
        .werk-bundesland-section
*/

.werk-map-card {
  background: var(--gray-100);
  border-radius: 18px;
  padding: 24px;
  margin: 32px auto;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.werk-map-card-large {
  max-width: 920px;
  padding: 32px;
}

/* Karten-Stage: Container für PNG + SVG-Marker-Overlay */
.werk-map-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 600 / 711;
}

.werk-map-card-large .werk-map-stage {
  max-width: 720px;
}

.werk-map-bg {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
}

/* Default: Light sichtbar, Dark versteckt. */
.werk-map-bg-light { display: block; }
.werk-map-bg-dark  { display: none; }

/* Explizit Dark-Mode (Toggle) */
:root[data-theme="dark"] .werk-map-bg-light { display: none; }
:root[data-theme="dark"] .werk-map-bg-dark  { display: block; }

/* Auto-Mode: System-Pref entscheidet */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .werk-map-bg-light { display: none; }
  :root[data-theme="auto"] .werk-map-bg-dark  { display: block; }
}

.werk-map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Marker — Hauptort auf Detailseite */
.de-map-marker {
  fill: var(--red);
  stroke: var(--white);
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Pulsing ring für Hauptort */
.de-map-marker-pulse {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  opacity: 0.6;
  animation: werk-pulse 2.4s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes werk-pulse {
  0%   { r: 6;  opacity: 0.7; }
  100% { r: 22; opacity: 0;   }
}

/* Marker auf Übersichtskarte — alle Standorte (klickbar) */
.de-map-marker-all {
  fill: var(--red);
  stroke: var(--white);
  stroke-width: 1.4;
  cursor: pointer;
  transition: r 0.15s ease, fill 0.15s ease;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.de-map-marker-all:hover,
.de-map-marker-all:focus {
  fill: var(--gold);
  r: 7;
  outline: none;
}

.de-map-marker-all-link {
  pointer-events: auto;
  cursor: pointer;
}

/* Werke-Index: Marker-Hover-Layer braucht pointer-events */
.werk-map-card-large .werk-map-overlay {
  pointer-events: auto;
}

.werk-map-legend {
  font-size: 0.85rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
}

.werk-map-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--gray-400);
}

.werk-map-credit {
  font-size: 0.72rem;
  color: var(--gray-600);
  margin: 4px 0 0;
  text-align: center;
  line-height: 1.45;
}

.werk-map-credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gray-400);
}

/* Geo-Koordinaten-Chip */
.chip-geo {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Info-Box "Über den Standort" */
.werk-info-box {
  background: var(--gray-100);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0;
}

.werk-info-box h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
}

.werk-info-box p {
  margin: 0;
  color: var(--black);
  line-height: 1.55;
}

/* Bundesland-Sections im Werke-Index */
.werk-bundesland-section {
  margin: 40px 0;
}

.werk-bundesland-section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.werk-bundesland-count {
  font-size: 0.95rem;
  color: var(--gray-600);
  font-weight: 400;
}

.werk-stadt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.werk-stadt-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--gray-100);
  border-radius: 999px;
  text-decoration: none;
  color: var(--black);
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.werk-stadt-chip:hover {
  background: var(--white);
  border-color: var(--gray-300);
}

.werk-stadt-chip-count {
  font-size: 0.82rem;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
}

/* Mobile */
@media (max-width: 640px) {
  .werk-map-card {
    padding: 16px;
    margin: 24px -16px;
    border-radius: 0;
  }
  .werk-map-card-large {
    padding: 16px;
  }
  .werk-info-box {
    padding: 16px 18px;
  }
}
