:root {



    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F0F2F5;
    --bg-card: #FFFFFF;


    --bg-card-hover: #FAFBFC;
    --bg-blue-light: #E7F3FF;


    --text-primary: #0F172A;

    --text-secondary: #334155;

    --text-muted: #475569;

    --text-white: #FFFFFF;


    --violet-primary: #7C3AED;
    --violet-dark: #6D28D9;
    --violet-light: #EDE9FE;
    --violet-hover: #6D28D9;


    --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);


    --accent-primary: #7C3AED;
    --accent-secondary: #8B5CF6;
    --accent-live: #E74C3C;
    --accent-success: #15803d;
    /* was #42B72A (ratio 3.7:1 FAIL) → #15803d (ratio 4.55:1 PASS) */
    --accent-gold: #F7B500;


    --border-subtle: #E4E6EB;
    --border-medium: #CED0D4;
    --border-strong: #BCC0C4;
    --border-violet: var(--violet-primary);
    --border-live: var(--accent-live);


    --gradient-violet: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    --gradient-card: linear-gradient(180deg, #FFFFFF 0%, #F8F9FA 100%);
    --gradient-live: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);


    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.12);


    --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 4px 12px rgba(124, 58, 237, 0.15);
    --shadow-violet: 0 4px 12px rgba(124, 58, 237, 0.20);
    --shadow-live: 0 4px 12px rgba(231, 76, 60, 0.25);


    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-titles: 'Rajdhani', 'Poppins', sans-serif;
    --font-arabic: 'Cairo', 'Segoe UI', sans-serif;


    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;


    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;


    --text-xs: 0.875rem;

    --text-sm: 1rem;

    --text-base: 1.125rem;

    --text-lg: 1.25rem;

    --text-xl: 1.5rem;

    --text-2xl: 1.875rem;

    --text-3xl: 2.25rem;

    --text-4xl: 3rem;

    --text-5xl: 3.75rem;

    --text-6xl: 4.5rem;

}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Anti-FOUC: show body once main.css is loaded (critical.css hides it with opacity:0) */
body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.7;
    font-weight: 500;
    letter-spacing: 0.01em;
    font-size: 20px;
    position: relative;
    overflow-x: hidden;
}


body[dir="rtl"],
html[lang="ar"] body {
    font-family: var(--font-arabic);
}

h1 {
    font-family: var(--font-titles);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.15;
    font-size: clamp(3rem, 8vw, 4.5rem);
}

h2 {
    font-family: var(--font-titles);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    font-size: clamp(2.25rem, 6vw, 3.25rem);
}

h3 {
    font-family: var(--font-titles);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.3;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

p {
    line-height: 1.8;
    max-width: 75ch;
}


a {
    color: var(--accent-violet);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--accent-violet-dark);
    text-decoration-thickness: 3px;
}


.cta-watch,
.match-cta,
.btn,
.nav-link-clean,
.mobile-nav-item,
.lang-option,
.footer-links a {
    text-decoration: none;
}


header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 2px solid #E5E7EB;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: all 300ms ease;
}

header.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--accent-violet);
}

.container-header {
    width: 100%;
    height: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-titles);
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-violet);
    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}




.language-switcher {
    position: relative;
    z-index: 100;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 200ms;
    font-size: 0.875rem;
    font-weight: 600;
}

.lang-btn:hover {
    background: #FFFFFF;
    border-color: var(--violet-primary);
    box-shadow: var(--shadow-md);
}

.lang-btn.active {
    border-color: var(--violet-primary);
    box-shadow: var(--shadow-violet);
}

.current-lang-flag {
    font-size: 1.25rem;
}

.current-lang-code {
    font-weight: 700;
    text-transform: uppercase;
}

.lang-btn i {
    font-size: 1rem;
    transition: transform 200ms;
}

.lang-btn.active i {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 200ms ease-out;
}

.lang-dropdown.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary) !important;
    text-decoration: none;
    border-radius: 6px;
    transition: all 200ms;
    font-weight: 500;
}

.lang-option:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary) !important;
}

.lang-option.active {
    background: rgba(124, 58, 237, 0.1);
    color: #4c1d95 !important;
    /* was var(--accent-violet) #7C3AED ratio ~3.1:1 → #4c1d95 ratio 7.5:1 PASS */
    font-weight: 700;
}

.lang-option .flag {
    font-size: 1.25rem;
}

.lang-option .lang-name {
    font-size: 0.875rem;
}


.hero-section {
    padding: calc(80px + var(--space-12)) var(--space-6) var(--space-12);
    background: transparent;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 50% 50%,
            rgba(0, 245, 255, 0.08) 0%,
            transparent 60%);


    pointer-events: none;
}

