/**
 * Haupt-Stylesheet - Modernes Design für junge Zielgruppe (16-25 Jahre)
 * Mobile-First Responsive Design
 * Moderne Farbpalette mit Gradienten und lebendigen Akzenten
 */

/* ============================================
   CSS Reset & Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Farbpalette: Blau (Hauptfarbe), Rot (Akzentfarbe), Weiß */
    --color-red: #E43231;
    --color-red-dark: #B91C1C;
    --color-red-light: #EF4444;
    --color-blue: #1F3A6A;
    --color-blue-dark: #1F3A6A;
    --color-blue-light: #1F3A6A;
    --color-blue-deep: #1F3A6A;
    
    --color-white: #FFFFFF;
    --color-gray-light: #F3F4F6;
    --color-gray: #6B7280;
    --color-gray-dark: #374151;
    --color-black: #111827;
    
    /* Schriftart: Open Sans */
    --font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Open Sans', system-ui, sans-serif;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    /* Einheitlicher vertikaler Abstand zwischen Sektionen mit Divider */
    --section-divider-gap: var(--spacing-sm);
    /* Einheitlicher Abstand um Trennstriche in fst-race-theme-Sektionen */
    --section-divider-gap-race: var(--section-divider-gap);
    
    --container-max-width: 1280px;
    --container-padding: 1.5rem;
    
    /* Leicht abgerundete Ecken */
    --border-radius: 0.5rem;
    --border-radius-sm: 0.375rem;
    --border-radius-lg: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Schatten */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-red: 0 10px 30px -5px rgba(220, 38, 38, 0.3);
    --shadow-blue: 0 10px 30px -5px rgba(10, 44, 110, 0.3);
}

/* Fonts werden über preconnect + link in layout.php geladen (nicht @import, um Render-Blocking zu vermeiden) */

html {
    font-size: 16px;
    scroll-behavior: auto;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--color-black);
    background: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-tap-highlight-color: rgba(31, 58, 106, 0.15);
}

/* Platz für fixierten Header (nur wenn Header vorhanden, z.B. keine Admin-Seiten) */
body.has-main-header {
    padding-top: 90px;
}

/* Buchungsseite: zusätzlicher Platz für Trennstrich unter dem Header */
body.has-booking-header {
    padding-top: 115px;
}

main {
    flex: 1 0 auto;
}

/* ============================================
   Typography - Modern & Bold
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--color-black);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--color-blue);
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-gray-dark);
    font-size: 1.0625rem;
    line-height: 1.8;
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 500;
}

a:hover {
    color: var(--color-red);
    text-decoration: none;
}

/* ============================================
   Container
   ============================================ */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Sehr kleine Bildschirme: kompakteres Padding */
/* Mobil: weniger Container-Padding für mehr Content-Platz */
@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 374px) {
    .container {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }
}

@media (max-width: 479px) {
    /* Sehr kleine Smartphones: CTA volle Breite, kompaktere Paddings */
    .training-type-section--auto .training-section-card,
    .training-type-section--motorrad .training-section-card {
        padding: 1rem;
        padding-bottom: 4rem;
    }

    .training-card-booking-cta {
        left: 0.65rem;
        right: 0.65rem;
        bottom: 0.65rem;
    }

    .fst-auto-side,
    .fst-moto-right {
        padding: 0.9rem 1rem;
    }

    .training-highlight-intro {
        padding: 1rem 0.875rem;
    }

    .training-highlight-intro-text {
        font-size: 1.1rem;
    }

    .training-highlight-intro-subtext {
        font-size: 0.85rem;
    }
}

/* ============================================
   Buttons - Modern mit Gradienten
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
    box-shadow: var(--shadow-md);
}

/* Pfeil-Icon rechts im Button (z.B. „Termin buchen →“, „Jetzt Buchen →“) */
.btn .btn-arrow {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-arrow-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-arrow-svg svg {
    width: 1em;
    height: 1em;
}

.btn-primary {
    background-color: var(--color-blue);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-blue-dark);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-blue);
}

.btn-secondary {
    /* Hervorgehobener Primär-CTA (z.B. "Jetzt Online Buchen") */
    background-color: var(--color-red);
    color: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding-inline: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    font-weight: 700;
}

.btn-secondary:hover {
    background-color: var(--color-red-dark);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.floating-buttons {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-end;
}

.floating-buttons-close {
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition-fast);
}

.floating-buttons-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.floating-buttons-close svg {
    display: block;
}

.floating-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    background: var(--color-red);
    color: var(--color-white);
    font-weight: 700;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
    transition: var(--transition-fast);
}

.floating-button:hover {
    background: var(--color-red-dark);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-2px);
}

.floating-button--faqs {
    background: #ffffff;
    color: #111827;
}

.floating-button--faqs:hover {
    background: #f9fafb;
    color: #111827;
}

.floating-button--faqs .floating-button-icon {
    filter: brightness(0);
}

.floating-button--booking .floating-button-icon {
    filter: brightness(0) invert(1);
}

.floating-button-icon {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
}

.floating-button-label {
    line-height: 1;
}

@media (max-width: 767px) {
    .floating-buttons {
        right: 1rem;
        bottom: 1rem;
        gap: 0.5rem;
    }

    .floating-button {
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }

    .floating-button-label {
        font-size: 0.95rem;
    }
}

/* ============================================
   Map Section (Startseite)
   ============================================ */

.home-map-section {
    margin-top: 0;
}

.home-map-section .home-map-image {
    display: block;
    width: 100%;
    /* Nur etwa halbe Höhe im Vergleich zum ursprünglichen Seitenverhältnis */
    height: 40vh;
    max-height: 360px;
    object-fit: cover;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    border-radius: var(--border-radius-lg);
}

/* ============================================
   Header & Navigation - Glassmorphism
   ============================================ */

.header {
    background: #FFFFFF;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    container-type: inline-size;
    container-name: header;
}

.header:hover {
    background: #FFFFFF;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.06);
}

.header::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.header--logo-only .header-content {
    justify-content: flex-start;
}

.header--logo-only .header-logo-group {
    flex: 1;
    min-width: 0;
}

.header--logo-only .header-logo-meta {
    margin-left: auto;
    padding-left: 0;
    text-align: right;
}

.header-logo-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    min-width: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.logo {
    flex: 0 0 auto;
    min-width: 0;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo-image {
    display: block;
    height: 48px;
    width: auto;
    max-width: min(160px, calc(100vw - 100px));
    object-fit: contain;
    transition: var(--transition);
    transform: scale(1.2);
    transform-origin: left center;
}

.logo:hover .logo-image {
    transform: scale(1.24);
}

.header-logo-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    color: var(--color-blue-deep);
}

