/* ==========================================================================
   Fahrschule Protect — Design System
   Palette: Vermilion #e63b0f · Asphalt #14171d · Signalgelb #ffd21e
   Type:    Saira SemiCondensed (Display) · Inter (Body)
   Motiv:   "Fahrbahn" — gestrichelte Mittellinie als durchgängige Signatur
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-var-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira SemiCondensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/saira-sc-500-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira SemiCondensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/saira-sc-600-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira SemiCondensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/saira-sc-700-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --c-vermilion: #e63b0f;
  --c-vermilion-deep: #c53008;
  --c-vermilion-tint: #fdeae4;
  --c-signal: #ffd21e;
  --c-asphalt: #14171d;
  --c-asphalt-2: #1f242e;
  --c-asphalt-3: #2c3341;
  --c-ink: #1c2027;
  --c-body: #454b56;
  --c-muted: #6d7480;
  --c-paper: #ffffff;
  --c-mist: #f4f4f1;
  --c-line: #e4e5e1;
  --c-success: #1d9e5f;
  --c-error: #d0342c;

  --font-display: 'Saira SemiCondensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --text-on-dark: rgba(255, 255, 255, 0.82);
  --muted-on-dark: rgba(255, 255, 255, 0.55);

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 20px;

  --shadow-card: 0 6px 24px -8px rgba(20, 23, 29, 0.14);
  --shadow-pop: 0 16px 48px -12px rgba(20, 23, 29, 0.28);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --header-h: 76px;
  --topbar-h: 42px;

  /* Fahrbahn-Signatur: gelbe Mittellinie auf Asphalt */
  --lane-dash: repeating-linear-gradient(90deg,
      var(--c-signal) 0 22px, transparent 22px 38px);
  --lane-dash-idle: repeating-linear-gradient(90deg,
      #b9bdc4 0 22px, transparent 22px 38px);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-body);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.75rem, 6.4vw, 4.75rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.005em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-vermilion); text-decoration: none; }
a:hover { color: var(--c-vermilion-deep); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }

strong { color: var(--c-ink); font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--c-vermilion);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible {
  outline-color: var(--c-signal);
}

::selection { background: var(--c-vermilion); color: #fff; }

/* ---------- Layout ---------- */
.container {
  width: min(100% - 2.5rem, 1200px);
  margin-inline: auto;
}
.container--wide { width: min(100% - 2.5rem, 1360px); }
.container--narrow { width: min(100% - 2.5rem, 840px); }

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--mist { background: var(--c-mist); }
.section--dark { background: var(--c-asphalt); }

.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark p, .section--dark li { color: var(--text-on-dark); }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

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

/* ---------- Fahrbahn-Signatur ---------- */
.lane {
  height: 4px;
  border: 0;
  margin: 0;
  background: var(--c-asphalt);
  position: relative;
  overflow: hidden;
}
.lane::after {
  content: '';
  position: absolute;
  inset: 1px 0;
  background: var(--lane-dash);
  background-size: 38px 2px;
  background-repeat: repeat-x;
  background-position: 0 50%;
}

/* Eyebrow: kleines Label mit Fahrbahn-Strich davor */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-vermilion);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: '';
  width: 42px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--c-vermilion) 0 9px, transparent 9px 15px);
}
.section--dark .eyebrow { color: var(--c-signal); }
.section--dark .eyebrow::before {
  background: repeating-linear-gradient(90deg, var(--c-signal) 0 9px, transparent 9px 15px);
}