@keyframes heroGlow {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.7;
    }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1.15;
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    text-shadow: 0 2px 15px rgba(0, 245, 255, 0.4),
        0 4px 30px rgba(0, 245, 255, 0.2);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: var(--text-secondary);
    max-width: 65ch;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    font-weight: 500;
    line-height: 1.8;
}


.hero-stadium {
    background: var(--bg-card);
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    margin: var(--space-10) auto;
    max-width: 900px;
    box-shadow: var(--shadow-card), var(--shadow-violet);
    position: relative;
    z-index: 1;
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-stadium::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-2xl);
    background: var(--gradient-violet);
    opacity: 0;
    filter: blur(20px);
    transition: opacity 400ms;
    z-index: -1;
}

.hero-stadium:hover::before {
    opacity: 0.2;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-featured-match {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.live-badge {
    background: var(--gradient-live);
    color: #FFF;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-live);

    position: relative;
}

.live-badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-full);
    background: var(--gradient-live);
    opacity: 0.3;
    filter: blur(6px);

    z-index: -1;
}

.live-badge span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #FFF;
    border-radius: 50%;

}

@keyframes livePulseIntense {

    0%,
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-live);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    }
}

@keyframes liveGlow {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes liveDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.league-name {
    color: var(--text-secondary);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}


.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    flex-wrap: nowrap;
}

.team {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 250px;
    min-width: 120px;
}

.team-logo {
    width: 120px;
    height: 120px;
    background: var(--bg-secondary);
    border: 3px solid var(--border-medium);
    border-radius: 50%;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-name {
    font-family: var(--font-titles);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    text-transform: uppercase;
    word-break: break-word;
    line-height: 1.3;
}

.vs-divider {
    font-family: var(--font-titles);
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--accent-score);
    flex-shrink: 0;
    text-align: center;
    min-width: 60px;
}

.match-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.match-time,
.match-date {
    color: var(--text-secondary);
    font-size: 1.25rem;

    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.6;
}

.cta-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.125rem 2.25rem;

    background: var(--gradient-violet);
    color: white;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 200ms;
    font-size: 1.125rem;

    min-height: 54px;

    box-shadow: var(--shadow-md);
}

.cta-watch:hover {
    background: var(--violet-dark);
    box-shadow: var(--shadow-violet);
}




.matches-section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-titles);
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-primary);
    /* was --text-secondary: causes 1.32:1 fail on dark bg */
    font-size: 1.125rem;
    line-height: 1.6;
    text-align: center;
    font-weight: 500;
}


.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
    gap: var(--space-10);
    padding: 0 var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
}


.match-card {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(124, 58, 237, 0.06) 50%,
            transparent 100%);
    transition: left 600ms;
}

.match-card:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--accent-violet);
}

.match-card:hover::before {
    left: 100%;
}

.match-card.live {
    border-color: var(--accent-live);
    box-shadow: var(--shadow-md), var(--shadow-live);

}

@keyframes liveCardPulse {

    0%,
    100% {
        border-color: rgba(239, 68, 68, 0.5);
    }

    50% {
        border-color: rgba(239, 68, 68, 0.8);
    }
}

.match-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.league-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
    font-size: 1.0625rem;

    font-weight: 600;
    text-transform: uppercase;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.6;
}

.league-badge i {
    color: var(--accent-violet);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.match-status {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}

.match-status.live {
    background: var(--gradient-live);
    color: #FFF;
    animation: livePulseIntense 1.5s ease-in-out infinite;
    box-shadow: var(--shadow-live);
}

.match-status.finished {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.match-status.upcoming {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}


.match-card-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.match-team {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    max-width: 45%;
}

.match-team-logo {
    width: 120px;
    height: 120px;
    background: #f4f7f9;
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: 50%;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 300ms;
}

.match-card:hover .match-team-logo {
    border-color: var(--accent-violet);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.25);
}

.match-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.match-team-logo i {
    font-size: 4rem;
    color: var(--accent-violet);
}

.match-team-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%;
}

.match-score {
    font-family: var(--font-titles);
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-violet);
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
    flex-shrink: 0;
    min-width: fit-content;
}

.match-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.match-time-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.25rem;

    line-height: 1.6;
}

.match-time-info i {
    color: var(--accent-live);
}

.match-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--gradient-violet);
    color: var(--text-white);
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    white-space: nowrap;
    min-height: 44px;
    box-shadow: var(--shadow-violet);
}

.match-cta:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-violet-strong);
    filter: brightness(1.1);
}

