/* General Styling */
:root {
    /* Color Palette - Updated to match the logo colors */
    --primary-color: #013C6D;
    /* Deep, professional blue from the logo */
    --secondary-color: #8C9BAB;
    /* Soft grey for secondary elements (kept) */
    --accent-color: #92E898;
    /* Light, fresh green from the logo for accents/success */
    --text-color: #333333;
    /* Darker text for better contrast (kept) */
    --light-text-color: #666666;
    /* Lighter text for descriptions (kept) */
    --bg-light: #F8F9FA;
    /* Very light grey background (kept) */
    --bg-medium: #E9ECEF;
    /* Slightly darker background for alternate sections (kept) */
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-light: rgba(0, 0, 0, 0.07);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-deep: rgba(0, 0, 0, 0.20);

    /* Typography (kept the same, but ensuring consistency) */
    --font-inter: 'Inter', sans-serif;
    --font-tajawal: 'Tajawal', sans-serif;
    --font-size-base: 16px;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;

    /* Spacing (kept the same) */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    /* Still generous for sections */

    /* Border Radius */
    --border-radius: 6px;
    /* Slightly smaller radius */
    --border-radius-lg: 10px;
    --border-radius-pill: 40px;
    /* Slightly smaller pill */

    /* Transitions */
    --transition-speed: 0.3s;
    --transition-ease: ease-in-out;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-inter);
    /* FIX: Corrected variable name from --base-font-size to --font-size-base */
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body[dir="rtl"] {
    font-family: var(--font-tajawal);
    direction: rtl;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-ease);
}

a:hover {
    color: #357ABD;
    /* Slightly darker primary on hover */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-inter);
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] h4,
body[dir="rtl"] h5,
body[dir="rtl"] h6 {
    font-family: var(--font-tajawal);
}

h1 {
    font-size: 3em;
    font-weight: 800;
}

h2 {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    /* Increased margin for better separation */
    color: var(--primary-color);
}

h3 {
    font-size: 1.7em;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--light-text-color);
}

ul {
    list-style: none;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius-pill);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-ease);
    border: none;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 0 3px 10px var(--shadow-light);
}

.cta-button:hover {
    background-color: #357ABD;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

/* Header & Navbar */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl);
}

.site-header nav {
    /* Ensure the main container is a flexible row */
    display: flex;
    /* This distributes the space evenly between the logo, the links, and the controls */
    justify-content: space-between;
    /* Vertically center all items */
    align-items: center;
    /* Add space between all siblings */
    gap: var(--spacing-sm);

    max-width: 1200px;
    margin: 0 auto;
}

/* --- Modern Navbar Enhancements --- */
.site-header nav {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.site-header .logo img {
    height: 90px;
    width: auto;
    transition: transform 0.3s ease;
}

.site-header .logo:hover img {
    transform: scale(1.05);
}

.nav-links li a {
    position: relative;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

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


.site-header .logo {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--primary-color);
    margin-right: var(--spacing-md);
}

.site-header .logo img {
    height: 80px;
    /* increase to make it more visible */
    width: auto;
    display: block;
    max-height: 90px;
    /* safety limit so it doesn’t overflow header */
    object-fit: contain;
}

.site-header .nav-links {
    display: flex;
    gap: var(--spacing-md);
    flex-grow: 1;
    justify-content: center;
}

.site-header .nav-links li a {
    color: var(--text-color);
    font-weight: 600;
    padding: var(--spacing-xs) 0;
    position: relative;
    font-size: 0.95em;
}

.site-header .nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 50%;
    transform: translateX(-50%);
    bottom: -6px;
    transition: width var(--transition-speed) var(--transition-ease);
}

.site-header .nav-links li a:hover::after,
.site-header .nav-links li a.active::after {
    width: 70%;
}

.site-header nav>div {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* --- Hamburger Menu Styles (Hidden on desktop) --- */
.hamburger-menu {
    display: none;
    /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform var(--transition-speed) var(--transition-ease);
    padding: 0 var(--spacing-xs);
}

.hamburger-menu:hover {
    color: #357ABD;
    transform: scale(1.1);
}

.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links.active~.menu-overlay {
    display: block;
    opacity: 1;
}

#lang-switch {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-ease);
    font-size: 0.9em;
}

