/* ==========================================================================
   Fahrschule Schultjan – Stylesheet (globales Design-System)
   UI-Framework: Bootstrap 5.3 + Bootstrap Icons (CDN)
   Diese Datei enthält Design-Tokens, Layout (Header, Footer), die
   wiederverwendbaren Fahrschul-Komponenten und globale Effekte.
   Seitenspezifisches liegt in pages.css (Unterseiten) und home.css (Start).

   --------------------------------------------------------------------------
   KOMPONENTEN-BAUKASTEN „Straße & Verkehr“  (alle rein CSS, ohne JS)
   --------------------------------------------------------------------------

   .road-divider            Abschnitts-Trenner als Asphaltband mit
                            Randlinien und (langsam laufender) Leitlinie.
     <div class="road-divider" aria-hidden="true"></div>
     Modifier: --thin      schmales Band ohne Randlinien
               --rounded   abgerundete Enden (für Einsatz im .container)
               --static    Leitlinie steht still
               --car       kleines Fahrschulauto fährt ab und zu vorbei
     Variablen: --road-h (Höhe), --road-speed (Dauer eines Strichs)

   .sign                    Verkehrsschild-Badge, umschließt ein Icon oder
                            kurzen Text (1–3 Zeichen).
     <span class="sign sign--round">B</span>
     <span class="sign sign--warning"><i class="bi bi-exclamation-lg"></i></span>
     <span class="sign sign--info">P</span>
     Modifier: --round     weiß mit rotem Ring (Vorschrift/Tempo)
               --warning   Gefahrzeichen: Dreieck mit rotem Rand
               --info      blaues Quadrat mit weißer Innenlinie
               --priority  Vorfahrtstraße: gelbe Raute mit weißem Rand
               --sm / --lg / --xl   Größen (oder --sign-size: 3rem)
     Rein dekorativ: aria-hidden="true"; sonst role="img" aria-label="…".

   .plate                   Deutsches Kfz-Kennzeichen (weiß, schwarzer Rand,
                            blauer EU-Streifen mit „D“). Größe über font-size.
     <span class="plate">NOH<span class="plate-seal"></span>S 1965</span>
     Optional: .plate-seal (Plakette zwischen Kreis- und Buchstabenteil)
     Modifier: --sm / --lg

   .traffic-light           Mini-Ampel (rot/gelb/grün) als Deko oder Status.
     <span class="traffic-light is-green" role="img" aria-label="Ampel: grün"></span>
     Zustände: .is-red  .is-amber  .is-red.is-amber (Rot-Gelb)  .is-green
     Modifier: --h        waagerecht
               --cycle    schaltet automatisch rot → rot-gelb → grün → gelb
     Variable: --tl-size (Lampendurchmesser, Standard .7rem)

   .chip-class              Kompakte Pille für Führerscheinklassen.
     <span class="chip-class">B</span>
     <span class="chip-class">A2 <small>Motorrad</small></span>
     Zustände/Modifier: .is-active (rot gefüllt), --dark (für dunkle Flächen)

   .lane                    Senkrechte Fahrbahn für Zeitstrahlen/Abläufe.
     <ol class="lane">
       <li class="lane-stop" data-step="1">…</li>
       <li class="lane-stop">…</li>      (ohne data-step: runder Punkt)
     </ol>
     .lane-stop.is-done = rot gefüllte Markierung
     Variablen: --lane-gap (Abstand der Stationen)

   .has-grain               Feines Filmkorn über dunklen Flächen (nutzt ::after).

   --------------------------------------------------------------------------
   FOTOS – responsives Bild-Markup (Konvention für alle Seiten)
   --------------------------------------------------------------------------
   Dateien: /img/fotos/<name>-<640|1200|2000>.<jpg|webp> (EXIF entfernt).
   Maße 640/1200/2000 px breit; Seitenverhältnis 3:2 (640×427, 1200×800,
   2000×1333) außer: aussenansicht-strasse 16:9 (…×360/675/1125),
   fahrzeugflotte 4:3 (…×480/900/1500), motorrad-ausbildung-warnweste
   hochkant 3:4 (640×853, 1200×1600, 2000×2667).

     <picture>
       <source type="image/webp"
         srcset="/img/fotos/NAME-640.webp 640w, /img/fotos/NAME-1200.webp 1200w, /img/fotos/NAME-2000.webp 2000w"
         sizes="(min-width: 992px) 50vw, 100vw">
       <img src="/img/fotos/NAME-1200.jpg"
         srcset="/img/fotos/NAME-640.jpg 640w, /img/fotos/NAME-1200.jpg 1200w, /img/fotos/NAME-2000.jpg 2000w"
         sizes="(min-width: 992px) 50vw, 100vw"
         width="1200" height="800" alt="Deutscher, beschreibender Alt-Text"
         loading="lazy" decoding="async">
     </picture>

   - width/height = Maße der 1200er-Datei (verhindert Layout-Verschiebung;
     per CSS dann width:100%; height:auto bzw. object-fit:cover).
   - sizes = tatsächliche Anzeigebreite (container-max 1320 px beachten,
     z. B. "(min-width: 1400px) 640px, (min-width: 992px) 45vw, 100vw").
   - Nur Bilder im ersten Bildschirm: loading="eager" + fetchpriority="high".
   - Vergrößerbar: <picture> in <a href="…-2000.jpg" data-lightbox="gruppe"
     data-webp="…-2000.webp" data-caption="…" data-width="2000"
     data-height="1333"> einschließen (Lightbox-API: Kopf von app.js).

   Design-Tokens (Auswahl, siehe :root):
     Abstände --fs-space-1 … --fs-space-8 · Radien --fs-radius-xs/-sm/-/-lg/-pill
     Schatten --fs-shadow-sm/-/-lg · Schrift --fs-step--1 … --fs-step-5 (fluid)
     Kurven  --fs-ease-out, --fs-ease-spring · Fokus --fs-focus
     Straße  --fs-asphalt, --fs-asphalt-2, --fs-marking, --fs-sign-red,
             --fs-sign-blue(-dark), --fs-sign-yellow, --fs-plate-blue,
             --fs-amber, --fs-green · Korn --fs-grain
   ========================================================================== */

/* ---------- Theme-Tokens ---------- */

:root {
  /* Farbpalette: Führerschein – Rot, Weiß, Anthrazit
     Rot = Handlungsfarbe (Buttons, Akzente), Anthrazit = dunkle Flächen. */
  --fs-primary: #c8102e;          /* Rot – Hauptfarbe (Siegel/Stempel) */
  --fs-primary-dark: #a30d25;
  --fs-primary-light: #ff8a95;    /* Rot auf dunklem Grund (Kontrast ≥ 4.5:1) */
  --fs-primary-soft: rgba(200, 16, 46, .09);
  --fs-secondary: #1c1f24;        /* Anthrazit – Sekundärfläche */
  --fs-secondary-dark: #14171b;
  --fs-accent: #c8102e;           /* Rot – Häkchen/Akzent */
  --fs-navy: #1c1f24;             /* Anthrazit – dunkle Flächen */
  --fs-navy-2: #2a2f36;
  --fs-ink: #1a1d21;
  --fs-muted: #5a6169;
  --fs-line: #e2e5e8;
  --fs-soft: #f6f7f8;

  /* Straße & Verkehrszeichen */
  --fs-asphalt: #2b2f35;
  --fs-asphalt-2: #22252a;
  --fs-marking: rgba(255, 255, 255, .86);
  --fs-sign-red: #c8102e;
  --fs-sign-blue: #0f5aa6;
  --fs-sign-blue-dark: #0a4783;
  --fs-sign-yellow: #f7c21b;
  --fs-plate-blue: #003399;
  --fs-amber: #ffb020;
  --fs-green: #22c172;

  /* Abstände (4er-Raster) */
  --fs-space-1: .25rem;
  --fs-space-2: .5rem;
  --fs-space-3: .75rem;
  --fs-space-4: 1rem;
  --fs-space-5: 1.5rem;
  --fs-space-6: 2rem;
  --fs-space-7: 3rem;
  --fs-space-8: 4.5rem;

  /* Radien */
  --fs-radius-xs: 8px;
  --fs-radius-sm: 12px;
  --fs-radius: 18px;
  --fs-radius-lg: 26px;
  --fs-radius-pill: 999px;

  /* Schatten */
  --fs-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px -4px rgba(15, 23, 42, .08);
  --fs-shadow: 0 10px 30px -12px rgba(28, 31, 36, .22);
  --fs-shadow-lg: 0 28px 60px -28px rgba(28, 31, 36, .45);

  /* Bewegung */
  --fs-ease-out: cubic-bezier(.2, .7, .2, 1);
  --fs-ease-spring: cubic-bezier(.3, 1.4, .5, 1);

  /* Fokus-Ring (auf dunklen Flächen automatisch hell, siehe unten) */
  --fs-focus: #c8102e;

  /* Schriften */
  --fs-font-display: "Bricolage Grotesque", "Archivo", "Segoe UI", system-ui, sans-serif;
  --fs-font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Fluide Typo-Skala (360px → 1280px) */
  --fs-step--1: clamp(.82rem, .79rem + .12vw, .9rem);
  --fs-step-0: clamp(1rem, .97rem + .14vw, 1.0625rem);
  --fs-step-1: clamp(1.08rem, 1.03rem + .25vw, 1.2rem);
  --fs-step-2: clamp(1.25rem, 1.15rem + .45vw, 1.5rem);
  --fs-step-3: clamp(1.55rem, 1.33rem + 1vw, 2.25rem);
  --fs-step-4: clamp(2.1rem, 1.6rem + 2.3vw, 3.5rem);
  --fs-step-5: clamp(2.6rem, 1.9rem + 3.2vw, 4.5rem);

  /* Filmkorn (wiederverwendbar als background-image) */
  --fs-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Bootstrap-Variablen überschreiben */
  --bs-primary: #c8102e;
  --bs-primary-rgb: 200, 16, 46;
  --bs-link-color: #a30d25;
  --bs-link-color-rgb: 163, 13, 37;
  --bs-link-hover-color: #7d0a1c;
  --bs-body-color: #1a1d21;
  --bs-body-font-family: var(--fs-font-body);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.65;
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 18px;
  --bs-border-color: #e2e5e8;
}