/* Klassen-Schild: Führerscheinklasse als Plakette */
.klasse-schild {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 3px solid var(--c-vermilion);
  border-radius: 14px;
  background: #fff;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1;
  flex: none;
}
.klasse-schild--dark { background: var(--c-asphalt-2); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: var(--c-vermilion);
  color: #fff;
}
.btn--primary:hover {
  background: var(--c-vermilion-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(230, 59, 15, 0.65);
}

.btn--dark { background: var(--c-asphalt); color: #fff; }
.btn--dark:hover { background: var(--c-asphalt-2); color: #fff; transform: translateY(-2px); }

.btn--ghost { border-color: var(--c-line); color: var(--c-ink); background: transparent; }
.btn--ghost:hover { border-color: var(--c-ink); color: var(--c-ink); }

.btn--ghost-light { border-color: rgba(255,255,255,0.35); color: #fff; background: transparent; }
.btn--ghost-light:hover { border-color: #fff; color: #fff; }

.btn--lg { padding: 1.05rem 2.2rem; font-size: 1rem; }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }

/* Text-Link mit Pfeil */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--c-vermilion);
}
.arrow-link svg { width: 17px; height: 17px; transition: transform 0.2s var(--ease-out); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.topbar {
  background: var(--c-signal);
  color: var(--c-asphalt);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0;
}
.topbar { position: relative; }
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding-right: 3.2rem;
}

/* Sprachumschalter (DE/TR) rechts in der Topbar */
.topbar-lang {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  border: 1.5px solid rgba(20, 23, 29, 0.4);
  border-radius: 7px;
  padding: 0.05rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none !important;
  color: var(--c-asphalt);
}
.topbar-lang:hover { background: rgba(20, 23, 29, 0.1); color: #000; }
.topbar a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.topbar a:hover { color: #000; }

@media (max-width: 700px) {
  :root { --topbar-h: 36px; }
  .topbar { font-size: 0.8rem; padding: 0.38rem 0; }
  .topbar .container { flex-wrap: nowrap; justify-content: space-between; text-align: left; }
  .topbar span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-asphalt);
  transition: box-shadow 0.25s, transform 0.3s var(--ease-out);
}
.site-header.is-scrolled { box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.55); }

/* Smart-Hide: beim Runterscrollen ausblenden, beim Hochscrollen sofort zeigen */
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-hidden:focus-within { transform: none; }

.site-header .container--wide {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-h);
  transition: min-height 0.25s var(--ease-out);
}
.site-header.is-scrolled .container--wide { min-height: 62px; }

.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; transition: height 0.25s var(--ease-out); }
.site-header.is-scrolled .brand img { height: 38px; }

/* Anruf-Button (nur mobil sichtbar) */
.header-phone {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--c-asphalt-3);
  border-radius: 10px;
  color: #fff;
  flex: none;
}
.header-phone:hover { color: var(--c-signal); border-color: var(--c-signal); }
.header-phone svg { width: 19px; height: 19px; }

.main-nav { margin-left: auto; }
.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  position: relative;
  display: inline-block;
  padding: 0.4rem 0;
  color: var(--text-on-dark);
  font-size: 0.9375rem;
  font-weight: 500;
}
/* Nav-Hover: Fahrbahn-Strich */
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--c-signal) 0 8px, transparent 8px 14px);
  transition: right 0.3s var(--ease-out);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { right: 0; }

.header-cta { flex: none; }

/* Dropdown */
.main-nav .has-sub { position: relative; }
.main-nav .has-sub > a { padding-right: 1.1rem; }
.main-nav .has-sub > a::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 230px;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-pop);
  padding: 0.5rem !important;
  list-style: none;
  margin: 0;
  display: block !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s var(--ease-out), visibility 0.2s;
}
.main-nav .has-sub:hover > .sub-menu,
.main-nav .has-sub:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.sub-menu li { margin: 0; }
.sub-menu a {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem !important;
  border-radius: var(--radius-s);
  color: var(--c-ink) !important;
  font-weight: 500;
}
.sub-menu a::after { display: none; }
.sub-menu a:hover { background: var(--c-mist); color: var(--c-vermilion) !important; }
.sub-menu .klasse-mini {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--c-vermilion);
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-ink);
  flex: none;
}

