:root {
  --navy: #253a5f;
  --navy-deep: #17253e;
  --navy-light: #32507f;
  --gold: #caa34a;
  --gold-light: #e0bf6e;
  --cream: #faf8f3;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5a6577;
  --border: #e7e4dc;

  --yellow: #E8C547;
  --orange: #E88E3E;
  --red: #E85555;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; color: var(--text); }
a { color: var(--navy); text-decoration: none; }
img, svg { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-full { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(37, 58, 95, 0.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1200px; margin: 0 auto;
}
.nav-logo { height: 60px; width: auto; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-weight: 500; font-size: 15px; color: var(--navy);
  transition: color 0.25s ease;
  position: relative;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active {
  color: var(--gold);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .nav-links { flex-wrap: wrap; gap: 16px; font-size: 14px; }
  .nav-logo { height: 48px; }
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 80px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(202, 163, 74, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(202, 163, 74, 0.08) 0%, transparent 40%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  background: rgba(202, 163, 74, 0.15);
  border: 1px solid rgba(202, 163, 74, 0.4);
  color: var(--gold-light);
  padding: 6px 16px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 16px;
}
.hero .subtitle {
  color: rgba(255, 255, 255, 0.82);
  max-width: 720px; margin: 0 auto;
  font-size: clamp(16px, 2vw, 19px);
}

/* ============ CONTROLS ============ */
.controls {
  background: var(--white);
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.controls .container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.counter-box {
  flex: 1; min-width: 240px;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(37, 58, 95, 0.18);
}
.counter-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.counter-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.filter-buttons {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.filter-btn {
  background: var(--cream);
  border: 2px solid var(--border);
  color: var(--navy);
  padding: 12px 24px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover {
  border-color: var(--gold);
  background: var(--white);
}
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
  box-shadow: 0 4px 12px rgba(202, 163, 74, 0.3);
}

@media (max-width: 768px) {
  .controls .container { flex-direction: column; align-items: stretch; }
  .counter-box { min-width: 100%; }
  .filter-buttons { justify-content: center; }
}

/* ============ MAP ============ */
.map-section {
  background: var(--cream);
  padding: 0;
}
#map {
  width: 100%;
  height: 680px;
  background: #0d1320;
  border-radius: 0;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  #map { height: 500px; }
}

/* Leaflet Dark Mode Overrides */
.leaflet-container {
  background: #0d1320;
  font-family: 'DM Sans', sans-serif;
}
.leaflet-popup-content-wrapper {
  background: var(--navy-deep);
  color: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 0;
}
.leaflet-popup-content {
  margin: 0;
  min-width: 240px;
}
.leaflet-popup-tip {
  background: var(--navy-deep);
}
.leaflet-popup-close-button {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 20px !important;
  font-weight: 600;
  width: 28px !important;
  height: 28px !important;
  top: 8px !important;
  right: 8px !important;
}
.leaflet-popup-close-button:hover {
  color: var(--gold-light) !important;
}

/* Popup content styling */
.popup-content {
  padding: 20px;
}
.popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.popup-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(202, 163, 74, 0.15);
  border: 2px solid rgba(202, 163, 74, 0.3);
}
.popup-title {
  flex: 1;
}
.popup-city {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  margin: 0 0 2px;
}
.popup-plz {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}
.popup-cases {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.popup-cases-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.popup-summary {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 16px 0;
}
.popup-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.popup-date {
  font-weight: 500;
}
.popup-source {
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.popup-source:hover {
  color: var(--gold);
}

/* Custom marker styles */
.marker-pulse {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.12);
  }
}

/* New case blink animation */
.marker-new {
  animation: blink 1.8s ease-in-out 3;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Marker cluster styling (dark mode) */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
  background-color: rgba(202, 163, 74, 0.15) !important;
  border: 3px solid rgba(202, 163, 74, 0.5) !important;
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background-color: rgba(202, 163, 74, 0.3) !important;
  color: var(--gold-light) !important;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}

/* ============ INFO SECTION ============ */
.info-section {
  background: var(--white);
  padding: 64px 0;
}
.info-section h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 24px;
}
.info-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 820px;
}
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}
.cta-link:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 58, 95, 0.25);
}

/* ============ FOOTER ============ */
.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer h5 {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer li {
  margin-bottom: 10px;
}
.footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--gold-light);
}
.footer-logo {
  height: 60px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.footer-tagline {
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

@media (max-width: 480px) {
  .hero { padding: 56px 0 36px; }
  .controls { padding: 24px 0; }
  .filter-btn { padding: 10px 18px; font-size: 13px; }
  .counter-box { padding: 20px 24px; }
  .info-section { padding: 48px 0; }
}

/* === Zeitstrahl / Blitz-Radar === */
.custom-marker { transition: opacity .45s ease; }
.blip .marker-pulse { animation: blipflash .9s ease-out; }
@keyframes blipflash { 0% { transform: scale(2.6); } 55% { transform: scale(.92); } 100% { transform: scale(1); } }

/* Kompakter Zeitstrahl unter den Filter-Buttons */
.filter-buttons { flex-wrap: wrap; }
.tl-wrap { flex-basis: 100%; width: 100%; margin-top: 14px; }
.tl-bar { display: flex; align-items: center; gap: 10px; }
.tl-play {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: #caa34a; color: #17253e; font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s ease;
}
.tl-play:hover { background: #e0bf6e; }
.tl-slider { flex: 1; accent-color: #caa34a; height: 4px; cursor: pointer; min-width: 80px; }
.tl-speed {
  flex: none; border: 1px solid #d8d2c4; border-radius: 8px; padding: 5px 7px;
  font-size: 12px; background: #fff; color: #253a5f; cursor: pointer;
}
.tl-date { margin-top: 6px; text-align: right; font-size: 12px; color: #5a6577; font-variant-numeric: tabular-nums; }
