/* Roots & Variables */
:root {
    --primary: #2ecc71; /* Gym Green */
    --hover: #27ae60;
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --bg-light: #ffffff;
    --bg-dark: #0f172a;
    --gray-light: #f1f5f9;
    --gray-dark: #334155;
    --card-light: #ffffff;
    --card-dark: #1e293b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
    
    --font-main: 'Outfit', sans-serif;
    --font-ar: 'Cairo', sans-serif; /* Arabic Font */
}

[data-theme="dark"] {
    --text-dark: #f8fafc;
    --text-light: #cbd5e1;
    --bg-light: #0f172a; /* Dark background mainly */
    --bg-dark: #020617;
    --gray-light: #1e293b;
    --gray-dark: #94a3b8;
    --card-light: #1e293b;
    --card-dark: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}
/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hover);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-light);
}

[data-theme="dark"] {
    scrollbar-color: var(--primary) var(--bg-dark);
}


[dir="rtl"] {
    font-family: var(--font-ar);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    font-family: georgian;
}

.subtitle {
    display: block;
    color: var(--primary);
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-family: 'Teko', sans-serif;
    font-size: 1rem;
    
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: georgian;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--hover);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: #2ecc71;
    color: #fff;
}

.btn-outline:hover {
  
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 90px;
    width: 90px;
    object-fit: cover; /* Ensures image fills the circle */
    border-radius: 50%;
    border: 2px solid var(--primary); /* Optional: adds a nice touch since they asked for it to be like a circle */
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: var(--transition);
    color: #fff; /* Initially white for hero overlay */
}

/* When scrolled, links become dark (or light in dark mode) */
.navbar.scrolled .nav-link {
    color: var(--text-dark);
}

[data-theme="dark"] .nav-link {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Toggle */
.lang-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
}
.lang-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.navbar.scrolled .lang-toggle {
    color: var(--text-dark);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="dark"] .navbar.scrolled .lang-toggle {
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.navbar.scrolled .theme-toggle {
    background: rgba(0,0,0,0.05);
}
[data-theme="dark"] .navbar.scrolled .theme-toggle {
    background: rgba(255,255,255,0.1);
}

.dark-icon { display: none; }
[data-theme="dark"] .light-icon { display: none; }
[data-theme="dark"] .dark-icon { display: block; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.navbar.scrolled .mobile-toggle {
    color: var(--text-dark);
}

[data-theme="dark"] .navbar.scrolled .mobile-toggle {
    color: #fff;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    font-family: 'Bebas Neue', sans-serif;
    font-style: italic;
    font-weight: 900;
}

.hero-bg {
    position: fixed; /* Fixed background */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    
}

.text-gradient {
    color: var(--primary);
}

.hero h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #f1f5f9;
    line-height: 1.3;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Flip arrows in buttons for RTL */
[dir="rtl"] .arrow-icon {
    transform: rotate(180deg);
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Why Choose Us */
.services-grid, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    font-family:'Oswald', sans-serif ;
    font-weight: 900;
}

.feature-card {
    background: var(--card-light);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent; /* Prepare for border transition */
}

.feature-card:hover {
    transform: translateY(-10px) rotate(2deg);
    border-color: var(--primary);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
}

.icon-box span {
    font-size: 32px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

/* Services */
.services {
    background-color: var(--gray-light);
}

.service-card {
    background: var(--card-light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .service-card {
    border: 1px solid rgba(255,255,255,0.05);
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.bg-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 100px;
    opacity: 0.05;
    color: var(--text-dark);
}
[dir="rtl"] .bg-icon {
    right: auto;
    left: -10px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

/* Sliders */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 400px; /* fixed height for promo */
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* or cover depending on image aspect ratio */
    background: transparent;
    border-radius: 12px;
}
/* Specific overrides for testimonial slides inside the generic structure */
.testimonial-slide {
    height: auto; /* Allow auto height for text */
    min-height: 400px; /* Keep consistent height */
    padding: 20px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: var(--transition);
    z-index: 10;
}
/* Dark arrows for testimonial slider if background is light */
.testimonials .slider-btn {
    background: rgba(0,0,0,0.1);
    color: var(--text-dark);
}
.testimonials .slider-btn:hover {
    background: var(--primary);
    color: #fff;
}
[data-theme="dark"] .testimonials .slider-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
}


.slider-btn:hover {
    background: var(--primary);
}

.prev { left: 20px; }
.next { right: 20px; }

[dir="rtl"] .prev { left: auto; right: 20px; }
[dir="rtl"] .next { right: auto; left: 20px; }

.zoomed-trigger {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.zoomed-trigger:hover {
    transform: scale(1.02);
}

/* Gender Programs */
.split-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.program-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
}

.program-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.program-banner:hover img {
    transform: scale(1.05);
}

/* Modal / Lightbox */
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; /* Ensure it is top most */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    object-fit: contain; /* Ensure full image is visible */
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}
[dir="rtl"] .close-modal {
    right: auto;
    left: 35px;
}


.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    pointer-events: none; /* Let clicks pass to the parent */
}

/* Results Gallery (Snap Slider) */
.gallery-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 20px;
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
    scrollbar-width: none; /* Firefox */
}
.gallery-slider::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    scroll-snap-align: center;
    min-width: 300px;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Coach Section */
.coach {
    background-color: var(--bg-light);
}

.coach-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}