.header-logo-meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.header-logo-meta-value {
    font-size: 0.85rem;
    line-height: 1.25;
    color: var(--color-gray-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .header-logo-group {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.35rem var(--spacing-sm);
        width: 100%;
    }

    .header--logo-only .header-logo-meta {
        margin-left: 0;
    }

    .header-logo-meta {
        flex: 1 1 100%;
        width: 100%;
        padding-left: 0;
        text-align: left;
    }

    .header-logo-meta-label,
    .header-logo-meta-value {
        display: block;
        width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
    }
}

.nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.nav-toggle {
    display: none;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.65rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.nav-toggle-icon-burger {
    display: block;
    width: 24px;
    height: 24px;
}

.nav-toggle-icon-close {
    display: none;
    width: 24px;
    height: 24px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link,
.nav-link-dropdown {
    color: var(--color-black);
    font-weight: 600;
    padding: 0.7rem 1.3rem;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-lg);
    position: relative;
    display: inline-block;
    cursor: default;
}

.nav-link {
    cursor: pointer;
    text-decoration: none;
}

.nav-link-dropdown {
    cursor: default;
    text-decoration: none;
    border: none;
    background: none;
    font: inherit;
    width: auto;
    text-align: left;
}

.nav-link:hover,
.nav-link-dropdown:hover {
    color: var(--color-black);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.04);
}

/* Aktiver Menüpunkt (Seite geöffnet) */
.nav-link.active,
.nav-link-dropdown.active {
    background: var(--color-blue-deep);
    color: #FFFFFF;
}

/* Aktiver Dropdown-Trigger soll beim Hover blau bleiben */
.nav-link-dropdown.active:hover {
    background: #1F3A6A;
    color: #FFFFFF;
}

/* Dropdown Navigation */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown:hover .dropdown-menu {
    display: block !important;
}

/* Dropdown bleibt offen wenn Maus darüber ist */
.nav-item-dropdown .dropdown-menu:hover {
    display: block !important;
}

.dropdown-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    width: 12px;
    height: 12px;
    color: currentColor;
    transition: transform var(--transition-fast);
    vertical-align: middle;
    flex-shrink: 0;
}

.nav-link-dropdown:hover .dropdown-arrow {
    color: var(--color-blue);
}

.nav-item-dropdown.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--color-blue);
}

/* Aktiver Dropdown-Pfeil bleibt weiß, auch bei Interaktion */
.nav-link-dropdown.active .dropdown-arrow,
.nav-link-dropdown.active:hover .dropdown-arrow {
    color: #FFFFFF;
}

.nav-item-dropdown.dropdown-open .nav-link-dropdown.active .dropdown-arrow {
    color: #FFFFFF;
}

/* Startseite-Pill */
.nav-link-home {
    font-weight: 700;
}

.nav-link-home.active {
    background: var(--color-blue-deep);
    color: #FFFFFF;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.nav-link-home:not(.active):hover {
    background: rgba(15, 23, 42, 0.06);
}

/* Header CTA nutzt direkt das gemeinsame Button-System (.btn, .btn-secondary, .btn-large) */

/* ============================================
   Breadcrumbs
   ============================================ */

.breadcrumbs {
    display: none;
    padding: var(--spacing-md) 0;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-link {
    color: var(--color-blue);
    font-weight: 500;
    transition: var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--color-red);
    text-decoration: none;
}

.breadcrumb-separator {
    color: var(--color-gray);
    margin: 0 var(--spacing-xs);
}

.breadcrumb-current {
    color: var(--color-gray-dark);
    font-weight: 600;
}

/* Desktop: Header-Elemente in einer Zeile halten */
@media (min-width: 992px) {
    .header-content {
        flex-wrap: nowrap;
        gap: 1.5rem;
    }

    .logo {
        flex: 0 0 auto;
    }

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

    .nav-list {
        flex-wrap: nowrap;
    }

    .header-cta {
        flex: 0 0 auto;
    }
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-xl);
    list-style: none;
    padding: var(--spacing-xs) 0;
    min-width: 200px;
    z-index: 9999;
    animation: slideDown 0.2s ease-out;
    pointer-events: auto;
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item-dropdown.dropdown-open .dropdown-menu {
    display: block !important;
}

.dropdown-link {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--color-black) !important;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none !important;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
    margin: 0 var(--spacing-xs);
}

.dropdown-link:visited {
    color: var(--color-black) !important;
}

.dropdown-link:hover,
.dropdown-link.active {
    color: var(--color-blue) !important;
    background: rgba(37, 99, 235, 0.1);
    text-decoration: none !important;
}

.header-cta {
    flex: 0 0 auto;
}

.header-cta .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: none;
}

.header-cta .btn:hover {
    box-shadow: none;
}

/* Standard: CTA nur für Mobile vorgesehen */
.nav-item-cta-mobile {
    display: none;
}

/* Pfeile in Nav-Links nur auf Mobile */
.nav-link-arrow,
.dropdown-link-arrow {
    display: none;
}

/* Body-Scroll sperren wenn Burger-Menü offen (html/body außerhalb des Header-Containers) */
@media (max-width: 991px) {
    html.nav-menu-open,
    body.nav-menu-open {
        overflow: hidden;
        height: 100%;
    }
}