#lang-switch:hover {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 3px 10px var(--shadow-light);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6ab2f8 100%);
    color: var(--white);
    text-align: center;
    padding: 7rem var(--spacing-xl);
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* --- Elegant Hero Section --- */
.hero {
    background: linear-gradient(135deg, #013C6D 0%, #1C76C5 50%, #6AB2F8 100%);
    color: white;
    text-align: center;
    padding: 8rem 1rem 6rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 70%);
    animation: heroGlow 6s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    animation: fadeUp 1s ease forwards;
    opacity: 0;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeUp 1.3s ease forwards;
    opacity: 0;
}

.hero .cta-button {
    background: linear-gradient(135deg, #6DD5A3, #56C596);
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeUp 1.6s ease forwards;
    opacity: 0;
}

.hero .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Animation for fade-up appearance */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
    animation: pulse 10s infinite ease-in-out alternate;
}

.hero::before {
    width: 100%;
    height: 100%;
    top: -20%;
    left: -30%;
    transform: rotate(10deg);
}

.hero::after {
    width: 80%;
    height: 80%;
    bottom: -20%;
    right: -30%;
    transform: rotate(-20deg);
    animation-delay: 2s;
}

@keyframes pulse {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.06;
    }

    50% {
        transform: scale(1.03) rotate(3deg);
        opacity: 0.1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.06;
    }
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: var(--spacing-md);
    color: var(--white);
    text-shadow: 0 3px 8px var(--shadow-medium);
}

.hero p {
    font-size: 1.3em;
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

.hero .cta-button {
    background-color: var(--accent-color);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.1em;
    color: var(--primary-color);
    /* Use primary text color for contrast on green */
    font-weight: 700;
    box-shadow: 0 8px 20px var(--shadow-deep);
}

.hero .cta-button:hover {
    background-color: #24A260;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px var(--shadow-deep);
}

/* Section Styling */
section {
    padding: var(--spacing-xl) var(--spacing-md);
    /* Adjusted horizontal padding to MD for better container management */
    max-width: 1100px;
    margin: 0 auto;
    background-color: var(--white);
}

/* --- Section Reveal Animation --- */
section,
.exercise-card,
.team-member,
.service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.show,
.exercise-card.show,
.team-member.show,
.service-card.show {
    opacity: 1;
    transform: translateY(0);
}


section:nth-of-type(odd) {
    background-color: var(--white);
}

section:nth-of-type(even) {
    background-color: var(--bg-light);
}


/* Grid Layouts */
.service-grid,
.team-grid,
.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.card,
.team-member,
.exercise-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 6px 20px var(--shadow-light);
    padding: var(--spacing-md);
    text-align: center;
    transition: transform var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    /* Added subtle border */
}

.card:hover,
.team-member:hover,
.exercise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.card img,
.team-member img,
.exercise-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    object-position: center 30%;
}

.card h3,
.team-member h3,
.exercise-card h4 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.card p,
.team-member p,
.exercise-card p {
    font-size: 0.95em;
    color: var(--light-text-color);
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}

/* Location Section */
.location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    /* Changed from XL to LG for tighter mobile fit */
    align-items: flex-start;
}

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

    .modal-content {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
}

.map-container {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 6px 20px var(--shadow-light);
    padding: var(--spacing-lg);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-container iframe {
    width: 100%;
    height: 380px;
    border-radius: var(--border-radius);
    margin-top: var(--spacing-md);
    box-shadow: 0 3px 10px var(--shadow-medium);
}

.hours-container {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 6px 20px var(--shadow-light);
    padding: var(--spacing-lg);
    text-align: center;
    height: 100%;
}

.hours-container h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.8em;
}

.hours-list {
    list-style: none;
    padding: 0;
}