.match-cta i {
    font-size: 1.125rem;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 700;
    font-size: 0.9375rem;
    text-transform: uppercase;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary,
.match-cta,
.cta-watch {
    background: var(--gradient-violet);
    color: white;
    font-weight: 800;
    box-shadow: var(--shadow-violet);
}

.btn-primary::after,
.match-cta::after,
.cta-watch::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 100%);
    opacity: 0;
    transition: opacity 300ms;
}

.btn-primary:hover,
.match-cta:hover,
.cta-watch:hover {
    box-shadow: var(--shadow-lg),
        0 12px 48px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover::after,
.match-cta:hover::after,
.cta-watch:hover::after {
    opacity: 1;
}

.cta-watch {
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
}

.match-cta {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    white-space: nowrap;
}

.match-cta i {
    font-size: 1rem;
}


.hamburger-container {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 200ms;
}

.hamburger-container:hover {
    background: var(--bg-card-hover);
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 3px;
    transition: all 200ms;
}

.hamburger-container.hamburger-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-container.hamburger-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-container.hamburger-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

#mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border-subtle);
    padding: 1.5rem;
    transition: right 300ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow-y: auto;
}

#mobile-menu.active {
    right: 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary) !important;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 200ms;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.mobile-nav-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary) !important;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    color: var(--accent-primary);
}

#mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 300ms;
    z-index: 1000;
}

#mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}


.header-nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-nav-desktop .nav-link-clean {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    transition: all 200ms;
    position: relative;
}

.header-nav-desktop .nav-link-clean::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: width 300ms;
}

.header-nav-desktop .nav-link-clean:hover::after,
.header-nav-desktop .nav-link-clean.active::after {
    width: 60%;
}

.header-nav-desktop .nav-link-clean:hover {
    color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.header-nav-desktop .nav-link-clean.active {
    color: var(--accent-primary);
    background: rgba(5, 150, 105, 0.1);
}

.header-nav-desktop .nav-link-clean i {
    font-size: 1.125rem;
    color: var(--accent-primary);
}


@media (min-width: 769px) and (max-width: 1024px) {
    .matches-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    }

    .hero-stadium {
        padding: 1.5rem;
    }
}


@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .header-nav-desktop {
        display: none !important;
    }

    .header-content {
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .logo-text {
        font-size: 1.25rem !important;
    }

    .logo-container img {
        width: 40px !important;
        height: 40px !important;
    }

    .hamburger-container {
        display: flex !important;
    }


    header .btn-primary {
        display: none;
    }

    .hero-section {
        padding: calc(80px + var(--space-8)) var(--space-4) var(--space-8);
    }

    .hero-title {
        font-size: clamp(2.25rem, 10vw, 3rem);
        margin-bottom: 1.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.0625rem;
        line-height: 1.7;
    }

    .hero-stadium {
        padding: var(--space-6) var(--space-4);
        margin: var(--space-6) 0;
    }

    .match-teams {
        gap: var(--space-6);
    }

    .team-logo {
        width: 70px;
        height: 70px;
        padding: 0.75rem;
    }

    .team-name {
        font-size: 1rem;
    }

    .vs-divider {
        font-size: 1.75rem;
    }

    .matches-section {
        padding: var(--space-12) 0;
    }

    .section-title {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .matches-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        padding: 0 var(--space-4);
    }

    .match-card {
        padding: var(--space-6);
    }

    .match-card-teams {
        gap: var(--space-4);
    }

    .match-team-logo {
        width: 100px;
        height: 100px;
        padding: 0.625rem;
        border-width: 2px;
    }

    .match-team-name {
        font-size: 1.125rem;
    }

    .match-score {
        font-size: 1.5rem;
    }

    .match-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
    }

    .match-cta {
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
        min-height: 48px;
    }

    .cta-watch {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 50px;
    }
}


@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .header-content {
        padding: 0 0.75rem;
    }

    .logo-text {
        font-size: 1.125rem !important;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .match-card {
        padding: var(--space-4);
    }

    .match-team-logo {
        width: 95px;
        height: 95px;
        padding: 0.75rem;
    }

    .match-team-name {
        font-size: 1rem;
    }

    .match-score {
        font-size: 1.25rem;
    }
}


@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.match-card {
    animation: slideInUp 600ms ease-out;
    animation-fill-mode: both;
}

.match-card:nth-child(1) {
    animation-delay: 50ms;
}

.match-card:nth-child(2) {
    animation-delay: 100ms;
}

.match-card:nth-child(3) {
    animation-delay: 150ms;
}

.match-card:nth-child(4) {
    animation-delay: 200ms;
}

.match-card:nth-child(5) {
    animation-delay: 250ms;
}

