/**
 * Hatta Sports Club - Modern Design System
 * Blue Tonal Monochromatic Theme
 * Single source of truth for all color tokens.
 * DO NOT add hardcoded hex values anywhere else.
 */

/* ============================================
   IMPORTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800;900&family=Cairo:wght@400;600;700;800;900&display=swap');

/* ============================================
   CSS VARIABLES — BLUE TONAL DESIGN TOKENS
   ============================================ */
:root {
    /* ── Blue Tonal Scale ── */
    --blue-900: #012a4a;
    --blue-800: #013a63;
    --blue-700: #01497c;
    --blue-600: #014f86;
    --blue-500: #2a6f97;
    --blue-400: #2c7da0;
    --blue-300: #468faf;
    --blue-200: #61a5c2;
    --blue-100: #89c2d9;
    --blue-50: #a9d6e5;

    /* ── RGB variants for rgba() ── */
    --blue-900-rgb: 1, 42, 74;
    --blue-800-rgb: 1, 58, 99;
    --blue-700-rgb: 1, 73, 124;
    --blue-600-rgb: 1, 79, 134;
    --blue-500-rgb: 42, 111, 151;
    --blue-400-rgb: 44, 125, 160;
    --blue-300-rgb: 70, 143, 175;
    --blue-200-rgb: 97, 165, 194;
    --blue-100-rgb: 137, 194, 217;
    --blue-50-rgb: 169, 214, 229;

    /* ── Full-Page Gradient ── */
    --page-gradient: linear-gradient(180deg,
            var(--blue-900) 0%,
            var(--blue-800) 15%,
            var(--blue-700) 30%,
            var(--blue-500) 50%,
            var(--blue-300) 70%,
            var(--blue-100) 85%,
            var(--blue-50) 100%);

    /* ── Legacy compatibility aliases ── */
    --clr-midnight: var(--blue-900);
    --clr-midnight-rgb: var(--blue-900-rgb);
    --clr-dark: var(--blue-800);
    --clr-surface: var(--blue-700);
    --clr-surface-rgb: var(--blue-700-rgb);

    /* ── Brand Dark (buttons, accents) ── */
    --brand-dark: var(--blue-500);
    --brand-dark-hover: var(--blue-400);

    /* ── Accent - Hatta Yellow (kept for badges/live only) ── */
    --clr-yellow: #fecb00;
    --clr-yellow-hover: #e5b700;
    --clr-yellow-rgb: 254, 203, 0;

    /* ── Text Colors ── */
    --clr-text: #ffffff;
    --clr-text-muted: rgba(255, 255, 255, 0.65);
    --clr-text-dim: rgba(255, 255, 255, 0.40);

    /* ── Glassmorphism ── */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-border-hover: rgba(255, 255, 255, 0.20);
    --glass-blur: 12px;

    /* ── Border Radius ── */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* ── Transitions ── */
    --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-med: 220ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 450ms cubic-bezier(0.4, 0, 0.2, 1);
    --ease-cinematic: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* ── Shadows ── */
    --shadow-sm: 0 2px 8px rgba(var(--blue-900-rgb), 0.4);
    --shadow-md: 0 8px 24px rgba(var(--blue-900-rgb), 0.5);
    --shadow-lg: 0 16px 48px rgba(var(--blue-900-rgb), 0.6);
    --shadow-xl: 0 24px 64px rgba(var(--blue-900-rgb), 0.7);

    /* ── Z-Index Scale ── */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* ── Nav Height ── */
    --nav-height: 70px;
}

/* ============================================
   GLOBAL RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    /* Full-page tonal gradient — fixed so scrolling reveals depth */
    background: var(--page-gradient);
    background-attachment: fixed;
    background-size: cover;
    color: var(--clr-text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: var(--nav-height);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.display-font {
    font-family: 'Outfit', 'Cairo', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--clr-text);
}

[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    font-family: 'Cairo', 'Inter', sans-serif;
}

/* Links */
a {
    color: var(--blue-100);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--blue-50);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Background Colors — using tonal tokens */
.bg-midnight {
    background-color: rgba(var(--blue-900-rgb), 0.95);
}

.bg-dark {
    background-color: rgba(var(--blue-800-rgb), 0.90);
}

.bg-surface {
    background-color: rgba(var(--blue-700-rgb), 0.85);
}

.bg-yellow {
    background-color: var(--blue-600) !important;
    color: white !important;
}

.bg-darker {
    background-color: rgba(var(--blue-900-rgb), 0.60);
}

/* Text Colors */
.text-yellow {
    color: var(--clr-yellow) !important;
}

.text-white {
    color: var(--clr-text) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.50) !important;
}

.text-muted {
    color: var(--clr-text-muted) !important;
}

/* Font Weights */
.fw-light {
    font-weight: 300;
}

.fw-normal {
    font-weight: 400;
}

.fw-medium {
    font-weight: 500;
}

.fw-semibold {
    font-weight: 600;
}

.fw-bold {
    font-weight: 700;
}

.fw-black {
    font-weight: 800;
}

