/*
Theme Name: SimRacing Fahren
Theme URI: https://simracing-fahren.de
Description: Custom WordPress Theme für simracing-fahren.de
Version: 3.6
Author: Jekosch IT
*/

/* ============================================================
   ROOT & RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:           #07070a;
  --clr-surface:      #0e0e13;
  --clr-surface-2:    #16161e;
  --clr-surface-3:    #1e1e28;
  --clr-primary:      #e11d28;
  --clr-primary-d:    #be0012;
  --clr-primary-glow: rgba(225,29,40,.22);
  --clr-text:         #f0f0f5;
  --clr-muted:        #7a7a8c;
  --clr-dim:          #3a3a4c;
  --clr-border:       #1c1c26;
  --clr-border-2:     #26263a;

  --font-h: 'Rajdhani', 'Barlow Condensed', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, sans-serif;

  --nav-h:     70px;
  --container: 1200px;
  --radius:    6px;
  --radius-lg: 12px;
  --ease:      cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }
body {
  background:  var(--clr-bg);
  color:       var(--clr-text);
  font-family: var(--font-b);
  font-size:   1rem;
  line-height: 1.6;
  overflow-x:  hidden;
}
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { font-family: inherit; }

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin:  0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.section { padding: clamp(60px, 8vw, 110px) 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-h);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: .75rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--clr-primary);
}

.section-title {
  font-family: var(--font-h);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--clr-muted);
  max-width: 560px;
  line-height: 1.75;
}

.section-header { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--clr-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--clr-primary-d);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--clr-primary-glow);
}
.btn--outline {
  background: transparent;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border-2);
}
.btn--outline:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-2px);
}
.btn--sm { padding: .5rem 1.2rem; font-size: .88rem; }
.btn--ghost {
  background: transparent;
  color: var(--clr-muted);
  border: 1.5px solid var(--clr-border-2);
  gap: .4rem;
}
.btn--ghost:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.nav__cta--login, .nav__cta--account { font-size: .82rem; padding: .5rem 1rem; }

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--clr-primary);
  box-shadow: 0 0 10px var(--clr-primary-glow);
  transition: width .1s linear;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background .3s var(--ease), border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(7,7,10,.97);
  border-color: var(--clr-border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-h);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--clr-text);
  flex-shrink: 0;
  margin-right: auto;
  text-decoration: none;
}
.nav__logo-mark {
  width: 30px;
  height: 30px;
  background: var(--clr-primary);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
}
.nav__logo-accent { color: var(--clr-primary); }
/* Uploaded logo image in nav */
.nav__logo-img { height: 44px; width: auto; object-fit: contain; display: block; }
.nav__logo .custom-logo { height: 44px; width: auto; object-fit: contain; display: block; }

/* ── Cache-Fix: alten Canvas-Logo ausblenden ────────────────── */
.nav__logo canvas,
.nav__logo .wrap,
canvas#c { display: none !important; }

/* ── Logo A: Slash & Text ───────────────────────────────────── */
.sr-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sr-logo__slash {
  width: 3px;
  height: 46px;
  background: linear-gradient(to bottom, transparent, #CC0000 20%, #CC0000 80%, transparent);
  transform: skewX(-14deg);
  box-shadow: 0 0 8px rgba(204,0,0,0.5), 0 0 20px rgba(204,0,0,0.2);
  flex-shrink: 0;
}

.sr-logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sr-logo__top {
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 4px;
  color: #666;
  text-transform: uppercase;
  line-height: 1;
}

.sr-logo__bottom {
  font-family: 'Exo 2', sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: 28px;
  color: #eeeeee;
  letter-spacing: -1px;
  line-height: 1;
  margin-left: -4px;
}

.nav__list {
  display: flex;
  gap: .1rem;
}
.nav__link {
  padding: .5rem .85rem;
  font-family: var(--font-h);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--clr-muted);
  border-radius: var(--radius);
  transition: color .2s, background .2s;
  text-decoration: none;
  display: block;
}
.nav__link:hover { color: var(--clr-text); background: rgba(255,255,255,.05); }
.nav__cta { flex-shrink: 0; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0 9px;
  flex-shrink: 0;
}
.nav__toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav__toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* html.nav-open: prevents scroll behind open nav (iOS-safe – on html, NOT body) */
html.nav-open { overflow: hidden; }
.nav__item--mobile-login { display: none; }

