/* ==========================================================================
   Förderverein FF Ohlstedt e.V. – Basis-Stylesheet
   Reduziertes, modernes Design (Apple-inspiriert) mit Feuerwehr-Rot als Akzent
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f7;
  --color-text: #1d1d1f;
  --color-text-muted: #6e6e73;
  --color-border: #d2d2d7;
  --color-red: #af2b1e;
  --color-red-dark: #8f2118;
  --color-red-light: #c73427;
  --color-black: #0b0b0c;

  --nav-height: 64px;
  --max-width: 1400px;
  --radius: 18px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 12px);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ---------------------------------------------------------------- Typografie */

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}

p {
  margin: 0;
  line-height: 1.6;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 12px;
}

/* -------------------------------------------------------------- Navigation */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s var(--ease);
}

.nav__inner {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.nav__links {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
}

.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
  padding: 6px 2px;
  position: relative;
}

@media (hover: hover) {
  .nav__links a:hover {
    opacity: 1;
  }
}

.nav__links a.is-active {
  opacity: 1;
  color: var(--color-red);
}

.nav__cta {
  background: var(--color-red);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 0.88rem !important;
  opacity: 1 !important;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

@media (hover: hover) {
  .nav__cta:hover {
    background: var(--color-red-dark);
    transform: translateY(-1px);
  }
}

.nav__item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav__item.has-dropdown {
  /* Schließt die Hover-Lücke zum Dropdown darunter: ohne dieses Padding
     verlässt die Maus beim Runterfahren kurz den :hover-Bereich, bevor sie
     das Dropdown erreicht, wodurch es sofort wieder schließt. */
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.nav__item.has-dropdown > a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.6;
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav__dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem !important;
  opacity: 0.85;
  white-space: nowrap;
}

.nav__dropdown a.is-active {
  opacity: 1;
  background: var(--color-bg-alt);
  color: var(--color-red);
}

@media (hover: hover) {
  .nav__dropdown a:hover {
    opacity: 1;
    background: var(--color-bg-alt);
    color: var(--color-red);
  }
}

.nav__item.has-dropdown:focus-within .nav__dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: hover) {
  .nav__item.has-dropdown:hover .nav__dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

@media (hover: hover) {
  .theme-toggle:hover {
    border-color: var(--color-text-muted);
  }
}

.theme-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--color-text);
}

.theme-toggle__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ------------------------------------------------------------------- Hero */

.hero {
  /* svh (small viewport height, ohne Browser-UI) statt vh: auf iOS Safari
     kann sich vh live neu berechnen, wenn die Adressleiste beim Scrollen
     ein-/ausblendet -- die Seite "springt" dann kurz, und ein Fingertipp
     kann zwischen Antippen und Loslassen auf einem anderen Element landen
     als dem sichtbaren (z. B. eine Kachel unterhalb des Hero-Bereichs).
     vh bleibt als Fallback fuer Browser ohne svh-Unterstuetzung stehen. */
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background:
    radial-gradient(circle at 15% 20%, rgba(175, 43, 30, 0.10), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(175, 43, 30, 0.08), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
  position: relative;
  overflow: hidden;
}

.hero__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 4vw, 44px);
  width: 100%;
}

.hero__crest-top {
  width: clamp(140px, 15vw, 240px);
  height: clamp(140px, 15vw, 240px);
  object-fit: contain;
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 6vw, 64px);
  width: 100%;
}

.hero__content {
  flex: 1 1 50%;
  max-width: 560px;
}

.hero__visuals {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 480px;
}