/* Letter Spacing */
.spaced-text {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Object Fit */
.object-fit-cover {
    object-fit: cover;
    object-position: center;
}

/* ============================================
   GLASSMORPHISM SYSTEM
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: background var(--transition-med),
        border-color var(--transition-med),
        transform var(--transition-med),
        box-shadow var(--transition-med);
    will-change: transform, background, border-color;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.glass-nav {
    background: rgba(var(--blue-900-rgb), 0.85) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-med);
}

/* ============================================
   3D TILT EFFECTS
   ============================================ */
.tilt-card {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.tilt-inner {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: transform var(--transition-med);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow var(--transition-med);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(var(--blue-300-rgb), 0.40);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal-init {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Staggered Delays */
.stagger-1 {
    transition-delay: 50ms;
}

.stagger-2 {
    transition-delay: 150ms;
}

.stagger-3 {
    transition-delay: 250ms;
}

.stagger-4 {
    transition-delay: 350ms;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-premium {
    background: var(--blue-500);
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    border: none;
    transition: background var(--transition-med),
        transform var(--transition-med),
        box-shadow var(--transition-med);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.btn-premium:hover {
    background: var(--blue-400);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-premium:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   NAVIGATION & HEADER
   ============================================ */
.main-nav {
    height: var(--nav-height);
    padding: 0;
}

.main-nav.scrolled {
    height: 60px;
    background: rgba(var(--blue-900-rgb), 0.97) !important;
    box-shadow: var(--shadow-lg);
}

/* Navigation Links */
.nav-link {
    position: relative;
    transition: color var(--transition-fast);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--blue-200);
    transition: width var(--transition-med), left var(--transition-med);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* RTL nav underline */
[dir="rtl"] .nav-link::after {
    left: auto;
    right: 50%;
    transition: width var(--transition-med), right var(--transition-med);
}

[dir="rtl"] .nav-link:hover::after,
[dir="rtl"] .nav-link.active::after {
    right: 0;
}

/* Main Logo */
.main-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform var(--transition-med);
}

.header-logo img {
    height: 48px !important;
    width: auto !important;
    object-fit: contain;
    max-width: 100%;
    display: block;
}

.hover-scale.main-logo:hover {
    transform: scale(1.05);
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--glass-border);
    background: rgba(var(--blue-900-rgb), 0.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    margin-top: 10px !important;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.80);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--blue-500);
    color: white;
    transform: translateX(5px);
}

[dir="rtl"] .dropdown-item:hover {
    transform: translateX(-5px);
}

/* ============================================
   RESPONSIVE HEADER
   ============================================ */
@media (max-width: 991px) {
    .main-nav {
        height: 60px;
    }

    .header-logo img {
        height: 42px !important;
    }

    .tilt-card {
        perspective: none;
    }

    .tilt-inner {
        transform: none !important;
    }
}

@media (max-width: 576px) {
    .main-nav {
        height: 60px;
        padding: 0.5rem 1rem;
    }

    .header-logo img {
        height: 38px !important;
    }
}

/* ============================================
   SECTION DIFFERENTIATION
   Subtle glass overlays — NOT hard color blocks.
   ============================================ */

/* News section — very faint glass */
.section-news,
.bg-midnight {
    background: rgba(var(--blue-900-rgb), 0.25) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Alternate section */
.bg-surface,
.bg-darker {
    background: rgba(var(--blue-700-rgb), 0.20) !important;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-modern .page-link {
    background: var(--glass-bg);
    border: 1px solid rgba(var(--blue-300-rgb), 0.25);
    color: var(--clr-text);
    margin: 0 5px;
    border-radius: var(--radius-full) !important;
    padding: 10px 20px;
    transition: all var(--transition-med);
}

.pagination-modern .page-item.active .page-link {
    background: var(--blue-500);
    border-color: var(--blue-500);
    color: white;
    font-weight: bold;
}

.pagination-modern .page-item.disabled .page-link {
    opacity: 0.3;
}

.pagination-modern .page-link:hover:not(.disabled) {
    background: rgba(var(--blue-400-rgb), 0.30);
    border-color: var(--blue-300);
    transform: translateY(-2px);
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    background: linear-gradient(0deg,
            rgba(var(--blue-900-rgb), 0.92) 0%,
            rgba(var(--blue-900-rgb), 0.20) 100%);
}

.bg-gradient-dark {
    background: linear-gradient(0deg,
            rgba(var(--blue-900-rgb), 0.95) 0%,
            rgba(var(--blue-900-rgb), 0) 100%);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--blue-900);
}

::-webkit-scrollbar-thumb {
    background: var(--blue-600);
    border: 2px solid var(--blue-900);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-400);
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton {
    background: linear-gradient(90deg,
            rgba(var(--blue-700-rgb), 0.3) 25%,
            rgba(var(--blue-500-rgb), 0.4) 50%,
            rgba(var(--blue-700-rgb), 0.3) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: var(--blue-400);
    color: white;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
        transition-delay: -1ms !important;
    }

    .reveal-init {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--blue-300);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }

    .glass-card,
    .glass-nav {
        background: white;
        border: 1px solid #ccc;
    }

    .no-print {
        display: none !important;
    }
}

/* ============================================
   MOBILE GRADIENT FIX
   ============================================ */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

/* ============================================================
   PHASE 1: PERFORMANCE & STABILITY FOUNDATION
   PAGE-SPECIFIC STYLES & CLS FIXES
   ============================================================ */

/* --- includes/header.php Extracted --- */
:root {
    --nav-height: 70px;
}

body {
    padding-top: var(--nav-height);
}

.main-nav {
    height: var(--nav-height);
    transition: all var(--transition-med);
}

body .main-nav.scrolled {
    height: 60px;
    background: rgba(var(--blue-900-rgb, 1, 42, 74), 0.97);
    box-shadow: var(--shadow-lg);
}

/* Fix Main Logo Sizing inside Header */
.header-logo img {
    height: 48px;
    width: auto;
}

@media (max-width: 991px) {
    .header-logo img {
        height: 42px;
    }
}

@media (max-width: 576px) {
    .header-logo img {
        height: 38px;
    }
}

.nav-link {
    font-family: 'Outfit', 'Cairo', sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

[dir="rtl"] .nav-link {
    font-family: 'Cairo', sans-serif;
    text-transform: none;
}

.dropdown-menu {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(var(--blue-900-rgb, 1, 42, 74), 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateZ(0);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    margin-top: 10px;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--blue-500, #2a6f97);
    color: white;
    transform: translateX(5px);
}

[dir="rtl"] .dropdown-item:hover {
    transform: translateX(-5px);
}

/* ============================================
   CLS STABILIZATION
   ============================================ */
.hero-slider {
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--blue-900, #012a4a);
    display: block;
}

.hero-slider:not(.swiper-initialized) .swiper-slide {
    display: none;
}

.hero-slider:not(.swiper-initialized) .swiper-slide:first-child {
    display: block !important;
}

.news-card-img-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

/* GPU-Accelerated Backdrop Filter Fixes */
.glass-card {
    background: rgba(1, 42, 74, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateZ(0);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* --- index.php --- */
.page-home .hero-slider {
    width: 100%;
    margin-top: calc(-1 * var(--nav-height));
}

.page-home .hero-overlay {
    background: linear-gradient(0deg, rgba(10, 12, 16, 0.95) 0%, rgba(10, 12, 16, 0.3) 100%);
}

.page-home .max-w-600 {
    max-width: 600px;
}

.page-home .news-card {
    transition: all var(--transition-med);
}

.page-home .news-card:hover {
    transform: translateY(-5px);
}

.page-home .news-card:hover .news-img img {
    transform: scale(1.05);
}

.page-home .grayscale-hover {
    filter: grayscale(0.2);
}

.page-home .news-card:hover .grayscale-hover {
    filter: none;
}

.page-home .news-img img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.page-home .football-spotlight-img {
    perspective: 1000px;
}

.page-home .football-spotlight-img img {
    transform: rotateY(-10deg) rotateX(5deg);
    transition: all var(--transition-slow);
}

.page-home .football-spotlight-img:hover img {
    transform: rotateY(0) rotateX(0);
}

[dir="rtl"] .page-home .football-spotlight-img img {
    transform: rotateY(10deg) rotateX(5deg);
}

.page-home .text-truncate-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-home .match-logo {
    width: 80px;
    height: auto;
}

.page-home .match-logo-box {
    width: 80px;
    height: 80px;
}

.page-home .bg-gradient-gold {
    background: var(--brand-dark);
}


/* --- includes/nav.php Extracted Submenu Support --- */
.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
}

[dir="rtl"] .dropdown-submenu .dropdown-menu {
    left: auto;
    right: 100%;
}

.dropdown-submenu:hover>.dropdown-menu {
    display: block;
}


/* ============================================================
   EXTRACTED INLINE STYLES
   ============================================================ */

/* --- public_html/about.php --- */
.timeline-container {
    padding-top: 20px;
    padding-bottom: 20px;
}

.timeline-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(254, 203, 0, 0.8), transparent);
    box-shadow: 0 0 15px rgba(254, 203, 0, 0.5);
}

.timeline-circle {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(254, 203, 0, 0.3);
    background: rgba(10, 12, 16, 0.95);
    z-index: 10;
    position: relative;
}

.timeline-item:hover .timeline-circle {
    border-color: var(--clr-yellow);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(254, 203, 0, 0.3);
}

.shadow-glow {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.bg-gradient-gold {
    background: linear-gradient(90deg, rgba(254, 203, 0, 0) 0%, rgba(254, 203, 0, 1) 50%, rgba(254, 203, 0, 0) 100%);
}

.extra-small {
    font-size: 0.7rem;
}


/* --- public_html/board.php --- */
.board-member {
    text-align: center;
    width: 100%;
    max-width: 220px;
}

.member-img-wrap {
    width: 185px;
    height: 185px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: none !important;
    box-shadow: none !important;
}

.member-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none !important;
    border-radius: 12px;
}

.chairman-member .member-img-wrap {
    width: 210px;
    height: 210px;
}

/* Remove any borders/shadows from images */
.board-member img {
    border: none !important;
    box-shadow: none !important;
}

.member-name {
    font-size: 1rem;
    line-height: 1.2;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .board-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .board-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .member-img-wrap {
        width: 160px;
        height: 160px;
    }

    .chairman-member .member-img-wrap {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .board-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .member-img-wrap {
        width: 140px;
        height: 140px;
    }

    .chairman-member .member-img-wrap {
        width: 155px;
        height: 155px;
    }
}

.tiny {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}


/* --- public_html/contact.php --- */
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--clr-yellow);
    color: white;
    box-shadow: none;
}

.grayscale-blur {
    filter: grayscale(1) contrast(1.2) invert(0.9);
    opacity: 0.7;
    transition: all var(--transition-slow);
}

.grayscale-blur:hover {
    filter: none;
    opacity: 1;
}


/* --- public_html/matches.php --- */
.scrolling-wrapper::-webkit-scrollbar {
    height: 4px;
}

.scrolling-wrapper::-webkit-scrollbar-thumb {
    background: var(--clr-yellow);
    border-radius: 10px;
}


/* --- public_html/volunteer.php --- */
[dir="rtl"] .border-start {
    border-right: 4px solid var(--clr-yellow) !important;
    border-left: 0 !important;
    padding-right: 1rem !important;
    padding-left: 0 !important;
}


/* --- news/single.php --- */
.article-body {
    background: rgba(255, 255, 255, 0.01);
}

.news-side-item:hover .side-img img {
    transform: scale(1.1);
}

.news-side-item:hover h5 {
    color: var(--clr-yellow);
}

.extra-small {
    font-size: 0.75rem;
}


/* --- football/team.php --- */
.match-logo-lg {
    width: 80px;
    height: auto;
}

.match-logo-lg-box {
    width: 80px;
    height: 80px;
}

.bg-gradient-gold {
    background: linear-gradient(90deg, #fecb00 0%, #ffdf60 100%);
}

.player-card:hover .jersey-number {
    text-shadow: 0 0 15px rgba(254, 203, 0, 0.5);
    opacity: 1;
}

.player-card:hover .grayscale-hover {
    filter: none;
}

.grayscale-hover {
    filter: grayscale(0.2);
}


/* --- En/index.php --- */
.hero-slide {
    height: 100vh;
    min-height: 600px;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--clr-yellow);
}

.swiper-pagination-bullet-active {
    background: var(--clr-yellow);
}


/* --- Ar/index.php --- */
.hero-slide {
    height: 100vh;
    min-height: 600px;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--clr-yellow);
}

.swiper-pagination-bullet-active {
    background: var(--clr-yellow);
}



/* ============================================================
   PHASE 2: PREMIUM VISUAL UPGRADE & CINEMATIC EXPERIENCE
   ============================================================ */
:root {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 8px;

    --glow-yellow-sm: 0 4px 15px rgba(254, 203, 0, 0.15);
    --glow-yellow-md: 0 8px 30px rgba(254, 203, 0, 0.25);

    --ease-cinematic: cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-cinematic: 0.6s var(--ease-cinematic);
}

.card-premium {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transform: translateZ(0);
    transition: transform var(--transition-cinematic), box-shadow var(--transition-cinematic), border-color var(--transition-fast), background var(--transition-cinematic);
}

.card-premium:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--glow-yellow-md);
    border-color: rgba(var(--clr-yellow-rgb), 0.4);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.card-premium .img-wrapper {
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.card-premium .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-cinematic);
}

.card-premium:hover .img-wrapper img {
    transform: scale(1.06);
}

.btn-premium {
    background: var(--blue-500);
    color: var(--clr-text);
    border: 1px solid transparent;
    padding: 1rem 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-premium:hover {
    background: var(--clr-yellow);
    color: var(--blue-900) !important;
    box-shadow: var(--glow-yellow-md);
    transform: translateY(-3px);
}

[dir="rtl"] .btn-premium:hover {
    transform: translateY(-3px);
}

.hero-slider .swiper-slide .hero-bg {
    transform: scale(1.1);
    transition: transform 6s linear;
}

.hero-slider .swiper-slide-active .hero-bg {
    transform: scale(1);
}

.hero-slider .swiper-slide .hero-content>div {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s var(--ease-cinematic);
    transition-delay: 0.3s;
}

.hero-slider .swiper-slide-active .hero-content>div {
    opacity: 1;
    transform: translateY(0);
}

.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 6rem 0;
    overflow: hidden;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(1, 42, 74, 0.9) 0%, rgba(1, 42, 74, 0.4) 100%);
}