/* ---------- Basis ---------- */

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }
/* Seitliche Einblend-Animationen dürfen nie horizontales Scrollen erzeugen
   (clip statt hidden, damit position: sticky weiter funktioniert) */
html, body { overflow-x: clip; }

body {
  -webkit-font-smoothing: antialiased;
  background: #fff;
  /* Kurze Seiten (404, Login): Footer sitzt trotzdem unten */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
#main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--fs-font-display);
  line-height: 1.1; letter-spacing: -.03em; font-weight: 700; text-transform: none;
  text-wrap: balance;
}
h1 { font-size: var(--fs-step-4); font-weight: 800; letter-spacing: -.04em; }
h2 { font-size: var(--fs-step-3); }
h3 { font-size: 1.12rem; letter-spacing: -.015em; }

/* Fließtext */
.lead, .hero-lead, .section-head p { font-family: var(--fs-font-body); }
p { text-wrap: pretty; }

a { text-underline-offset: 3px; }

::selection { background: var(--fs-primary); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1080;
  background: var(--fs-primary); color: #fff;
  padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2.5px solid var(--fs-focus); outline-offset: 3px; }
.btn:focus-visible { outline: 2.5px solid var(--fs-focus); outline-offset: 3px; box-shadow: none; }
/* Bootstrap ersetzt den Fokus bei Navigation, Akkordeon und Formularfeldern durch
   einen sehr blassen Schatten – hier überall der deutliche Fokus-Ring */
.site-header .nav-link:focus-visible,
.accordion-button:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
iframe:focus-visible { outline: 2.5px solid var(--fs-focus); outline-offset: 2px; }
.site-header .nav-link:focus-visible { box-shadow: none; }
/* Dunkle Flächen: heller Fokus-Ring für ausreichenden Kontrast */
.site-header, .site-footer, .hero, .page-hero, .section-dark, .cta-band, .card-glass { --fs-focus: var(--fs-primary-light); }

/* ---------- Buttons ---------- */

.btn { font-weight: 700; border-radius: 999px; padding: .6rem 1.35rem; }
.btn-lg { padding: .8rem 1.7rem; font-size: 1.02rem; }
.btn-sm { padding: .4rem .95rem; font-size: .875rem; }

.btn-brand {
  --bs-btn-bg: var(--fs-primary);
  --bs-btn-border-color: var(--fs-primary);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--fs-primary-dark);
  --bs-btn-hover-border-color: var(--fs-primary-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--fs-primary-dark);
  --bs-btn-active-border-color: var(--fs-primary-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--fs-primary);
  --bs-btn-disabled-border-color: var(--fs-primary);
  --bs-btn-disabled-color: #fff;
}

/* ---------- Header ---------- */

/* Oben: Anthrazit-Leiste, nahtlos zum dunklen Hero. Desktop: Navigation als
   Pille, die beim Scrollen als Glas-Pille über dem Inhalt schwebt.
   Handy: schmale Leiste + Vollbild-Menü (Steuerung in app.js). */
.site-header {
  z-index: 1030;
  background: var(--fs-navy);
  transition: background-color .3s ease, transform .4s var(--fs-ease-out);
}
.site-header .navbar { padding-block: .55rem; }

/* Glas-Hintergrund als Pseudo-Element, damit das fixierte Handy-Menü
   (Kind des Headers) nicht von backdrop-filter eingefangen wird */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(24, 27, 31, .82); opacity: 0;
  transition: opacity .3s ease;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header::before {
    background: rgba(24, 27, 31, .72);
    -webkit-backdrop-filter: saturate(170%) blur(16px);
    backdrop-filter: saturate(170%) blur(16px);
  }
}

/* Beim Runterscrollen ausblenden, beim Hochscrollen wieder zeigen */
.site-header.is-hidden { transform: translateY(-110%); }
.site-header:focus-within { transform: none; }

.site-header .navbar-brand { margin-right: 0; }
.site-header .navbar-brand .brand-logo { transition: transform .35s var(--fs-ease-spring); }
.site-header .navbar-brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }

/* Logo – Wortmarke mit S-Monogramm und Straßenflucht */
.brand-logo {
  display: block; flex: none;
  width: 42px; height: 42px; border-radius: 12px;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .55);
}
.brand-logo-sm { width: 38px; height: 38px; border-radius: 11px; }