/* Mobile Navigation – Burger-Menü, sobald der Header bricht (Container Query) */
@container header (max-width: 991px) {
    .nav-toggle {
        display: flex;
        border-radius: var(--border-radius-sm);
        padding: 0.65rem;
        transition: var(--transition-fast);
    }
    
    .nav-toggle:hover {
        background: rgba(37, 99, 235, 0.1);
    }
    
    .nav-toggle span {
        background-color: var(--color-black);
    }
    
    .nav-cta-mobile-btn {
        width: 100%;
        border-radius: 0 !important;
        padding: 1rem var(--spacing-lg) !important;
        font-size: 1rem !important;
        justify-content: center;
    }

    /* Menü-Einträge mit transparentem Hintergrund */
    .nav-link,
    .nav-link-dropdown {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        border-radius: var(--border-radius-lg);
        padding: 0.85rem var(--container-padding);
        transition: var(--transition-fast);
        color: var(--color-black);
        position: relative;
        margin: 0;
        background: transparent;
    }

    .nav-link-arrow,
    .dropdown-link-arrow {
        display: inline;
        color: var(--color-black);
        font-weight: 700;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    /* Mobile: Aktive Menüpunkte – nur Schrift und Icon blau, kein Hintergrund */
    .nav-link.active .nav-link-arrow,
    .nav-link-dropdown.active .dropdown-arrow,
    .nav-item-dropdown .dropdown-link.active .dropdown-link-arrow {
        color: var(--color-blue-deep) !important;
    }

    /* Hover-State für nicht-aktive Menüpunkte */
    .nav-link:not(.active):hover,
    .nav-link-dropdown {
        cursor: pointer;
    }

    .nav-link-dropdown:not(.active):hover {
        background: rgba(31, 58, 106, 0.08);
    }
    
    /* Mobile: Aktive Menüpunkte – nur Schrift und Icon blau */
    .nav-link.active,
    .nav-link-dropdown.active {
        margin: 0;
        width: 100%;
        padding: 0.85rem var(--container-padding);
        background-color: transparent;
        color: var(--color-blue-deep);
        border-radius: var(--border-radius-lg);
        text-align: left;
        font-weight: 600;
    }
    
    .nav-link-dropdown.active .dropdown-arrow {
        color: var(--color-blue-deep);
    }

    /* Trennstrich unter dem Dropdown-Trigger (Über Uns) – volle Bildschirmbreite */
    .nav-link-dropdown {
        position: relative;
    }
    .nav-link-dropdown::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: calc(-1 * var(--container-padding));
        right: calc(-1 * var(--container-padding));
        height: 1px;
        background: rgba(0, 0, 0, 0.12);
    }
    
    /* Dropdown-Pfeil bleibt schwarz wenn Dropdown geöffnet ist (außer wenn aktiv) */
    .nav-item-dropdown.dropdown-open .dropdown-arrow {
        color: var(--color-black) !important;
    }
    
    .nav-item-dropdown.dropdown-open:not(.active) .nav-link-dropdown .dropdown-arrow {
        color: var(--color-black) !important;
    }
    
    /* Hover-State für Dropdown-Pfeil auf Mobile */
    .nav-link-dropdown:not(.active):hover .dropdown-arrow {
        color: var(--color-black) !important;
    }
    
    /* Sicherstellen, dass keine inneren Elemente den Hintergrund begrenzen */
    .nav-link.active *,
    .nav-link-dropdown.active * {
        color: inherit;
    }
    
    .nav-list {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100vh - 80px);
        height: calc(100dvh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        padding: var(--spacing-md) var(--container-padding);
        padding-top: 0;
        padding-bottom: var(--spacing-md);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        box-shadow: var(--shadow-xl);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        border-bottom: none; /* Kein Trennstrich unten */
        gap: 0; /* Kein Gap, damit Trennstriche direkt aneinander sind */
        animation: slideDown 0.3s ease-out;
        z-index: 1001;
        text-align: left;
        align-items: stretch; /* Stretch für volle Breite der Kinder */
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Sicherstellen, dass nav-item-Container keine Breitenbegrenzung haben */
    .nav-item {
        width: 100%;
        box-sizing: border-box;
    }

    .nav-item + .nav-item::before {
        content: '';
        display: block;
        width: calc(100% + 2 * var(--container-padding));
        margin-left: calc(-1 * var(--container-padding));
        height: 1px;
        background: rgba(0, 0, 0, 0.12);
    }

    /* Kein Trennstrich zwischen CTA und erstem Menüpunkt */
    .nav-item-cta-mobile + .nav-item::before {
        display: none;
    }

    
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-open .nav-list {
        display: flex;
    }
    
    /* Beim Öffnen: Burger-Icon ausblenden, Close-Icon anzeigen */
    .nav-open .nav-toggle-icon-burger {
        display: none;
    }
    
    .nav-open .nav-toggle-icon-close {
        display: block;
    }
    
    /* Desktop-CTA im Header auf Mobile ausblenden,
       stattdessen eigener CTA im Burger-Menü */
    .header-cta {
        display: none;
    }

    /* CTA-Button oben im Menü – volle Breite bis zum Rand, nah am Header */
    .nav-item-cta-mobile {
        display: block !important;
        list-style: none;
        width: calc(100% + 2 * var(--container-padding));
        margin-left: calc(-1 * var(--container-padding));
        margin-right: calc(-1 * var(--container-padding));
        margin-bottom: var(--spacing-md);
    }

    .nav-item-cta-mobile .btn,
    .nav-cta-mobile-btn {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        justify-content: center;
        text-align: center;
        box-shadow: 0 4px 14px rgba(228, 50, 49, 0.35);
        box-sizing: border-box;
    }

    .nav-item-cta-mobile .btn:hover,
    .nav-cta-mobile-btn:hover {
        box-shadow: 0 6px 20px rgba(228, 50, 49, 0.45);
    }
    
    /* Mobile Dropdown im Burger-Menü */
    .nav-item-dropdown .dropdown-menu {
        position: static !important;
        display: none !important;
        margin-top: 0;
        margin-left: 0;
        padding: 0;
        padding-left: var(--spacing-xs);
        box-shadow: none !important;
        background: transparent !important; /* Transparenter Hintergrund - überschreibt Desktop */
        backdrop-filter: none !important; /* Kein Blur-Effekt */
        border-left: 0;
        border-radius: 0;
    }
    
    .nav-item-dropdown.dropdown-open .dropdown-menu {
        display: block !important;
    }

    .nav-item-dropdown.dropdown-open .dropdown-menu::before {
        content: '';
        display: block;
        width: calc(100% + 2 * var(--container-padding) + var(--spacing-xs));
        margin-left: calc(-1 * var(--container-padding) - var(--spacing-xs));
        height: 1px;
        background: rgba(0, 0, 0, 0.15);
    }
    
    /* Gleicher Abstand wie Hauptmenüpunkte – nur Trennlinie, kein Extra-Abstand */
    .nav-item-dropdown .dropdown-menu li + li {
        margin-top: 0;
    }

    .nav-item-dropdown .dropdown-menu li + li::before {
        content: '';
        display: block;
        width: calc(100% + 2 * var(--container-padding) + var(--spacing-xs));
        margin-left: calc(-1 * var(--container-padding) - var(--spacing-xs));
        height: 1px;
        background: rgba(0, 0, 0, 0.12);
    }

    .nav-item-dropdown .dropdown-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        padding: 0.85rem var(--container-padding);
        text-align: left;
        color: var(--color-black) !important;
        font-weight: 600;
        border-radius: var(--border-radius-lg);
        transition: var(--transition-fast);
        margin: 0 !important;
        background: transparent !important;
    }

    /* Nur der Text wird nach rechts verschoben, nicht der Pfeil */
    .nav-item-dropdown .dropdown-link .dropdown-link-text {
        margin-left: var(--spacing-md);
    }

    /* Überschreibe Desktop-Styles für Mobile */
    .nav-item-dropdown .dropdown-link:visited {
        background: transparent !important;
        color: var(--color-black) !important;
    }
    
    /* Hover-State für Dropdown-Links */
    .nav-item-dropdown .dropdown-link:hover:not(.active) {
        background: rgba(31, 58, 106, 0.08) !important;
        color: var(--color-black) !important;
    }
    
    .nav-item-dropdown .dropdown-link:hover:not(.active) * {
        color: var(--color-black) !important;
    }
    
    /* Mobile: Aktive Dropdown-Links – nur Schrift und Icon blau */
    .nav-item-dropdown .dropdown-link.active {
        background: transparent !important;
        color: var(--color-blue-deep) !important;
        font-weight: 600;
    }
    
    .nav-item-dropdown .dropdown-link.active * {
        color: var(--color-blue-deep) !important;
    }
}

/* ============================================
   Home Full Image - Platzhalter für Startseite
   ============================================ */

.home-full-image {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    min-height: 600px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.home-full-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================
   Hero Section - Campaign-Style with Dominant Image
   ============================================ */

.hero {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 420px;
    max-height: 620px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    margin-bottom: 0;
    padding: 0;
    border-radius: 0;
    z-index: 1;
    background-color: #1F3A6A;
}

/* Hero halbe Höhe (z. B. Fahrsicherheitstraining-Seite) */
.hero.hero-half {
    height: 33vh;
    min-height: 280px;
    max-height: 410px;
}

.hero.hero-half.hero-schraeglagen,
.hero.hero-half.hero-subpage-align {
    align-items: center;
}

.hero-half .hero-content {
    padding: var(--spacing-xl) var(--container-padding);
    padding-left: calc(var(--container-padding) + 6rem);
    max-width: 600px;
}

/* Spezielle Ausrichtung für Schräglagentraining-Hero:
   Textblock horizontal an der Header-Logo-Kante ausrichten */
.hero-half.hero-schraeglagen .hero-content,
.hero-half.hero-subpage-align .hero-content {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    margin-top: 0;
    padding-left: max(var(--container-padding), calc((100vw - var(--container-max-width)) / 2 + var(--container-padding)));
}

@media (min-width: 768px) {
    .hero-half.hero-schraeglagen .hero-content,
    .hero-half.hero-subpage-align .hero-content {
        margin-top: 0;
        padding-top: var(--spacing-xl);
        padding-left: max(var(--container-padding), calc((100vw - var(--container-max-width)) / 2 + var(--container-padding)));
    }
}

@media (min-width: 1024px) {
    .hero-half.hero-schraeglagen .hero-content,
    .hero-half.hero-subpage-align .hero-content {
        margin-top: 0;
        padding-top: var(--spacing-xl);
        padding-left: max(var(--container-padding), calc((100vw - var(--container-max-width)) / 2 + var(--container-padding)));
    }
}

.hero-half .hero-badge {
    margin-bottom: var(--spacing-sm);
    font-size: 0.6875rem;
    padding: 0.35rem 1rem;
}

.hero-half .hero-badge-icon {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

.hero-half .hero-title {
    font-size: clamp(1.5rem, 4.5vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
}

.hero-half .hero-text {
    font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
    margin-bottom: var(--spacing-md);
    max-width: 520px;
    line-height: 1.5;
}

.hero-half .hero-cta {
    margin-top: var(--spacing-md);
}

.hero-half .hero-cta .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--color-blue);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.95) contrast(1.08) saturate(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(31, 58, 106, 0.78) 0%,
        rgba(31, 58, 106, 0.62) 30%,
        rgba(31, 58, 106, 0.42) 60%,
        rgba(31, 58, 106, 0.22) 85%,
        transparent 100%
    );
    z-index: 2;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(5, 15, 30, 0.35) 0%,
        rgba(5, 15, 30, 0.20) 50%,
        transparent 100%
    );
    z-index: 1;
}