@media (max-width: 900px) {
  .nav__list {
    /* inset:0 + padding-top avoids the iOS position:fixed containing-block bug
       that occurs when overflow:hidden is applied to a parent */
    position: fixed;
    inset: 0;
    padding-top: var(--nav-h);
    background: rgba(7,7,10,.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    border-top: 1px solid var(--clr-border);
    /* Ensure it stacks above everything */
    z-index: 999;
  }
  .nav__list.open { transform: translateX(0); }
  .nav__link { font-size: 1.6rem; padding: .9rem 2rem; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav__user-name { display: none; }
  .nav__user-btn { padding: .45rem .55rem; }
  .nav__user-drop { right: 0; }
  /* Logo & Hamburger über dem Nav-Overlay halten */
  .nav__logo,
  .nav__toggle,
  .nav__user { position: relative; z-index: 1000; }
  /* Login-Link im Overlay sichtbar (auf Desktop über nav__item--mobile-login ausgeblendet) */
  .nav__item--mobile-login { display: list-item; }
}

/* ============================================================
   NAV USER DROPDOWN
   ============================================================ */
.nav__user {
  position: relative;
  flex-shrink: 0;
}
.nav__user-btn {
  display: flex;
  align-items: center;
  gap: .45rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius);
  color: var(--clr-text);
  padding: .45rem .75rem;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  transition: border-color .2s, background .2s;
  white-space: nowrap;
}
.nav__user-btn:hover {
  border-color: var(--clr-primary);
  background: rgba(225,29,40,.07);
}
.nav__user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

.nav__user-drop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: 10px;
  padding: .45rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 32px rgba(0,0,0,.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  z-index: 200;
}
.nav__user-drop.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__user-drop hr {
  border: none;
  border-top: 1px solid var(--clr-border-2);
  margin: .3rem 0;
}
.nav__user-drop-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .65rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--clr-muted);
  transition: background .15s, color .15s;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.nav__user-drop-link:hover {
  background: rgba(255,255,255,.06);
  color: var(--clr-text);
}
.nav__user-drop-link--logout { color: #e87070; }
.nav__user-drop-link--logout:hover { background: rgba(225,29,40,.12); color: #ff7070; }

.nav__user-drop-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  padding: .5rem .65rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--clr-muted);
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav__user-drop-toggle:hover {
  background: rgba(255,255,255,.06);
  color: var(--clr-text);
}
.nav__user-drop-toggle-label { flex: 1; text-align: left; }

/* Toggle Switch */
.nav__toggle-switch {
  position: relative;
  width: 32px;
  height: 18px;
  background: var(--clr-border-2);
  border-radius: 9px;
  transition: background .2s;
  flex-shrink: 0;
}
.nav__toggle-switch.on { background: var(--clr-primary); }
.nav__toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.nav__toggle-switch.on .nav__toggle-knob { transform: translateX(14px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  /* Basis: dunkles Rot hinter dem Text + Glühen am Boden wo das Grid konvergiert */
  background:
    radial-gradient(ellipse 70% 55% at 30% 50%, rgba(225,29,40,.13) 0%, transparent 70%),
    radial-gradient(ellipse 90% 35% at 50% 105%, rgba(225,29,40,.2)  0%, transparent 55%),
    var(--clr-bg);
}
/* Perspektiv-Raster: Blick auf die Strecke aus dem Cockpit */
.hero__bg::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -200vw;
  width: 400vw;
  height: 55%;
  background-image:
    linear-gradient(rgba(225,29,40,.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225,29,40,.3) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, black 0%, rgba(0,0,0,.55) 45%, transparent 88%);
  mask-image:         linear-gradient(to top, black 0%, rgba(0,0,0,.55) 45%, transparent 88%);
}
/* Roter Glüh-Streifen rechts */
.hero__bg::after {
  content: '';
  position: absolute;
  top: 8%; right: 0;
  width: 3px;
  height: 75%;
  background: linear-gradient(to bottom, transparent, var(--clr-primary) 25%, var(--clr-primary) 75%, transparent);
  box-shadow: 0 0 30px rgba(225,29,40,.8), 0 0 60px rgba(225,29,40,.3);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-top: 4rem;
  padding-bottom: 5rem;
  max-width: 820px;
}
.hero__content {
  width: 100%;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-h);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: 1.25rem;
}
.hero__label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-primary);
}

