/* ============================================================
   Galatasaray Fan Club Ulm – Premium Enhancements
   ============================================================ */

:root {
    --ticker-h: 2.65rem;
    --mobile-cta-h: 4.25rem;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* —— Scroll-Fortschritt —— */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 10002;
    background: var(--grad-fire);
    box-shadow: 0 0 12px rgba(255, 179, 0, 0.65);
    pointer-events: none;
    transition: width 0.08s linear;
}

body.has-ticker .scroll-progress { top: var(--ticker-h); }

/* —— News-Ticker (Startseite) —— */
body.has-ticker .ticker {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1101;
}

body.has-ticker .navbar {
    top: var(--ticker-h);
}

body.has-ticker .hero {
    padding-top: calc(7rem + var(--ticker-h));
}

/* —— Typografie & Sektionen —— */
.section-header::after {
    content: '';
    display: block;
    width: 72px;
    height: 3px;
    margin: 1.35rem auto 0;
    border-radius: 3px;
    background: var(--grad-fire);
    opacity: 0.85;
}

.section-title {
    text-wrap: balance;
    letter-spacing: 0.02em;
}

main > section:not(.hero):nth-of-type(even) {
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(165, 0, 52, 0.07), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 179, 0, 0.05), transparent 50%);
}

/* —— Karten & Interaktion —— */
.glass-card,
.trophy-card,
.match-card,
.event-card {
    transition:
        transform 0.45s var(--ease-out-expo),
        box-shadow 0.45s var(--ease-out-expo),
        border-color 0.35s ease;
}

.glass-card:hover,
.trophy-card:hover,
.match-card:hover,
.event-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 179, 0, 0.22);
}

.btn-primary,
.btn-secondary,
.nav-cta {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.nav-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.55s var(--ease-out-expo);
}

.btn-primary:hover::after,
.nav-cta:hover::after {
    transform: translateX(120%);
}

/* —— Hero verfeinert —— */
.hero-title .line-1 {
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.hero-title .line-2 {
    filter: drop-shadow(0 0 24px rgba(255, 179, 0, 0.35));
}

.hero-video-bg {
    filter: brightness(0.55) contrast(1.12) saturate(1.15);
}

.hero-action-card {
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* —— Featured Star (lokales Bild) —— */
.featured-image {
    background-image: url('../images/osimhen.jpg') !important;
    background-position: center top;
    mix-blend-mode: normal !important;
    filter: saturate(1.08) contrast(1.05);
}

.star-photo {
    opacity: 1 !important;
}

.featured-card {
    border: 1px solid rgba(255, 179, 0, 0.12);
    box-shadow:
        0 32px 80px -20px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* —— Stats & Countdown —— */
.stats-band {
    border-top: none;
    box-shadow: inset 0 1px 0 rgba(255, 179, 0, 0.12);
}

.stat-item {
    border-radius: 1rem;
    transition: background 0.35s ease, transform 0.35s ease;
}

.stat-item:hover {
    background: rgba(255, 179, 0, 0.04);
    transform: translateY(-2px);
}

.countdown-banner {
    box-shadow: 0 12px 40px -8px rgba(165, 0, 52, 0.45);
}

.countdown-number {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* —— Matchday Board —— */
.matchday-board {
    border: 1px solid rgba(255, 179, 0, 0.15);
    box-shadow:
        0 24px 60px -12px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 179, 0, 0.06) inset;
}

.live-pill i {
    animation: pulseDot 1.4s ease-in-out infinite;
}

/* —— Liga-Tabelle —— */
.league-table tbody tr.highlight {
    background: linear-gradient(90deg, rgba(165, 0, 52, 0.22), rgba(255, 179, 0, 0.08));
    box-shadow: inset 3px 0 0 var(--gs-gold);
}

/* —— Newsletter —— */
.newsletter {
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg at 50% 50%, transparent, rgba(255, 179, 0, 0.08), transparent 30%);
    animation: newsletterGlow 12s linear infinite;
    pointer-events: none;
}

@keyframes newsletterGlow {
    to { transform: rotate(360deg); }
}

.newsletter-container {
    position: relative;
    z-index: 1;
}

/* —— Unterseiten Hero —— */
.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 179, 0, 0.14), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(165, 0,  52, 0.2), transparent 50%);
    pointer-events: none;
}

.page-hero__title {
    text-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* —— Mobile Sticky CTA —— */
.mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid rgba(255, 179, 0, 0.2);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    gap: 0.55rem;
    align-items: center;
    transform: translateY(110%);
    transition: transform 0.45s var(--ease-out-expo);
}

.mobile-cta.is-visible {
    transform: translateY(0);
}

.mobile-cta__primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: var(--grad-fire);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(165, 0, 52, 0.4);
}

.mobile-cta__secondary {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 179, 0, 0.35);
    color: var(--gs-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    flex-shrink: 0;
}

.mobile-cta__close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1;
}

body.has-mobile-cta {
    padding-bottom: calc(var(--mobile-cta-h) + env(safe-area-inset-bottom, 0px));
}

body.has-mobile-cta .scroll-top.visible {
    bottom: calc(var(--mobile-cta-h) + 1rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 900px) {
    .mobile-cta {
        display: flex;
    }
}

/* —— Scroll-Top verfeinert —— */
.scroll-top {
    background: var(--grad-gold);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.05);
}

/* —— Bilder: lazy fade-in + Performance —— */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
    image-rendering: -webkit-optimize-contrast;
}

img[loading="lazy"].is-loaded,
img[loading="lazy"][src] {
    opacity: 1;
}

/* Reduce layout shifts */
img, video, .event-card-bg {
    max-width: 100%;
    height: auto;
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
    .newsletter::before {
        animation: none;
    }
}

/* ============================================================
   PHASE 5: Mobile Polish Ergänzungen
   ============================================================ */
@media (max-width: 768px) {
    /* Größere, angenehmere Touch-Ziele */
    .nav-link, .nav-cta {
        padding: 0.6rem 0.9rem;
        min-height: 44px;
    }
    
    .star-card, .glass-card, .event-card, .match-card {
        touch-action: manipulation;
    }

    /* Music Player auf sehr kleinen Geräten verstecken */
    @media (max-width: 380px) {
        .music-player {
            display: none;
        }
    }

    /* Bessere Abstände bei Hero Action Cards */
    .hero-action-card {
        padding: 0.85rem 1rem;
    }
}
}