/* Hero mit solidem Blau wie auf der Startseite (ohne Bild, ohne Verlauf) */
.hero.hero-blue-bg .hero-background {
    background: var(--color-blue);
}
.hero.hero-blue-bg .hero-image {
    opacity: 0;
}
.hero.hero-blue-bg .hero-overlay {
    background: none !important;
}
.hero.hero-blue-bg .hero-overlay::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: left;
    padding: var(--spacing-3xl) var(--container-padding);
    padding-left: calc(var(--container-padding) + 12rem);
    max-width: 750px;
    width: 100%;
    animation: none;
    opacity: 1;
}

.hero-bottom-cta {
    position: absolute;
    left: 50%;
    bottom: 2.5rem;
    transform: translateX(-50%);
    z-index: 4;
    text-align: center;
}

.hero-bottom-button {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    color: var(--color-red);
    font-weight: 800;
    box-shadow: none;
    text-decoration: none;
    transition: var(--transition-fast);
}

.hero-bottom-text {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-bottom-arrow {
    display: inline-block;
    font-size: 1.3rem;
    line-height: 1;
    margin-top: 1px;
    margin-left: 0.1rem;
}

.hero-bottom-button:hover {
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-red-light);
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .hero-bottom-cta {
        bottom: 1.75rem;
    }
    
    .hero-bottom-button {
        padding-inline: 2rem;
        font-size: 0.95rem;
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--color-red);
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.hero-badge-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hero-badge-text {
    display: inline-block;
}

.hero-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Schräglagentraining: Badge „Einfach Schräg“ weniger hervorgehoben */
.hero-schraeglagen .hero-badge {
    box-shadow: none;
    transform: none;
    background: var(--color-red);
}
.hero-schraeglagen .hero-badge:hover {
    box-shadow: none;
    transform: none;
}

.hero-title {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.04em;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7), 0 8px 60px rgba(0, 0, 0, 0.5);
}

.hero-title-line {
    display: block;
}

.hero-subpage-align .hero-title-line {
    white-space: nowrap;
}

.hero-title-highlight {
    color: var(--color-red);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.8vw, 1.5rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.6), 0 6px 35px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.01em;
}

.hero-text {
    font-size: clamp(0.9375rem, 1.8vw, 1.125rem);
    margin-bottom: var(--spacing-lg);
    max-width: 650px;
    font-weight: 400;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5), 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* Schräglagentraining-Hero: Text größer und in einer Zeile */
.hero-schraeglagen .hero-text {
    font-size: clamp(1.05rem, 2.1vw, 1.3rem);
    white-space: nowrap;
    max-width: none;
}

.hero-cta {
    margin-top: var(--spacing-xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* CTA-Bereich auf der Startseite: Buttons mittig ausrichten */
.cta-banner-section .hero-cta {
    justify-content: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .hero {
        height: 55vh;
        min-height: 460px;
    }
    
    .hero.hero-half {
        height: 36.5vh;
        min-height: 305px;
        max-height: 450px;
    }
    
    .hero-content {
        padding: var(--spacing-3xl) var(--container-padding);
        padding-left: calc(var(--container-padding) + 14rem);
        max-width: 750px;
    }
    
    .hero-half .hero-content {
        padding-left: calc(var(--container-padding) + 8rem);
    }
    
    .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(29, 78, 216, 0.85) 0%,
            rgba(37, 99, 235, 0.75) 20%,
            rgba(59, 130, 246, 0.50) 40%,
            rgba(59, 130, 246, 0.30) 60%,
            rgba(59, 130, 246, 0.15) 80%,
            transparent 100%
        );
    }
}

@media (min-width: 1024px) {
    .hero {
        height: 60vh;
        min-height: 500px;
        max-height: 680px;
    }
    
    .hero.hero-half {
        height: 40vh;
        min-height: 330px;
        max-height: 450px;
    }
    
    .hero-content {
        padding: var(--spacing-3xl) var(--container-padding);
        padding-left: calc(var(--container-padding) + 16rem);
        max-width: 800px;
    }
    
    .hero-half .hero-content {
        padding-left: calc(var(--container-padding) + 10rem);
    }
    
    .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(17, 43, 140, 0.88) 0%,
            rgba(29, 78, 216, 0.80) 18%,
            rgba(37, 99, 235, 0.55) 40%,
            rgba(59, 130, 246, 0.32) 62%,
            rgba(59, 130, 246, 0.18) 82%,
            transparent 100%
        );
    }
}

@media (max-width: 767px) {
    /* Subpage-Hero (nicht Startseite): geringere Höhe auf Mobile */
    .hero {
        height: auto;
        min-height: 200px;
    }
    
    .hero.hero-half {
        height: auto;
        min-height: 140px;
        max-height: none;
    }
    
    .hero-content {
        padding: var(--spacing-xl) var(--container-padding);
        padding-left: var(--container-padding);
        padding-right: var(--container-padding);
        text-align: left;
        max-width: 100%;
    }
    
    /* Subpage-Hero (Fahrsicherheitstraining etc.) linksbündig auf Mobile */
    .hero-half.hero-subpage-align .hero-content,
    .hero-half.hero-schraeglagen .hero-content {
        padding-top: var(--spacing-xl);
        padding-left: var(--container-padding);
    }

    /* Hero-Titel auf Mobile umbrechen lassen (verhindert horizontalen Overflow) */
    .hero-subpage-align .hero-title-line,
    .hero-subpage-align .hero-title-highlight {
        white-space: normal;
    }
    
    .hero-half .hero-title {
        font-size: clamp(1.35rem, 6vw, 2rem);
    }
    
    .hero-half .hero-text {
        font-size: 0.8125rem;
    }

    /* Schräglagentraining Hero-Text: auf Mobile umbrechen */
    .hero-schraeglagen .hero-text {
        white-space: normal;
    }

    /* Badge und unterer Hero-CTA auf Mobile ausblenden */
    .hero-badge,
    .hero-bottom-cta {
        display: none;
    }
    
    .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(29, 78, 216, 0.78) 0%,
            rgba(37, 99, 235, 0.65) 25%,
            rgba(59, 130, 246, 0.42) 50%,
            rgba(59, 130, 246, 0.22) 75%,
            transparent 100%
        );
    }
    
    .hero-side-hint {
        display: none;
    }
    
    .hero-title {
        font-size: clamp(2rem, 10vw, 3.25rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3.5vw, 1.25rem);
    }
    
    .hero-text {
        font-size: 0.9375rem;
    }
    
    .hero-badge {
        font-size: 0.6875rem;
        padding: 0.4375rem 1rem;
    }
}

/* Großes Hero-Bild für Schräglagentraining */
.hero-small {
    height: auto;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) 0;
    background-color: transparent !important;
    background: none !important;
}

.hero-small::before {
    display: none;
}