.hero__title {
  font-family: var(--font-h);
  font-size: clamp(2.8rem, 7.5vw, 6rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero__title em {
  font-style: normal;
  color: var(--clr-primary);
  display: block;
}

.hero__sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--clr-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.hero__stats {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}
.hero__stat-num {
  display: block;
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  color: var(--clr-primary);
  line-height: 1;
}
.hero__stat-label {
  display: block;
  font-size: .78rem;
  color: var(--clr-muted);
  letter-spacing: .05em;
  margin-top: .25rem;
}

/* ============================================================
   RIG-ANGEBOT
   ============================================================ */
.rig-angebot__header {
  max-width: 680px;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
/* Body: Cards (links) + Bild (rechts) */
.rig-angebot__body {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.rig-angebot__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
/* Bild-Spalte */
.rig-angebot__img {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}
.rig-angebot__img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--clr-surface);
  border: 1px dashed var(--clr-border-2);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--clr-dim);
  transition: border-color .2s;
}
.rig-angebot__img-placeholder:hover { border-color: rgba(225,29,40,.3); }
.rig-angebot__img-placeholder svg {
  width: 48px; height: 48px;
  opacity: .35;
}
.rig-angebot__img-placeholder span {
  font-family: var(--font-h);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-dim);
}
.rig-angebot__img-placeholder small {
  font-size: .75rem;
  color: var(--clr-border-2);
}
.rig-angebot__img-real {
  width: 100%;
  height: clamp(460px, 62vh, 760px);
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 1px var(--clr-border-2);
}
/* KI-Label für das Rig-Bild in der Features-Section */
.rig-angebot__img.ki-gen { position: relative; }
.rig-angebot__img.ki-gen::after {
  content: 'KI-generiert';
  position: absolute;
  bottom: .6rem; right: .6rem;
  background: rgba(7,7,10,.72);
  backdrop-filter: blur(6px);
  color: var(--clr-muted);
  font-family: var(--font-b);
  font-size: .58rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .18rem .42rem; border-radius: 3px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none; z-index: 3;
}
.ra-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  position: relative;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ra-card:hover {
  border-color: rgba(225,29,40,.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.ra-card--highlight {
  border-color: rgba(225,29,40,.35);
  background: linear-gradient(145deg, #140608 0%, var(--clr-surface) 100%);
}
.ra-card--highlight:hover { border-color: var(--clr-primary); }
.ra-card__icon {
  width: 44px;
  height: 44px;
  background: rgba(225,29,40,.1);
  border: 1px solid rgba(225,29,40,.25);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-primary);
  flex-shrink: 0;
}
.ra-card__icon svg { width: 20px; height: 20px; }
.ra-card__title {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--clr-text);
  line-height: 1.2;
}
.ra-card__text {
  font-size: .875rem;
  color: var(--clr-muted);
  line-height: 1.7;
  flex: 1;
}
.ra-card__badge {
  display: inline-block;
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clr-primary);
  border: 1px solid rgba(225,29,40,.35);
  border-radius: 4px;
  padding: .2rem .55rem;
  align-self: flex-start;
}
/* 24h Vor-Ort-Service Hinweis */
.ra-card__service {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: .25rem 0 .85rem;
  padding: .6rem .75rem;
  background: rgba(225,29,40,.1);
  border: 1px solid rgba(225,29,40,.28);
  border-radius: 8px;
  font-size: .82rem;
  color: var(--clr-text);
  line-height: 1.4;
}
.ra-card__service svg {
  width: 20px; height: 20px;
  color: var(--clr-primary);
  flex-shrink: 0;
}
.ra-card__service strong { color: var(--clr-primary); }
.rig-angebot__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-left: 3px solid var(--clr-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
}
.rig-angebot__cta-text {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.rig-angebot__cta-text strong {
  font-family: var(--font-h);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--clr-text);
}
.rig-angebot__cta-text span {
  font-size: .9rem;
  color: var(--clr-muted);
}
@media (max-width: 900px) {
  .rig-angebot__body { grid-template-columns: 1fr; }
  .rig-angebot__img { position: static; order: -1; }
  .rig-angebot__img-placeholder { aspect-ratio: 16/9; }
}
@media (max-width: 600px) {
  .rig-angebot__cards { grid-template-columns: 1fr; }
  .rig-angebot__cta { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   RIGS
   ============================================================ */
.rigs {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.rigs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1100px) { .rigs__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .rigs__grid { grid-template-columns: 1fr; } }

.rig-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  position: relative;
}
.rig-card:hover {
  transform: translateY(-6px);
  border-color: rgba(225,29,40,.35);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}
.rig-card--featured {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 1px var(--clr-primary), 0 20px 40px rgba(225,29,40,.15);
}
.rig-card--featured::before {
  content: 'BELIEBT';
  position: absolute;
  top: 0; left: 0; right: 0;
  background: var(--clr-primary);
  text-align: center;
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .2em;
  padding: .3rem;
  color: #fff;
  z-index: 1;
}

.rig-card__img {
  height: 160px;
  position: relative;
  overflow: hidden;
}
.rig-card--featured .rig-card__img { height: 184px; margin-top: 1.4rem; }

.rig-card__img-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a24 0%, #0c0c14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255,255,255,.04);
  letter-spacing: -.03em;
  text-transform: uppercase;
}
.rig-card__img-inner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--clr-primary), transparent);
}
.rig-card__img-icon {
  font-size: 2.5rem;
  position: absolute;
}

