/* ======================================================
   GLOBAL BASICS (LCP-SAFE)
   ====================================================== */

/* System-Font als Basis → KEIN Font-Blocking */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
}

/* Optional: Brand-Font nur gezielt nutzen */
.font-brand {
  font-family: 'Poppins', system-ui, sans-serif;
}

/* ======================================================
   BREADCRUMBS (stabil, CLS-frei)
   ====================================================== */

.breadcrumb-wrap {
  margin-top: 14px;
  margin-bottom: 18px;
  padding-left: 14px;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.breadcrumb-list a {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #cbd5e1;
  user-select: none;
}

/* ======================================================
   PAGE / INTRO (LCP-BEREICH!)
   ====================================================== */

.map-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.page-title {
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2rem);
  font-weight: 800;
  margin: 30px 0 48px;
  color: #1f2937;
}

/* 🚨 LCP-ELEMENT → SYSTEM FONT ZWINGEND */
.map-description {
  max-width: 760px;
  margin: 0 auto 0.75rem;
  color: #4b5563;
  text-align: center;
  line-height: 1.6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.map-backlink {
  display: inline-block;
  margin-top: 0.75rem;
  padding-bottom: 10px;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.95rem;
}

.map-backlink:hover {
  text-decoration: underline;
}

/* ======================================================
   MAP PANEL (CLS-FREE)
   ====================================================== */

.map-panel {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Controls */
.map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.map-controls-group {
  display: inline-flex;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 6px;
  border-radius: 999px;
}

.map-control-btn {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.map-control-btn.is-active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37,99,235,.2);
}

/* Legend */
.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #64748b;
}

.legend-bar {
  width: 90px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(59,130,246,.15),
    rgba(239,68,68,.7)
  );
}

/* ======================================================
   MAP CANVAS (KEIN LAYOUT SHIFT)
   ====================================================== */

.map-canvas {
  width: 100%;
  height: 400px; /* feste Höhe = CLS 0 */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

/* Responsive Höhen (vor Paint → CLS-frei) */
@media (max-width: 768px) {
  .map-canvas {
    height: 320px;
  }
}

/* ======================================================
   MAP HINT
   ====================================================== */

.map-wrapper {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.map-hint {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  color: #374151;
  font-size: 0.95rem;
}

.map-hint strong {
  display: block;
  margin-bottom: 0.5rem;
}

.map-hint ul {
  margin: 0;
  padding-left: 1.1rem;
}

.map-hint li {
  margin-bottom: 0.35rem;
}

/* ======================================================
   HOTSPOTS
   ====================================================== */

.map-hotspots {
  margin-top: 2rem;
  background: #f9fafb;
  border-radius: 16px;
  padding: 1.5rem;
}

.map-hotspots-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
}

.map-hotspots-header p {
  margin: 0 0 1.25rem;
  color: #64748b;
}

.map-hotspots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.map-hotspot-empty {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.95rem;
}

/* ======================================================
   LEAFLET MARKER (unproblematisch für LCP)
   ====================================================== */

.pulse-marker {
  background: transparent;
  border: none;
}

.pulse-marker .pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ef4444;
  animation: pulse-dot 1.6s ease-out infinite;
}

@keyframes pulse-dot {
  0%,100% { transform: scale(.9); opacity: .8; }
  70%     { transform: scale(1.1); opacity: 1; }
}

/* ======================================================
   MAP HOTSPOT CARDS (FEHLTE – JETZT KOMPLETT)
   ====================================================== */

.map-hotspot-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    border-color .15s ease;
  will-change: transform;
}

.map-hotspot-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.map-hotspot-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.2;
}

.map-hotspot-meta {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.2;
}

.map-hotspot-count {
  font-weight: 700;
  color: #ef4444;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Fallback / leerer Zustand */
.map-hotspot-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
  padding: 1rem 0;
}