.brand-name { font-size: 1rem; letter-spacing: -.01em; color: #fff; font-family: var(--fs-font-display); font-weight: 700; text-transform: none; }
.brand-sub { font-size: .72rem; color: rgba(225, 226, 228, .72); margin-top: .2rem; }

/* Offizielles Logo (2019, Schwarz-Box) – Ausschnitt ohne Web-Adresse:
   /img/logo-2019-header.png (472×132, 3×-Auflösung für 44 px Höhe) */
.brand-official { gap: .7rem; }
.brand-wordmark {
  display: block; flex: none;
  width: auto; height: 44px; aspect-ratio: 158 / 44;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 6px 16px -10px rgba(0, 0, 0, .8);
  transition: transform .35s var(--fs-ease-spring), box-shadow .3s ease;
}
.site-header .brand-official:hover .brand-wordmark {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 0 1px rgba(255, 138, 149, .45), 0 10px 20px -10px rgba(0, 0, 0, .9);
}
.brand-sub--official {
  margin: 0; padding-left: .7rem;
  border-left: 1px solid rgba(255, 255, 255, .16);
  font-size: .7rem; line-height: 1.25; letter-spacing: .02em;
  color: rgba(225, 226, 228, .66); white-space: nowrap;
}
/* Unterzeile nur, wenn Platz ist (ab 1200 px) */
@media (max-width: 1199.98px) { .brand-sub--official { display: none; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .brand-wordmark { height: 40px; } }
@media (max-width: 991.98px) { .brand-wordmark { height: 40px; } }
@media (max-width: 379.98px) { .brand-wordmark { height: 36px; } }

.site-header .nav-link {
  position: relative;
  font-family: var(--fs-font-body);
  font-weight: 500; color: rgba(255, 255, 255, .8);
  transition: color .2s ease, background-color .2s ease;
}
.site-header .nav-link:hover,
.site-header .nav-link:focus-visible,
.site-header .nav-link.active { color: #fff; }
.nav-index { display: none; }

/* Hamburger → X */
.nav-toggle {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff;
  transition: background-color .2s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, .14); }
.nav-toggle:focus { box-shadow: none; }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .3s var(--fs-ease-out), background-color .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after { transform: translateY(6px); width: 13px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: rotate(-45deg); width: 20px; }

/* --- Desktop: schwebende Glas-Pille --- */
@media (min-width: 992px) {
  .site-header .navbar { padding-block: .6rem; }
  .site-header .navbar > .container {
    padding: .4rem .45rem .4rem .7rem;
    border-radius: var(--fs-radius-pill);
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
  }
  .site-header.is-scrolled { background: transparent; pointer-events: none; }
  .site-header.is-scrolled .navbar > .container {
    pointer-events: auto;
    background: rgba(24, 27, 31, .9);
    border-color: rgba(255, 255, 255, .1);
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .site-header.is-scrolled .navbar > .container {
      background: rgba(24, 27, 31, .72);
      -webkit-backdrop-filter: saturate(170%) blur(16px);
      backdrop-filter: saturate(170%) blur(16px);
    }
  }

  .site-header .nav-link {
    font-size: .94rem; padding: .5rem .95rem !important;
    border-radius: var(--fs-radius-pill);
  }
  .site-header .nav-link:hover { background: rgba(255, 255, 255, .07); }
  .site-header .nav-link.active { background: rgba(255, 255, 255, .1); }
  /* Aktiver Punkt: kurzer roter Strich wie eine Fahrbahnmarkierung */
  .site-header .nav-link::after {
    content: ""; position: absolute; left: 50%; bottom: .28rem;
    width: 14px; height: 2px; margin-left: -7px; border-radius: 2px;
    background: var(--fs-primary-light);
    transform: scaleX(0);
    transition: transform .3s var(--fs-ease-out);
  }
  .site-header .nav-link:hover::after { transform: scaleX(.5); }
  .site-header .nav-link.active::after { transform: scaleX(1); }
  .site-header .nav-item-cta .btn { padding: .5rem 1.05rem; }
}

/* Acht Menüpunkte: Pille zwischen 992 und 1400px schrittweise kompakter,
   damit alles in eine Zeile passt (Umschalten aufs Vollbild-Menü bleibt bei 992px,
   passend zu app.js) */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .site-header .nav-link { font-size: .9rem; padding: .5rem .72rem !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .site-header .navbar > .container { padding-left: .55rem; }
  .site-header .navbar-brand { gap: .4rem !important; }
  .site-header .brand-sub { display: none; }
  .site-header .navbar-nav { gap: 0 !important; }
  .site-header .nav-link { font-size: .85rem; padding: .45rem .52rem !important; }
  .site-header .nav-link::after { bottom: .2rem; }
  .site-header .nav-item-cta { margin-left: .3rem !important; }
  .site-header .nav-item-cta .btn { padding: .5rem .72rem; }
  /* WhatsApp-Knopf nur als Symbol – Text bleibt für Screenreader erhalten */
  .site-header .nav-cta-label {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}

/* --- Handy/Tablet: Leiste + Vollbild-Menü --- */
@media (max-width: 991.98px) {
  .site-header.is-scrolled::before { opacity: 1; }
  .site-header.is-scrolled { background: transparent; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .75); }
  .site-header .navbar-brand { position: relative; z-index: 2; }

  .site-header .navbar-collapse {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: stretch;
    padding: 5.25rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overscroll-behavior: contain;
    background:
      radial-gradient(600px 320px at 100% 0%, rgba(200, 16, 46, .28), transparent 70%),
      var(--fs-navy);
  }
  .site-header .navbar-collapse.show { display: flex; animation: nav-in .35s var(--fs-ease-out) both; }
  .site-header .navbar-collapse.is-closing { animation: nav-out .22s ease both; }

  .site-header .navbar-nav { gap: 0; align-items: stretch !important; margin: 0 !important; }
  .site-header .navbar-nav .nav-item { animation: nav-item-in .5s var(--fs-ease-out) both; }
  .site-header .navbar-nav .nav-item:nth-child(1) { animation-delay: .04s; }
  .site-header .navbar-nav .nav-item:nth-child(2) { animation-delay: .08s; }
  .site-header .navbar-nav .nav-item:nth-child(3) { animation-delay: .12s; }
  .site-header .navbar-nav .nav-item:nth-child(4) { animation-delay: .16s; }
  .site-header .navbar-nav .nav-item:nth-child(5) { animation-delay: .2s; }
  .site-header .navbar-nav .nav-item:nth-child(6) { animation-delay: .24s; }
  .site-header .navbar-nav .nav-item:nth-child(7) { animation-delay: .28s; }
  .site-header .navbar-nav .nav-item:nth-child(8) { animation-delay: .32s; }
  .site-header .navbar-nav .nav-item:nth-child(9) { animation-delay: .36s; }

  .site-header .nav-link {
    display: flex; align-items: baseline; gap: 1rem;
    padding: .55rem 0 !important;
    font-family: var(--fs-font-display); font-weight: 700;
    font-size: clamp(1.6rem, 7.2vw, 2.3rem); letter-spacing: -.035em; line-height: 1.15;
    color: rgba(255, 255, 255, .78);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .site-header .nav-link:hover { color: #fff; }
  .nav-index {
    display: inline-block; min-width: 1.6rem;
    font-family: var(--fs-font-body); font-size: .8rem; font-weight: 700;
    letter-spacing: .08em; color: var(--fs-primary-light);
    transform: translateY(-.55em);
  }
  .site-header .nav-link.active { color: #fff; }
  .site-header .nav-link.active .nav-index { color: #fff; }
  .site-header .nav-link.active::after {
    content: ""; align-self: center; width: 10px; height: 10px; margin-left: auto; border-radius: 50%;
    background: var(--fs-primary); box-shadow: 0 0 0 4px rgba(200, 16, 46, .25);
  }
  .site-header .nav-item-cta { margin-top: 1.5rem; }
  .site-header .nav-item-cta .btn { padding: .95rem 1.2rem; font-size: 1.05rem; }

  .nav-extra {
    display: grid; gap: .6rem; margin-top: auto; padding-top: 2rem;
    animation: nav-item-in .5s var(--fs-ease-out) .4s both;
  }
  .nav-extra .road-divider { margin-bottom: .9rem; }
  .nav-extra-link {
    display: inline-flex; align-items: center; gap: .6rem;
    color: #fff; text-decoration: none; font-weight: 600; font-size: 1.02rem;
  }
  .nav-extra-link i { color: var(--fs-primary-light); }
  .nav-extra-meta { font-size: .85rem; color: rgba(255, 255, 255, .55); }

  @media (max-height: 760px) {
    .site-header .nav-link { font-size: clamp(1.35rem, 6vw, 1.9rem); padding: .4rem 0 !important; }
    .site-header .nav-item-cta { margin-top: 1rem; }
    .nav-extra { padding-top: 1.25rem; }
  }

  /* Geöffnetes Menü: Seite steht still, schwebende Knöpfe weg */
  html.nav-open { overflow: hidden; }
  body.nav-open .fab,
  body.nav-open .to-top,
  body.nav-open .scroll-progress { opacity: 0 !important; visibility: hidden !important; }
}

@keyframes nav-in { from { opacity: 0; clip-path: circle(0 at calc(100% - 2.5rem) 2.2rem); } to { opacity: 1; clip-path: circle(150% at calc(100% - 2.5rem) 2.2rem); } }
@keyframes nav-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes nav-item-in { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* Ohne JavaScript: Menü auf kleinen Screens einfach anzeigen */
@media (scripting: none) and (max-width: 991.98px) {
  .site-header .navbar-collapse { display: block; position: static; padding: 1rem 0; background: none; }
  .nav-toggle { display: none; }
}

/* ---------- Seiten-Hero (Unterseiten) ---------- */

.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--fs-navy);
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2.75rem, 6vw, 4.5rem);
}
.page-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--fs-primary); z-index: 3;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(760px 380px at 82% -20%, rgba(200, 16, 46, .26), transparent 68%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; margin-bottom: .75rem; }
.page-hero p { color: rgba(255, 255, 255, .8); max-width: 62ch; margin-bottom: 0; font-size: 1.05rem; }
.page-hero .kicker { color: var(--fs-primary-light); }

/* Breadcrumb */
.page-hero .crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .82rem; color: rgba(255, 255, 255, .6); margin-bottom: 1rem; }
.page-hero .crumbs a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.page-hero .crumbs a:hover { color: #fff; text-decoration: underline; }
.page-hero .crumbs .sep { opacity: .5; }

/* ---------- Abschnitte ---------- */

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-page { padding-top: clamp(2.5rem, 5vw, 4rem); }
.section-soft { background: var(--fs-soft); }
.section-dark { background: var(--fs-navy); color: #e2e8f0; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(232, 234, 236, .8); }

.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--fs-muted); font-size: 1.05rem; margin-bottom: 0; }
.section-dark .section-head p { color: rgba(232, 234, 236, .75); }

/* Nummerierte Abschnitte – gibt der Seite einen roten Faden statt Aneinanderreihung */
.section-head[data-num] { position: relative; padding-left: 3.4rem; }
.section-head[data-num]::before {
  content: attr(data-num);
  position: absolute; left: 0; top: -.15rem;
  font-family: var(--fs-font-display); font-size: .98rem; font-weight: 800;
  color: var(--fs-ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  /* wie ein Tempo-Schild: weiß mit rotem Ring */
  background: #fff; border: 4px solid var(--fs-sign-red);
  box-shadow: 0 0 0 1.5px #fff, 0 6px 14px -8px rgba(0, 0, 0, .45);
}
.section-head.center[data-num] { padding-left: 0; padding-top: 3.1rem; }
.section-head.center[data-num]::before { left: 50%; top: 0; transform: translateX(-50%); }

.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fs-primary); margin-bottom: .6rem;
}
/* Kurze Leitlinie vor dem Kicker – Straßenmarkierung als Leitmotiv */
.kicker::before {
  content: ""; flex: none; width: 1.35rem; height: 2px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 7px, transparent 7px 10px);
}
.section-head.center .kicker::after {
  content: ""; flex: none; width: 1.35rem; height: 2px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 7px, transparent 7px 10px);
}

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

.hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--fs-navy);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6.5rem);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 460px at 78% -15%, rgba(200, 16, 46, .3), transparent 68%);
}
/* Roter Akzentbalken links – setzt den Blickpunkt auf die Überschrift */
.hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--fs-primary); z-index: 3;
}
.hero .container { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7); margin-bottom: 1.25rem;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fs-primary); }

.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero-lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: rgba(255, 255, 255, .82); max-width: 34ch; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; letter-spacing: -.02em; }
.hero-stats span { font-size: .85rem; color: rgba(255, 255, 255, .65); }

