/* =========================================
   0. HERO WRAPPER & TEXT-OVERLAY
   ========================================= */

.hero-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.hero-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 22px 28px 70px 28px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.1) 70%, transparent 100%);
    z-index: 5;
    pointer-events: none;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.hero-text-overlay h1 {
    color: #fff !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    text-shadow: 0 2px 14px rgba(0,0,0,0.45);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.hero-text-overlay p {
    color: rgba(255,255,255,0.88) !important;
    font-size: 0.92rem;
    margin: 7px 0 0 0 !important;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
}

@media (min-width: 600px) {
    .hero-text-overlay h1 { font-size: 2.6rem !important; }
}

/* =========================================
   1. BILD-KARUSSELL (STARTSEITE SLIDER)
   ========================================= */

.image-slider {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.hero-wrapper .image-slider {
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #000;
    user-select: none;
}

.slider-track {
    display: flex;
    /* 5 Slides: clone_last + 3 real + clone_first */
    width: 500%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide {
    width: 20%;
    height: 100%;
    position: relative;
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0 !important;
    transition: transform 0.5s ease;
    pointer-events: none;
}

.slide:hover img {
    transform: scale(1.03);
}

.slide-caption-box {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 51, 160, 0.75);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.slide:hover .slide-caption-box {
    background: rgba(255, 204, 0, 0.95);
    color: #000000;
    border-color: #ffcc00;
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Prev/Next Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease, transform 0.2s ease;
    backdrop-filter: blur(3px);
}

.slider-btn:hover {
    background: rgba(0, 51, 160, 0.85);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev { left: 12px; }
.slider-next { right: 12px; }

/* Dots-Navigation */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.2s ease;
}

.slider-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}


/* =========================================
   2. STARTSEITE: WILLKOMMEN & SCHNELLNAVIGATION
   ========================================= */

.welcome-section {
    max-width: 800px;
    margin: 0 auto 30px auto;
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.75;
    padding: 30px 36px;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.06) 0%, rgba(255, 255, 255, 0.92) 25%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-left: 4px solid #ffcc00;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 71, 204, 0.09), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ── Sektion-Trennlinie ── */
.section-divider {
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-blue) 18%,
        #ffcc00 50%,
        var(--primary-blue) 82%,
        transparent 100%);
    margin: 0 auto 30px auto;
    max-width: 800px;
    border-radius: 2px;
}

body.dark-mode .section-divider {
    background: linear-gradient(90deg,
        transparent 0%,
        #4285F4 18%,
        rgba(255, 204, 0, 0.8) 50%,
        #4285F4 82%,
        transparent 100%);
}

.quick-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 40px auto;
    max-width: 860px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px;
    padding: 20px 18px;
    box-shadow: 0 4px 20px rgba(0, 71, 204, 0.06);
}

.quick-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 16px 16px 14px 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    text-decoration: none !important;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 88px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    position: relative;
}

.quick-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
    pointer-events: none;
}

.quick-nav-item:hover::before {
    left: 125%;
}