[dir="rtl"] .parallax-overlay {
    background: linear-gradient(-90deg, rgba(1, 42, 74, 0.9) 0%, rgba(1, 42, 74, 0.4) 100%);
}


/* ============================================================
   PHASE 2.1: LOGO ALIGNMENT AND CINEMATIC REFINEMENTS
   ============================================================ */

/* 1. Header Logo Standardization */
.header-logo img {
    max-height: 70px !important;
    height: auto !important;
    width: auto !important;
    vertical-align: middle;
    object-fit: contain;
    transition: transform 0.4s ease, filter 0.4s ease, opacity 0.4s ease !important;
}

.header-logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(254, 203, 0, 0.4));
}

/* 2. Footer Logo Standardization */
.footer-logo {
    max-height: 150px !important;
    height: auto;
    width: auto;
    object-fit: contain;
    transition: transform 0.4s ease, opacity 0.4s ease !important;
}

.footer-logo:hover {
    transform: scale(1.05);
}

/* 3. Next Match Widget Logo alignment */
.match-logo {
    width: 60% !important;
    max-width: 120px !important;
    max-height: 100px !important;
    aspect-ratio: 1/1 !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    transition: transform 0.4s ease, opacity 0.4s ease !important;
}

.match-logo-box {
    width: 60% !important;
    max-width: 120px !important;
    aspect-ratio: 1/1 !important;
    height: auto !important;
}