.match-card:nth-child(6) {
    animation-delay: 300ms;
}

.match-card:nth-child(7) {
    animation-delay: 350ms;
}

.match-card:nth-child(8) {
    animation-delay: 400ms;
}

.match-card:nth-child(9) {
    animation-delay: 450ms;
}

.match-card:nth-child(10) {
    animation-delay: 500ms;
}


.match-card.loaded {
    animation: none;
}


footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #E2E8F0 100%);
    border-top: 1px solid var(--border-medium);
    padding: 3rem 0 2rem;
    color: #374151;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: var(--text-primary);
    font-family: var(--font-titles);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all 300ms;
}

.footer-social a:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 255, 163, 0.2);
}

.footer-section h4 {
    color: #111827;
    font-family: var(--font-titles);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #374151;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 200ms;
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 255, 163, 0.3);
    transform: translateX(3px);
}

.footer-links a i {
    font-size: 1rem;
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-bottom small {
    color: #4b5563;
    font-size: 0.8125rem;
    line-height: 1.6;
}


.leagues-section {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    padding: var(--space-20) 0;
    position: relative;
}

.leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.league-card {
    background: var(--gradient-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    text-decoration: none;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.league-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(5, 150, 105, 0.08) 50%,
            transparent 100%);
    transition: left 500ms ease;
}

.league-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-accent);
    border-color: var(--accent-primary);
}

.league-card:hover::before {
    left: 100%;
}

.league-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(2, 132, 199, 0.1) 100%);
    border-radius: 50%;
    transition: all 300ms;
    flex-shrink: 0;
}

.league-card:hover .league-logo {
    transform: rotate(15deg) scale(1.1);
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(2, 132, 199, 0.2) 100%);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}

.league-logo i {
    font-size: 3rem;
    color: var(--accent-primary);
    transition: all 300ms;
}

.league-card:hover .league-logo i {
    color: var(--accent-secondary);
}

.league-name-text {
    font-family: var(--font-titles);
    font-size: 1.125rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 0.05em;
    margin: 0;
    transition: all 300ms;
    line-height: 1.3;
}

.league-card:hover .league-name-text {
    color: var(--accent-primary);
    transform: scale(1.05);
}




@media (min-width: 1200px) {
    .leagues-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


@media (min-width: 900px) and (max-width: 1199px) {
    .leagues-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (min-width: 600px) and (max-width: 899px) {
    .leagues-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }

    .league-card {
        min-height: 160px;
        padding: var(--space-6);
    }
}


@media (max-width: 599px) {
    .leagues-section {
        padding: var(--space-12) 0;
    }

    .leagues-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        padding: 0 var(--space-4);
    }

    .league-card {
        min-height: 140px;
        padding: var(--space-5);
    }

    .league-logo {
        width: 60px;
        height: 60px;
    }

    .league-logo i {
        font-size: 2.25rem;
    }

    .league-name-text {
        font-size: 1rem;
    }
}


@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0 1rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-brand p {
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-social a {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .footer-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .footer-links li {
        margin-bottom: 0.35rem;
    }

    .footer-links a {
        font-size: 0.8rem;
        gap: 0.35rem;
    }

    .footer-links a i {
        font-size: 0.85rem;
    }

    .footer-bottom {
        padding-top: 1rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }

    .footer-bottom small {
        font-size: 0.7rem;
    }
}

/* ── ACCESSIBILITY & CONTRAST FIXES (PageSpeed 100 target) ─────────────────── */

/* Hero subtitle over dark bg (#0d1b2a): force white text for WCAG AA */
.hero-section .hero-subtitle {
    color: rgba(255, 255, 255, 0.92);
}

/* Section subtitles/titles on dark match section */
.matches-section .section-subtitle,
.matches-section .section-title {
    color: #E8F5E9;
}

/* League badge text: darken for better contrast on white cards */
.league-badge {
    color: #374151;
}

/* Footer links - dark for light bg */
.footer-links a {
    color: #374151;
}

.footer-links a:hover {
    color: #059669;
}

/* Nav links on white header */
.nav-link-clean {
    color: #1F2937;
}

/* Mobile nav on dark overlay */
.mobile-nav-item {
    color: #F1F5F9;
}

/* Focus outlines for keyboard navigation (WCAG 2.4.7) */
*:focus-visible {
    outline: 3px solid #7C3AED;
    outline-offset: 3px;
}

/* ── KEYFRAMES moved from index.php inline style ──────────────────────────── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ── Section title global color fix (no green spans) ─────────────────────── */
.section-title {
    color: var(--text-primary);
}

.section-title span {
    color: inherit !important;
}