.rig-card__klasse {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(14,14,19,.85);
  backdrop-filter: blur(8px);
  color: var(--clr-muted);
  font-family: var(--font-h);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 4px;
  border: 1px solid var(--clr-border-2);
}

.rig-card__body {
  padding: 1.25rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.rig-card__name {
  font-family: var(--font-h);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .35rem;
}
.rig-card__desc {
  font-size: .85rem;
  color: var(--clr-muted);
  margin-bottom: 1.1rem;
  line-height: 1.5;
}
.rig-card__specs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.rig-card__spec {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
  color: var(--clr-muted);
}
.rig-card__spec::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--clr-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.rig-card__footer {
  border-top: 1px solid var(--clr-border);
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.rig-card__price-wrap {}
.rig-card__price-label {
  display: block;
  font-size: .68rem;
  color: var(--clr-muted);
  letter-spacing: .06em;
  margin-bottom: .1rem;
}
.rig-card__price {
  font-family: var(--font-h);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--clr-text);
  line-height: 1;
}
.rig-card__price--anfrage {
  font-size: 1rem;
  color: var(--clr-muted);
}

/* ============================================================
   PROBEFAHRT
   ============================================================ */
.probefahrt { background: var(--clr-bg); }

.probefahrt__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .probefahrt__inner { grid-template-columns: 1fr; } }

.probefahrt__features {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.75rem;
}
.probefahrt__feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.probefahrt__feature-icon {
  width: 44px; height: 44px;
  background: rgba(225,29,40,.1);
  border: 1px solid rgba(225,29,40,.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.probefahrt__feature-icon--svg svg {
  width: 22px; height: 22px;
  stroke: var(--clr-primary);
}
.probefahrt__feature-title {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
}
.probefahrt__feature-text {
  font-size: .875rem;
  color: var(--clr-muted);
  line-height: 1.55;
}

/* Booking form */
.sr-form {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.sr-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 600px) { .sr-form__row { grid-template-columns: 1fr; } }

.sr-form__field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}
.sr-form__field:last-of-type { margin-bottom: 0; }
.sr-form__field--full { grid-column: 1 / -1; }

.sr-form label {
  font-family: var(--font-h);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-muted);
}
.sr-form input,
.sr-form select,
.sr-form textarea {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius);
  color: var(--clr-text);
  font-family: var(--font-b);
  font-size: .95rem;
  padding: .7rem 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.sr-form input:focus,