/* 4. Volunteer CTA Background Fixes / Logo Overlays */
.card-premium .cta-logo {
    background-size: contain !important;
    background-position: center !important;
    opacity: 0.15 !important;
    transition: transform 0.6s ease;
}

.card-premium:hover .cta-logo {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .header-logo img {
        max-height: 50px !important;
    }

    .footer-logo {
        max-height: 120px !important;
    }

    .match-logo {
        max-width: 80px !important;
        max-height: 80px !important;
    }
}

/* ============================================================
   PHASE 3: DEEP PERFORMANCE & UX POLISH
   ============================================================ */

/* 1. Smooth Page Transitions */
.page-wrapper {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s var(--ease-cinematic), transform 0.6s var(--ease-cinematic);
}

.page-wrapper.fade-in-active {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Global Toast Notification System */
.toast-premium-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

[dir="rtl"] .toast-premium-container {
    right: auto;
    left: 20px;
}

.toast-premium {
    background: rgba(1, 42, 74, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.5s var(--ease-cinematic);
    will-change: transform, opacity;
}

[dir="rtl"] .toast-premium {
    transform: translateX(-100%);
}

.toast-premium.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-premium i {
    color: var(--clr-yellow);
    font-size: 1.25rem;
}

/* 3. Numeric Counter styling (optional enhancement) */
.counter-value {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* 4. Cinematic Img scaling */
.zoom-on-scroll {
    transition: transform 0.8s var(--ease-cinematic);
    will-change: transform;
}

.zoom-on-scroll.scrolled {
    transform: scale(1.02);
}

/* 5. Mobile Drawer fixes */
.offcanvas {
    transition: transform 0.4s var(--ease-cinematic) !important;
}

/* Extra optimization for mobile scrolling performance */
@media (max-width: 768px) {

    .glass-card,
    .card-premium {
        /* Reduce blur slightly on mobile to keep 60fps */
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* ============================================================
   PHASE 4: CINEMATIC STORYTELLING & FAN ENGAGEMENT
   ============================================================ */

/* Rich Player Profiles */
.player-card {
    transition: transform 0.5s var(--ease-cinematic), box-shadow 0.5s var(--ease-cinematic) !important;
}

.player-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 35px rgba(254, 203, 0, 0.15) !important;
    /* Premium glow */
}

.player-img {
    overflow: hidden;
}

.player-img img {
    will-change: transform;
    transition: transform 0.6s ease-out !important;
}

.player-card:hover .player-img img {
    transform: scale(1.05) translateY(-2px);
}

.player-stats {
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.6s ease-out;
    bottom: -60px;
    opacity: 0;
}

.player-card:hover .player-stats {
    bottom: 0;
    opacity: 1;
}

.player-stats-item {
    font-variant-numeric: tabular-nums;
}

.player-card:hover .jersey-number {
    color: var(--clr-yellow) !important;
    opacity: 0.8 !important;
    transform: scale(1.1) translateY(-10px);
}

/* Picture Element support */
picture.w-100 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dynamic Fan Engagement CTA */
.cta-overlay-anim {
    transition: transform 1.2s var(--ease-cinematic), opacity 1.2s var(--ease-cinematic);
}

/* Ensure background size contain for clear logos */
.bg-logo-contain {
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ============================================================
   PHASE 5: IMMERSIVE INTERACTIONS & MICRO-ANIMATIONS
   ============================================================ */

/* 1. Cinematic Counters Glow */
.animate-counter {
    display: inline-block;
    will-change: transform, opacity;
}

.scrolled .animate-counter,
.animate-counter.scrolled {
    animation: counterPulse 1.5s var(--ease-cinematic) forwards;
}

@keyframes counterPulse {
    0% {
        transform: scale(0.9);
        text-shadow: 0 0 0px rgba(254, 203, 0, 0);
    }

    50% {
        transform: scale(1.05);
        text-shadow: 0 0 15px rgba(254, 203, 0, 0.6);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(254, 203, 0, 0.3);
    }
}

/* 2. Advanced Toast Premium Animation (RTL/LTR Aware) */
.toast-premium-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

[dir="rtl"] .toast-premium-container {
    right: auto;
    left: 30px;
}

.toast-premium {
    background: rgba(1, 42, 74, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: white;
    padding: 18px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--clr-yellow);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    pointer-events: auto;

    /* Spring-like easing */
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease-out;
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    will-change: transform, opacity;
}

[dir="rtl"] .toast-premium {
    border-left: none;
    border-right: 4px solid var(--clr-yellow);
    transform: translateX(-100%) scale(0.95);
}

.toast-premium.toast-show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Mobile Fallback for GPU operations */
@media (max-width: 768px) {
    .toast-premium {
        backdrop-filter: none;
        background: rgba(1, 42, 74, 0.95);
        width: 100%;
        transform: translateY(100%);
    }

    .toast-premium-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
        align-items: center;
    }

    [dir="rtl"] .toast-premium-container {
        left: 20px;
        right: 20px;
    }

    [dir="rtl"] .toast-premium {
        transform: translateY(100%);
    }

    .toast-premium.toast-show {
        transform: translateY(0);
    }
}

/* 3. Hero & CTA Parallax Classes */
.hero-bg {
    will-change: transform, opacity;
    transform-origin: center top;
}

.cta-logo {
    will-change: transform;
    transition: transform 0.2s linear;
}

.card-premium .cta-logo {
    opacity: 0.15;
}

.card-premium:hover .cta-logo {
    opacity: 0.2;
    filter: brightness(1.2);
}

/* 4. Enhanced Player Cards (Parallax on depth wrapper) */
.player-card {
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* ============================================================
   PHASE 6: CINEMATIC STORYTELLING, IDENTITY & MEDIA
   ============================================================ */

/* 1. Cinematic Timeline (about.php & index.php) */
.timeline-item {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.6s ease;
    will-change: transform;
}

.timeline-item:hover {
    transform: translateY(-5px);
}

.timeline-item:hover .timeline-circle {
    box-shadow: 0 0 20px rgba(254, 203, 0, 0.5);
    background: var(--brand-dark);
}

/* 2. Elite Player Details Modal Overlay */
.player-modal-backdrop {
    background: rgba(1, 42, 74, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

.player-modal-backdrop.show {
    opacity: 1;
}

.player-modal-content {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, opacity;
}

.player-modal-backdrop.show .player-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* 3. Matchday Countdown Experience */
.matchday-pulse {
    animation: matchdayPulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes matchdayPulse {
    0% {
        filter: drop-shadow(0 0 5px rgba(254, 203, 0, 0.2));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(254, 203, 0, 0.8));
        transform: scale(1.02);
    }

    100% {
        filter: drop-shadow(0 0 5px rgba(254, 203, 0, 0.2));
        transform: scale(1);
    }
}

/* 4. Fan Quotes Premium Grid Cards */
.fan-quote-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.6rem 1.5rem 1.4rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, box-shadow;
}

.fan-quote-card:hover {
    transform: translateY(-6px);
    border-color: rgba(254, 203, 0, 0.25);
    box-shadow: 0 12px 40px rgba(254, 203, 0, 0.08),
        0 0 0 1px rgba(254, 203, 0, 0.1);
}

/* Card Header — Author block */
.fan-quote-header {
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.fan-quote-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(254, 203, 0, 0.2) 0%, rgba(254, 203, 0, 0.05) 100%);
    border: 1px solid rgba(254, 203, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-yellow);
    font-size: 0.85rem;
    transition: all 0.4s ease;
}

.fan-quote-card:hover .fan-quote-avatar {
    background: linear-gradient(135deg, rgba(254, 203, 0, 0.35) 0%, rgba(254, 203, 0, 0.1) 100%);
    box-shadow: 0 0 12px rgba(254, 203, 0, 0.2);
}

/* Animated Stars */
.fan-quote-stars {
    display: flex;
    gap: 3px;
}

.fan-star {
    color: var(--clr-yellow);
    font-size: 0.82rem;
    opacity: 0;
    transform: scale(0.5);
    animation: starFillIn 0.5s ease forwards;
}

.fan-star-empty {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.82rem;
}

@keyframes starFillIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-15deg);
        filter: brightness(0.5);
    }

    60% {
        opacity: 1;
        transform: scale(1.2) rotate(5deg);
        filter: brightness(1.5);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
}

/* Quote Body */
.fan-quote-body {
    position: relative;
    padding-top: 0.2rem;
}

.fan-quote-open-mark {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.8rem;
    line-height: 1;
    color: rgba(254, 203, 0, 0.15);
    position: absolute;
    top: -0.5rem;
    left: -0.2rem;
    font-weight: 900;
    pointer-events: none;
}

[dir="rtl"] .fan-quote-open-mark {
    left: auto;
    right: -0.2rem;
}

.fan-quote-body p {
    position: relative;
    z-index: 1;
    padding-top: 0.8rem;
}

/* Decorative corner accent */
.fan-quote-corner-accent {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 50px;
    border-bottom: 2px solid rgba(254, 203, 0, 0.12);
    border-right: 2px solid rgba(254, 203, 0, 0.12);
    border-radius: 0 0 16px 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

[dir="rtl"] .fan-quote-corner-accent {
    right: auto;
    left: 0;
    border-right: none;
    border-left: 2px solid rgba(254, 203, 0, 0.12);
    border-radius: 0 0 0 16px;
}

.fan-quote-card:hover .fan-quote-corner-accent {
    width: 70px;
    height: 70px;
    border-color: rgba(254, 203, 0, 0.3);
}

/* Responsive: 2 col on tablets, 1 col on mobile */
@media (max-width: 576px) {
    .fan-quote-card {
        padding: 1.3rem 1.2rem;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
}

/* 5. Video Media Immersion */
.video-immersion-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    /* Full width breakout */
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
}

.video-immersion-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transition: transform 10s linear;
}

.video-immersion-wrapper.playing video {
    transform: scale(1.05);
    /* Subtle zoom when playing */
}

.video-overlay-gradient {
    background: linear-gradient(0deg, rgba(1, 42, 74, 1) 0%, rgba(1, 42, 74, 0.4) 50%, rgba(1, 42, 74, 1) 100%);
}

/* 7. Subtle Ambient Body Gradient (Global) */
body {
    background: var(--clr-dark);
    /* Baseline fallback */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(254, 203, 0, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

/* Adjust timeline for mobile */
@media (max-width: 768px) {
    .timeline-container .row {
        flex-direction: column;
    }

    .timeline-line {
        width: 4px !important;
        height: 100% !important;
        left: 50% !important;
        top: 0 !important;
        bottom: 0 !important;
        transform: translateX(-50%);
    }
}

/* ============================================================
   PHASE 6: UTILITY COMPLETIONS & ACCESSIBILITY
   ============================================================ */

/* Layout constraint utilities */
.max-w-800 {
    max-width: 800px;
}

.max-w-600 {
    max-width: 600px;
}

.max-w-700 {
    max-width: 700px;
}

/* Hover scale micro-interaction (close btn, icons) */
.hover-scale {
    transition: transform 0.3s var(--ease-cinematic);
    will-change: transform;
}

.hover-scale:hover {
    transform: scale(1.15) rotate(90deg);
}

/* Cinematic scroll reveal */
.cinematic-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.cinematic-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax background element */
.parallax-bg {
    will-change: transform, opacity;
    transform-origin: center center;
    transition: opacity 0.1s linear;
}

/* Enhanced glow text */
.glow-text {
    text-shadow: 0 0 8px rgba(254, 203, 0, 0.35);
}

/* Premium section separator */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(254, 203, 0, 0.3), transparent);
    border: 0;
    margin: 0;
}

/* Font-italic utility (missing from Bootstrap 5 by default) */
.font-italic {
    font-style: italic;
}

/* Keyboard-visible focus ring (Accessibility) */
:focus-visible {
    outline: 2px solid var(--clr-yellow);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── prefers-reduced-motion: disable all non-essential animations ── */
@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;
    }

    .parallax-bg,
    .hero-bg,
    .cta-logo {
        transform: none !important;
        will-change: auto !important;
    }

    .fan-star {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .matchday-pulse {
        animation: none !important;
    }
}

/* Video immersion mobile: reduce height */
@media (max-width: 768px) {
    .video-immersion-wrapper {
        height: 50vh;
        min-height: 300px;
    }

    .video-immersion-wrapper video {
        display: none;
        /* Hide video on mobile, show poster via CSS */
    }

    .video-immersion-wrapper::before {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--clr-midnight) var(--video-poster, '') center/cover no-repeat;
    }
}

/* ============================================================
   PHASE 7: STADIUM IMMERSION, MEDIA & INTERACTIVITY
   ============================================================ */

/* 1. Stadium Atmosphere Layer */
.stadium-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.stadium-atmosphere::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 0%,
            rgba(254, 203, 0, 0.05) 45%,
            rgba(254, 203, 0, 0.1) 50%,
            rgba(254, 203, 0, 0.05) 55%,
            transparent 100%);
    animation: lightSweep 8s infinite linear;
    opacity: 0.6;
}