.hours-list li {
    background-color: var(--bg-light);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1em;
    color: var(--text-color);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.hours-list li span {
    font-weight: 700;
    color: var(--primary-color);
}


/* Booking Form */
.booking-form {
    background-color: var(--bg-medium);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--shadow-medium);
    max-width: 700px;
    margin: var(--spacing-xl) auto;
}

.booking-form .input-group {
    margin-bottom: var(--spacing-md);
}

.booking-form label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
    color: var(--text-color);
    font-size: 1em;
}

.booking-form input[type="text"],
.booking-form input[type="tel"],
.booking-form input[type="date"],
.booking-form textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1em;
    font-family: var(--font-inter);
    color: var(--text-color);
    transition: border-color var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
}

body[dir="rtl"] .booking-form input,
body[dir="rtl"] .booking-form textarea {
    font-family: var(--font-tajawal);
}

.booking-form input:focus,
.booking-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 60, 109, 0.15);
    /* Used primary color for focus ring */
}

.booking-form textarea {
    resize: vertical;
    min-height: 100px;
}

.booking-form .cta-button {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1.1em;
    background-color: var(--primary-color);
}

.booking-form .cta-button:hover {
    background-color: #357ABD;
}

/* Contact Section */
#contact .text-center {
    font-size: 1em;
    margin-top: var(--spacing-lg);
}

#contact p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

#contact p a {
    font-weight: 600;
    color: var(--primary-color);
}


/* Footer */
footer {
    background-color: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    font-size: 0.9em;
    margin-top: var(--spacing-xl);
    line-height: 1.7;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xs);
}

footer a {
    color: var(--accent-color);
    transition: color var(--transition-speed) var(--transition-ease);
    font-weight: 600;
}

footer a:hover {
    color: #24A260;
}


/* Exercises Page Specific Styles */
.exercises-page-section {
    padding: var(--spacing-xl) var(--spacing-md);
    /* Adjusted horizontal padding to MD */
    max-width: 1100px;
    margin: 0 auto;
    background-color: var(--white);
}

