/* ---
Color Palette & Fonts
--- */
:root {
    --primary-accent: #8B0000; /* Deep Red */
    --primary-accent-dark: #6e0000;
    --background-white: #FFFFFF;
    --background-light-grey: #F5F5F5;
    --text-dark: #1E1E1E;
    --text-light: #4a4a4a;
    --border-color: #dddddd;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
    --font-arabic: 'Tajawal', sans-serif;
}

/* ---
Global & Body Styles
--- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--background-white);
    line-height: 1.7;
}

/* Apply Arabic font for the RTL page */
html[dir="rtl"] body {
    font-family: var(--font-arabic);
}

/* ---
Typography & Headings
--- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-accent);
    line-height: 1.3;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-family: 'Tajawal', sans-serif !important;
    
}
.section-title h2 {
font-family: 'Tajawal', sans-serif !important;
    }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-accent);
    text-decoration: none;
}

/* ---
Layout Components
--- */
.content-section {
    padding: 5rem 2rem;
}

.bg-light {
    background-color: var(--background-light-grey);
}

/* ---
Header & Navigation
--- */
.main-header {
    background-color: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(#8B0000);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-switcher {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.lang-btn {
    background: none;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-btn.active {
    background-color: var(--primary-accent);
    color: var(--background-white);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: var(--background-white);
}

.btn-primary:hover {
    background-color: var(--primary-accent-dark);
    transform: translateY(-2px);
}

.btn-mobile-only {
    display: none; /* Hide on desktop */
}

/* ---
Hero Section (#home)
--- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'Tajawal', sans-serif !important;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-specialties {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.specialty-item {
    background-color: var(--background-light-grey);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-image {
    flex-basis: 400px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ---
About Section
--- */
.about-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.qualifications h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-family: 'Tajawal', sans-serif !important;
}

.qualifications ul {
    list-style: none;
}

.qualifications li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.qualifications i {
    color: var(--primary-accent);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

html[dir="rtl"] .qualifications i {
    margin-right: 0;
    margin-left: 10px;
}

/* ---
Services Section
--- */
.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: var(--background-white);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-accent);
    margin-bottom: 1.5rem;
}

.service-card h4 {
    color: var(--text-dark);
    font-size: 1.2rem;
}

/* ---
Testimonials Section
--- */
.testimonial-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--background-light-grey);
    padding: 2rem;
    border-left: 5px solid var(--primary-accent);
    border-radius: 0 8px 8px 0;
}

html[dir="rtl"] .testimonial-card {
    border-left: none;
    border-right: 5px solid var(--primary-accent);
    border-radius: 8px 0 0 8px;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.testimonial-text i {
    font-size: 1rem;
    margin-right: 0.5rem;
}

html[dir="rtl"] .testimonial-text i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.testimonial-author {
    font-weight: 700;
    text-align: right;
    color: var(--text-dark);
}

html[dir="rtl"] .testimonial-author {
    text-align: left;
}


/* ---
Contact Section
--- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.contact-info p {
    font-size: 1.1rem;
    display: flex;
    align-items: start;
    gap: 10px;
}

.contact-info i {
    margin-top: 5px;
    color: var(--primary-accent);
    width: 20px;
}
.contact-info h3 {
    margin-bottom: 1.5rem; /* You can adjust this value for more or less space */
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

.contact-map iframe {
    border-radius: 8px;
}

/* ---
Footer
--- */
.main-footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--text-dark);
    /* Add/Modify these two lines */
    color: #FFFFFF !important;
    font-family: 'Tajawal', sans-serif !important;
}
.main-footer p {
    color: #FFFFFF !important;
    }


/* ---
Responsive Design
--- */
@media (max-width: 992px) {
    .hero-section, .about-container, .contact-container, .testimonial-list {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .hero-image {
        order: -1; /* Puts image on top on mobile */
        margin-bottom: 2rem;
    }

    .header-actions .btn-primary {
        display: none; /* Hide desktop button */
    }

    .btn-mobile-only {
        display: block; /* Show mobile button in hero */
        margin: 2rem auto 0;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .nav-links {
        display: none; /* Simple hiding for now. A full mobile menu needs more JS. */
    }
    .section-title {
        font-size: 2rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .content-section {
        padding: 3rem 1rem;
    }
    .main-header {
        padding: 1rem;
    }
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
    border-radius: 15px;
    margin-left: 15px; /* Adds space to the left of the logo */
}

.logo h1 {
    font-size: 1.8em;
    margin: 0;
    color: var(--primary-blue);
    font-family: 'Tajawal', sans-serif !important;
}
/* --- Correct Font for ARABIC Header Logo --- */
html[dir="rtl"] .logo a {
    font-family: 'Tajawal', sans-serif !important;
}
/* ---
   13. Mobile Navigation (Hamburger Menu)
--- */

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--color-green-sage);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001; /* Make sure it's on top */
}

/* Styles for the mobile navigation panel */
@media (max-width: 992px) { /* The breakpoint when the menu should change */

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%); /* Start off-screen to the right */
        transition: transform 0.4s ease-in-out;
        padding-top: 60px;
    }

    /* In RTL, we want it to come from the left */
    html[dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .nav-links.active li {
       opacity: 1;
       transition-delay: 0.3s;
    }

    .nav-links a {
        font-size: 1.2rem;
        color: var(--color-text-charcoal);
    }

    .header-actions {
        display: none; /* Hide desktop buttons on mobile */
    }

    .hamburger-menu {
        display: block; /* Show the hamburger on mobile */
    }
}
/* ---
   13. Mobile Navigation (Hamburger Menu)
--- */

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--color-green-sage);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001; /* Make sure it's on top */
}

/* This media query applies styles ONLY on screens smaller than 992px */
@media (max-width: 992px) {

    /* Hides the desktop buttons/language switcher */
    .header-actions {
        display: none;
    }

    /* Shows the hamburger icon */
    .hamburger-menu {
        display: block;
    }

    /* This styles the hidden menu panel */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        display: flex; /* This was missing from my previous code, my apologies */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%); /* This hides the menu off-screen */
        transition: transform 0.4s ease-in-out;
    }

    /* For the Arabic version, this makes it slide in from the left */
    html[dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    /* THIS IS THE CRUCIAL PART: This rule makes the menu appear */
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .nav-links.active li {
       opacity: 1;
       transition-delay: 0.3s;
    }

    .nav-links a {
        font-size: 1.2rem;
        color: var(--color-text-charcoal);
    }
}