.vignette-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.4) 110%);
    pointer-events: none;
    z-index: 2;
}

@keyframes lightSweep {
    0% {
        transform: translateX(-50%) skewX(-15deg);
    }

    100% {
        transform: translateX(50%) skewX(-15deg);
    }
}

@keyframes slowDrift {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.drift-bg {
    animation: slowDrift 20s infinite ease-in-out;
    will-change: transform;
}

/* 2. Interactive Stadium Section */
.stadium-explore-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.stadium-map-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.5));
}

.stadium-zone {
    cursor: pointer;
    transition: all 0.3s ease;
    fill: rgba(255, 255, 255, 0.05);
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1;
}

.stadium-zone:hover,
.stadium-zone.active {
    fill: rgba(254, 203, 0, 0.2);
    stroke: var(--clr-yellow);
    filter: drop-shadow(0 0 8px var(--clr-yellow));
}

.stadium-info-panel {
    background: rgba(var(--clr-midnight-rgb), 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(254, 203, 0, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-top: -50px;
    position: relative;
    z-index: 5;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stadium-info-panel.active {
    opacity: 1;
    transform: translateY(0);
}

/* 3. Matchday Enhancement */
.match-pulse-ring {
    position: absolute;
    inset: -5px;
    border: 2px solid var(--clr-yellow);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
}

.match-active .match-pulse-ring {
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.match-glow-bar {
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--clr-yellow), transparent);
    box-shadow: 0 0 15px var(--clr-yellow);
    border-radius: 0 0 10px 10px;
}

/* 4. Media Gallery Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.media-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    background: var(--blue-800);
}

.media-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.media-card:hover .media-card-img {
    transform: scale(1.08);
}

.media-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.media-card:hover .media-card-overlay {
    opacity: 1;
}

.media-card-title {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.media-card:hover .media-card-title {
    transform: translateY(0);
}

.media-card-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px;
    height: 50px;
    background: var(--clr-yellow);
    color: var(--clr-midnight);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.4s ease;
}

.media-card:hover .media-card-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Media Viewer (Pure CSS / Minimal JS) */
.media-viewer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(10px);
}

.media-viewer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.media-viewer-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.media-viewer-backdrop.active .media-viewer-img {
    transform: scale(1);
}

.media-viewer-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.media-viewer-close:hover {
    color: var(--clr-yellow);
}

.media-viewer-caption {
    margin-top: 1.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

/* 5. YouTube Integration */
.youtube-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(254, 203, 0, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.youtube-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Performance / Visibility Rules */
@media (max-width: 767px) {

    .stadium-atmosphere,
    .vignette-layer,
    .drift-bg {
        animation: none !important;
    }
}

/* ============================================================
   PHASE 7: ELITE MEDIA EXPERIENCE (ULTRA-PREMIUM)
   ============================================================ */

:root {
    --clr-elite-bg: #0f1115;
    --clr-elite-card: rgba(26, 30, 40, 0.6);
    --elite-glow: rgba(254, 203, 0, 0.4);
}

.noise-overlay {
    inset: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 9999;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
}

/* 1. Elite Hero Slideshow */
.elite-hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--clr-elite-bg);
}

.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slideshow .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    transform: scale(1);
    will-change: opacity, transform;
}