.qni-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    transition: all 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Farbige Gradient-Icons pro Sportart */
.quick-nav-item:nth-child(1) .qni-icon { background: linear-gradient(135deg, #ff8c00, #ffcc00); }
.quick-nav-item:nth-child(2) .qni-icon { background: linear-gradient(135deg, #0047cc, #7c3aed); }
.quick-nav-item:nth-child(3) .qni-icon { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.quick-nav-item:nth-child(4) .qni-icon { background: linear-gradient(135deg, #d97706, #fbbf24); }
.quick-nav-item:nth-child(5) .qni-icon { background: linear-gradient(135deg, #16a34a, #4ade80); }
.quick-nav-item:nth-child(6) .qni-icon { background: linear-gradient(135deg, #dc2626, #f97316); }

.quick-nav-item:hover {
    background: var(--primary-blue);
    color: #fff !important;
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 71, 204, 0.3);
    border-color: transparent;
}

.quick-nav-item:hover .qni-icon {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.1);
}

body.dark-mode .quick-nav {
    background: rgba(20, 20, 45, 0.65);
    border-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode .quick-nav-item {
    background: rgba(40, 42, 70, 0.88);
    border-color: rgba(255, 255, 255, 0.09);
    color: #c8d0f0;
}

body.dark-mode .quick-nav-item:hover {
    background: #4285F4;
    color: #fff !important;
    border-color: #4285F4;
}

body.dark-mode .quick-nav-item:hover .qni-icon {
    background: rgba(255, 255, 255, 0.15);
}


/* =========================================
   3. STARTSEITE: TRACK-PREVIEW
   ========================================= */

.track-preview-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid var(--primary-blue);
    background: #000;
    margin-bottom: 25px;
}

body.dark-mode .track-preview-container {
    border-color: #4285F4;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.track-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background-color: #000;
}

.video-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.preview-badge {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

.preview-badge i {
    color: var(--live-red);
    animation: pulse 1.5s infinite;
}


/* =========================================
   4. MEDIA QUERIES
   ========================================= */

@media (max-width: 768px) {
    .slide-caption-box {
        bottom: 8px;
        padding: 5px 12px;
        font-size: 0.8rem;
        gap: 5px;
    }

    .slider-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .quick-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 16px 14px;
    }

    .quick-nav-item {
        min-width: unset;
        padding: 14px 10px 12px 10px;
        font-size: 0.72rem;
        gap: 7px;
    }

    .qni-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (min-width: 992px) {
    body.page-home main {
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
    }
}


/* =========================================
   5. SPORT-SWITCHER (Kart / Trial)
   ========================================= */

/* Orbitron-Font für Countdown-Zahlen */
.countdown-box .number {
    font-family: var(--font-display);
    letter-spacing: 0.05em;
}

.sport-switcher {
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Tab-Leiste mit Pfeilen */
.sport-tabs-bar {
    display: flex;
    align-items: stretch;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: var(--primary-blue);
}

.sport-arrow {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    padding: 0 14px;
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
}

.sport-arrow:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sport-tab-btn {
    flex: 1;
    padding: 13px 12px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.3s ease;
}

.sport-tab-btn.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.sport-tab-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

/* Sliding-Bereich */
.sport-switcher-overflow {
    overflow: hidden;
    border: 2px solid var(--primary-blue);
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.sport-track {
    display: flex;
    width: 200%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sport-panel {
    width: 50%;
    box-sizing: border-box;
}

/* Countdown und Location innerhalb des Panels anpassen */
.sport-panel .countdown-wrapper {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sport-panel .location-box {
    margin: 0;
    border-radius: 0;
    border-left: none;
    box-shadow: none;
}

/* Dark Mode */
body.dark-mode .sport-switcher-overflow {
    border-color: #4285F4;
}

body.dark-mode .sport-tabs-bar {
    background: #001b5e;
}

/* Maps-Placeholder in Panels */
.maps-placeholder {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 15px;
}

body.dark-mode .maps-placeholder {
    background: #1e1e1e;
    border-color: #555;
}

/* Inhalt des Karten-Placeholder-Bereichs */
.maps-placeholder-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 10px;
    color: var(--text-light);
}

.maps-placeholder-title {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.maps-placeholder-hint {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 auto 25px auto;
    line-height: 1.6;
}

.maps-load-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-family: inherit;
}

.maps-load-btn:hover {
    transform: translateY(-2px);
}

/* =========================================
   CTA-BANNER
   ========================================= */
.cta-banner {
    max-width: 800px;
    margin: 30px auto 10px auto;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    border-radius: 20px;
    padding: 32px 36px;
    box-shadow: 0 8px 32px rgba(0, 71, 204, 0.25);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 204, 0, 0.12);
    pointer-events: none;
}

.cta-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.cta-banner-text h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 6px;
    font-weight: 800;
}

.cta-banner-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
}

.cta-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.cta-btn-primary {
    background: #ffcc00;
    color: #000;
}

.cta-btn-primary:hover {
    background: #ffe033;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

.cta-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

body.dark-mode .cta-banner {
    background: linear-gradient(135deg, #001b5e 0%, #000d3a 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .cta-banner {
        padding: 24px 20px;
        margin: 24px auto 10px auto;
    }

    .cta-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .cta-banner-text h2 {
        font-size: 1.2rem;
    }

    .cta-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .cta-banner {
        max-width: 1100px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sport-tab-btn {
        font-size: 0.78rem;
        padding: 11px 6px;
        gap: 4px;
    }

    .sport-arrow {
        padding: 0 10px;
        font-size: 0.8rem;
    }
}


/* =========================================
   6. DESKTOP ENHANCEMENTS (ab 992px)
   ========================================= */

@media (min-width: 992px) {

    /* 6.1 Breitere Inhaltsbereiche */
    .hero-wrapper,
    .welcome-section,
    .section-divider {
        max-width: 1100px;
    }

    .quick-nav {
        max-width: 1100px;
    }

    /* 6.2 Größerer Hero-Text */
    .hero-text-overlay h1 {
        font-size: 3.8rem !important;
        letter-spacing: -1.5px;
    }

    .hero-text-overlay p {
        font-size: 1.15rem !important;
        margin-top: 12px !important;
        letter-spacing: 0.8px;
    }

    /* 6.3 Sport-Switcher: Tab-Layout wie Mobil, aber breiter */
    .sport-switcher {
        max-width: 900px;
    }

    .sport-tab-btn {
        font-size: 1rem;
        padding: 15px 12px;
    }
}