.exercises-page-section h1 {
    font-size: 3em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.exercises-page-section p.text-center {
    font-size: 1.15em;
    color: var(--light-text-color);
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.exercise-card {
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.exercise-card h4 {
    color: var(--primary-color);
    font-size: 1.6em;
    margin-bottom: var(--spacing-sm);
}

.exercise-card p {
    font-size: 0.95em;
    line-height: 1.5;
    text-align: left;
    margin-bottom: var(--spacing-md);
}

body[dir="rtl"] .exercise-card p {
    text-align: right;
}

.learn-more-button {
    background-color: var(--accent-color);
    color: var(--primary-color);
    /* Used primary color for text on accent button for better contrast */
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: auto;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-pill);
    transition: all var(--transition-speed) var(--transition-ease);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.learn-more-button:hover {
    background-color: #24A260;
    color: var(--white);
    /* White text on hover for darker green */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


/* --- Modal Styling --- */
.modal {
    display: none;
    /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* dark transparent overlay */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: left;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    overflow-y: auto;
    max-height: 80vh;
    /* prevent overflow on small screens */
}

/* --- Close Button --- */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.close-button:hover {
    color: var(--pc-teal);
}

@keyframes fadeInBg {
    from {
        background-color: rgba(0, 0, 0, 0);
    }

    to {
        background-color: rgba(0, 0, 0, 0.6);
    }
}

.modal-content {
    background-color: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px var(--shadow-medium);
    width: 90%;
    max-width: 650px;
    position: relative;
    text-align: center;
    animation: fadeInScale 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.modal-content p {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--light-text-color);
    text-align: justify;
    margin-bottom: var(--spacing-md);
}

body[dir="rtl"] .modal-content p {
    text-align: right;
}

.close-button {
    color: var(--secondary-color);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
    transition: color var(--transition-speed) var(--transition-ease), transform var(--transition-speed) var(--transition-ease);
}

body[dir="rtl"] .close-button {
    right: auto;
    left: 20px;
}

.close-button:hover,
.close-button:focus {
    color: var(--accent-color);
    transform: rotate(90deg);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .site-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .site-header nav {
        max-width: 980px;
    }

    .hero {
        padding: 6rem var(--spacing-lg);
    }

    .hero h1 {
        font-size: 2.8em;
    }

    .hero p {
        font-size: 1.2em;
    }

    section {
        padding: var(--spacing-lg);
    }

    h2 {
        font-size: 2em;
    }
}

@media (max-width: 1200px) and (min-width: 993px) {

    /* Hide the Book Now button on tablets to create space */
    .site-header .cta-button {
        display: none;
    }

    /* Hide the phone number on tablets */
    .site-header .header-phone {
        display: none !important;
    }

    /* Reduce horizontal padding on the header */
    .site-header {
        padding: var(--spacing-md) var(--spacing-md);
    }

    /* Ensure the links section is still centered correctly */
    .site-header .nav-links {
        justify-content: center;
    }
}

@media (max-width: 992px) {

    /* --- CRITICAL: MOBILE NAVIGATION FIX --- */

    /* Ensure the logo is a reasonable size for mobile */
    .site-header .logo img {
        height: 40px;
    }

    /* Show the hamburger button by overriding the desktop 'display: none' */
    .hamburger-menu {
        display: block;
        background: none;
        border: none;
        color: var(--primary-color);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0;
        margin-left: 10px;
    }

    /* Hide the desktop phone number for cleaner mobile header */
    .site-header .header-phone {
        display: none !important;
    }

    .site-header nav {
        /* Reset flex-direction to row to keep logo and controls on one line */
        flex-direction: row;
        align-items: center;
        /* Increased padding on the nav container to push content away from edges */
        padding: 0 var(--spacing-md);
        gap: 0;
    }

    /* Target the container holding the lang-switch and hamburger */
    .site-header nav>div {
        width: auto;
        /* Allow content to dictate width */
        justify-content: flex-end;
        /* Push controls to the end */
        margin-top: 0;
        gap: var(--spacing-sm);
    }

    .site-header nav .logo {
        flex-grow: 1;
        /* Pushes the logo to the left */
    }

    /* CRITICAL: Hide the main nav links by default */
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* centers vertically */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        z-index: 999;
        padding: 0;
        transition: opacity 0.3s ease-in-out;
        opacity: 0;
        pointer-events: none;
    }

    /* CRITICAL: Show the menu when the .active class is applied by JavaScript */
    .nav-links.active {
        display: flex;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        list-style: none;
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.6em;
        /* larger text */
        font-weight: 600;
        color: var(--pc-dark);
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .nav-links a:hover {
        color: var(--pc-primary);
    }

    .nav-links li a::after {
        /* Hide the underline for mobile dropdown links */
        display: none;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    /* --- END MOBILE NAVIGATION FIX --- */


    .hero {
        padding: 5rem var(--spacing-md);
    }

    .hero h1 {
        font-size: 2.2em;
    }

    .hero p {
        font-size: 1.05em;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.7em;
    }

    .service-grid,
    .team-grid,
    .exercises-grid {
        grid-template-columns: 1fr;
    }

    .location-grid {
        grid-template-columns: 1fr;
    }

    .map-container,
    .hours-container {
        padding: var(--spacing-md);
    }

    .map-container iframe {
        height: 280px;
    }

    .booking-form {
        padding: var(--spacing-md);
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .modal-content h3 {
        font-size: 1.8em;
    }

    .modal-content p {
        font-size: 1em;
    }

    .close-button {
        font-size: 26px;
        top: 10px;
        right: 15px;
    }

    body[dir="rtl"] .close-button {
        left: 15px;
        right: auto;
    }
}

@media (max-width: 480px) {
    .site-header .logo {
        font-size: 1.6em;
    }

    .site-header {
        padding: var(--spacing-sm);
    }

    .hero {
        padding: 4rem var(--spacing-sm);
    }

    .hero h1 {
        font-size: 1.8em;
    }

    .hero p {
        font-size: 0.95em;
    }

    .hero .cta-button {
        font-size: 0.95em;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .booking-form {
        padding: var(--spacing-sm);
    }

    .map-container iframe {
        height: 220px;
    }
}