.hero-slideshow .slide.active {
    opacity: 1;
    animation: eliteScaleDraft 20s infinite alternate linear;
}

@keyframes eliteScaleDraft {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0.9) 100%);
    z-index: 2;
}

.stadium-atmosphere-elite {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(254, 203, 0, 0.05) 0%, transparent 50%);
    z-index: 2;
}

.display-huge {
    font-size: clamp(3rem, 12vw, 10rem);
    letter-spacing: -0.05em;
    line-height: 0.9;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.hero-gold-divider {
    width: 100px;
    height: 4px;
    background: var(--clr-yellow);
    box-shadow: 0 0 15px var(--clr-yellow);
}

.hero-label {
    letter-spacing: 0.5em;
    font-size: 0.8rem;
    text-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

/* 2. Elite Staggered Grid */
.elite-staggered-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

.elite-grid-item:nth-child(5n+1) {
    grid-column: span 2;
    grid-row: span 2;
}

.elite-grid-item:nth-child(8n+2) {
    grid-column: span 2;
}

.elite-media-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #15181d;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.elite-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.elite-card-img.loaded {
    opacity: 1;
}

.elite-media-card:hover .elite-card-img {
    transform: scale(1.1);
}

.skeleton-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #15181d 0%, #1a1e28 50%, #15181d 100%);
    background-size: 200% 100%;
    animation: eliteShimmer 1.5s infinite linear;
}