.hero-small .hero-background {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-small .hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (min-width: 768px) {
    .hero-small {
        padding: var(--spacing-md) 0;
    }
    
    .hero-small .hero-image {
        max-height: 55vh;
    }
}

@media (min-width: 1024px) {
    .hero-small {
        padding: var(--spacing-md) 0;
    }
    
    .hero-small .hero-image {
        max-height: 60vh;
    }
}

/* Training Hero - Dunkles Design */
.hero-training {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    overflow: hidden;
    padding: 0;
}

.hero-training::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.15) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.hero-training::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(37, 99, 235, 0.15);
    z-index: 1;
    pointer-events: none;
}

.hero-training .hero-background {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 0;
    opacity: 1;
    display: block;
    flex-shrink: 0;
}

.hero-training .hero-image {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.85) contrast(1.05);
    vertical-align: middle;
}

.hero-training .hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-2xl) var(--container-padding);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    pointer-events: none;
}

.hero-training .hero-content > * {
    pointer-events: auto;
}

.hero-training .hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.hero-training .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.375rem);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
    font-weight: 500;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-training .hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

@media (min-width: 768px) {
    .hero-training .hero-cta {
        flex-direction: row;
        gap: var(--spacing-lg);
    }
}

.hero-btn-primary {
    /* ggf. kleine Layout-Anpassungen für den Hero-CTA */
}

.hero-btn-secondary {
    /* Outline-Button im Hero: weiße Umrandung auf dunklem Hintergrund */
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.hero-btn-secondary:hover {
    background-color: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-blue-deep);
}


/* ============================================
   Card Grid - Modern mit Glassmorphism
   ============================================ */

.card-grid {
    padding: var(--spacing-2xl) 0;
    position: relative;
    z-index: 1;
}

.card-grid-overlap {
    margin-top: -80px;
    position: relative;
    z-index: 10;
    padding-top: var(--spacing-2xl);
}

@media (min-width: 768px) {
    .card-grid-overlap {
        margin-top: -100px;
    }
}

@media (min-width: 1024px) {
    .card-grid-overlap {
        margin-top: -120px;
    }
}

.card-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

@media (min-width: 768px) {
    .card-grid-wrapper[data-columns="2"],
    .card-grid-wrapper[data-columns="3"],
    .card-grid-wrapper[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid-wrapper[data-columns="3"] {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .card-grid-wrapper[data-columns="4"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.card-grid-overlap .card {
    z-index: 11;
}

/* Home: Trainings-Sektion unter dem Hero */
.home-training-section {
    padding: var(--spacing-2xl) 0 var(--spacing-md);
    text-align: center;
    background-color: #F8FAFC;
}

.home-training-header {
    max-width: 720px;
    margin: 0 auto;
}

.home-training-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-red);
    margin-bottom: var(--spacing-sm);
}

.home-training-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

.home-training-subtitle {
    font-size: 0.9875rem;
    color: var(--color-gray-dark);
    max-width: 640px;
    margin: 0 auto;
}

/* Trainings-Sektion + Kacheln sollen zusammengehören */
.home-training-section + .card-grid {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-2xl);
    background-color: #F8FAFC;
}

/* Home: Startseite im Fahrsicherheitstraining-Look */
.hero.home-hero {
    position: relative;
    z-index: 0;
    overflow: visible;
    isolation: isolate;
}

.home-race-theme {
    background: #ffffff;
    padding-bottom: var(--spacing-xl);
    position: relative;
    overflow: visible;
}

.home-hero-separator {
    position: relative;
    z-index: 1;
}

.home-race-road {
    top: calc(var(--spacing-2xl) * 1.7);
    height: clamp(440px, 55vw, 760px);
    opacity: 0.95;
}

.home-training-section.training-type-section {
    padding: clamp(3.5rem, 8vw, 5rem) 0 var(--spacing-lg);
    background: transparent;
}

.home-training-section.training-type-section.home-training-section-empty {
    padding: 0;
    min-height: 0;
    margin: 0;
}

.home-training-intro {
    margin-bottom: 0;
    max-width: 760px;
}

.home-race-theme .home-race-card-grid {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-2xl);
    background: transparent;
    position: relative;
}

.home-race-theme .home-race-card-grid.card-grid-overlap {
    margin-top: -110px;
    padding-top: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 10;
}

@media (max-width: 1199px) {
    .home-race-theme .home-race-card-grid.card-grid-overlap {
        margin-top: -96px;
    }
}

.home-race-theme .home-race-card-grid .card {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.62);
    backdrop-filter: none;
    position: relative;
}

.home-race-theme .home-race-card-grid .card::before {
    transform: scaleX(1);
    height: 5px;
    background: repeating-linear-gradient(90deg, #e43231 0 36px, #ffffff 36px 72px);
}

.home-race-theme .home-race-card-grid .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 46px -28px rgba(15, 23, 42, 0.5);
    border-color: #cfdae7;
}

.home-race-theme .home-race-card-grid .card-image {
    padding: 1rem;
    height: 210px;
    background: #ffffff;
}

.home-race-theme .home-race-card-grid .card-image img {
    border-radius: 12px;
    filter: none;
}

.home-race-theme .home-race-card-grid .card-title {
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    line-height: 1.2;
    color: #111827;
}

.home-race-theme .home-race-card-grid .card-text {
    color: #4b5563;
    line-height: 1.65;
}

.home-race-theme .home-race-card-grid .card-link {
    border-radius: 12px;
}

.home-race-why-us {
    position: relative;
    background: transparent;
    margin-bottom: 0;
    padding-top: var(--spacing-lg);
}

.home-race-why-us .section-content {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.62);
    padding: clamp(1rem, 2.4vw, 1.6rem);
}

.home-race-why-us .section-image {
    border-radius: 12px;
}

.home-race-why-us .why-us-feature-icon {
    background: #f9ecec;
}

@media (max-width: 767px) {
    .home-race-theme .home-race-card-grid.card-grid-overlap {
        margin-top: -82px;
        padding-top: 0.5rem;
    }

    .home-race-road {
        top: calc(var(--spacing-xl) * 2.2);
        height: clamp(300px, 70vw, 480px);
        opacity: 0.68;
    }

    .home-race-theme .home-race-card-grid .card-image {
        height: 190px;
    }

    .home-race-why-us .section-content {
        padding: 1rem;
    }
}

/* Home Rebuild: Hero + sauberer Card-Overlap */
.home-rebuild-hero {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: visible;
    min-height: 420px;
    max-height: 620px;
    height: 50vh;
    display: flex;
    align-items: flex-start;
}

.home-rebuild-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--color-blue);
}

.home-rebuild-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.home-rebuild-hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    width: fit-content;
    max-width: min(92vw, 980px);
    padding-top: calc(var(--spacing-xl) * 2);
    padding-bottom: var(--spacing-xl);
    padding-left: 0;
    text-align: left;
    margin-left: max(var(--container-padding), calc((100vw - var(--container-max-width)) / 2 + var(--container-padding)));
    margin-right: auto;
    display: grid;
    justify-items: start;
    text-shadow: 0 2px 12px rgba(15, 23, 42, 0.45);
}

.home-rebuild-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: #e43231;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    white-space: nowrap;
}

.home-rebuild-hero-badge-text-mobile {
    display: none;
}

@media (max-width: 767px) {
    .home-rebuild-hero-badge-text-desktop {
        display: none;
    }
    .home-rebuild-hero-badge-text-mobile {
        display: inline;
    }
    .home-rebuild-hero-badge {
        font-size: 0.6875rem;
        padding: 0.4rem 0.95rem;
        min-height: 32px;
        gap: 0.4rem;
        white-space: normal;
        max-width: 100%;
        line-height: 1.35;
    }

    .home-rebuild-hero-badge .home-rebuild-hero-badge-icon {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }
}