@media (max-width: 1080px) {
  .main-nav .has-sub > a { pointer-events: none; }
  .main-nav .has-sub > a::before { display: none; }
  .sub-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 1.1rem !important;
  }
  .sub-menu a { color: var(--text-on-dark) !important; font-size: 1.05rem !important; font-family: var(--font-body); }
  .sub-menu a:hover { background: rgba(255,255,255,0.06); color: #fff !important; }
  .sub-menu .klasse-mini { color: #fff; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .header-phone { display: grid; margin-left: auto; }
  .nav-toggle { display: flex; margin-left: 0.4rem; }
  .main-nav {
    position: fixed;
    inset: 0;
    top: 0;
    padding-top: calc(var(--header-h) + 6rem);
    background: var(--c-asphalt);
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    z-index: -1;
    overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0 2rem 2rem;
  }
  .main-nav a {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    padding: 0.55rem 0;
  }
  .header-cta { display: none; }
  .main-nav .nav-cta-mobile { display: block; margin-top: 1.2rem; }
  .main-nav .nav-cta-mobile .btn { font-size: 1rem; }
}
@media (min-width: 1081px) {
  .nav-cta-mobile { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  /* Erste Bildschirmseite komplett füllen: Topbar + Header + Hero = 100 % Viewport */
  min-height: calc(100vh - var(--header-h) - var(--topbar-h));
  min-height: calc(100svh - var(--header-h) - var(--topbar-h));
  background: var(--c-asphalt);
  overflow: hidden;
  isolation: isolate;
}
.hero__media, .hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(20, 23, 29, 0.92) 0%, rgba(20, 23, 29, 0.35) 45%, rgba(20, 23, 29, 0.25) 100%),
    linear-gradient(100deg, rgba(20, 23, 29, 0.72) 0%, rgba(20, 23, 29, 0.15) 60%);
}
.hero__inner { padding-block: clamp(5rem, 12vh, 8rem) clamp(3.5rem, 8vh, 6rem); }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.45rem 1.1rem 0.45rem 0.6rem;
  margin-bottom: 1.6rem;
}
.hero__badge .dot {
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--c-signal);
  display: grid;
  place-items: center;
  color: var(--c-asphalt);
  flex: none;
}
.hero__badge .dot svg { width: 14px; height: 14px; }
.hero h1 { color: #fff; max-width: 14ch; margin-bottom: 0.45em; }
.hero h1 em { font-style: normal; color: var(--c-vermilion); }
.hero__sub {
  max-width: 52ch;
  color: var(--text-on-dark);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: clamp(2.5rem, 6vh, 4rem); }

/* Fakten-Leiste unter dem Hero-Text */
.hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-m);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.hero__facts > div {
  background: rgba(20, 23, 29, 0.55);
  padding: 1.1rem 1.4rem;
}
.hero__facts .num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.hero__facts .num em { font-style: normal; color: var(--c-signal); }
.hero__facts .lbl {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted-on-dark);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Scroll-Indikator */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  animation: scroll-hint 2.4s ease-in-out infinite;
}
.hero__scroll:hover { color: #fff; border-color: #fff; }
.hero__scroll svg { width: 18px; height: 18px; }
@keyframes scroll-hint {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}
@media (max-width: 767px), (max-height: 620px) {
  .hero__scroll { display: none; }
}

/* Hero Load-Animation */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero [data-rise] { animation: rise 0.7s var(--ease-out) both; }
.hero [data-rise="2"] { animation-delay: 0.12s; }
.hero [data-rise="3"] { animation-delay: 0.24s; }
.hero [data-rise="4"] { animation-delay: 0.36s; }

/* ---------- Page-Hero (Unterseiten) ---------- */
.page-hero {
  position: relative;
  background: var(--c-asphalt);
  overflow: hidden;
  isolation: isolate;
}
.page-hero__media, .page-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(20, 23, 29, 0.94) 15%, rgba(20, 23, 29, 0.55) 70%, rgba(20, 23, 29, 0.38) 100%);
}