.sr-form select:focus,
.sr-form textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-glow);
}
.sr-form input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; }
.sr-form select option { background: var(--clr-surface-2); }
.sr-form textarea { resize: vertical; min-height: 90px; }
.sr-form__submit { width: 100%; margin-top: 1.25rem; }
.sr-form__note { font-size: .78rem; color: var(--clr-muted); margin-top: .75rem; }
.sr-form__msg {
  margin-top: 1rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  display: none;
}
.sr-form__msg--success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.3);  color: #86efac; }
.sr-form__msg--error   { background: rgba(225,29,40,.1);   border: 1px solid rgba(225,29,40,.35); color: #fca5a5; }
.sr-form__optional { font-size: .78rem; color: var(--clr-muted); font-style: normal; margin-left: .3rem; }

/* ============================================================
   GALERIE
   ============================================================ */
.galerie {
  background: #000;           /* gleiche Farbe wie Grid-Hintergrund */
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  overflow: hidden;           /* Grid-Ränder werden sauber abgeschnitten */
}
/* Masonry via CSS columns – Bilder behalten ihr Seitenverhältnis, nie Lücken */
.galerie__grid {
  column-count: 3;
  column-gap: 6px;
}
.galerie__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  background: var(--clr-surface);
  border: 1px dashed var(--clr-border-2);
  border-radius: var(--radius-lg);
  color: var(--clr-muted);
  text-align: center;
}
/*
  URSACHE weisse Raender: opacity-Animation erzeugt GPU-Compositing-Layer
  → Anti-Aliasing-Halo. Lösung: Gallery-Items haben KEINE Animation.
*/
.galerie__item,
.galerie__item.reveal,
.galerie__item.reveal.visible {
  transform: none !important;
  transition: none !important;
  opacity: 1 !important;
  will-change: auto !important;
}
.galerie__item {
  overflow: hidden;
  position: relative;
  background: #000;
  cursor: pointer;
  display: block;
  width: 100%;
  margin: 0 0 6px;            /* dunkler Abstand zwischen den Bildern */
  break-inside: avoid;        /* Bild wird nie zwischen Spalten zerrissen */
  -webkit-column-break-inside: avoid;
  border: 0;                  /* keine weißen Ränder */
  border-radius: 4px;
}
.galerie__item img {
  width: 100%; height: auto;  /* natürliches Seitenverhältnis (Masonry) */
  object-fit: cover;
  display: block;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  margin: 0; padding: 0;
  /* clip-path schneidet den eingebrannten 1px-Bildrand ab – zuverlässig auf iOS/Android */
  clip-path: inset(2px);
  -webkit-clip-path: inset(2px);
  transition: transform .45s var(--ease);
}
.galerie__item:hover img { transform: scale(1.05); }
/* Lightbox-Hover-Indikator */
.galerie__item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .25s;
  z-index: 1;
  pointer-events: none;
}
.galerie__item:hover::before { background: rgba(0,0,0,.28); }
.galerie__item .galerie__zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
  z-index: 2;
  pointer-events: none;
}
.galerie__item:hover .galerie__zoom { opacity: 1; }
.galerie__zoom-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(225,29,40,.85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.galerie__zoom-icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.galerie__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a26 0%, #0a0a12 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--clr-dim);
  transition: transform .4s var(--ease);
  font-size: 1.75rem;
}
.galerie__item:hover .galerie__placeholder { transform: scale(1.04); }
.galerie__placeholder span {
  font-family: var(--font-h);
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.galerie__overlay {
  position: absolute;
  inset: 0;
  background: rgba(225,29,40,0);
  transition: background .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;   /* Tap geht durch zum Item (Lightbox-Klick) */
}
.galerie__item:hover .galerie__overlay { background: rgba(225,29,40,.07); }

/* KI-Kennzeichnung – nur wenn .ki-gen Klasse am Item gesetzt ist */
.galerie__item.ki-gen::after {
  content: 'KI-generiert';
  position: absolute;
  bottom: .4rem;
  right: .4rem;
  background: rgba(7,7,10,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--clr-muted);
  font-family: var(--font-b);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .18rem .42rem;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
  z-index: 3;
}

@media (max-width: 900px) {
  .galerie__grid { column-count: 2; }
}
@media (max-width: 480px) {
  .galerie__grid { column-count: 1; }
}

/* ── Lightbox ─────────────────────────────────────────── */
.sr-lb {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.96);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.sr-lb.open { display: flex; }
.sr-lb__img-wrap {
  position: relative; max-width: min(92vw, 1400px);
  display: flex; align-items: center; justify-content: center;
}
.sr-lb__img-wrap img {
  max-width: 100%; max-height: 88vh;
  object-fit: contain; border-radius: 6px;
  /* clip-path entfernt den eingebrannten weißen Bildrand zuverlässig (auch iOS) */
  clip-path: inset(2px);
  -webkit-clip-path: inset(2px);
  transition: opacity .25s;
  display: block;
}
.sr-lb__spinner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4); font-size: 1.8rem;
  display: none;
}
.sr-lb__close {
  position: fixed; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.15);
  color: #fff; width: 42px; height: 42px; border-radius: 50%;
  font-size: 1.15rem; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.sr-lb__close:hover { background: var(--clr-primary); }
.sr-lb__prev, .sr-lb__next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12);
  color: #fff; width: 48px; height: 64px; border-radius: 8px;
  font-size: 1.4rem; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.sr-lb__prev { left: .75rem; }
.sr-lb__next { right: .75rem; }
.sr-lb__prev:hover, .sr-lb__next:hover { background: var(--clr-primary); border-color: var(--clr-primary); }
.sr-lb__counter {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.5); font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; font-family: var(--font-h);
  background: rgba(0,0,0,.5); padding: .3rem .8rem; border-radius: 99px;
  pointer-events: none;
}
@media (max-width: 600px) {
  .sr-lb__prev { left: .35rem; } .sr-lb__next { right: .35rem; }
  .sr-lb__prev, .sr-lb__next { width: 38px; height: 52px; font-size: 1.1rem; }
}

/* ============================================================
   ÜBER UNS
   ============================================================ */
/* =====================================================================
   FLYER
   ===================================================================== */