.home-rebuild-hero-badge-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.home-rebuild-hero-title-main {
    color: #ffffff;
}

.home-rebuild-hero-headline {
    display: grid;
    justify-items: start;
    gap: 1rem;
}

.home-rebuild-hero-title {
    margin: 0;
    display: grid;
    gap: 0.08em;
    font-size: clamp(2.2rem, 4.6vw, 4rem);
    line-height: 0.94;
    letter-spacing: -0.02em;
    font-weight: 800;
    justify-items: start;
    max-width: 12ch;
}

.home-rebuild-hero-title > span {
    white-space: normal;
    text-wrap: balance;
}

.home-rebuild-hero-title-inline {
    display: block;
    white-space: nowrap;
}

.home-rebuild-hero-title-inline .home-rebuild-hero-title-main,
.home-rebuild-hero-title-inline .home-rebuild-hero-title-highlight {
    display: inline;
}

.home-rebuild-hero-title-inline .home-rebuild-hero-title-main {
    margin-right: 0.35ch;
}

.home-rebuild-hero-title-highlight {
    color: #e43231;
}

.home-rebuild-hero-services {
    display: grid;
    gap: 0.28rem;
    width: max-content;
    min-width: 0;
    margin-top: -2.25rem;
    margin-left: clamp(26rem, 52vw, 42rem);
    padding: 0.85rem 1.15rem 0.8rem;
    background: #ffffff;
    border: 2px solid #e43231;
    border-radius: 18px;
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.85);
    transform: rotate(-4deg);
    transform-origin: left center;
    max-width: none;
}

.home-rebuild-hero-service {
    display: block;
    font-size: clamp(1rem, 1.55vw, 1.28rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #122033;
    white-space: nowrap;
}

.home-rebuild-hero-service:nth-child(2) {
    color: #e43231;
}

.home-rebuild-hero-text {
    margin-top: -4.2rem;
    margin-bottom: 0;
    max-width: 32rem;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.95);
    white-space: normal;
    text-align: left;
    transition: margin-top 0.25s ease;
}

.home-rebuild-separator {
    position: relative;
    z-index: 1;
    height: 28px;
    min-height: 28px;
    width: 100%;
    flex-shrink: 0;
    background: repeating-linear-gradient(90deg, #e43231 0 112px, #ffffff 112px 224px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.home-rebuild-shell {
    position: relative;
    overflow: visible;
    background: transparent;
}

.home-rebuild-cards-anchor {
    margin: 0;
    padding: 0;
    min-height: 0;
}

/* Abstand Card-Grid → Links-Titel = Abstand Links-Item → Divider */
.home-rebuild-card-grid {
    position: relative;
    z-index: 10;
    margin-top: -72px;
    padding-top: 0;
    padding-bottom: calc(var(--spacing-lg) + ((var(--spacing-2xl) + var(--spacing-lg)) / 2) + var(--spacing-md) - var(--spacing-md));
    background: transparent;
}

.home-rebuild-card-grid .card-grid-wrapper {
    max-width: 1120px;
    margin: 0 auto;
    gap: var(--spacing-lg);
}

.home-rebuild-card-grid .card {
    background: #ffffff;
    border: 0.75px solid #e5ebf2;
    border-radius: 16px;
    box-shadow:
        0 16px 34px -20px rgba(15, 23, 42, 0.35),
        0 6px 14px -8px rgba(15, 23, 42, 0.24);
    backdrop-filter: none;
}

.home-rebuild-card-grid .card::before {
    content: none !important;
    display: none !important;
}

.home-rebuild-card-grid .card-image {
    padding: 0;
    height: 180px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.home-rebuild-card-grid .card-image::after {
    content: "";
    position: absolute;
    top: auto !important;
    left: 0;
    right: 0;
    bottom: 0 !important;
    height: 3px;
    background: repeating-linear-gradient(90deg, #e43231 0 24px, #ffffff 24px 48px);
    box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.16);
    z-index: 3;
    opacity: 1;
    pointer-events: none;
}

.home-rebuild-card-grid .card-image img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    filter: none;
    display: block;
    position: relative;
    z-index: 1;
}

.home-rebuild-card-grid .card-title {
    font-size: clamp(1.15rem, 2.1vw, 1.45rem);
    line-height: 1.2;
    color: #111827;
    text-align: left;
}

.home-rebuild-card-grid .card-text {
    color: #4b5563;
    line-height: 1.6;
    font-size: 1.02rem;
    text-align: left;
}

.home-rebuild-card-grid .card-link {
    border-radius: 12px;
    padding: 0.72rem 1.1rem;
    font-size: 0.93rem;
}

.home-rebuild-card-grid .card-content {
    padding: 0.95rem;
    text-align: left;
}

.home-rebuild-links-section {
    position: relative;
    padding: 0 0 var(--spacing-lg);
    background: transparent;
    display: flex;
    align-items: center;
}

.home-rebuild-links-section .container {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.home-rebuild-links-head {
    max-width: 900px;
    margin: 0 auto var(--spacing-md);
    text-align: center;
}

.home-rebuild-links-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    color: #111827;
}

.home-rebuild-links-subtitle {
    margin: 0.45rem 0 0;
    color: #5b677c;
    font-size: 0.98rem;
    line-height: 1.5;
}

.home-rebuild-links-note {
    max-width: 900px;
    margin: var(--spacing-md) auto 0;
    color: #4b5563;
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: center;
}

.home-rebuild-links-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.home-rebuild-links-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 24px -24px rgba(15, 23, 42, 0.55);
    transition: var(--transition-fast);
}

.home-rebuild-links-item:hover {
    border-color: #cbd8e6;
    transform: translateY(-1px);
    color: #0f172a;
    background: #ffffff;
}

.home-rebuild-facility-wrap {
    --home-facility-gap: var(--spacing-sm);
    --home-facility-vertical: var(--spacing-xs);
    --home-facility-divider-spacing: calc((var(--home-facility-gap) / 2) + var(--spacing-md));
    --home-facility-space-above: calc(calc((var(--home-facility-gap) / 2) - var(--spacing-sm)) + var(--home-facility-vertical));
    position: relative;
    margin-top: 0;
    padding-top: var(--home-facility-vertical);
    padding-bottom: var(--home-facility-space-above);
    overflow: hidden;
    background: transparent;
}