.hero__map {
  display: block;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid var(--color-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hero__map--big {
  width: min(46vw, 460px);
  height: min(46vw, 460px);
  border-width: 6px;
}

@media (hover: hover) {
  .hero__map:hover {
    transform: scale(1.03);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  }
}

.hero__map iframe {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  border: 0;
  pointer-events: none;
}

.hero__map-credit {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: center;
}

.hero__map-credit a {
  color: inherit;
}

@media (max-width: 900px) {
  .hero__inner {
    flex-direction: column;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__content .lead {
    margin-inline: auto;
  }

  .hero__content .button-row {
    justify-content: center;
  }

  .hero__map--big {
    width: min(70vw, 340px);
    height: min(70vw, 340px);
  }
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--color-red);
}

.hero p.lead {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  max-width: 620px;
  margin-bottom: 36px;
}

.button-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s var(--ease);
  border: 1.5px solid transparent;
}

.btn--primary {
  background: var(--color-red);
  color: #fff;
}

@media (hover: hover) {
  .btn--primary:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(175, 43, 30, 0.28);
  }
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

@media (hover: hover) {
  .btn--secondary:hover {
    border-color: var(--color-text);
    transform: translateY(-2px);
  }
}

/* --------------------------------------------------------------- Sections */

.section {
  padding: clamp(72px, 10vw, 140px) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--dark {
  background: var(--color-black);
  color: #fff;
}

.section--dark p {
  color: rgba(255, 255, 255, 0.7);
}

.section__head {
  max-width: 680px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section__head.center {
  margin-inline: auto;
  text-align: center;
}

/* --------------------------------------------------------------- Grid/Cards */

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 40px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  }
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(175, 43, 30, 0.1);
  color: var(--color-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 1rem;
}

/* Dark cards on section--dark */
.section--dark .card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.section--dark .card__icon {
  background: rgba(175, 43, 30, 0.25);
  color: #ff6a5a;
}

/* ------------------------------------------------------------- Lebensweg */

/* Kacheln (.grid) und Zeitstrahl (.lebensweg) zeigen dieselben Infos, siehe
   public/index.php -- nur eine der beiden Varianten ist je Bildschirmbreite
   sichtbar (Kacheln aufs Handy, Zeitstrahl am Desktop). */
.grid--mobil-only {
  display: none;
}

.lebensweg--desktop-only {
  display: flex;
}

@media (max-width: 900px) {
  .grid--mobil-only {
    display: grid;
  }

  .lebensweg--desktop-only {
    display: none;
  }
}

.card__meta {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 10px;
}

.lebensweg {
  align-items: flex-start;
  gap: 0;
  margin-top: 40px;
  padding-top: 8px;
}

.lebensweg__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  width: 220px;
  padding: 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

@media (hover: hover) {
  .lebensweg__step:hover {
    background: var(--color-bg-alt);
    transform: translateY(-3px);
  }

  .lebensweg__step:hover .lebensweg__label {
    color: var(--color-red);
  }
}

.lebensweg__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-red);
  margin-bottom: 10px;
  box-shadow: 0 0 0 4px rgba(175, 43, 30, 0.15);
}

.lebensweg__dot--open {
  background: var(--color-black);
  box-shadow: 0 0 0 4px rgba(11, 11, 12, 0.12);
}

.lebensweg__age {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.lebensweg__label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
  margin-top: 4px;
  transition: color 0.2s var(--ease);
}

.lebensweg__text {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.lebensweg__hinweis {
  display: block;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.lebensweg__connector {
  flex: 1 1 auto;
  height: 2px;
  background: var(--color-border);
  margin-top: 19px;
  min-width: 24px;
}

.lebensweg__connector--open {
  background: linear-gradient(to right, var(--color-border), transparent);
}

/* ---------------------------------------------------- Zeitstrahl (vertikal) */

.zeitstrahl-v {
  display: flex;
  flex-direction: column;
}

.zeitstrahl-v__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding-bottom: 28px;
}

.zeitstrahl-v__row:last-child {
  padding-bottom: 0;
}

.zeitstrahl-v__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.zeitstrahl-v__jahr {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-text);
  margin-bottom: 8px;
  text-align: center;
}

.zeitstrahl-v__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-red);
  box-shadow: 0 0 0 4px rgba(175, 43, 30, 0.15);
  flex-shrink: 0;
  z-index: 1;
}

.zeitstrahl-v__marker::after {
  content: "";
  position: absolute;
  top: 30px;
  bottom: -28px;
  left: 50%;
  width: 2px;
  background: var(--color-border);
  transform: translateX(-50%);
}

.zeitstrahl-v__row:last-child .zeitstrahl-v__marker::after {
  display: none;
}

.zeitstrahl-v__kachel {
  display: block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  text-decoration: none;
  color: inherit;
}

a.zeitstrahl-v__kachel--link {
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

@media (hover: hover) {
  a.zeitstrahl-v__kachel--link:hover {
    transform: translateX(4px);
    border-color: var(--color-red);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  }
}

.zeitstrahl-v__kachel h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.zeitstrahl-v__kachel p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin: 0;
}

