:root {
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #09090B;
    --text-muted: #52525B;
    --crimson: #DC2626;
    --crimson-glow: rgba(220, 38, 38, 0.18);
    --border-line: rgba(9, 9, 11, 0.08);
    color-scheme: light;
}

html.dark {
    --bg-primary: #070709;
    --bg-secondary: #0C0D10;
    --bg-card: rgba(17, 18, 22, 0.85);
    --text-primary: #F4F4F6;
    --text-muted: #9CA3AF;
    --crimson: #DC2626;
    --crimson-glow: rgba(220, 38, 38, 0.22);
    --border-line: rgba(255, 255, 255, 0.07);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    overflow-x: clip;
    margin: 0;
    transition: background-color 0.35s ease, color 0.35s ease;
}

html[lang="en"] body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-impact {
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* خط الأرقام والعناوين الرياضية (Teko) */
.font-display {
    font-family: 'Teko', sans-serif;
}

/* خلفية الموقع الغامقة الاحترافية */
.gym-atmosphere-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(circle at 80% 15%, rgba(220, 38, 38, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(220, 38, 38, 0.05) 0%, transparent 50%);
}

/* ================= الهيرو السينمائي المدمج ================= */
.hero-cinema-stage {
    position: relative;
    min-height: 94vh;
    background-color: #060608;
    background-image: 
        radial-gradient(circle at 75% 50%, rgba(220, 38, 38, 0.12) 0%, transparent 55%),
        linear-gradient(to left, #060608 10%, rgba(6, 6, 8, 0.78) 55%, #060608 100%),
        url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?auto=format&fit=crop&w=1800&q=80');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    color: #F4F4F6;
}

.poster-title-ar {
    line-height: 1.22 !important;
    font-weight: 900;
    text-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
}

html[lang="en"] .poster-title-ar {
    font-family: 'Anton', sans-serif;
    line-height: 0.95 !important;
    letter-spacing: 0.015em;
}

/* دمج صورة الكابتن في الهيرو بدون إطار صندوقي + أنيميشن تنفس وإضاءة */
.hero-coach-wrapper {
    position: relative;
    perspective: 1200px;
}

@keyframes heroFloat {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-12px) scale(1.02); }
}

/* سحابة دخان/طباشير متحركة أسفل الكابتن */
.chalk-smoke-layer {
    position: absolute;
    bottom: -20px;
    height: 180px;
    left: -20px;
    right: -20px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.12) 0%, rgba(220,38,38,0.06) 45%, transparent 75%);
    filter: blur(25px);
    z-index: 15;
    pointer-events: none;
    animation: smokePulse 5s ease-in-out infinite alternate;
}

@keyframes smokePulse {
    0% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 0.95; transform: scale(1.08); }
}

/* كبسولة تبديل الثيم واللغة الأنيقة (Modern Pill Controls) */
.nav-pill-control {
    height: 38px;
    padding: 0 14px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.25s ease;
    cursor: pointer;
}

html:not(.dark) .nav-pill-control {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.nav-pill-control:hover {
    border-color: var(--crimson);
}

/* تضييق مسافات أزرار الهيدر على الموبايل عشان زرار المنيو ميتقصّش (360px - 390px) */
@media (max-width: 639px) {
    header > div:first-child > div:last-child {
        gap: 0.5rem;
        flex-shrink: 0;
    }
}

@media (max-width: 399px) {
    .nav-pill-control {
        padding: 0 10px;
        gap: 6px;
    }
}

/* مفتاح التبديل الانسيابي (Toggle Switch) للدارك واللايت مود */
.theme-switch-track {
    width: 52px;
    height: 30px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

html:not(.dark) .theme-switch-track {
    background: #E4E4E7;
    border-color: #D4D4D8;
}

.theme-switch-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--crimson);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
}

html:not(.dark) .theme-switch-thumb {
    transform: translateX(-22px);
    background: #18181B;
}

html[dir="ltr"]:not(.dark) .theme-switch-thumb {
    transform: translateX(22px);
}

/* الزرار الأحمر الرئيسي */
.btn-crimson-poster {
    background-color: #DC2626;
    color: #FFFFFF;
    font-weight: 800;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 12px 28px -6px rgba(220, 38, 38, 0.5);
    transition: all 0.25s ease;
}

.btn-crimson-poster:hover {
    background-color: #EF4444;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -6px rgba(220, 38, 38, 0.7);
}