.home-rebuild-section-divider {
    height: 4px;
    background: repeating-linear-gradient(90deg, #e43231 0 44px, #ffffff 44px 88px);
    margin: var(--section-divider-gap) 0;
    position: relative;
    z-index: 3;
}

.training-phase-overview + .home-rebuild-links-section {
    margin-top: var(--spacing-2xl);
}

.home-rebuild-facility-road {
    position: absolute;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    top: 10%;
    bottom: -12%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

.home-rebuild-facility-road-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.home-rebuild-facility-road .fst-race-road-edge {
    stroke-width: 74;
}

.home-rebuild-facility-road .fst-race-road-body {
    stroke-width: 62;
}

.home-rebuild-facility-road .fst-race-road-center {
    stroke-width: 5;
    stroke-dasharray: 38 34;
}

.home-rebuild-facility-wrap .container {
    position: relative;
    z-index: 3;
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.home-rebuild-facility-card {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 28px;
    box-shadow: 0 10px 24px -24px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    padding: 0;
}

.home-rebuild-facility-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
}

.home-rebuild-facility-main {
    padding: clamp(1.25rem, 2.6vw, 1.85rem);
}

.home-rebuild-facility-title {
    margin: 0 0 var(--spacing-md);
    font-size: clamp(2.1rem, 3.6vw, 2.9rem);
    line-height: 1.1;
    color: #111827;
    font-weight: 800;
}

.home-rebuild-facility-text {
    margin: 0 0 var(--spacing-lg);
    color: #4b5563;
    line-height: 1.58;
    font-size: 1.03rem;
    max-width: 620px;
}

.home-rebuild-facility-points {
    display: grid;
    gap: 0.8rem;
}

.home-rebuild-facility-point {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    color: #1f2937;
    font-size: 0.98rem;
    line-height: 1.45;
    font-weight: 500;
    position: relative;
    padding-left: 1.5rem;
}

.home-rebuild-facility-point img {
    display: none;
}

.home-rebuild-facility-point::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background-color: #e43231;
    -webkit-mask: url('/assets/img/icons/check_mark.svg') center / contain no-repeat;
    mask: url('/assets/img/icons/check_mark.svg') center / contain no-repeat;
}

.home-rebuild-facility-cta {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-wrap: nowrap;
    gap: var(--spacing-sm);
}

.home-rebuild-facility-image {
    border-radius: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
    height: 100%;
    margin: 0;
    align-self: stretch;
}

.home-rebuild-facility-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-rebuild-facility-cta .btn {
    min-width: 140px;
    justify-content: center;
    padding: 0.62rem 1rem;
    font-size: 0.93rem;
    border-radius: 10px;
    box-shadow: none;
}

.home-rebuild-facility-btn-primary {
    border-radius: 12px;
}

.home-rebuild-facility-btn-secondary {
    border-radius: 12px;
}

.home-rebuild-why-us {
    position: relative;
    background: transparent;
    margin-bottom: 0;
    padding-top: var(--spacing-lg);
}

.home-rebuild-why-us .section-content {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.62);
    padding: clamp(1rem, 2.4vw, 1.6rem);
}

@media (min-width: 768px) {
    .home-rebuild-hero-content {
        padding-left: 0;
    }
}

@media (min-width: 1024px) {
    .home-rebuild-hero-content {
        padding-left: 0;
    }
}

@media (max-width: 1439px) {
    .home-rebuild-hero-text {
        max-width: min(32rem, 100%);
    }
}

@media (max-width: 1199px) {
    .home-rebuild-hero-headline {
        gap: 0.85rem;
    }

    .home-rebuild-hero-services {
        display: none;
    }

    .home-rebuild-hero-text {
        margin-top: 1rem;
        max-width: min(32rem, 100%);
    }

    .home-rebuild-card-grid {
        margin-top: -64px;
    }
}

@media (max-width: 767px) {
    .home-rebuild-hero {
        min-height: 300px;
        max-height: none;
        height: auto;
    }

    .home-rebuild-hero-headline {
        gap: 0.5rem;
    }

    .home-rebuild-hero-title {
        font-size: clamp(1.55rem, 7vw, 2.2rem);
        max-width: 9.5ch;
        line-height: 0.96;
    }

    .home-rebuild-hero-services {
        display: none;
        margin-top: 0.15rem;
        margin-left: 0.25rem;
        padding: 0.75rem 0.95rem;
        max-width: min(88vw, 22rem);
        gap: 0.32rem;
        transform: rotate(-2deg);
    }

    .home-rebuild-hero-service {
        font-size: 0.98rem;
    }

    .home-rebuild-hero-text {
        margin-top: 0.4rem;
        max-width: min(18rem, 88vw);
        font-size: 0.92rem;
        line-height: 1.4;
        white-space: normal;
    }

    .home-rebuild-hero-text .hero-text-line2 {
        display: block;
    }

    .home-rebuild-hero-content {
        padding-top: var(--spacing-xl);
        padding-left: 0;
        padding-bottom: 0;
        width: min(88vw, 24rem);
        margin-left: clamp(var(--container-padding), 8vw, 5rem);
        margin-right: auto;
    }

    .home-rebuild-card-grid {
        margin-top: -54px;
        padding-top: 0.5rem;
    }

    .home-rebuild-card-grid .card-image {
        height: 165px;
    }

    .home-rebuild-links-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .home-rebuild-links-item {
        padding: 0.8rem 0.9rem;
    }

    .home-rebuild-section-divider {
        margin: var(--section-divider-gap) 0;
    }

    .home-rebuild-facility-wrap {
        --home-facility-gap: var(--spacing-xl);
        --home-facility-vertical: var(--spacing-xl);
        --home-facility-space-above: calc(calc((var(--home-facility-gap) / 2) - var(--spacing-sm)) + var(--home-facility-vertical));
        padding-top: var(--home-facility-vertical);
        margin-top: calc((var(--home-facility-gap) / 2) - var(--spacing-sm));
        padding-bottom: var(--home-facility-space-above);
    }

    .home-rebuild-facility-main {
        padding: 1rem;
    }

    .home-rebuild-facility-cta .btn {
        min-width: 0;
        width: auto;
    }

    .home-rebuild-facility-point {
        font-size: 0.95rem;
    }

    .home-rebuild-facility-image {
        height: 180px;
    }

    .home-rebuild-why-us .section-content {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .home-rebuild-facility-layout {
        grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
        min-height: 240px;
        position: relative;
    }

    .home-rebuild-facility-main {
        padding: clamp(1rem, 2.2vw, 1.55rem) clamp(1.25rem, 2.8vw, 2.1rem) clamp(1rem, 2.2vw, 1.55rem) clamp(1rem, 2.2vw, 1.55rem);
    }
}

/* Home-Facility: harte Overrides gegen spätere globale Card-Regeln */
.home-rebuild-facility-wrap .training-section-card.home-rebuild-facility-card {
    padding: 20px !important;
    border-radius: 16px !important;
    border: 1px solid #dbe3ee !important;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.62) !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.home-rebuild-facility-wrap .home-rebuild-facility-image {
    position: relative;
    border: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    display: block !important;
    background: #ffffff !important;
    overflow: hidden !important;
}

/* Desktop: Bild füllt die Kachel komplett aus (bis zu den Kachelkanten) */
@media (min-width: 992px) {
    .home-rebuild-facility-wrap .home-rebuild-facility-image {
        position: absolute !important;
        top: -20px !important;
        right: -20px !important;
        bottom: -20px !important;
        left: 50% !important;
        margin-left: 0 !important;
        width: auto !important;
        height: auto !important;
        align-self: unset !important;
        border-radius: 0 !important;
    }
}


.home-rebuild-facility-wrap .home-rebuild-facility-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
}

@media (max-width: 767px) {
    .home-rebuild-facility-wrap .training-section-card.home-rebuild-facility-card {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .home-rebuild-facility-main {
        padding: 0.9rem;
    }

    .home-rebuild-facility-title {
        margin-bottom: 0.75rem;
        font-size: clamp(1.55rem, 7vw, 2rem);
        line-height: 1.08;
    }

    .home-rebuild-facility-text {
        margin-bottom: 0.9rem;
        font-size: 0.96rem;
        line-height: 1.5;
    }

    .home-rebuild-facility-points {
        gap: 0.65rem;
    }

    .home-rebuild-facility-point {
        align-items: flex-start;
        font-size: 0.92rem;
        line-height: 1.4;
        padding-left: 1.35rem;
    }

    .home-rebuild-facility-point::before {
        top: 0.15rem;
        transform: none;
        width: 16px;
        height: 16px;
    }

    .home-rebuild-facility-cta {
        flex-wrap: wrap;
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
    }

    .home-rebuild-facility-cta .btn {
        width: 100%;
        min-width: 0;
    }

    .home-rebuild-facility-wrap .home-rebuild-facility-image {
        height: 168px !important;
        border-radius: var(--border-radius-lg);
        overflow: hidden;
    }

    .home-rebuild-facility-wrap .home-rebuild-facility-image img {
        border-radius: var(--border-radius-lg);
    }
}

/* Page Intro Section (für Unterseiten wie Kontakt, FAQs, Fahrtechnikzentrum) */
.page-intro-section {
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    text-align: left;
    background-color: #fff;
}

.page-intro-header {
    max-width: 720px;
    margin: 0;
}

.page-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--color-red);
    color: var(--color-white);
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--spacing-md);
}