.skeleton-shimmer.hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes eliteShimmer {
    to {
        background-position: -200% 0;
    }
}

.elite-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0.8;
}

.elite-card-cat {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--clr-yellow);
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 12px;
    border-radius: 2px;
}

.elite-card-content {
    transform: translateY(15px);
    transition: transform 0.4s ease;
}

.elite-media-card:hover .elite-card-content {
    transform: translateY(0);
}

.elite-card-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.elite-card-btn {
    width: 40px;
    height: 40px;
    background: var(--clr-yellow);
    color: var(--clr-midnight);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.4s ease;
}

.elite-media-card:hover .elite-card-btn {
    opacity: 1;
}

.elite-border-glow {
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    transition: all 0.4s ease;
    pointer-events: none;
}

.elite-media-card:hover .elite-border-glow {
    border-color: rgba(254, 203, 0, 0.3);
    box-shadow: inset 0 0 20px rgba(254, 203, 0, 0.1);
}

/* 3. Elite YouTube Integration */
.elite-video-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(254, 203, 0, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.youtube-embed-wrapper-elite {
    position: relative;
    padding-bottom: 50%;
    /* Cinematic 2:1 ratio approx */
    height: 0;
}

.youtube-embed-wrapper-elite iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.elite-video-info {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-premium-gold {
    background: linear-gradient(135deg, var(--clr-yellow), #b59218);
    color: #000;
    font-weight: 900;
    border: none;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.btn-premium-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(254, 203, 0, 0.4);
}

/* 4. Elite Modal UI */
.elite-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.elite-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.modal-nav:hover {
    background: var(--clr-yellow);
    color: black;
}

.modal-nav.prev {
    left: 2rem;
}

.modal-nav.next {
    right: 2rem;
}

.modal-content-item {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-content-item.active {
    opacity: 1;
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.3s ease;
}

.modal-close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    color: var(--clr-yellow);
}

.modal-caption-elite {
    position: absolute;
    bottom: 3rem;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* 5. Responsiveness Elite */
@media (max-width: 1200px) {
    .elite-staggered-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .elite-staggered-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .elite-hero {
        height: 75vh;
    }

    .display-huge {
        font-size: 5rem;
    }

    .elite-staggered-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .elite-grid-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

/* ============================================================
   PHASE 7.1: ELITE MOTION MEDIA SYSTEM
   ============================================================ */

:root {
    --bg-dark-elite: #0b0d12;
    --gold-gradient: linear-gradient(90deg, #fecb00, #b59218, #fecb00);
}

.elite-motion-hero {
    height: 100vh;
    background: var(--bg-dark-elite);
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.hero-content-motion {
    z-index: 5;
    opacity: 0;
}

.hero-vignette-motion {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.8) 80%, var(--bg-dark-elite) 100%);
    z-index: 2;
}

.hero-gold-divider-motion {
    height: 3px;
    width: 0;
    background: var(--clr-yellow);
    box-shadow: 0 0 20px var(--clr-yellow);
}

.display-motion {
    font-size: clamp(3rem, 15vw, 12rem);
    letter-spacing: -0.05em;
    line-height: 0.9;
}

/* Dynamic Grid Staggered Layout */
.elite-motion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    gap: 2rem;
}

.elite-grid-item {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.elite-grid-item:nth-child(5n+1) {
    grid-column: span 2;
    grid-row: span 2;
}

.elite-grid-item:nth-child(8n+2) {
    grid-column: span 2;
}

/* Elite Motion Card */
.elite-motion-card {
    position: relative;
    height: 100%;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #12141a;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.6s ease;
    transform-style: preserve-3d;
}

.elite-motion-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(254, 203, 0, 0.2);
}

.elite-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.elite-card-overlay-motion {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 13, 18, 0.95) 0%, transparent 60%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.elite-card-title-motion {
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.elite-motion-card:hover .elite-card-title-motion {
    transform: translateY(0);
    opacity: 1;
}

.elite-card-cat-motion {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--clr-yellow);
    font-weight: 900;
    font-size: 0.65rem;
    padding: 6px 16px;
    border: 1px solid var(--clr-yellow);
    border-radius: 100px;
    text-transform: uppercase;
}

/* Animated Gold Border */
.elite-motion-border-glow {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    transition: border-color 0.4s;
    pointer-events: none;
}

.elite-motion-card:hover .elite-motion-border-glow {
    border-color: var(--clr-yellow);
}

/* Motion Streak */
.motion-streak {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(135deg, transparent 40%, rgba(254, 203, 0, 0.05) 50%, transparent 60%);
    pointer-events: none;
    z-index: 10;
}

.elite-motion-card:hover .motion-streak {
    animation: streakPass 0.8s ease-out forwards;
}

@keyframes streakPass {
    0% {
        transform: translate(-10%, -10%);
    }

    100% {
        transform: translate(30%, 30%);
    }
}

/* Filter Bar */
.media-filter-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 35px;
    border-radius: 100px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--clr-yellow);
    border-color: var(--clr-yellow);
    color: black;
    box-shadow: 0 0 25px rgba(254, 203, 0, 0.4);
}

/* Elite Video Showcase */
.elite-video-showcase {
    display: grid;
    grid-template-columns: 2fr 1fr;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tv-pulse {
    width: 12px;
    height: 12px;
    background: var(--clr-yellow);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--clr-yellow);
    animation: pulseYelp 1.5s infinite;
}

/* Modal Next Gen */
.elite-modal-motion {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-blur-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease;
}

.elite-modal-motion.active {
    opacity: 1;
    pointer-events: auto;
}

.elite-modal-motion.active .modal-blur-bg {
    backdrop-filter: blur(20px);
}

.modal-content-item-motion {
    max-width: 90vw;
    max-height: 80vh;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
    border-radius: 4px;
}

.elite-modal-motion.active .modal-content-item-motion {
    transform: scale(1);
    opacity: 1;
}

.modal-nav-motion {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.modal-nav-motion:hover {
    background: var(--clr-yellow);
    color: black;
}

.modal-nav-motion.prev {
    left: 2rem;
}

.modal-nav-motion.next {
    right: 2rem;
}

.modal-close-btn-motion {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    z-index: 110;
    cursor: pointer;
}

.modal-caption-motion {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-weight: 900;
    font-size: 2rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 1);
}

/* Section Divider Grow */
.divider-grow {
    width: 0 !important;
    transition: width 1.5s ease;
}

.divider-grow.aos-animate {
    width: 150px !important;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .elite-motion-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .elite-motion-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .elite-video-showcase {
        grid-template-columns: 1fr;
    }

    .modal-nav-motion {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .elite-motion-grid {
        grid-template-columns: repeat(1, 1fr);
        grid-auto-rows: 250px;
    }

    .elite-grid-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .display-motion {
        font-size: 4rem;
    }
}

/* ============================================================
   3D CINEMATIC MAP SECTION (FAKE 3D ARCHITECTURAL VIEW)
   ============================================================ */
.perspective-map-container {
    perspective: 1200px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 1rem 0 2rem;
    /* Reduced bottom padding significantly */
}

/* 3D Wrapper Layer - Loop Floating Animation */
.map-3d-wrapper {
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(15deg) rotateZ(0deg) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: map-float 3s ease-in-out infinite alternate;
}

@keyframes map-float {
    0% {
        transform: rotateX(15deg) translateZ(0px) scale(0.98);
    }

    100% {
        transform: rotateX(15deg) translateZ(20px) scale(0.98);
    }
}

/* Hover effect creates a subtle parallax lift and pauses the float */
.perspective-map-container:hover .map-3d-wrapper {
    transform: rotateX(10deg) translateZ(25px) scale(1);
    animation-play-state: paused;
}

/* Pseudo 3D Building Satellite Image Base */
.map-layer {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* removed overflow: hidden here previously, but wait - the image border-radius relies on overflow-hidden */
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 40px 100px -20px rgba(10, 12, 16, 0.9);
}

/* 3D Depth Shadow simulating thick base */
.map-layer::after {
    content: '';
    position: absolute;
    inset: -30px;
    background: rgba(1, 42, 74, 0.5);
    /* Blue-900 tie-in */
    filter: blur(50px);
    z-index: -1;
    transform: translateZ(-50px);
}

/* Subtle darkening around the edges for cinematic focus */
.map-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(10, 12, 16, 0.8) 120%);
    pointer-events: none;
    z-index: 10;
}

/* Glassmorphism Premium Action Button */
.map-action-btn,
[dir="rtl"] .map-action-btn {
    position: absolute !important;
    bottom: 36px;
    /* Offset 1.5cm higher from previous location */
    left: 50% !important;
    right: auto !important;
    /* Force prevent RTL flipping */
    transform: translateX(-50%) translateZ(80px) !important;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.8rem 2.5rem;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    z-index: 50;
    cursor: pointer;
    pointer-events: auto;
}

/* Hover State - Solid yellow, lifted, glowing */
.map-action-btn:hover,
[dir="rtl"] .map-action-btn:hover {
    background: #fecb00;
    /* Club yellow */
    color: #0a0c10;
    /* Dark text */
    border-color: #fecb00;
    opacity: 1;
    transform: translateX(-50%) translateZ(100px) translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(254, 203, 0, 0.4);
}

/* Reduced animation on mobile or smaller screens */
@media (max-width: 768px) {
    .map-3d-wrapper {
        transform: rotateX(0deg) scale(1) !important;
        animation: none;
        aspect-ratio: auto;
    }

    .map-layer {
        aspect-ratio: 4/3;
        box-shadow: var(--shadow-xl);
    }

    .map-layer::after {
        display: none;
    }

    .map-action-btn,
    [dir="rtl"] .map-action-btn {
        bottom: 60px;
        padding: 1rem 3rem;
        font-size: 1.1rem;
        transform: translateX(-50%) translateZ(0) !important;
        opacity: 0.9;
    }

    .map-action-btn:hover,
    [dir="rtl"] .map-action-btn:hover {
        transform: translateX(-50%) translateY(-3px) translateZ(0) !important;
    }
}