.flyer {
  background: var(--clr-bg);
  padding: var(--section-pad, 5rem 0);
  position: relative;
  overflow: hidden;
  scroll-margin-top: var(--nav-h);
}
/* Racing-Grid Hintergrund */
.flyer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(225,29,40,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225,29,40,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}
/* Roter Boden-Glow */
.flyer::after {
  content: '';
  position: absolute;
  bottom: -10%; left: 50%;
  transform: translateX(-50%);
  width: 65%; height: 55%;
  background: radial-gradient(ellipse, rgba(225,29,40,.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Header */
.flyer__head {
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
}
.flyer__head-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--clr-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin-bottom: .8rem;
}
.flyer__head-label::before,
.flyer__head-label::after {
  content: '';
  display: block;
  width: 2.2rem;
  height: 2px;
  background: var(--clr-primary);
}
.flyer__head-title {
  font-size: clamp(1.55rem, 5vw, 3.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin: 0 0 .85rem;
}
.flyer__head-title span { color: var(--clr-primary); }
.flyer__head-sub {
  font-size: .9rem;
  color: var(--clr-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Content */
.flyer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2rem;
  position: relative;
}
.flyer__stage {
  max-width: 1020px;
  width: 100%;
}

/* Flyer Frame mit Corner-Brackets */
.flyer__frame {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 28px 70px rgba(0,0,0,.85),
    0 0 100px rgba(225,29,40,.22);
  transform: perspective(1400px) rotateX(4deg) scale(.985);
  transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s ease;
}
.flyer__frame:hover {
  transform: perspective(1400px) rotateX(0deg) scale(1);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.12),
    0 40px 90px rgba(0,0,0,.75),
    0 0 140px rgba(225,29,40,.32);
}
/* Corner-Brackets */
.flyer__frame::before,
.flyer__frame::after {
  content: '';
  position: absolute;
  width: 28px; height: 28px;
  border-color: var(--clr-primary);
  border-style: solid;
  z-index: 2;
}
.flyer__frame::before { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.flyer__frame::after  { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }

.flyer__img { width: 100%; height: auto; display: block; }

/* Boden-Reflection */
.flyer__reflection {
  height: 70px;
  background: linear-gradient(to bottom, rgba(225,29,40,.07) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  border-radius: 0 0 6px 6px;
}

/* Download Button */
.flyer__download {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: 1.05rem;
  padding: 1rem 2.6rem;
  letter-spacing: .06em;
  animation: flyerPulse 3s ease-in-out infinite;
}
@keyframes flyerPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(225,29,40,0); }
  50%      { box-shadow: 0 0 0 10px rgba(225,29,40,.18); }
}
.flyer__hint {
  font-size: .73rem;
  color: var(--clr-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: -.75rem;
}

@media (max-width: 700px) {
  .flyer__frame { transform: none !important; }
  .flyer__head-title { font-size: clamp(1.7rem, 7vw, 2.5rem); }
}

.about { background: var(--clr-bg); }
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .about__inner { grid-template-columns: 1fr; } }

.about__text { color: var(--clr-muted); line-height: 1.8; margin-top: 1.5rem; }
.about__text p { margin-bottom: 1rem; }
.about__text strong { color: var(--clr-text); }

.about__contacts { margin-top: 2rem; display: flex; flex-direction: column; }
.about__contact-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: .95rem;
}
.about__contact-item:first-child { border-top: 1px solid var(--clr-border); }
.about__contact-icon {
  width: 36px; height: 36px;
  background: rgba(225,29,40,.1);
  border: 1px solid rgba(225,29,40,.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.about__contact-link { color: var(--clr-muted); transition: color .2s; }
.about__contact-link:hover { color: var(--clr-primary); }

.about__map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--clr-border-2);
  aspect-ratio: 4/3;
  background: var(--clr-surface-2);
}
.about__map-wrap iframe {
  width: 100%; height: 100%;
  border: none;
  filter: grayscale(1) invert(1) contrast(.85) brightness(.9);
}

/* Maps consent */
.maps-consent {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--clr-surface-2);
  cursor: pointer;
  padding: 2rem;
  text-align: center;
}
.maps-consent__icon { font-size: 2rem; }
.maps-consent p { font-size: .85rem; color: var(--clr-muted); max-width: 260px; line-height: 1.6; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 2.5rem 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__logo {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.footer__logo-mark {
  width: 26px; height: 26px;
  background: var(--clr-primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 900;
  color: #fff;
}
.footer__logo-accent { color: var(--clr-primary); }
.footer__logo-img { height: 36px; width: auto; display: block; object-fit: contain; }
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__link { font-size: .875rem; color: var(--clr-muted); transition: color .2s; }
.footer__link:hover { color: var(--clr-text); }
.footer__copy { width: 100%; font-size: .78rem; color: var(--clr-dim); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

/* ============================================================
   SUBPAGE (page.php)
   ============================================================ */
.page-wrap { padding-top: var(--nav-h); }
.page-hero {
  padding: 3.5rem 0 2.5rem;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
}
.page-hero h1 {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.page-content {
  padding: 3rem 0 5rem;
  max-width: 760px;
}
.page-content h2, .page-content h3 {
  font-family: var(--font-h);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 2rem 0 .75rem;
  font-size: 1.4rem;
}
.page-content p  { color: var(--clr-muted); margin-bottom: 1rem; line-height: 1.85; }
.page-content a  { color: var(--clr-primary); }
.page-content ul { list-style: disc; padding-left: 1.5rem; color: var(--clr-muted); margin-bottom: 1rem; }
.page-content li { margin-bottom: .35rem; line-height: 1.7; }

/* ── Legal Pages (Impressum / Datenschutz) ─────────────────── */
.legal-content {
  max-width: 760px;
  padding: 3.5rem 0 6rem;
}
.legal-section {
  margin-bottom: 2.75rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--clr-border);
}
.legal-section:last-of-type { border-bottom: none; }

.legal-section h2 {
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--clr-text);
  margin-bottom: 1rem;
}
.legal-section h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--clr-primary);
  border-radius: 2px;
  margin-right: .65rem;
  vertical-align: middle;
  transform: skewX(-12deg);
}
.legal-section p {
  color: var(--clr-muted);
  line-height: 1.9;
  margin-bottom: .85rem;
  font-size: .97rem;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a {
  color: var(--clr-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-section a:hover { color: #ff2a35; }
.legal-section ul {
  list-style: none;
  padding: 0;
  margin: .75rem 0 .85rem;
}
.legal-section ul li {
  color: var(--clr-muted);
  font-size: .97rem;
  line-height: 1.75;
  padding: .3rem 0 .3rem 1.2rem;
  position: relative;
  border-bottom: 1px solid var(--clr-border);
}
.legal-section ul li:last-child { border-bottom: none; }
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  background: var(--clr-primary);
  border-radius: 50%;
}
.legal-date {
  font-size: .8rem;
  color: var(--clr-dim);
  letter-spacing: .06em;
  margin-top: 1rem;
}

/* ============================================================
   FAHRTEN
   ============================================================ */
.fahrten { background: var(--clr-bg); border-bottom: 1px solid var(--clr-border); }
.fahrten__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
@media(max-width:900px){ .fahrten__grid { grid-template-columns: 1fr; } }

.fahrt-card { background: var(--clr-surface); border: 1px solid var(--clr-border-2); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), border-color .3s; }
.fahrt-card:hover { transform: translateY(-4px); border-color: rgba(225,29,40,.3); }
.fahrt-card--highlight { border-color: var(--clr-primary); box-shadow: 0 0 0 1px var(--clr-primary), 0 16px 32px rgba(225,29,40,.12); }
.fahrt-card__top { padding: 1.5rem; background: linear-gradient(135deg, var(--clr-surface-2), var(--clr-bg)); border-bottom: 1px solid var(--clr-border); display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.fahrt-card__icon { font-size: 2.2rem; line-height: 1; }
.fahrt-card__pricing { text-align: right; }
.fahrt-card__price-row { font-family: var(--font-h); font-size: .82rem; color: var(--clr-muted); line-height: 1.6; }
.fahrt-card__price-row strong { color: var(--clr-text); font-size: 1rem; }
.fahrt-card__body { padding: 1.25rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.fahrt-card__name { font-family: var(--font-h); font-size: 1.3rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem; }
.fahrt-card__desc { font-size: .875rem; color: var(--clr-muted); margin-bottom: 1.25rem; line-height: 1.55; flex: 1; }
.fahrt-card__features { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.5rem; }
.fahrt-card__feat { display: flex; align-items: center; gap: .6rem; font-size: .84rem; color: var(--clr-muted); }
.fahrt-card__feat::before { content: ''; width: 5px; height: 5px; background: var(--clr-primary); border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   GUTSCHEINE
   ============================================================ */
.gutschein { background: var(--clr-surface); border-top: 1px solid var(--clr-border); border-bottom: 1px solid var(--clr-border); }
.gutschein__inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem,6vw,5rem); align-items: start; }
@media(max-width:900px){ .gutschein__inner { grid-template-columns: 1fr; } }

.gc-visual { background: linear-gradient(135deg, #1c0a0b 0%, #0e0e13 60%); border: 1px solid rgba(225,29,40,.3); border-radius: var(--radius-lg); padding: 2rem; position: relative; overflow: hidden; margin-bottom: 1.5rem; min-height: 200px; }
.gc-visual::before { content: ''; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; background: rgba(225,29,40,.08); border-radius: 50%; }
.gc-visual::after  { content: ''; position: absolute; bottom: -20px; left: -20px; width: 90px; height: 90px; background: rgba(225,29,40,.05); border-radius: 50%; }
.gc-visual__logo { font-family: var(--font-h); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--clr-primary); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .4rem; position: relative; z-index: 1; }
.gc-visual__logo-mark { width: 22px; height: 22px; background: var(--clr-primary); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 900; color: #fff; }
.gc-visual__title { font-family: var(--font-h); font-size: 1.7rem; font-weight: 900; text-transform: uppercase; line-height: 1.1; position: relative; z-index: 1; }
.gc-visual__sub { font-size: .85rem; color: var(--clr-muted); margin: .5rem 0 1.5rem; position: relative; z-index: 1; }
.gc-visual__value { font-family: var(--font-h); font-size: clamp(2rem,4vw,2.8rem); font-weight: 900; color: var(--clr-primary); line-height: 1; position: relative; z-index: 1; }
.gc-visual__value-label { font-size: .72rem; color: var(--clr-muted); letter-spacing: .1em; text-transform: uppercase; margin-top: .2rem; position: relative; z-index: 1; }
.gc-visual__code { font-family: monospace; font-size: .78rem; color: var(--clr-dim); letter-spacing: .15em; margin-top: 1.5rem; position: relative; z-index: 1; }

.gc-types { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.gc-type { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; background: var(--clr-bg); border: 1.5px solid var(--clr-border-2); border-radius: var(--radius); cursor: pointer; transition: border-color .2s, background .2s; user-select: none; }
.gc-type:hover { border-color: rgba(225,29,40,.3); }
.gc-type.selected { border-color: var(--clr-primary); background: rgba(225,29,40,.07); }
.gc-type input[type="radio"] { display: none; }
.gc-type__label { font-family: var(--font-h); font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--clr-muted); }
.gc-type.selected .gc-type__label { color: var(--clr-text); }
.gc-type__price { font-family: var(--font-h); font-size: 1rem; font-weight: 800; color: var(--clr-primary); }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.leaderboard { background: var(--clr-bg); }
.lb-tracks { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.lb-track-btn { padding: .45rem 1rem; font-family: var(--font-h); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--clr-surface); border: 1px solid var(--clr-border-2); border-radius: var(--radius); cursor: pointer; color: var(--clr-muted); transition: all .2s; }
.lb-track-btn:hover  { border-color: rgba(225,29,40,.35); color: var(--clr-text); }
.lb-track-btn.active { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }

.lb-panel { display: none; }
.lb-panel.active { display: block; }

.lb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lb-table th { font-family: var(--font-h); font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--clr-muted); padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--clr-border-2); }
.lb-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--clr-border); }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tbody tr:hover td { background: rgba(255,255,255,.018); }
.lb-rank { font-family: var(--font-h); font-size: 1rem; font-weight: 800; width: 52px; }
.lb-rank--gold   { color: #fbbf24; }
.lb-rank--silver { color: #94a3b8; }
.lb-rank--bronze { color: #cd7f32; }
.lb-driver { font-weight: 600; color: var(--clr-text); }
.lb-time { font-family: monospace; font-size: 1rem; font-weight: 700; color: var(--clr-primary); letter-spacing: .04em; }
.lb-time--best { color: #22c55e; }
.lb-sector { font-size: .82rem; color: var(--clr-muted); font-family: monospace; }
.lb-rig-label { font-size: .8rem; color: var(--clr-dim); }
.lb-empty { text-align: center; padding: 4rem 2rem; color: var(--clr-muted); }
.lb-empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }

/* ============================================================
   LIVE MITFAHREN – CODE EINGEBEN
   ============================================================ */
.joincode__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--clr-surface-2), var(--clr-surface));
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  position: relative;
  overflow: hidden;
}
.joincode__card::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--clr-primary-glow), transparent 70%);
  pointer-events: none;
}
.joincode__text { flex: 1 1 320px; position: relative; z-index: 1; }
.joincode__title {
  font-family: var(--font-h);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .5rem;
}
.joincode__sub { color: var(--clr-muted); max-width: 460px; line-height: 1.6; }
.joincode__form {
  flex: 1 1 280px;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  position: relative;
  z-index: 1;
}
.joincode__input {
  flex: 1 1 160px;
  background: var(--clr-bg);
  border: 1.5px solid var(--clr-border-2);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  color: var(--clr-text);
  font-family: var(--font-h);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .25em;
  text-align: center;
  text-transform: uppercase;
}
.joincode__input::placeholder { color: var(--clr-dim); letter-spacing: .15em; font-size: 1.1rem; }
.joincode__input:focus { outline: none; border-color: var(--clr-primary); box-shadow: 0 0 0 3px var(--clr-primary-glow); }
.joincode__btn { flex: 0 0 auto; padding: .9rem 1.6rem; font-size: 1rem; }
.joincode__err { flex-basis: 100%; color: #f87171; font-size: .85rem; min-height: 1em; margin: 0; }
@media (max-width: 560px) {
  .joincode__form { flex-direction: column; }
  .joincode__btn { width: 100%; justify-content: center; }
}