.page-intro-badge-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.page-intro-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}

.page-intro-subtitle {
    font-size: 1.04rem;
    color: var(--color-gray-dark);
    max-width: 640px;
    margin: 0;
    line-height: 1.7;
}

.page-intro-faq-layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

@media (max-width: 767px) {
    .page-intro-section--faqs .page-intro-faq-layout {
        flex-direction: column;
        gap: 0;
    }
    .page-intro-section--faqs .page-intro-subtitle {
        margin-bottom: var(--spacing-sm);
    }
}

@media (min-width: 768px) {
    .page-intro-section--faqs .page-intro-faq-layout {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    .page-intro-section--faqs .faq-tabs-wrap {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .page-intro-section {
        padding-top: var(--spacing-xl);
        padding-bottom: var(--spacing-lg);
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--color-blue);
    transform: scaleX(0);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    border-color: rgba(15, 23, 42, 0.08);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--color-white);
    padding: 1.25rem;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: var(--transition);
}

.card:hover .card-image::after {
    opacity: 1;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: saturate(1.05) contrast(1.05);
    border-radius: 1rem;
}

.card:hover .card-image img {
    transform: none;
}

.card-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--color-black);
}

.card-text {
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-lg);
    flex: 1;
    line-height: 1.7;
}

.card-text p {
    margin-bottom: var(--spacing-sm);
}

.card-text p:last-child {
    margin-bottom: 0;
}

.card-text ul,
.card-text ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.card-text li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

.card-text a {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

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

.card-text strong {
    color: var(--color-black);
    font-weight: 600;
}

.card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.875rem 1.75rem;
    background: var(--color-blue-deep);
    color: var(--color-white);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: auto;
}

.card-link:hover {
    background: var(--color-blue-deep);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
    gap: var(--spacing-sm);
}

.card-link .arrow {
    transition: var(--transition-fast);
    font-size: 1.125rem;
}

.card-link:hover .arrow {
    transform: translateX(6px);
}

/* ============================================
   Footer - Dunkles Design wie im Layout
   ============================================ */

.footer {
    background: #3E4957;
    color: #e5e7eb;
    padding: 0;
    margin-top: var(--spacing-2xl);
    position: relative;
    overflow: hidden;
}

/* Startseite: kein Abstand zwischen facility-wrap und Footer */
main:has(.home-rebuild-facility-wrap) ~ .footer {
    margin-top: 0;
}

/* fst-race-theme: kein Abstand zwischen letzter Sektion (team-intro) und Footer */
main:has(.fst-race-theme) ~ .footer {
    margin-top: 0;
}

/* Abstand zwischen home-rebuild-links-section und Footer (z. B. Fahrsicherheitstraining) */
main:has(.home-rebuild-links-section):has(.training-phase-overview) ~ .footer {
    margin-top: var(--spacing-2xl);
}

/* FAQs-Seite: kein Abstand zwischen letzter Sektion und Footer */
main:has(.home-rebuild-links-section--faq) ~ .footer {
    margin-top: 0;
}

/* Kontakt-Seite: kein Abstand zwischen contact-section und Footer */
main:has(.contact-section) ~ .footer {
    margin-top: 0;
}

main:has(.home-rebuild-facility-wrap) .home-rebuild-facility-wrap {
    padding-bottom: 0;
}

.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: 0.85rem 0;
    flex-wrap: wrap;
}

.footer-bar-copy {
    margin: 0;
    font-size: 0.88rem;
    color: #ffffff;
}

.footer-bar-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-bar-links li {
    margin: 0;
}

.footer-bar-links a {
    font-size: 0.88rem;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-bar-links a:hover {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 575px) {
    .footer-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.footer::before {
    content: none;
}

.footer::after {
    content: none;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .footer-main {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.footer-section {
    flex: 1;
    transition: none;
    position: relative;
    z-index: 1;
}

.footer-section:hover {
    transform: none;
}

.footer-section-brand {
    max-width: 420px;
}

.footer-section-contact {
    margin-left: auto;
    text-align: right;
    max-width: 360px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-logo-link {
    display: inline-block;
}

.footer-logo-image {
    display: block;
    height: 52px;
    width: auto;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.45));
    /* Abgerundete Ecken für das Footer-Logo */
    border-radius: 12px;
}

.footer-heading {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue) 0%, transparent 100%);
    border-radius: 2px;
    transition: var(--transition);
}

.footer-section:hover .footer-heading::after {
    width: 100%;
}

.footer-description {
    color: #cbd5e1;
    margin-bottom: 0;
    line-height: 1.8;
    font-size: 1.0625rem;
    transition: var(--transition-fast);
}

.footer-section:hover .footer-description {
    color: #e5e7eb;
}

.footer-address {
    font-style: normal;
    color: #cbd5e1;
}

.footer-address p {
    margin-bottom: var(--spacing-xs);
    transition: none;
    color: #cbd5e1;
}

.footer-address a {
    color: #cbd5e1;
    transition: var(--transition-fast);
    display: inline-block;
    position: relative;
    padding: 0.25rem 0;
}

.footer-address a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition-fast);
    border-radius: 1px;
}

.footer-address a:hover {
    color: #ffffff;
    transform: none;
}

.footer-address a:hover::after {
    width: 100%;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
    transition: none;
}

.footer-links li:hover {
    transform: none;
}

.footer-links a {
    color: #cbd5e1;
    transition: var(--transition-fast);
    display: inline-block;
    position: relative;
    padding: 0.25rem 0;
    font-weight: 500;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition-fast);
    border-radius: 1px;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: none;
    transform: none;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: left;
    padding-top: var(--spacing-lg);
    color: #94a3b8;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg) 0 0;
}

.footer-bottom p {
    margin: 0;
    color: #94a3b8;
    transition: none;
}

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    text-align: center;
}

.footer-links-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xl);
}

@media (max-width: 767px) {
    .footer-bottom {
        text-align: center;
    }
}

/* ============================================
   Main Content
   ============================================ */

main {
    min-height: calc(100vh - 400px);
    position: relative;
    background: #ffffff;
}

/* Smooth Scroll Animation */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Selection Styling */
::selection {
    background-color: var(--color-blue);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-blue);
    color: var(--color-white);
}

/* ============================================
   Responsive Images
   ============================================ */

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Additional Modern Effects
   ============================================ */

/* Smooth fade-in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Pulse animation for CTAs */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Accent text utility */
.accent-text {
    color: var(--color-red);
    font-weight: 700;
}

/* ============================================
   Cookie-Banner
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #3E4957;
    color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner-inner {
    padding: var(--spacing-lg) 0;
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

.cookie-banner-text {
    flex: 1;
    min-width: 0;
}

.cookie-banner-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 var(--spacing-xs);
}

.cookie-banner-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.cookie-banner-link {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.cookie-banner-link:hover {
    color: rgba(255, 255, 255, 0.85);
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
}

.cookie-banner-btn-accept {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
}


.cookie-banner-btn-reject {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-family);
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.cookie-banner-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
}

@media (max-width: 767px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-banner-actions .btn,
    .cookie-banner-actions .cookie-banner-btn-reject {
        width: 100%;
    }
}
