/* ==========================================================================
   Base & Variables
   ========================================================================== */
:root {
    /* Brand Colors */
    --color-brand: #FF4D2E;
    --color-brand-hover: #E63E20;
    --color-secondary: #FFB400;
    --color-success: #22C55E;
    --color-success-hover: #16a34a;

    /* Theme Variables - Fallback / Light */
    --color-bg: #FAFAF7;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F0F0EA;
    --color-text: #14141A;
    --color-muted: #5A5A68;
    --color-border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);

    /* Fonts & Spacing */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Poppins', sans-serif;
    --font-primary: var(--font-ar);
    --spacing-unit: 8px;
    --radius-card: 14px;
    --radius-pill: 999px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --color-bg: #0B0B0F;
    --color-surface: #15151C;
    --color-surface-alt: #1E1E28;
    --color-text: #F5F5F7;
    --color-muted: #A0A0B0;
    --color-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html[lang="en"] {
    --font-primary: var(--font-en);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

html[lang="en"] body {
    line-height: 1.5;
}

html[lang="ar"] body {
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: calc(var(--spacing-unit) * 2.5);
}

.section {
    padding-block: calc(var(--spacing-unit) * 10);
}

.surface-alt {
    background-color: var(--color-surface-alt);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
    color: var(--color-text);
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

html[lang="en"] h1 {
    text-transform: uppercase;
}

.section-header {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 6);
    max-width: 700px;
    margin-inline: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    background: linear-gradient(90deg, var(--color-brand), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ltr-text {
    direction: ltr;
    display: inline-block;
}

/* ==========================================================================
   Components (Buttons, Cards, Forms)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-brand), #FF8A00);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 77, 46, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-brand-hover), #e67d00);
    box-shadow: 0 6px 20px rgba(255, 77, 46, 0.4);
}

.btn-success {
    background-color: var(--color-success);
    color: #fff;
}

.btn-success:hover {
    background-color: var(--color-success-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-text);
    background: var(--color-text);
    color: var(--color-bg);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--color-surface-alt);
}

.icon-btn .theme-icon {
    transition: transform 0.3s ease;
}

.icon-btn:hover .theme-icon {
    transform: rotate(15deg) scale(1.1);
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    padding: calc(var(--spacing-unit) * 3);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.open {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-success);
}

.badge.closed {
    background: rgba(255, 77, 46, 0.15);
    color: var(--color-brand);
}

form .form-group {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

form input,
form select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-family: inherit;
    transition: border-color 0.3s;
}

form input:focus,
form select:focus {
    outline: none;
    border-color: var(--color-brand);
}

.w-100 {
    width: 100%;
}

.mt-2 {
    margin-top: 16px;
}

.mt-4 {
    margin-top: 32px;
}

.mt-5 {
    margin-top: 40px;
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding-block: 16px;
    color: var(--color-text);
    background-color: color-mix(in srgb, var(--color-bg) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
    padding-block: 12px;
    box-shadow: var(--shadow-sm);
    background-color: color-mix(in srgb, var(--color-bg) 94%, transparent);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-brand);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-text);
    transition: var(--transition);
    border-radius: 3px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11, 11, 15, 0.8), rgba(11, 11, 15, 0.95));
}

/* Ensure dark overlay works in light mode too, since the hero photo needs text contrast */

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 800px;
}

.trust-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-badge .star {
    color: var(--color-secondary);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 16px;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 32px;
    color: #d1d1d1;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 64px;
}

/* Hardcode outline btn for hero to be visible */
.hero .btn-outline {
    border-color: #fff;
    color: #fff;
}

.hero .btn-outline:hover {
    background: #fff;
    color: #000;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
}

.stat-item h3 {
    margin-bottom: 4px;
    color: var(--color-brand);
    font-size: 2rem;
}

.stat-item p {
    color: #aaa;
    font-size: 0.9rem;
}

/* ==========================================================================
   Sections Grid Layouts
   ========================================================================== */
.grid {
    display: grid;
    gap: 24px;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.feature-card {
    text-align: center;
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 16px;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
    gap: 20px;
}

.pricing-card {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px 20px;
}

.pricing-price {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 16px 0;
    color: var(--color-text);
}

.pricing-features {
    list-style: none;
    margin: 20px 0 28px 0;
    text-align: start;
    flex-grow: 1;
}

.pricing-features li {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.95rem;
}

.pricing-features li::before {
    content: '✓';
    color: var(--color-brand);
    font-weight: bold;
}

.pricing-card .btn {
    margin-top: auto;
}

.trainers-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.trainer-card {
    overflow: hidden;
    padding: 0;
}

.trainer-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.trainer-info {
    padding: 20px;
}

.trainer-info h3 {
    margin-bottom: 4px;
}

.trainer-role {
    color: var(--color-brand);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* ==========================================================================
   Schedule & Tabs
   ========================================================================== */
.schedule-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.schedule-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 10px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    font-weight: 600;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: #fff;
}

.schedule-content {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.schedule-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    align-items: center;
}

.schedule-row:last-child {
    border-bottom: none;
}

.schedule-time {
    font-weight: bold;
    color: var(--color-brand);
}

.schedule-name {
    font-weight: 600;
}

.schedule-trainer {
    color: var(--color-muted);
    font-size: 0.9rem;
    text-align: end;
}

/* ==========================================================================
   Gallery & Lightbox
   ========================================================================== */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius-card);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    aspect-ratio: 4/5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    inset-inline-end: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
}

/* ==========================================================================
   Reviews Carousel
   ========================================================================== */
.reviews-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 24px;
}