/* Fahrbahn-Abschlusskante: gelbe Mittellinie am unteren Hero-Rand */
.hero::before, .page-hero::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 1;
  background: var(--lane-dash);
  background-size: 38px 3px;
  background-repeat: repeat-x;
  opacity: 0.85;
}

/* Klassen-Schild im Page-Hero (ersetzt dort das Eyebrow) */
.klasse-schild--hero {
  width: 72px;
  height: 72px;
  font-size: 2.1rem;
  border-radius: 16px;
  margin-bottom: 1.3rem;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.55);
}
.page-hero__inner { padding-block: clamp(4.5rem, 10vh, 7rem); }
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 5vw, 3.75rem); max-width: 18ch; }
.page-hero p { color: var(--text-on-dark); max-width: 56ch; font-size: 1.1rem; }
.page-hero .eyebrow { color: var(--c-signal); }
.page-hero .eyebrow::before {
  background: repeating-linear-gradient(90deg, var(--c-signal) 0 9px, transparent 9px 15px);
}

/* Breadcrumb */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  font-size: 0.85rem;
}
.crumbs a { color: var(--muted-on-dark); }
.crumbs a:hover { color: #fff; }
.crumbs li:not(:first-child)::before { content: '›'; margin-right: 0.5rem; color: var(--muted-on-dark); }
.crumbs [aria-current] { color: var(--c-signal); font-weight: 500; }

/* ---------- Cards ---------- */
.card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: rgba(230, 59, 15, 0.35); }

a.card { display: block; color: inherit; }

.card--dark {
  background: var(--c-asphalt-2);
  border-color: var(--c-asphalt-3);
}
.card--dark h3, .card--dark h4 { color: #fff; }
.card--dark p { color: var(--text-on-dark); }
.card--dark:hover { border-color: rgba(255, 210, 30, 0.4); box-shadow: 0 16px 40px -16px rgba(0,0,0,0.6); }

/* Bild-Karte (Fuhrpark, Standort) */
.media-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.media-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
a.media-card { display: block; color: inherit; }
a.media-card:hover { color: inherit; }
.media-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.media-card__body { padding: 1.4rem 1.6rem 1.6rem; }
.media-card__body h3 { margin-bottom: 0.35em; }
.media-card__body p { font-size: 0.95rem; }

/* Klassen-Karte */
.klasse-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  color: inherit;
}
.klasse-card .klasse-schild { transition: transform 0.25s var(--ease-out); }
.klasse-card:hover .klasse-schild { transform: rotate(-4deg) scale(1.06); }
.klasse-card h3 { margin: 0; }
.klasse-card p { font-size: 0.95rem; margin: 0; }
.klasse-card .arrow-link { margin-top: auto; }
.klasse-card .subklassen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.klasse-card .subklassen li {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-muted);
  border: 1px solid var(--c-line);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}

/* ---------- Fakten / Infoblöcke ---------- */
.fact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
}
.fact-table th, .fact-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}
.fact-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-ink);
  white-space: nowrap;
  width: 38%;
}
.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }

.check-list { list-style: none; padding: 0; }
.check-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.65rem;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--c-vermilion-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63b0f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.section--dark .check-list li::before {
  background-color: rgba(255, 210, 30, 0.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd21e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* Nummerierte Schritte (Ablauf der Ausbildung) */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  position: relative;
  padding: 0 0 1.6rem 3.4rem;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -0.1em;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-vermilion);
}
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 2rem;
  bottom: 0.4rem;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--c-line) 0 8px, transparent 8px 14px);
}
.steps h4 { margin-bottom: 0.25em; }
.steps p { font-size: 0.95rem; }