.zeitstrahl-v__mehr {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-red);
}

@media (max-width: 600px) {
  .zeitstrahl-v__row {
    grid-template-columns: 60px 1fr;
    gap: 14px;
  }

  .zeitstrahl-v__jahr {
    font-size: 0.78rem;
  }

  .zeitstrahl-v__kachel {
    padding: 14px 16px;
  }
}

/* --------------------------------------------------------- Recruit-Banner */

.recruit-banner {
  background: var(--color-red);
  color: #fff;
  text-align: center;
}

/* Folgt ein Hero direkt von einem Recruit-Banner (index.php, mitmachen.php,
   einsatzabteilung.php), wirkt das auf dem Desktop ohne zusaetzlichen Abstand
   optisch verbunden -- auf dem Handy trennt dort meist ein gestapeltes
   Element (z. B. die Karte im Home-Hero) schon sichtbar genug. Nur ab der
   Desktop-Breite (siehe .hero__inner-Breakpoint oben) noch etwas Luft
   ergaenzen, statt pro Seite einzeln mit der Hero-Hoehe zu tricksen. */
@media (min-width: 901px) {
  .hero + .recruit-banner {
    margin-top: clamp(24px, 5vh, 64px);
  }
}

.recruit-banner__inner {
  max-width: 720px;
  margin-inline: auto;
}

.recruit-banner h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 16px;
  color: #fff;
}

.recruit-banner p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
}

.recruit-banner .button-row {
  justify-content: center;
}

.recruit-banner .btn--primary {
  background: #fff;
  color: var(--color-red);
}

@media (hover: hover) {
  .recruit-banner .btn--primary:hover {
    background: var(--color-bg-alt);
    color: var(--color-red-dark);
    transform: translateY(-2px);
  }
}

/* ------------------------------------------------------------------ Notice */

.notice {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

.notice strong {
  color: var(--color-text);
}

/* --------------------------------------------------------- Einsatz-Statistik */

.einsatz-chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.einsatz-chart__row {
  display: grid;
  grid-template-columns: 52px 1fr 48px;
  align-items: center;
  gap: 12px;
}

.einsatz-chart__year {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
}

.einsatz-chart__live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-red);
  text-transform: uppercase;
  vertical-align: middle;
}

.einsatz-chart__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red);
  animation: einsatz-live-pulse 1.6s ease-in-out infinite;
}

@keyframes einsatz-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.einsatz-chart__bar {
  display: flex;
  height: 20px;
  min-width: 6px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-border);
  transition: width 0.6s var(--ease);
}

.einsatz-chart__seg {
  height: 100%;
}

.einsatz-chart__seg--ev {
  background: #2f7d46;
}

.einsatz-chart__seg--th {
  background: #3a6ea5;
}

.einsatz-chart__seg--bs {
  background: var(--color-red);
}

.einsatz-chart__seg--sonstiges {
  background: var(--color-text-muted);
}