.coach-image .img-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 5px solid var(--primary);
}

.coach-info h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.coach-info .role {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

.specs {
    margin: 20px 0;
}

.specs li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 500;
}

.specs li span {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: #fff;
}

/* Challenge Section */
.weekly-challenge {
    background-color: var(--gray-light);
}
[data-theme="dark"] .weekly-challenge {
    background-color: rgba(255,255,255,0.02);
}

.challenge-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--card-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.challenge-content {
    padding: 50px;
}
.challenge-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}
.challenge-content p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: var(--gray-dark);
}
[data-theme="dark"] .challenge-content p {
    color: var(--text-light);
}
.challenge-image {
    height: 100%;
    min-height: 400px;
}
.challenge-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Winners */
.winners-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.winner-card {
    position: relative;
    width: 250px;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in; /* More explicit cursor */
}

.winner-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.winner-card::after {
    content: 'zoom_in';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(46, 204, 113, 0.8);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
    pointer-events: none; /* Crucial: let clicks pass through to the card */
}

.winner-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.winner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.winner-card:hover img {
    transform: scale(1.1);
}

.ribbon {
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--primary);
    color: #fff;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10; /* Ensure ribbon is above overlay */
    pointer-events: none; /* Let clicks pass through */
}
[dir="rtl"] .ribbon {
    right: auto;
    left: -30px;
    transform: rotate(-45deg);
}

/* Testimonials */
.testimonials {
    text-align: center;
    background: var(--gray-light);
}

/* Testimonials */
.testimonials {
    text-align: center;
    background: var(--gray-light);
}

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-light);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: left; /* Align text left for better readability with side header */
}

[dir="rtl"] .testimonial-card {
    text-align: right;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 20px;
}