/* Führerschein-Siegel – das Erkennungszeichen der Seite */
.hero-seal {
  position: absolute; top: -34px; right: -18px;
  width: 104px; height: 104px; color: #ff8a95;
  transform: rotate(-8deg);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
  pointer-events: none;
}
.hero-seal svg { width: 100%; height: 100%; display: block; }
.hero-seal .seal-text {
  font-family: var(--fs-font-body); font-size: 8.2px; font-weight: 700;
  letter-spacing: .16em; fill: currentColor; opacity: .85;
}
.hero-seal .seal-big {
  font-family: var(--fs-font-display); font-size: 34px; font-weight: 800;
  fill: #fff; letter-spacing: -.03em;
}
.hero-seal .seal-small {
  font-family: var(--fs-font-body); font-size: 7.5px; font-weight: 700;
  letter-spacing: .22em; fill: currentColor; opacity: .8;
}
/* ---------- Karten ---------- */

.card {
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  background: #fff;
}
.card .card-body { padding: 1.6rem; }
.card p { color: var(--fs-muted); font-size: .95rem; }

.feature-card:hover,
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -22px rgba(28, 31, 36, .3);
  border-color: rgba(200, 16, 46, .28);
}

/* Akzentlinie oben auf Feature-Karten */
.feature-card { position: relative; overflow: hidden; }
.feature-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--fs-primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.feature-card:hover::before { transform: scaleX(1); }

.card-glass {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .15);
  box-shadow: none;
}
.card-glass p { color: rgba(232, 234, 236, .78); }

.icon-badge {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--fs-primary-soft); color: var(--fs-primary-dark); margin-bottom: 1rem;
  font-size: 1.2rem;
}

/* ---------- Preise ---------- */

.price-table { font-size: .96rem; margin-bottom: 0; }
.price-table caption { caption-side: top; text-align: left; font-weight: 800; padding-bottom: .75rem; font-size: 1.05rem; color: var(--fs-ink); }
.price-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--fs-muted); font-weight: 700; }
.price-table td:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
.price-table tbody tr:hover > * { background: var(--fs-soft); }

/* ---------- Team ---------- */