.reviews-slider::-webkit-scrollbar {
    display: none;
}

.review-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

@media (min-width: 768px) {
    .review-card {
        flex: 0 0 calc(50% - 12px);
    }
}

@media (min-width: 1024px) {
    .review-card {
        flex: 0 0 calc(33.333% - 16px);
    }
}

.stars {
    color: var(--color-secondary);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.5rem;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    text-align: start;
    padding: 24px 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}

.faq-icon {
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--color-muted);
}

.faq-item.active .faq-answer {
    padding-bottom: 24px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #0B0B0F;
    /* Always dark */
    color: #fff;
    padding-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    color: #aaa;
}

.footer-nav a:hover {
    color: var(--color-brand);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
}

/* ==========================================================================
   Floating Actions
   ========================================================================== */
.floating-wa {
    position: fixed;
    bottom: 24px;
    inset-inline-start: 24px;
    background: var(--color-success);
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    z-index: 99;
    animation: pulse 2s infinite;
    transition: transform 0.3s;
}

.floating-wa:hover {
    transform: scale(1.1);
}

.scroll-top {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* ==========================================================================
   Animations & Media Queries
   ========================================================================== */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .pricing-features li {
        font-size: 0.88rem;
    }
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        inset-inline-end: -100%;
        width: 250px;
        height: 100vh;
        background: var(--color-surface);
        flex-direction: column;
        padding: 80px 24px;
        transition: 0.4s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    html[dir="ltr"] .nav-links {
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        inset-inline-end: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-join-btn {
        display: none;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .pricing-card {
        padding: 20px 14px;
    }

    .pricing-card h3 {
        font-size: 1.15rem;
    }

    .pricing-price {
        font-size: 1.75rem;
        margin: 12px 0;
    }

    .pricing-features {
        margin: 14px 0 20px 0;
    }

    .pricing-features li {
        margin-bottom: 8px;
        gap: 6px;
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .pricing-card .btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pricing-card {
        padding: 16px 10px;
    }

    .pricing-card h3 {
        font-size: 0.95rem;
    }

    .pricing-price {
        font-size: 1.35rem;
        margin: 8px 0;
    }

    .pricing-features {
        margin: 10px 0 16px 0;
    }

    .pricing-features li {
        margin-bottom: 6px;
        gap: 4px;
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .pricing-features li::before {
        font-size: 0.72rem;
    }

    .pricing-card .btn {
        padding: 8px 8px;
        font-size: 0.78rem;
    }

    .schedule-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }

    .schedule-trainer {
        text-align: center;
    }
}