/* الكروت الاحترافية */
.iron-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-line);
    border-radius: 18px;
    /* الرفعة بالـ translate المستقلة عشان متتعارضش مع transform بتاع أنيميشن GSAP */
    transition: translate 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.iron-card:hover {
    translate: 0 -5px;
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 20px 40px -15px var(--crimson-glow);
}

/* خط أحمر صغير فوق عناوين الأقسام بدل الأرقام */
.section-accent-bar {
    width: 42px;
    height: 4px;
    background: #DC2626;
    border-radius: 99px;
    margin-bottom: 14px;
}

/* الشريط اللانهائي */
.infinite-ticker {
    background: #09090C;
    border-top: 1px solid rgba(220, 38, 38, 0.25);
    border-bottom: 1px solid rgba(220, 38, 38, 0.25);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}

.infinite-ticker-track {
    display: flex;
    width: max-content;
    animation: continuousMarquee 26s linear infinite;
    will-change: transform;
}

@keyframes continuousMarquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* سلايدر قبل وبعد */
.ba-stage {
    position: relative;
    overflow: hidden;
    user-select: none;
    border-radius: 18px;
    border: 1px solid var(--border-line);
    direction: ltr !important;
}

.ba-before-layer {
    position: absolute;
    inset: 0;
    clip-path: inset(0 50% 0 0);
    will-change: clip-path;
}

.ba-divider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #DC2626;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 0 15px #DC2626;
}

.ba-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #070709;
    border: 2px solid #DC2626;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
}

#scroll-progress {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 3px;
    background: #DC2626;
    width: 0%;
    z-index: 9999;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #DC2626; border-radius: 6px; }
/* إظهار صورة التحول كاملة 100% مهما كان مقاسها */
#ba-img-after, #ba-img-before {
    object-fit: contain !important;
    background-color: #09090C;
}

/* تذويب الحواف المربعة الأربعة لصورة الهيرو بالكامل جوه الخلفية */
.hero-coach-blend {
    position: relative;
    z-index: 10;
    opacity: 0.92;
    mix-blend-mode: lighten;
    filter: contrast(1.25) brightness(0.82) saturate(0.88);
    /* قناع بيضاوي مشدود يقص الحواف المربعة بنعومة قبل ما توصل لآخر الصورة */
    -webkit-mask-image: radial-gradient(ellipse 52% 62% at 50% 44%, #000 25%, rgba(0,0,0,0.5) 55%, transparent 82%);
    mask-image: radial-gradient(ellipse 52% 62% at 50% 44%, #000 25%, rgba(0,0,0,0.5) 55%, transparent 82%);
    animation: heroFloat 6s ease-in-out infinite alternate;
    will-change: transform;
}

/* تصميم كروت التنقل بين الأبطال بشكل بارز وواضح */
.client-selector-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.25s ease;
    cursor: pointer;
}

html:not(.dark) .client-selector-card {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.1);
}

.client-selector-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateX(-4px);
}

/* في الإنجليزي (LTR) الكارت يتحرك ناحية اليمين بدل الشمال */
html[dir="ltr"] .client-selector-card:hover {
    transform: translateX(4px);
}

.client-selector-card.active {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.16) 0%, rgba(18, 19, 24, 0.9) 100%);
    border-color: #DC2626;
    box-shadow: 0 8px 20px -6px rgba(220, 38, 38, 0.3);
}

html:not(.dark) .client-selector-card.active {
    background: rgba(220, 38, 38, 0.08);
    border-color: #DC2626;
}


/* ================= الموبايل فقط (أقل من 768px) — الديسكتوب والتابلت زي ما هم ================= */
@media (max-width: 767px) {
    /* تقليل المسافات الرأسية بين الأقسام (section.* عشان تغلب py-20 / py-24 بتوع Tailwind) */
    section.scroll-section {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }

    /* تحويل كروت المتابعة والباقات لكاروسيل سحب أفقي */
    div.mobile-swipe {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 14px;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
    }

    div.mobile-swipe > * {
        min-width: 84vw;
        flex-shrink: 0;
        scroll-snap-align: center;
    }

    /* مساحة لبادج "الأكثر اختياراً" اللي طالع فوق الكارت عشان ميتقصّش جوه الكاروسيل */
    #packages div.mobile-swipe {
        padding-top: 18px;
    }
}