.team-card { overflow: hidden; }
.team-card .card-body { padding: 1.4rem; text-align: center; }
.team-photo {
  aspect-ratio: 4 / 3; background: linear-gradient(135deg, #2a2f36, #1c1f24);
  display: grid; place-items: center; color: rgba(255, 255, 255, .5); font-size: 3rem; font-weight: 800;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-body h3 { margin-bottom: .1rem; }
.team-body .role { color: var(--fs-primary); font-weight: 700; font-size: .9rem; }
.team-body .classes { color: var(--fs-muted); font-size: .88rem; margin: .35rem 0 .9rem; }
.team-body .contact { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.team-body .contact a { color: var(--fs-ink); text-decoration: none; }
.team-body .contact a:hover { color: var(--fs-primary-dark); text-decoration: underline; }

/* ---------- Theoriekurse ---------- */

.course-list { display: grid; gap: .75rem; }
.course {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 1rem; align-items: center;
  background: #fff; border: 1px solid var(--fs-line); border-radius: var(--fs-radius);
  padding: 1rem 1.25rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.course .month { font-weight: 800; }
.course .dates { color: var(--fs-muted); font-size: .93rem; font-variant-numeric: tabular-nums; }
.course .note { font-size: .78rem; font-weight: 700; color: var(--fs-primary-dark); background: var(--fs-primary-soft); padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }

.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.schedule li { display: flex; justify-content: space-between; padding: .55rem .9rem; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: .93rem; }
.section:not(.section-dark) .schedule li { background: var(--fs-soft); }

/* ---------- FAQ / Accordion ---------- */

.faq { max-width: 820px; }
.faq .accordion-item {
  border: 1px solid var(--fs-line); border-radius: var(--fs-radius) !important;
  margin-bottom: .75rem; overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.faq .accordion-button { font-weight: 700; color: var(--fs-ink); background: #fff; padding: 1rem 1.25rem; }
.faq .accordion-button:not(.collapsed) { color: var(--fs-primary-dark); background: var(--fs-primary-soft); box-shadow: none; }
.faq .accordion-button:focus { box-shadow: 0 0 0 4px var(--fs-primary-soft); }
.faq .accordion-body { color: var(--fs-muted); font-size: .95rem; }

/* ---------- Formulare ---------- */

/* Erfolgs-/Fehlermeldungen im Seitenfarbschema statt Bootstrap-Grün */
.alert { border-radius: var(--fs-radius-sm); border-width: 1px; font-size: .95rem; }
.alert-success {
  background: var(--fs-primary-soft); border-color: rgba(200, 16, 46, .25);
  color: var(--fs-primary-dark);
}
.alert-success .alert-link { color: var(--fs-primary-dark); }
.alert-danger { background: #fdf0f2; border-color: rgba(200, 16, 46, .3); color: var(--fs-primary-dark); }

.form-card {
  background: #fff; border: 1px solid var(--fs-line); border-radius: var(--fs-radius);
  padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--fs-shadow);
}
.form-label { font-weight: 700; font-size: .9rem; }
.req { color: var(--fs-primary); }
.form-control, .form-select { padding: .7rem .95rem; font-size: .97rem; border-radius: var(--fs-radius-sm); }
.form-control:focus, .form-select:focus {
  border-color: var(--fs-primary);
  box-shadow: 0 0 0 4px var(--fs-primary-soft);
}
.form-check-input:checked { background-color: var(--fs-primary); border-color: var(--fs-primary); }
.form-check-input:focus { border-color: var(--fs-primary); box-shadow: 0 0 0 4px var(--fs-primary-soft); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Kontakt ---------- */

.contact-item { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--fs-line); }
.contact-item:first-child { padding-top: 0; }
.contact-item:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-item .icon-badge { margin: 0; flex: none; width: 42px; height: 42px; }
.contact-item strong { display: block; font-size: .95rem; }
.contact-item span, .contact-item a { font-size: .93rem; color: var(--fs-muted); }

.map-embed { border-radius: var(--fs-radius); overflow: hidden; border: 1px solid var(--fs-line); margin-top: 1.5rem; }
.map-embed iframe { display: block; width: 100%; height: 320px; border: 0; }

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

.cta-band {
  position: relative; overflow: hidden;
  background: var(--fs-navy);
  color: #fff; border-radius: var(--fs-radius); padding: clamp(2rem, 4vw, 3rem);
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between;
  border-left: 5px solid var(--fs-primary);
}
.cta-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  border-radius: 50%; border: 40px solid rgba(255, 255, 255, .04); pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: .3rem; }
.cta-band p { color: rgba(255, 255, 255, .72); margin: 0; }
.cta-band .btn-light { color: var(--fs-navy); font-weight: 700; }
.cta-band .btn-outline-light { border-color: rgba(255, 255, 255, .35); }
.cta-band .btn-outline-light:hover { background: #fff; color: var(--fs-navy); border-color: #fff; }

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

/* Asphalt: oben ein Fahrbahnband, darunter dunkle Fläche mit feinem Korn,
   unten die Kennzeichen-Signatur */
.site-footer {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1c1f24 0%, #121417 100%);
  color: rgba(232, 234, 236, .78);
  padding: 0;
  font-size: .95rem;
  --fs-focus: var(--fs-primary-light);
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 320px at 12% 0%, rgba(200, 16, 46, .16), transparent 65%);
}
/* Feines Korn wie Asphalt */
.site-footer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--fs-grain) 0 0 / 160px 160px; opacity: .06; mix-blend-mode: overlay;
}
.site-footer .container { position: relative; z-index: 2; padding-top: clamp(2.75rem, 5.5vw, 4.25rem); }
.site-footer > .road-divider { position: relative; z-index: 2; }

.footer-top {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1.4fr 1fr 1fr .8fr;
  padding-bottom: 2.5rem;
}

.footer-logo { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; margin-bottom: 1rem; }
.footer-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.footer-logo-text strong { font-family: var(--fs-font-display); font-size: 1.05rem; color: #fff; letter-spacing: -.01em; }
.footer-logo-text small { font-size: .74rem; color: rgba(232, 234, 236, .6); }
.footer-logo--official { flex-direction: column; align-items: flex-start; gap: .55rem; }
.footer-wordmark {
  display: block; width: auto; height: 50px; aspect-ratio: 180 / 50;
  border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1);
  transition: transform .35s var(--fs-ease-spring);
}
.footer-logo--official:hover .footer-wordmark { transform: translateY(-2px); }
.footer-logo-sub { font-size: .74rem; letter-spacing: .02em; color: rgba(232, 234, 236, .6); }

.footer-claim { color: rgba(232, 234, 236, .7); font-size: .93rem; max-width: 34ch; margin-bottom: 1.25rem; }

.footer-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .9rem; color: #fff; text-decoration: none;
  padding: .6rem 1.15rem; border-radius: var(--fs-radius-pill);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .2);
  transition: background .2s ease, border-color .2s ease, gap .2s ease;
}
.footer-cta:hover { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; gap: .8rem; }

.footer-title {
  font-family: var(--fs-font-display); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .12em; font-weight: 700; color: #fff; margin-bottom: 1.1rem;
}

.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: rgba(232, 234, 236, .74); }
.footer-list li > i { color: var(--fs-primary-light); font-size: .95rem; margin-top: .18rem; flex: none; }
.footer-list a { color: rgba(232, 234, 236, .8); text-decoration: none; transition: color .15s ease; }
.footer-list a:hover { color: #fff; }

/* Fehlerseiten (404/500) bekommen vom Server keine Texte/Öffnungszeiten –
   dann leere Bausteine ausblenden statt Lücken zu zeigen */
.footer-claim:empty { display: none; }
.footer-col:has(.footer-hours):not(:has(.footer-hours li)) { display: none; }
.footer-hours { gap: .8rem; }
.footer-hours li { flex-direction: column; gap: .05rem; line-height: 1.4; }
.footer-hours li span:first-child { color: rgba(232, 234, 236, .88); font-weight: 500; }
.footer-hours li span:last-child { color: rgba(232, 234, 236, .62); font-size: .88rem; font-variant-numeric: tabular-nums; }

.footer-links li { display: block; }
.footer-links a { position: relative; padding-left: 0; transition: padding-left .18s ease, color .15s ease; }
.footer-links a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 2px;
  background: repeating-linear-gradient(90deg, var(--fs-primary-light) 0 4px, transparent 4px 6px);
  transform: translateY(-50%);
  transition: width .18s ease;
}
.footer-links a:hover { padding-left: 1.1rem; color: #fff; }
.footer-links a:hover::before { width: .8rem; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.25rem;
  /* rechts/unten Platz für Maxi (unten rechts) und WhatsApp (unten links), damit
     die schwebenden Buttons am Seitenende keine Links verdecken */
  padding: 1.25rem 13rem 5.5rem 0; border-top: 1px dashed rgba(255, 255, 255, .14);
  font-size: .82rem; color: rgba(232, 234, 236, .58);
}
.footer-signature { display: inline-flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.footer-signature .plate { font-size: .9rem; transform: rotate(-2deg); transition: transform .35s var(--fs-ease-spring); }
.footer-signature:hover .plate { transform: rotate(0deg) scale(1.04); }
.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom-links a { color: rgba(232, 234, 236, .66); text-decoration: none; }
.footer-bottom-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Floating WhatsApp (unten links – rechts sitzt die Online-Anmeldung „Maxi“) ---------- */

.fab {
  position: fixed; left: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 1040;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--fs-primary); color: #fff; font-size: 1.35rem;
  box-shadow: 0 12px 28px -10px rgba(200, 16, 46, .75);
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), background .15s ease;
  animation: fab-in .6s cubic-bezier(.3, 1.4, .5, 1) .8s both;
}
/* Pulsierender Ring – lenkt dezent den Blick auf den WhatsApp-Kontakt */
.fab::before, .fab::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 2px solid var(--fs-primary);
  animation: fab-pulse 2.8s cubic-bezier(.2, .6, .3, 1) 2s 3 both;
}
.fab::after { display: none; }
.fab i { position: relative; transition: transform .3s ease; }
.fab:hover { transform: scale(1.08); color: #fff; background: var(--fs-primary-dark); }
.fab:hover i { transform: rotate(-12deg); }
.fab:hover::before, .fab:hover::after { animation-play-state: paused; opacity: 0; }

@keyframes fab-pulse {
  0%   { transform: scale(1); opacity: .7; }
  70%  { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}
@keyframes fab-in {
  from { transform: scale(.4) translateY(20px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

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

/* Varianten über data-reveal="up|left|right|zoom|blur" (Standard: up),
   Verzögerung über data-reveal-delay="<ms>" bzw. automatisch gestaffelt (app.js) */
.reveal {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1), filter .6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal[data-reveal="left"]  { transform: translate3d(-32px, 0, 0); }
.reveal[data-reveal="right"] { transform: translate3d(32px, 0, 0); }
.reveal[data-reveal="zoom"]  { transform: scale(.94); }
.reveal[data-reveal="blur"]  { transform: translate3d(0, 10px, 0); filter: blur(10px); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
/* Nach dem Einblenden: keine Verzögerung mehr und wieder normale Hover-Übergänge
   (sonst überschreibt .reveal die Karten-Transition für Schatten/Rahmen) */
.reveal.is-revealed {
  transition: opacity .3s ease, transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease, border-color .3s ease, filter .3s ease;
  transition-delay: 0ms;
}

/* Ohne JavaScript bleiben Inhalte sichtbar */
@media (max-width: 767.98px) {
  .reveal[data-reveal="left"]  { transform: translate3d(-16px, 0, 0); }
  .reveal[data-reveal="right"] { transform: translate3d(16px, 0, 0); }
  .reveal.is-visible[data-reveal] { transform: none; }
}

@media (scripting: none) {
  .reveal { opacity: 1; transform: none; filter: none; }
}

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

.admin-tabs .nav-link { border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--fs-muted); border: 1px solid var(--fs-line); }
.admin-tabs .nav-link.is-active { background: var(--fs-navy); color: #fff; border-color: var(--fs-navy); }

.inquiry { border: 1px solid var(--fs-line); border-radius: var(--fs-radius); padding: 1.25rem; margin-bottom: 1rem; background: #fff; }
.inquiry header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.inquiry .meta { font-size: .85rem; color: var(--fs-muted); }
.inquiry .msg { white-space: pre-wrap; background: var(--fs-soft); padding: .9rem; border-radius: 10px; font-size: .93rem; }
.inquiry .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }
.inquiry .actions form { display: inline; }

.badge { font-size: .75rem; font-weight: 800; padding: .3rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.badge-neu { background: #fdf0f2; color: #a30d25; }
.badge-in_bearbeitung { background: #eef0f2; color: #2a2f36; }
.badge-erledigt { background: #1c1f24; color: #fff; }

/* Admin: Untertabs */
.admin-tabs-sub { margin-bottom: 1.25rem; }
.admin-tabs-sub .nav-link { font-size: .85rem; padding: .35rem .85rem; }

/* Admin: Tabellen mit Aktionen */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table > tbody > tr > td { padding: .75rem .5rem; border-bottom: 1px solid var(--fs-line); vertical-align: middle; }
.admin-table > tbody > tr:last-child > td { border-bottom: 0; }
.admin-table .form-control, .admin-table .form-select { font-size: .9rem; }
.admin-table .is-inactive { opacity: .55; }

.admin-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.admin-actions form { display: inline; margin: 0; }
.admin-actions .btn { padding: .2rem .5rem; font-size: .8rem; line-height: 1.2; }

/* Admin: "Neuer Eintrag"-Bereich */
.admin-new { border: 1px dashed var(--fs-line); border-radius: var(--fs-radius); background: #fff; margin-bottom: 1.5rem; }
.admin-new > summary { cursor: pointer; padding: .9rem 1.25rem; font-weight: 700; color: var(--fs-navy); list-style: none; }
.admin-new > summary::-webkit-details-marker { display: none; }
.admin-new > summary::before { content: "+"; display: inline-block; width: 1.25rem; font-weight: 800; }
.admin-new[open] > summary::before { content: "–"; }
.admin-new[open] > summary { border-bottom: 1px solid var(--fs-line); }
.admin-new-body { padding: 1.25rem; }

/* Admin: Einstellungen */
.admin-settings .form-label { font-weight: 600; font-size: .85rem; margin-bottom: .25rem; }
.admin-settings .form-text { font-size: .78rem; }

/* Admin: Bildauswahl */
.img-picker { border: 1px solid var(--fs-line); border-radius: var(--fs-radius-sm); padding: .85rem; background: var(--fs-soft); }
.img-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; margin-bottom: .85rem; }
.img-tile {
  position: relative; display: block; cursor: pointer; margin: 0;
  border: 2px solid transparent; border-radius: 10px; overflow: hidden;
  background: #fff; aspect-ratio: 4 / 3;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.img-tile:hover { border-color: var(--fs-primary); }
.img-tile input { position: absolute; opacity: 0; pointer-events: none; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-tile:has(input:checked) { border-color: var(--fs-primary); box-shadow: 0 0 0 3px var(--fs-primary-soft); }
.img-tile:has(input:focus-visible) { outline: 3px solid var(--fs-primary); outline-offset: 2px; }
.img-tile-none { display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--fs-muted); text-align: center; padding: .5rem; }
.img-picker-upload { border-top: 1px dashed var(--fs-line); padding-top: .75rem; }
.img-picker-upload .form-text { font-size: .75rem; }

/* ---------- Rechtstexte ---------- */

.legal { max-width: 820px; }
.legal .card p { color: var(--bs-body-color); font-size: 1rem; }

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

/* Tablet & kleiner */
@media (max-width: 991.98px) {
  .hero { padding: clamp(2.75rem, 7vw, 4.5rem) 0; }
  .hero-lead { max-width: 46ch; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Handy (hochkant) */
@media (max-width: 767.98px) {
  body { font-size: 1rem; }

  /* Hero: Text zuerst, Karte darunter, kompaktere Abstände */
  .hero { padding: 2.5rem 0 2.75rem; }
  .hero h1 { font-size: clamp(1.85rem, 8vw, 2.5rem); }
  .hero-lead { font-size: 1rem; max-width: none; }
  .hero .btn-lg { width: 100%; justify-content: center; }
  .hero-stats {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem; margin-top: 1.75rem; padding-top: 1.25rem;
  }
  .hero-stats strong { font-size: 1.35rem; }
  .hero-stats span { font-size: .8rem; }

  /* Unterseiten-Hero */
  .page-hero { padding: 2rem 0 2.25rem; }
  .page-hero h1 { font-size: clamp(1.75rem, 7.5vw, 2.35rem); }
  .page-hero p { font-size: .98rem; }

  /* Abschnitte */
  .section { padding: 2.5rem 0; }
  .section-head { margin-bottom: 1.75rem; }
  .section-head p { font-size: .98rem; }

  /* Karten & Listen */
  .card .card-body { padding: 1.25rem; }
  .course { grid-template-columns: 1fr; gap: .35rem; }
  .course .note { justify-self: start; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 1.5rem; }
  .cta-band .btn { width: 100%; justify-content: center; }

  /* Tabellen scrollbar statt gequetscht */
  .price-table { font-size: .9rem; }
  .price-table th, .price-table td { padding: .55rem .4rem; }

  /* Formular */
  .form-card { padding: 1.25rem; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 1.25rem 0 calc(8.75rem + env(safe-area-inset-bottom, 0px)); }
  .footer-cta { width: 100%; justify-content: center; }

  /* WhatsApp-Button etwas kleiner, damit er nicht stört; der Nach-oben-Button
     entfällt auf dem Handy (siehe Effekte-Abschnitt) */
  .fab { width: 44px; height: 44px; font-size: 1.25rem; left: .9rem; bottom: calc(.9rem + env(safe-area-inset-bottom, 0px)); }
}

/* Sehr kleine Handys */
@media (max-width: 419.98px) {
  .hero-stats { gap: .9rem 1rem; }
  .hero-stats strong { font-size: 1.2rem; }
  .page-hero .crumbs { font-size: .76rem; }
  .btn { padding: .55rem 1.1rem; }
  .btn-lg { padding: .7rem 1.25rem; font-size: .97rem; }
}

/* Querformat-Handy: Hero nicht zu hoch */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 2rem 0; }
  .hero-stats { margin-top: 1.25rem; padding-top: 1rem; }
}

/* ==========================================================================
   Effekte – Scroll-Fortschritt, Hero-Hintergrund, Spotlight, Tilt,
   Buttons (Magnet, Glanz, Ripple), Zähler, Nach-oben-Button, Footer.
   Die dazugehörigen Elemente/Klassen setzt app.js.
   ========================================================================== */

/* ---------- Seiteneinstieg ---------- */

/* Bewusst keine Einblend-Animation auf #main: Inhalte sind sofort sichtbar
   (eine Opacity-Animation auf der ganzen Seite wirkte wie ein Schleier). */

/* ---------- Scroll-Fortschritt: Straße mit Fahrschulauto ---------- */

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 1045;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 14px, transparent 14px 26px) 0 50% / 100% 1px no-repeat,
    var(--fs-asphalt);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
  opacity: 0; transition: opacity .3s ease;
}
.scroll-progress.is-active { opacity: 1; }
/* Gefahrene Strecke */
.scroll-progress-fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--fs-primary-dark), var(--fs-primary));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
.scroll-progress-car {
  position: absolute; left: 0; top: -1px; width: 26px; height: 13px;
  background: url("/img/fx-car.svg") center / contain no-repeat;
  transform: translate3d(var(--car-x, 0px), 0, 0);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}

/* ---------- Hero-Hintergrund (Ebene wird per JS eingefügt) ---------- */

.fx-layer {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
/* Feines Rauschen gegen "flache" Farbflächen */
.fx-layer::before {
  content: ""; position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Maus-Spotlight (Position über --mx/--my) */
.fx-spot {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .075), transparent 60%);
}
.is-lit .fx-spot { opacity: 1; }

/* Fahrbahnmarkierung – Leitlinie, die am unteren Rand vorbeizieht */
.fx-road {
  position: absolute; left: 0; right: 0; bottom: 1.1rem; height: 3px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: .3;
}
.fx-road::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 96px);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 48px, transparent 48px 96px);
  animation: fx-road 2.4s linear infinite;
}
.fx-road::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1rem; height: 1px;
  background: rgba(255, 255, 255, .12);
}
@keyframes fx-road { to { transform: translate3d(-96px, 0, 0); } }

.page-hero .fx-road { bottom: .8rem; opacity: .22; }

/* ---------- Spotlight auf dem CTA-Band ---------- */

.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(200, 16, 46, .28), transparent 65%);
}
.cta-band.is-lit::before { opacity: 1; }


/* ---------- Buttons: Glanz beim Hover ---------- */

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease,
              box-shadow .25s ease, transform .3s cubic-bezier(.2, .7, .2, 1);
}
.btn-brand {
  box-shadow: 0 10px 22px -14px rgba(200, 16, 46, .9);
}
.btn-brand:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -14px rgba(200, 16, 46, .95); }
.btn-brand:active { transform: none; }
/* Glanz, der beim Hover über den Button zieht */
.btn-brand::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .32) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-brand:hover::after,
.btn-brand:focus-visible::after { transform: translateX(120%); transition: transform .75s ease; }