.einsatz-chart__seg--offen {
  background: repeating-linear-gradient(135deg, #c98a2c 0 6px, #dba24d 6px 12px);
}

.einsatz-chart__seg--plain {
  background: var(--color-red-light);
  opacity: 0.6;
}

.einsatz-chart__total {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: right;
}

.einsatz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.einsatz-legend__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.einsatz-legend__dot--ev { background: #2f7d46; }
.einsatz-legend__dot--th { background: #3a6ea5; }
.einsatz-legend__dot--bs { background: var(--color-red); }
.einsatz-legend__dot--sonstiges { background: var(--color-text-muted); }
.einsatz-legend__dot--offen { background: #c98a2c; }

.einsatz-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.einsatz-table th,
.einsatz-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.einsatz-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.card__photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.vehicle-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: -8px;
  margin-bottom: 16px;
}

.vehicle-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.vehicle-specs__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vehicle-specs__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.vehicle-specs__value {
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 480px) {
  .vehicle-specs {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------- Map */

.map-frame {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* -------------------------------------------------------------- Stat teaser */

.stat-teaser {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 20px;
}

.stat-teaser__number {
  display: inline-block;
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-red);
  line-height: 1;
}

.stat-teaser__label {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.stat-teaser__number.is-updated {
  animation: stat-teaser-pulse 0.9s var(--ease);
}

@keyframes stat-teaser-pulse {
  0% { color: var(--color-red); }
  35% { color: var(--color-red-light); transform: scale(1.06); }
  100% { color: var(--color-red); }
}

/* ---------------------------------------------------------------- Persons */

.person {
  display: flex;
  align-items: center;
  gap: 16px;
}

.person__badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-red);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.person__name {
  font-weight: 600;
  font-size: 1.05rem;
}

.person__role {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.person__contact {
  font-size: 0.88rem;
  margin-top: 4px;
}

.person__contact a {
  color: var(--color-red);
  text-decoration: underline;
}

/* ------------------------------------------------------------------- CTA */

.cta {
  text-align: center;
  padding: clamp(72px, 10vw, 120px) 0;
  background: linear-gradient(135deg, var(--color-black), #1c1c1e);
  color: #fff;
}

.cta h2 {
  margin-bottom: 18px;
}

.cta p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 36px;
}

.cta .button-row {
  justify-content: center;
}

/* .cta hat immer einen zum umgebenden Theme invertierten Hintergrund (siehe
   Dark-Mode-Override unten), .btn--secondary muss darauf reagieren statt
   die normale --color-text zu nutzen, sonst Text/Rahmen unsichtbar. */
.cta .btn--secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

@media (hover: hover) {
  .cta .btn--secondary:hover {
    border-color: #fff;
  }
}

/* ---------------------------------------------------------------- Footer */

.footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.footer__brand {
  max-width: 320px;
}

.footer__brand .nav__brand {
  margin-bottom: 12px;
}

.footer__brand p {
  font-size: 0.9rem;
}

.footer__cols {
  display: flex;
  gap: clamp(32px, 6vw, 72px);
  flex-wrap: wrap;
}

.footer__col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.footer__col ul li {
  margin-bottom: 10px;
}

.footer__col a {
  font-size: 0.92rem;
  color: var(--color-text);
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
}

@media (hover: hover) {
  .footer__col a:hover {
    opacity: 1;
    color: var(--color-red);
  }
}

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------- Legal page */

.legal {
  padding-top: calc(var(--nav-height) + 64px);
  padding-bottom: 96px;
}

.legal .container {
  max-width: 820px;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 40px;
}

.legal h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  margin-top: 44px;
  margin-bottom: 14px;
}

.legal p, .legal li {
  color: var(--color-text);
  font-size: 1rem;
  margin-bottom: 12px;
}

.legal a:not(.btn) {
  color: var(--color-red);
  text-decoration: underline;
}

/* --------------------------------------------------------------- Reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* -------------------------------------------------------------- Responsive */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    /* Deutlich weniger durchsichtig als der 0.72-Wert der Kopfzeile: dieses
       Panel deckt beim Aufklappen einen grossen Teil des Bildschirms ab und
       muss die Menüpunkte unabhaengig vom durchscheinenden Seiteninhalt
       (z. B. Fotos) lesbar halten -- 0.72 war dafuer zu duenn. */
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 16px clamp(20px, 5vw, 48px) 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s var(--ease);
  }

  .nav__links a {
    width: 100%;
    padding: 12px 0;
  }

  .nav__item {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .nav__item.has-dropdown > a {
    width: 100%;
  }

  .nav__dropdown {
    position: static;
    opacity: 1;
    transform: none;
    /* pointer-events bleibt hier explizit "none" (wie die Basisregel oben,
       die sonst als einzige deklarierende Regel gewinnen wuerde): bei
       geschlossenem Menue liegt .nav__links (Elternelement) unsichtbar als
       position:fixed-Flaeche ueber der Seite -- ein "auto" hier wuerde die
       Dropdown-Links dort unsichtbar anklickbar machen, obwohl das Menue zu
       ist. Erst .nav.is-open weiter unten schaltet es wieder frei. */
    pointer-events: none;
    background: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    margin: 0 0 4px;
    padding: 0 0 0 16px;
    width: 100%;
  }

  .nav__dropdown a {
    padding: 8px 0;
    font-size: 0.88rem !important;
  }

  .nav.is-open .nav__links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav.is-open .nav__dropdown {
    pointer-events: auto;
  }

  .nav.is-open .nav__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav.is-open .nav__toggle span:nth-child(2) {
    opacity: 0;
  }
  .nav.is-open .nav__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .grid, .grid--2 {
    grid-template-columns: 1fr;
  }

  .footer__top {
    flex-direction: column;
  }
}

/*
 * Dunkelmodus: greift standardmäßig über die OS-Einstellung
 * (prefers-color-scheme), kann aber über den Schalter in der Navigation
 * (data-theme="dark"/"light" auf <html>, main.js) manuell erzwungen werden.
 * ":not([data-theme=\"light\"])" sorgt dafür, dass eine explizite
 * Hell-Wahl die OS-Einstellung übersteuert; der explizite Dark-Block
 * darunter greift unabhängig vom OS, sobald data-theme="dark" gesetzt ist.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #000000;
    --color-bg-alt: #111113;
    --color-text: #f5f5f7;
    --color-text-muted: #a1a1a6;
    --color-border: #2c2c2e;
    --color-black: #f5f5f7;
  }

  html:not([data-theme="light"]) .nav {
    background: rgba(0, 0, 0, 0.72);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  /* Nur im mobilen Breakpoint: dort ist .nav__links ein eigenes,
     volltransparentes Fixed-Panel (siehe @media max-width:720px weiter
     unten) und braucht einen eigenen Hintergrund. Auf Desktop-Breiten ist
     .nav__links nur eine unsichtbare Flex-Reihe innerhalb von .nav -- ein
     eigener Hintergrund hier wuerde (ohne Media-Query-Grenze, wie es vorher
     der Fall war) zusaetzlich auf den bereits transluzenten .nav-Hintergrund
     gemalt, wodurch zwei 0.72-Ebenen sich zu ~92% Deckkraft aufaddieren --
     das war der sichtbare dunklere Kasten genau um die Menuepunkte. */
  @media (max-width: 720px) {
    html:not([data-theme="light"]) .nav__links {
      background: rgba(0, 0, 0, 0.72);
    }
  }

  html:not([data-theme="light"]) .nav__dropdown {
    background: rgba(11, 11, 12, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
  }

  html:not([data-theme="light"]) .einsatz-chart__seg--ev {
    background: #3fa562;
  }

  html:not([data-theme="light"]) .einsatz-chart__seg--th {
    background: #5a94cf;
  }

  html:not([data-theme="light"]) .einsatz-legend__dot--ev {
    background: #3fa562;
  }

  html:not([data-theme="light"]) .einsatz-legend__dot--th {
    background: #5a94cf;
  }

  html:not([data-theme="light"]) .hero {
    background:
      radial-gradient(circle at 15% 20%, rgba(175, 43, 30, 0.18), transparent 45%),
      radial-gradient(circle at 85% 0%, rgba(175, 43, 30, 0.14), transparent 40%),
      linear-gradient(180deg, #000000 0%, #0b0b0c 100%);
  }

  html:not([data-theme="light"]) .card {
    background: #0b0b0c;
  }

  html:not([data-theme="light"]) .cta {
    background: linear-gradient(135deg, #f5f5f7, #d2d2d7);
    color: #0b0b0c;
  }

  html:not([data-theme="light"]) .cta p {
    color: rgba(11, 11, 12, 0.7);
  }

  html:not([data-theme="light"]) .cta .btn--secondary {
    color: #0b0b0c;
    border-color: rgba(11, 11, 12, 0.35);
  }

  @media (hover: hover) {
    html:not([data-theme="light"]) .cta .btn--secondary:hover {
      border-color: #0b0b0c;
    }
  }

  html:not([data-theme="light"]) .btn--secondary {
    color: var(--color-text);
  }

  html:not([data-theme="light"]) .section--dark {
    background: #0b0b0c;
  }
}

html[data-theme="dark"] {
  --color-bg: #000000;
  --color-bg-alt: #111113;
  --color-text: #f5f5f7;
  --color-text-muted: #a1a1a6;
  --color-border: #2c2c2e;
  --color-black: #f5f5f7;
}

html[data-theme="dark"] .nav {
  background: rgba(0, 0, 0, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Nur mobil noetig, siehe ausfuehrliche Begruendung bei der Analog-Regel
   oben in @media (prefers-color-scheme: dark). */
@media (max-width: 720px) {
  html[data-theme="dark"] .nav__links {
    background: rgba(0, 0, 0, 0.72);
  }
}

html[data-theme="dark"] .nav__dropdown {
  background: rgba(11, 11, 12, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .einsatz-chart__seg--ev {
  background: #3fa562;
}

html[data-theme="dark"] .einsatz-chart__seg--th {
  background: #5a94cf;
}

html[data-theme="dark"] .einsatz-legend__dot--ev {
  background: #3fa562;
}

html[data-theme="dark"] .einsatz-legend__dot--th {
  background: #5a94cf;
}

html[data-theme="dark"] .hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(175, 43, 30, 0.18), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(175, 43, 30, 0.14), transparent 40%),
    linear-gradient(180deg, #000000 0%, #0b0b0c 100%);
}

html[data-theme="dark"] .card {
  background: #0b0b0c;
}

html[data-theme="dark"] .cta {
  background: linear-gradient(135deg, #f5f5f7, #d2d2d7);
  color: #0b0b0c;
}

html[data-theme="dark"] .cta p {
  color: rgba(11, 11, 12, 0.7);
}

html[data-theme="dark"] .cta .btn--secondary {
  color: #0b0b0c;
  border-color: rgba(11, 11, 12, 0.35);
}

@media (hover: hover) {
  html[data-theme="dark"] .cta .btn--secondary:hover {
    border-color: #0b0b0c;
  }
}

html[data-theme="dark"] .btn--secondary {
  color: var(--color-text);
}

html[data-theme="dark"] .section--dark {
  background: #0b0b0c;
}

/* ----------------------------------------------------------- Admin-Bereich */

.admin-page {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 96px;
}

.admin-shell {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.admin-sidebar {
  flex: 0 0 200px;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-sidebar__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-sidebar__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.admin-sidebar__link {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--color-text);
  opacity: 0.8;
}

@media (hover: hover) {
  .admin-sidebar__link:hover {
    opacity: 1;
    background: var(--color-bg-alt);
  }
}

.admin-sidebar__link.is-active {
  opacity: 1;
  font-weight: 600;
  color: var(--color-red);
  background: var(--color-bg-alt);
}

.admin-main {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.admin-topbar h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.admin-user {
  position: relative;
  flex-shrink: 0;
}

.admin-user__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 980px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 500;
}

.admin-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-user__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-red);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}

.admin-user__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  padding: 10px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 1100;
}

.admin-user.is-open .admin-user__dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.admin-user__type {
  display: block;
  font-size: 0.76rem;
  color: var(--color-text-muted);
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 6px;
}

.admin-user__dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--color-text);
}

@media (hover: hover) {
  .admin-user__dropdown a:hover {
    background: var(--color-bg-alt);
  }
}

.admin-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 28px;
}

.admin-card h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.admin-table td {
  padding: 8px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.admin-field {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
}

.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.admin-badge--ev { background: #2f7d46; }
.admin-badge--th { background: #3a6ea5; }
.admin-badge--bs { background: var(--color-red); }
.admin-badge--offen { background: #c98a2c; }
.admin-badge--sonstiges { background: #6b6b70; }

.admin-notice {
  background: rgba(175, 43, 30, 0.08);
  border: 1px solid rgba(175, 43, 30, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
    width: 100%;
  }

  .admin-sidebar__group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .admin-sidebar__label {
    margin-bottom: 0;
  }
}

/* ------------------------------------------------------- Verleih-Lightbox */

.verleih-thumbs {
  display: inline-flex;
  flex-shrink: 0;
}

.verleih-thumb {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
}

.verleih-thumb--hidden {
  display: none;
}

.verleih-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verleih-thumb__count {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(11, 11, 12, 0.72);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
}

.verleih-lightbox {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(90vw, 720px);
  background: var(--color-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.verleih-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.verleih-lightbox__inner {
  position: relative;
  padding: 16px;
}

.verleih-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin-inline: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.verleih-lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 1.1rem;
  cursor: pointer;
}

.verleih-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(11, 11, 12, 0.55);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.verleih-lightbox__nav--prev {
  left: 8px;
}

.verleih-lightbox__nav--next {
  right: 8px;
}

.verleih-lightbox__count {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}
