:root {
    --primary-color: #1a365d; /* Deep Blue */
    --secondary-color: #d4af37; /* Gold */
    --accent-color: #2c5282; /* Medium Blue */
    --text-color: #2d3748; /* Dark Gray-Blue */
    --light-text: #718096; /* Medium Gray-Blue */
    --lighter-text: #a0aec0; /* Light Gray-Blue */
    --light-bg: #f7fafc; /* Very Light Gray-Blue */
    --white: #ffffff;
    --border-color: #e2e8f0; /* Light Gray Border */
    --box-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-in-out;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    direction: rtl; /* Right-to-left direction */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', sans-serif; /* Using Tajawal for headings as well for consistency in Arabic */
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Header & Navigation */
#header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: var(--white);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 45px;
}

.nav-links {
    display: flex;
    gap: 2rem; /* Adjusted for RTL */
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* Start from right for RTL */
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
    right: 0; /* Ensure it expands from right to left */
    left: auto;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.language-switcher {
    background: var(--light-bg);
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
    color: var(--primary-color) !important; /* Ensure text color */
    border: 1px solid var(--border-color);
}

.language-switcher:hover {
    background: var(--primary-color);
    color: var(--white) !important;
    border-color: var(--primary-color);
}
.language-switcher::after { /* Remove underline from language switcher */
    display: none !important;
}

/* Hero Section */
#home {
    padding: 180px 0 100px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
}

#home::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.8rem; /* Slightly adjusted for Arabic if needed */
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: var(--white);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
}
.text-center {
    text-align: center;
}
.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--primary-color) !important; /* Text color for button */
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--secondary-color);
    font-size: 1rem;
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: var(--secondary-color) !important;
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%; /* Center for RTL */
    transform: translateX(50%);
    width: 70px;
    height: 3px;
    background: var(--secondary-color);
}

.section-title p.subtitle {
    color: var(--light-text);
    max-width: 700px;
    margin: 10px auto 0;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* About Section */
#about {
    background-color: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }
    .about-image {
        order: -1; /* Image on the left for RTL if two columns */
    }
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

/* About and Vision Grids */
.about-grid, .vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.about-image img, .vision-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

.about-text, .vision-text {
    text-align: right;
}

@media (max-width: 768px) {
    .about-grid, .vision-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-text, .vision-text {
        text-align: center;
    }

    .about-grid .about-image,
    .vision-grid .vision-image {
        order: -1; /* Move image to top on mobile */
    }
}

/* Vision Section */
#vision {
    background: linear-gradient(rgba(26, 54, 93, 0.9), rgba(44, 82, 130, 0.9)), url('/assets/images/vision-bg.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    color: white;
    text-align: center;
}
#vision .section-title h2, #vision .section-title p.subtitle {
    color: white;
}
#vision .section-title h2::after {
    background: var(--white);
}
.vision-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.value-card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: inline-block;
}

.value-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.value-card p {
    color: var(--light-text);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Why Choose Us & Competitive Edge Sections */
#why-choose, #competitive-edge {
    background-color: var(--light-bg);
}
#competitive-edge {
    background-color: var(--white);
}

.list-items {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.list-items li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.05rem;
    padding: 15px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
#competitive-edge .list-items li {
     background-color: var(--light-bg);
}

.list-items li i {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-top: 3px;
    width: 25px; /* Ensure alignment */
    text-align: center;
}

/* Contact Section */
.contact-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px; /* RTL adjustment */
    font-size: 1.05rem;
}

.contact-details i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Newsletter Section */
.newsletter-form {
    max-width: 600px;
    margin: 2rem auto 0;
}

.newsletter-form form {
    display: flex;
    gap: 1rem;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

@media (max-width: 768px) {
    .newsletter-form form {
        flex-direction: column;
    }
}

/* Footer */
footer {
    background: var(--primary-color);
    color: #e0e0e0; /* Lighter text for footer */
    padding: 60px 0 0;
    text-align: right;
}

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

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* Start from right for RTL */
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-section p {
    margin-bottom: 15px;
    opacity: 0.8;
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px; /* RTL adjustment */
}

.footer-links a i {
    font-size: 0.7rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-right: 5px; /* Indent on hover for RTL */
}

.footer-links a:hover i {
    transform: translateX(-3px);
}

.footer-social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    transition: var(--transition);
}

.footer-social-links a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    background: rgba(0,0,0,0.2); /* Darker shade for bottom bar */
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Slide from right for RTL */
        left: auto;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 30px 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); /* Shadow on the left for RTL */
        transition: right 0.35s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
    }
    .nav-links.active {
        right: 0; /* Slide in from right */
    }
    .nav-links a {
        padding: 5px 0;
        /* border-bottom: 1px solid var(--border-color); */
        width: 100%;
        font-size: 0.95rem;
        line-height: 1.2;
    }
    .language-switcher {
        margin-top: 1.5rem;
        padding: 12px 15px !important;
        text-align: center;
        display: block;
        width: 100%;
    }
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    .overlay.active {
        display: block;
        opacity: 1;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    .about-image {
        order: 0; /* Reset order for single column */
        margin-top: 30px;
    }
    .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: right;
    }
    .footer-section h3::after {
        right: 0; /* Ensure underline starts from right */
        transform: none;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.9rem;
    }
    .section-title h2 {
        font-size: 1.7rem;
    }
    .nav-links {
        max-width: 280px;
    }
}