.btn-outline-light:hover, .btn-light:hover { transform: translateY(-1px); }

/* ---------- 3D-Tilt mit Lichtreflex ---------- */

[data-tilt] { transform-style: preserve-3d; }
[data-tilt].is-tilting {
  transition: transform .12s ease-out, box-shadow .3s ease, border-color .3s ease !important;
  will-change: transform;
  box-shadow: 0 24px 44px -28px rgba(28, 31, 36, .4);
}
.tilt-glare {
  position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 55%);
  mix-blend-mode: soft-light;
}
.is-tilting > .tilt-glare { opacity: 1; }

/* ---------- Zähler ---------- */

[data-count-to] { font-variant-numeric: tabular-nums; }

/* ---------- Nach-oben-Button: Verkehrszeichen „Geradeaus“ mit Fortschrittsring ---------- */

.to-top {
  position: fixed; left: calc(1.25rem - 1px); bottom: calc(1.25rem + 48px + .7rem + env(safe-area-inset-bottom, 0px)); z-index: 1039;
  width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: #fff;
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.85);
  transition: opacity .3s ease, transform .35s var(--fs-ease-spring), visibility 0s linear .3s;
}
.to-top.is-visible {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .3s ease, transform .35s var(--fs-ease-spring), visibility 0s;
}
/* Das Schild selbst: blau, weißer Innenrand, weißer Pfeil */
.to-top-sign {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--fs-sign-blue);
  box-shadow: inset 0 0 0 2px var(--fs-sign-blue), inset 0 0 0 3.5px #fff, 0 10px 22px -10px rgba(15, 90, 166, .8);
  font-size: 1.15rem; transition: transform .45s var(--fs-ease-spring), background-color .2s ease;
}
.to-top-sign i { -webkit-text-stroke: .9px currentColor; transition: transform .25s ease; }
.to-top:hover .to-top-sign { transform: rotate(-8deg); }
.to-top:hover .to-top-sign i { transform: translateY(-2px); }
.to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.to-top circle { fill: none; stroke-width: 2.5; }
.to-top .ring-track { stroke: rgba(28, 31, 36, .12); }
.to-top .ring-bar {
  stroke: var(--fs-primary); stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--progress, 0) * 100);
}
/* Auf dem Handy reicht der WhatsApp-Button – kein zweiter schwebender Knopf über dem Inhalt.
   Solange der Start-Hero (mit eigenem WhatsApp-Button) sichtbar ist, bleibt auch der
   schwebende Button weg, damit er die Hero-Buttons nicht verdeckt (Klasse setzt app.js). */
@media (max-width: 767.98px) {
  .to-top { display: none; }
  .fab { transition: translate .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear 0s; }
  .hero-in-view .fab {
    translate: 0 calc(100% + 2rem); visibility: hidden;
    transition: translate .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .35s;
  }
}

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

.footer-title { position: relative; padding-bottom: .55rem; }
.footer-title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 26px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--fs-primary-light) 0 8px, transparent 8px 12px);
  transition: width .35s ease;
}
.footer-col:hover .footer-title::after { width: 44px; }

/* Unterstreichung, die von links einläuft */
.footer-list a:not(.footer-links a),
.footer-bottom-links a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color .2s ease, background-size .3s ease;
  padding-bottom: 1px;
}
.footer-list a:not(.footer-links a):hover,
.footer-bottom-links a:hover { background-size: 100% 1px; text-decoration: none; }

.footer-logo .brand-logo { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.footer-logo:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }

.footer-cta i { transition: transform .25s ease; }
.footer-cta:hover i { transform: translateX(3px); }

.footer-list li > i { transition: transform .25s ease; }
.footer-list li:hover > i { transform: scale(1.15); }

/* ==========================================================================
   Komponenten „Straße & Verkehr“ (Dokumentation ganz oben in dieser Datei)
   ========================================================================== */

/* ---------- .road-divider – Asphaltband mit Leitlinie ---------- */