[data-theme="dark"] .testimonial-header {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.testimonial-card .client-avatar {
    width: 50px; /* Slightly larger again for new layout */
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    margin: 0; /* Remove automargin */
}

.client-info h4 {
    color: var(--primary);
    margin: 0;
    line-height: 1.2;
    font-size: 1.1rem;
}

.client-info span {
    font-size: 0.9rem;
    color: var(--gray-dark);
    opacity: 0.8;
}

[data-theme="dark"] .client-info span {
    color: var(--text-light);
}

.quote-icon {
    font-size: 32px;
    color: var(--primary);
    opacity: 0.3;
    margin-left: auto; /* Push to right */
}

[dir="rtl"] .quote-icon {
    margin-left: 0;
    margin-right: auto;
}

.testimonial-card p {
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--card-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-info {
    padding: 40px;
}

.contact-info .info-item {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    align-items: center;
}

.contact-info .info-item span {
    font-size: 24px;
    color: var(--primary);
    background: rgba(46, 204, 113, 0.1);
    padding: 10px;
    border-radius: 50%;
}

.contact-socials {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.contact-socials a {
    font-size: 24px;
    transition: color 0.3s;
}

.contact-socials a:hover {
    color: var(--primary);
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Footer */
.footer {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('footerImage.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #f8fafc;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
    max-width: 200px; /* Allow it to be bigger since it is a full picture now */
    border-radius: 10px; /* Optional: adds a nice touch to a photo */
}

.footer h4 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col a {
    display: block;
    margin-bottom: 10px;
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 5px;
}
[dir="rtl"] .footer-col a:hover {
    padding-left: 0;
    padding-right: 5px;
}


.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 30px 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}


.footer-bottom-links, .footer-crafted {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-bottom-links a, .footer-crafted a {
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-bottom-links a:hover, .footer-crafted a:hover {
    color: var(--primary);
}

.footer-bottom-links .separator {
    opacity: 0.3;
}

@media (max-width: 992px) {
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
}


/* Scroll To Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}
[dir="rtl"] #scrollToTopBtn {
    right: auto;
    left: 25px;
}

#scrollToTopBtn:hover {
    background-color: var(--hover);
    transform: translateY(-5px);
}

#scrollToTopBtn.show {
    opacity: 0.8;
    visibility: visible;
    backdrop-filter: blur(5px);
}

#scrollToTopBtn.show:hover {
    opacity: 0.5;
}



/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--bg-light);
        flex-direction: column;
        justify-content: center;
        transition: 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    [dir="rtl"] .nav-links.active {
        left: 0;
    }

    [data-theme="dark"] .nav-links {
        background: var(--bg-dark);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        color: var(--text-dark); /* Always dark/light text on mobile menu */
    } 
    [data-theme="dark"] .nav-link {
        color: var(--text-light);
    }
    
    .container {
        padding: 0 15px;
    }

    .coach-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .coach-info .bio {
        text-align: justify;
        line-height: 1.8;
        font-size: 0.95rem;
        padding: 0 10px;
        word-wrap: break-word;
        hyphens: auto;
    }

    .coach-info h2 {
        font-size: 2rem;
    }

    .coach-info .role {
        font-size: 0.9rem;
    }

    .specs {
        display: inline-block;
        text-align: left;
    }

    .specs li {
        justify-content: flex-start;
    }

    .social-links {
        justify-content: center;
    }

    .split-col {
        grid-template-columns: 1fr;
    }
    
    .challenge-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .challenge-image {
        min-height: 250px;
        order: -1; /* Image on top mobile */
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Typing Animation */
.typing-hero {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: .15em solid var(--primary);
    margin: 0 auto;
    /* 
       Total duration 8s. 
       steps(40, end) is a bit rough for complex keyframes, 
       but if we adjust the keyframes to just be 0 -> 100 and use alternate, 
       it's safer for 'steps' to align with characters.
       However, user wants retyping. 
       Let's try a standard type-pause-delete-pause loop using keyframes.
    */
    animation: 
        typing 6s steps(40, end) infinite,
        blink-caret .75s step-end infinite;
    max-width: fit-content;
}

/* 
   Typing and Retyping loop:
   0-40%: Type out
   40-60%: Wait
   60-90%: Delete
   90-100%: Wait
*/
@keyframes typing {
    0% { width: 0 }
    40% { width: 100% }
    60% { width: 100% }
    90% { width: 0 }
    100% { width: 0 }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary); }
}

/* Responsive adjust for typing */
@media (max-width: 768px) {
    .typing-hero {
        font-size: clamp(1rem, 5vw, 2.5rem); /* Responsive size to fit single line */
        white-space: nowrap;
        border-right: .15em solid var(--primary);
        animation: 
            typing 6s steps(40, end) infinite,
            blink-caret .75s step-end infinite;
        width: fit-content;
    }
}