/* ---------- Accordion (FAQ) ---------- */
.accordion { border: 1px solid var(--c-line); border-radius: var(--radius-m); overflow: hidden; }
.accordion details { border-bottom: 1px solid var(--c-line); background: var(--c-paper); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-ink);
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c2027' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s var(--ease-out);
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .accordion__body { padding: 0 1.5rem 1.3rem; font-size: 0.975rem; }

/* ---------- Formulare ---------- */
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 0.4rem;
}
.field .hint { font-size: 0.8rem; color: var(--c-muted); margin-top: 0.3rem; }
.field .req { color: var(--c-vermilion); }

.input, .select, .textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 0.975rem;
  color: var(--c-ink);
  background: var(--c-paper);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-s);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-vermilion);
  box-shadow: 0 0 0 3px rgba(230, 59, 15, 0.14);
}
.textarea { min-height: 140px; resize: vertical; }

.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--c-error); }
.field .error-msg { display: none; font-size: 0.8rem; color: var(--c-error); font-weight: 500; margin-top: 0.3rem; }
.field.has-error .error-msg { display: block; }

/* Auswahl-Kacheln (Wizard: Klassenwahl) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; }
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.3rem 0.9rem 1.1rem;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-m);
  background: var(--c-paper);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-out);
}
.choice:hover { border-color: var(--c-muted); transform: translateY(-2px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice svg { width: 34px; height: 34px; color: var(--c-ink); }
.choice .choice__label { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--c-ink); line-height: 1.25; }
.choice .choice__sub { font-size: 0.8rem; color: var(--c-muted); line-height: 1.4; }
.choice:has(input:checked) {
  border-color: var(--c-vermilion);
  box-shadow: 0 0 0 3px rgba(230, 59, 15, 0.16);
}
.choice:has(input:checked) svg { color: var(--c-vermilion); }
.choice:has(input:focus-visible) { outline: 2px solid var(--c-vermilion); outline-offset: 3px; }

/* Checkbox/Radio-Zeile */
.checkrow {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  font-size: 0.95rem;
}
.checkrow:hover { border-color: var(--c-muted); }
.checkrow input { width: 18px; height: 18px; margin-top: 0.2em; accent-color: var(--c-vermilion); flex: none; }
.checkrow:has(input:checked) { border-color: var(--c-vermilion); background: #fef4f1; }

/* ---------- CTA-Band ---------- */
.cta-band {
  position: relative;
  background: var(--c-vermilion);
  border-radius: var(--radius-l);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
  display: grid;
  gap: 1.5rem;
}
.cta-band::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 14px;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.45) 0 22px, transparent 22px 38px);
}
.cta-band h2 { color: #fff; max-width: 20ch; margin: 0; }
.cta-band p { color: rgba(255, 255, 255, 0.9); max-width: 55ch; margin: 0; }
.cta-band strong, .cta-band .eyebrow { color: #fff; }
.cta-band .eyebrow::before { background: repeating-linear-gradient(90deg, #fff 0 9px, transparent 9px 15px); }
.section--dark strong { color: #fff; }
.cta-band .btn--light { background: #fff; color: var(--c-vermilion); }
.cta-band .btn--light:hover { background: var(--c-mist); transform: translateY(-2px); }
@media (min-width: 860px) {
  .cta-band { grid-template-columns: 1fr auto; align-items: center; }
  .cta-band .cta-band__actions { display: flex; gap: 0.9rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-asphalt);
  color: var(--text-on-dark);
  font-size: 0.95rem;
}
.site-footer .footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
@media (max-width: 980px) { .site-footer .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .footer-main { grid-template-columns: 1fr; } }

.site-footer h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: var(--text-on-dark); }
.site-footer a:hover { color: var(--c-signal); }
.site-footer .brand img { height: 40px; margin-bottom: 1rem; }
.footer-contact li { display: flex; gap: 0.6rem; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; flex: none; margin-top: 0.25em; color: var(--c-signal); }

.footer-bottom {
  border-top: 1px solid var(--c-asphalt-3);
  padding-block: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.8rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted-on-dark);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: var(--muted-on-dark); }
.footer-bottom a:hover { color: #fff; }

.social-row { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.social-row a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-asphalt-3);
  border-radius: 10px;
  color: var(--text-on-dark);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.social-row a:hover { border-color: var(--c-signal); color: var(--c-signal); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }

/* ---------- Foto-Stapel ---------- */
.photo-stack {
  position: relative;
  padding: 0 12% 14% 0;
}
.photo-stack .photo-stack__back {
  margin: 0;
  transform: rotate(-1.6deg);
}
.photo-stack .photo-stack__back img {
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
}
.photo-stack .photo-stack__front {
  position: absolute;
  margin: 0;
  width: 52%;
  right: 0;
  bottom: 0;
  transform: rotate(2.6deg);
  transition: transform 0.3s var(--ease-out);
}
.photo-stack .photo-stack__front img {
  border-radius: var(--radius-m);
  border: 6px solid #fff;
  box-shadow: var(--shadow-pop);
}
.photo-stack:hover .photo-stack__front { transform: rotate(1deg) translateY(-4px); }
.photo-stack .plate {
  position: absolute;
  left: 4%;
  bottom: 6%;
  transform: rotate(-2deg);
}

/* ---------- Kennzeichen-Plakette ---------- */
.plate {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border: 2px solid var(--c-ink);
  border-radius: 7px;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 10px -4px rgba(20, 23, 29, 0.4);
}
.plate .plate__eu {
  display: grid;
  place-items: center;
  gap: 1px;
  background: #039;
  color: #fff;
  font-size: 0.5rem;
  padding: 0.28rem 0.34rem;
  letter-spacing: 0;
}
.plate .plate__eu::before {
  content: '★';
  color: var(--c-signal);
  font-size: 0.55rem;
}
.plate .plate__num {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.65rem;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  color: var(--c-ink);
  white-space: nowrap;
}

/* ---------- Zähler-Statistiken ---------- */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--c-line);
}
.stat .stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  font-weight: 700;
  color: var(--c-vermilion);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat .stat__lbl {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--c-muted);
  max-width: 15ch;
}

/* ---------- Klassen-Karte mit Bild ---------- */
.klasse-card--media { padding: 0; overflow: hidden; }
.klasse-card--media .klasse-card__media {
  position: relative;
  overflow: hidden;
}
.klasse-card--media .klasse-card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.45s var(--ease-out);
}
.klasse-card--media:hover .klasse-card__media img { transform: scale(1.06); }
.klasse-card--media .klasse-schild {
  position: absolute;
  left: 1.4rem;
  bottom: -20px;
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
  box-shadow: 0 6px 16px -6px rgba(20, 23, 29, 0.35);
}
.klasse-card--media .klasse-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 2.2rem 1.5rem 1.6rem;
  flex: 1;
}
.klasse-card--media h3 { margin: 0; }

/* ---------- Gekippte Zitat-Karten ---------- */
.tilt-l { transform: rotate(-1.1deg); }
.tilt-r { transform: rotate(1.1deg); }
.card.tilt-l:hover, .card.tilt-r:hover { transform: rotate(0deg) translateY(-5px); }
@media (max-width: 640px) { .tilt-l, .tilt-r { transform: none; } }

/* ---------- Scroll-Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.section-head { max-width: 720px; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { font-size: 1.05rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  z-index: 100;
  background: var(--c-vermilion);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  transition: top 0.2s;
}
.skip-link:focus { top: 0; color: #fff; }

/* Lange deutsche Komposita auf schmalen Screens sauber trennen */
@media (max-width: 640px) {
  h1, h2, h3, .fact-table th { overflow-wrap: break-word; hyphens: auto; }
  .fact-table th { white-space: normal; width: auto; }
  .footer-contact a, .media-card__body a { overflow-wrap: anywhere; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