.road-divider {
  --road-h: 40px;
  --road-speed: 2.8s;
  --road-dash: 34px;
  position: relative; display: block; width: 100%; height: var(--road-h);
  overflow: hidden; isolation: isolate;
  background:
    /* Randlinien (durchgezogen) */
    linear-gradient(var(--fs-marking), var(--fs-marking)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--fs-marking), var(--fs-marking)) 0 calc(100% - 6px) / 100% 2px no-repeat,
    var(--fs-grain) 0 0 / 120px 120px,
    linear-gradient(180deg, var(--fs-asphalt), var(--fs-asphalt-2));
  background-blend-mode: normal, normal, soft-light, normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -1px 0 rgba(0, 0, 0, .35);
}
/* Leitlinie (gestrichelt), läuft langsam nach links = „wir fahren“ */
.road-divider::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: calc(100% + var(--road-dash) * 2); height: 3px; margin-top: -1.5px;
  background: repeating-linear-gradient(90deg, var(--fs-marking) 0 var(--road-dash), transparent var(--road-dash) calc(var(--road-dash) * 2));
  animation: road-dash var(--road-speed) linear infinite;
}
@keyframes road-dash { to { transform: translate3d(calc(var(--road-dash) * -2), 0, 0); } }

.road-divider--thin {
  --road-h: 14px; --road-dash: 18px;
  background: var(--fs-grain) 0 0 / 120px 120px, linear-gradient(180deg, var(--fs-asphalt), var(--fs-asphalt-2));
  background-blend-mode: soft-light, normal;
}
.road-divider--thin::before { height: 2px; margin-top: -1px; }
.road-divider--rounded { border-radius: var(--fs-radius-pill); }
.road-divider--static::before { animation: none; }
.road-divider--footer { --road-h: 46px; }

/* Fahrschulauto, das gelegentlich durchs Band fährt */
.road-divider--car::after {
  content: ""; position: absolute; left: 0; top: calc(50% + 3px);
  width: 30px; height: 15px;
  background: url("/img/fx-car.svg") center / contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45));
  transform: translate3d(-60px, 0, 0);
  animation: road-car 16s linear 2s infinite;
}
@keyframes road-car {
  0%       { transform: translate3d(-60px, 0, 0); }
  45%, 100% { transform: translate3d(calc(100vw + 60px), 0, 0); }
}

/* ---------- .sign – Verkehrsschild-Badges ---------- */

.sign {
  --sign-size: 2.5rem;
  position: relative; display: inline-grid; place-items: center; flex: none; vertical-align: middle;
  width: var(--sign-size); height: var(--sign-size);
  font-family: var(--fs-font-display); font-weight: 800; line-height: 1; letter-spacing: -.03em;
  font-size: calc(var(--sign-size) * .38); font-variant-numeric: tabular-nums;
  text-align: center; color: var(--fs-ink); background: #fff; border-radius: 50%;
}
.sign > i,
.sign > .bi { font-size: calc(var(--sign-size) * .46); line-height: 1; }
.sign > i::before { vertical-align: 0; }
.sign--sm { --sign-size: 1.85rem; }
.sign--lg { --sign-size: 3.5rem; }
.sign--xl { --sign-size: 4.75rem; }

/* Rund mit rotem Ring (Vorschriftzeichen, z. B. Tempo „50“) */
.sign--round {
  border: calc(var(--sign-size) * .115) solid var(--fs-sign-red);
  box-shadow: 0 0 0 calc(var(--sign-size) * .035) #fff, 0 6px 14px -8px rgba(0, 0, 0, .45);
}

/* Gefahrzeichen: Dreieck mit rotem Rand (Inhalt sitzt im Schwerpunkt) */
.sign--warning {
  border-radius: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 9 94 88H6Z' fill='%23fff' stroke='%23fff' stroke-width='16' stroke-linejoin='round'/%3E%3Cpath d='M50 9 94 88H6Z' fill='%23fff' stroke='%23c8102e' stroke-width='10' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  padding-top: calc(var(--sign-size) * .26);
  font-size: calc(var(--sign-size) * .3);
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .2));
}
.sign--warning > i,
.sign--warning > .bi { font-size: calc(var(--sign-size) * .34); }

/* Vorfahrtstraße: gelbe Raute mit weißem Rand (Inhalt bleibt aufrecht) */
.sign--priority { background: transparent; isolation: isolate; color: var(--fs-ink); font-size: calc(var(--sign-size) * .3); }
.sign--priority::before {
  content: ""; position: absolute; inset: 15%; z-index: -1; border-radius: 8%;
  transform: rotate(45deg);
  background: var(--fs-sign-yellow);
  box-shadow: 0 0 0 calc(var(--sign-size) * .07) #fff, 0 0 0 calc(var(--sign-size) * .085) rgba(28, 31, 36, .28), 0 6px 14px -6px rgba(0, 0, 0, .45);
}
.sign--priority > i,
.sign--priority > .bi { font-size: calc(var(--sign-size) * .3); }

/* Richtzeichen: blaues Quadrat mit weißer Innenlinie */
.sign--info {
  border-radius: calc(var(--sign-size) * .16);
  background: var(--fs-sign-blue); color: #fff;
  box-shadow:
    inset 0 0 0 calc(var(--sign-size) * .055) var(--fs-sign-blue),
    inset 0 0 0 calc(var(--sign-size) * .09) #fff,
    0 6px 14px -8px rgba(15, 90, 166, .7);
}

/* ---------- .plate – Kfz-Kennzeichen ---------- */

.plate {
  display: inline-flex; align-items: center; gap: .32em; vertical-align: middle;
  height: 2.05em; padding: 0 .55em 0 0; overflow: hidden;
  background: linear-gradient(180deg, #fff, #f1f2f3); color: #111;
  border: .11em solid #111; border-radius: .34em;
  box-shadow: inset 0 0 0 .07em #fff, 0 8px 18px -10px rgba(0, 0, 0, .55);
  font-family: var(--fs-font-display); font-weight: 700; font-size: 1rem;
  letter-spacing: .05em; line-height: 1; text-transform: uppercase; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* EU-Streifen mit Sternenkranz und „D“ */
.plate::before {
  content: "D"; content: "D" / "";
  align-self: stretch; display: flex; align-items: flex-end; justify-content: center;
  width: 1.95em; margin-right: .22em; padding-bottom: .28em;
  font-family: var(--fs-font-body); font-size: .58em; font-weight: 700; letter-spacing: 0; color: #fff;
  background: var(--fs-plate-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffcc00'%3E%3Ccircle cx='10' cy='3' r='1.1'/%3E%3Ccircle cx='13.5' cy='3.94' r='1.1'/%3E%3Ccircle cx='16.06' cy='6.5' r='1.1'/%3E%3Ccircle cx='17' cy='10' r='1.1'/%3E%3Ccircle cx='16.06' cy='13.5' r='1.1'/%3E%3Ccircle cx='13.5' cy='16.06' r='1.1'/%3E%3Ccircle cx='10' cy='17' r='1.1'/%3E%3Ccircle cx='6.5' cy='16.06' r='1.1'/%3E%3Ccircle cx='3.94' cy='13.5' r='1.1'/%3E%3Ccircle cx='3' cy='10' r='1.1'/%3E%3Ccircle cx='3.94' cy='6.5' r='1.1'/%3E%3Ccircle cx='6.5' cy='3.94' r='1.1'/%3E%3C/svg%3E") no-repeat 50% .3em / 1.45em 1.45em;
}
/* Plaketten (HU + Landeswappen) zwischen Kreis- und Buchstabenteil */
.plate-seal {
  display: inline-block; flex: none; width: .5em; height: 1.2em; margin-inline: .06em;
  background:
    radial-gradient(circle at 50% 30%, #e8a33d 0 .2em, #b77219 .2em .24em, transparent .25em),
    radial-gradient(circle at 50% 70%, #e9ecef 0 .2em, #9aa1a8 .2em .24em, transparent .25em);
}
.plate--sm { font-size: .78rem; }
.plate--lg { font-size: 1.35rem; }

/* ---------- .traffic-light – Mini-Ampel ---------- */

@property --tl-r { syntax: "<color>"; inherits: true; initial-value: #4b1d22; }
@property --tl-a { syntax: "<color>"; inherits: true; initial-value: #4a3a17; }
@property --tl-g { syntax: "<color>"; inherits: true; initial-value: #173b29; }

.traffic-light {
  --tl-size: .7rem;
  --tl-pad: calc(var(--tl-size) * .38);
  --tl-r: #4b1d22; --tl-a: #4a3a17; --tl-g: #173b29;
  --tl-r-glow: transparent; --tl-a-glow: transparent; --tl-g-glow: transparent;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: space-between;
  flex: none; vertical-align: middle;
  width: calc(var(--tl-size) + var(--tl-pad) * 2);
  height: calc(var(--tl-size) * 3 + var(--tl-pad) * 4);
  padding: var(--tl-pad);
  border-radius: calc(var(--tl-size) * .5 + var(--tl-pad));
  background:
    radial-gradient(circle at 50% 50%, var(--tl-a) calc(var(--tl-size) / 2 - .5px), transparent calc(var(--tl-size) / 2)),
    radial-gradient(circle at 50% 50%, var(--tl-a-glow), transparent calc(var(--tl-size) * 1.1)),
    linear-gradient(180deg, #23262b, #15171a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 10px -4px rgba(0, 0, 0, .45);
}
.traffic-light::before,
.traffic-light::after {
  content: ""; width: var(--tl-size); height: var(--tl-size); border-radius: 50%; flex: none;
}
.traffic-light::before { background: var(--tl-r); box-shadow: 0 0 calc(var(--tl-size) * .8) var(--tl-r-glow); }
.traffic-light::after  { background: var(--tl-g); box-shadow: 0 0 calc(var(--tl-size) * .8) var(--tl-g-glow); }

.traffic-light.is-red   { --tl-r: #ff4d4d; --tl-r-glow: rgba(255, 77, 77, .75); }
.traffic-light.is-amber { --tl-a: #ffb020; --tl-a-glow: rgba(255, 176, 32, .55); }
.traffic-light.is-green { --tl-g: #2bd47d; --tl-g-glow: rgba(43, 212, 125, .7); }

.traffic-light--h {
  flex-direction: row;
  width: calc(var(--tl-size) * 3 + var(--tl-pad) * 4);
  height: calc(var(--tl-size) + var(--tl-pad) * 2);
}

/* Automatischer Ampelzyklus: Rot → Rot-Gelb → Grün → Gelb */
.traffic-light--cycle { animation: tl-cycle 8s steps(1, end) infinite; }
@keyframes tl-cycle {
  0%   { --tl-r: #ff4d4d; --tl-r-glow: rgba(255, 77, 77, .75); --tl-a: #4a3a17; --tl-a-glow: transparent; --tl-g: #173b29; --tl-g-glow: transparent; }
  35%  { --tl-r: #ff4d4d; --tl-r-glow: rgba(255, 77, 77, .75); --tl-a: #ffb020; --tl-a-glow: rgba(255, 176, 32, .55); --tl-g: #173b29; --tl-g-glow: transparent; }
  45%  { --tl-r: #4b1d22; --tl-r-glow: transparent; --tl-a: #4a3a17; --tl-a-glow: transparent; --tl-g: #2bd47d; --tl-g-glow: rgba(43, 212, 125, .7); }
  85%  { --tl-r: #4b1d22; --tl-r-glow: transparent; --tl-a: #ffb020; --tl-a-glow: rgba(255, 176, 32, .55); --tl-g: #173b29; --tl-g-glow: transparent; }
  100% { --tl-r: #ff4d4d; --tl-r-glow: rgba(255, 77, 77, .75); --tl-a: #4a3a17; --tl-a-glow: transparent; --tl-g: #173b29; --tl-g-glow: transparent; }
}

/* ---------- .chip-class – Führerscheinklasse ---------- */

.chip-class {
  display: inline-flex; align-items: center; gap: .4em; vertical-align: middle;
  min-height: 1.9rem; padding: .2rem .72rem;
  font-family: var(--fs-font-display); font-weight: 800; font-size: .86rem;
  letter-spacing: .01em; line-height: 1; white-space: nowrap;
  color: var(--fs-ink); background: #fff;
  border: 1.5px solid var(--fs-line); border-radius: var(--fs-radius-pill);
  box-shadow: var(--fs-shadow-sm);
}
.chip-class::before {
  content: ""; width: .42rem; height: .42rem; border-radius: 50%; flex: none;
  background: var(--fs-primary);
}
.chip-class > small {
  font-family: var(--fs-font-body); font-size: .78em; font-weight: 500;
  letter-spacing: 0; color: var(--fs-muted);
}
.chip-class > i { font-size: 1em; color: var(--fs-primary); }
.chip-class.is-active { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
.chip-class.is-active::before { background: #fff; }
.chip-class.is-active > small { color: rgba(255, 255, 255, .82); }
.chip-class--dark {
  color: #fff; background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .18); box-shadow: none;
}
.chip-class--dark::before { background: var(--fs-primary-light); }
.chip-class--dark > small { color: rgba(255, 255, 255, .65); }

/* ---------- .lane – senkrechte Fahrbahn für Zeitstrahlen ---------- */

.lane {
  --lane-x: 1.1rem;            /* Mitte der Fahrbahn */
  --lane-w: 14px;              /* Breite der Fahrbahn */
  --lane-pad: 3.4rem;          /* Einzug der Inhalte */
  --lane-gap: 1.75rem;
  position: relative; list-style: none; margin: 0;
  padding: 0 0 0 var(--lane-pad);
  display: grid; gap: var(--lane-gap);
}
.lane::before {
  content: ""; position: absolute; top: .4rem; bottom: .4rem;
  left: calc(var(--lane-x) - var(--lane-w) / 2); width: var(--lane-w);
  border-radius: var(--fs-radius-pill);
  background:
    repeating-linear-gradient(180deg, var(--fs-marking) 0 12px, transparent 12px 24px) 50% 0 / 2px 100% no-repeat,
    linear-gradient(180deg, var(--fs-asphalt), var(--fs-asphalt-2));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.lane-stop { position: relative; }
.lane-stop::before {
  content: ""; position: absolute; top: .1rem;
  left: calc(var(--lane-x) - var(--lane-pad) - 11px);
  width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box;
  display: grid; place-items: center;
  background: #fff; border: 4px solid var(--fs-sign-red);
  box-shadow: 0 0 0 2px #fff, 0 6px 12px -6px rgba(0, 0, 0, .5);
  font-family: var(--fs-font-display); font-weight: 800; font-size: .82rem; color: var(--fs-ink);
}
.lane-stop[data-step]::before {
  content: attr(data-step);
  width: 2.1rem; height: 2.1rem; top: -.2rem;
  left: calc(var(--lane-x) - var(--lane-pad) - 1.05rem);
}
.lane-stop.is-done::before { background: var(--fs-sign-red); color: #fff; }

/* ---------- .has-grain – Filmkorn über Flächen ---------- */

.has-grain { position: relative; isolation: isolate; }
.has-grain::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: var(--fs-grain) 0 0 / 160px 160px; opacity: .08; mix-blend-mode: overlay;
}

/* ==========================================================================
   Seitenwechsel – View Transitions (nur gleiche Herkunft, wenn unterstützt)
   ========================================================================== */

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }

/* ---------- Lightbox (Bildbetrachter, Steuerung + API in app.js) ---------- */

html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 1085;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: rgba(12, 14, 17, .94);
  color: #fff;
  opacity: 0; transition: opacity .25s ease;
  overscroll-behavior: contain;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .lightbox { background: rgba(12, 14, 17, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.lightbox-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1rem .5rem 1.25rem;
}
.lightbox-count { font-size: .85rem; font-variant-numeric: tabular-nums; letter-spacing: .06em; color: rgba(255, 255, 255, .72); }
.lightbox-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 0 clamp(.75rem, 6vw, 5.5rem) calc(1rem + env(safe-area-inset-bottom, 0px));
  touch-action: pan-y pinch-zoom;
}
.lightbox-figure {
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  max-width: 100%; max-height: 100%; margin: 0;
  transform: translateX(var(--lb-drag, 0));
}
.lightbox-figure picture { display: contents; }
.lightbox-img {
  display: block; min-height: 0;
  max-width: 100%; max-height: calc(100dvh - 9.5rem);
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--fs-radius-xs);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  background: rgba(255, 255, 255, .04);
}
.lightbox.is-in .lightbox-img { animation: lb-in .35s var(--fs-ease-out) both; }
@keyframes lb-in { from { opacity: 0; transform: scale(.975); } to { opacity: 1; transform: none; } }
.lightbox.is-loading .lightbox-img { opacity: .25; }
.lightbox-caption {
  max-width: 70ch; text-align: center; font-size: .95rem; line-height: 1.45;
  color: rgba(255, 255, 255, .86);
}
.lightbox-spinner {
  position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .2s ease .15s;
  animation: lb-spin .8s linear infinite;
}
.lightbox.is-loading .lightbox-spinner { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lightbox-btn {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.2rem;
  transition: background-color .2s ease, transform .2s ease;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox-btn:focus-visible { outline: 3px solid var(--fs-primary-light); outline-offset: 3px; }
.lightbox-btn[hidden] { display: none; }
.lightbox-nav { position: absolute; top: 50%; margin-top: -23px; z-index: 2; }
.lightbox-prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox-next { right: clamp(.5rem, 2vw, 1.5rem); }
.lightbox-prev:hover { transform: translateX(-2px); }
.lightbox-next:hover { transform: translateX(2px); }
@media (max-width: 767.98px) {
  .lightbox-stage { padding-inline: .5rem; }
  /* Handy: Pfeile unten, damit sie das Bild nicht verdecken */
  .lightbox-nav { top: auto; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); margin: 0; background: rgba(255, 255, 255, .14); }
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
  .lightbox-stage { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
  .lightbox-img { max-height: calc(100dvh - 12rem); }
  .lightbox-caption { font-size: .88rem; padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox-figure { transition: none; transform: none; }
  .lightbox.is-in .lightbox-img { animation: none; }
  .lightbox-spinner { animation: none; border-top-color: rgba(255, 255, 255, .2); }
}

/* Vorschaubilder, die die Lightbox öffnen (Bilder-Kachel) */
a[data-lightbox] { cursor: zoom-in; }

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal[data-reveal] { opacity: 1; transform: none; filter: none; }
  .fab::before, .fab::after, .fx-road, .fx-spot, .cta-band::before, .tilt-glare { display: none; }
  .site-header.is-hidden { transform: none; }
  .road-divider::before, .traffic-light--cycle { animation: none !important; }
  .traffic-light--cycle { --tl-g: #2bd47d; --tl-g-glow: rgba(43, 212, 125, .7); }
  .road-divider--car::after { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .btn-brand, .btn-brand:hover { transform: none; }
}
