:root {
    --primary-color: #2e7d32; /* Green */
    --secondary-color: #0288d1; /* Blue */
    --accent-color: #81c784; /* Light Green */
    --text-color: #333;
    --bg-color: #f4f4f4;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Back to Top Button */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#backToTop:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Active Nav Link */
.nav-links a.active-section {
    color: var(--primary-color);
    font-weight: bold;
}

/* Header & Nav */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Adjust based on your logo's aspect ratio */
    width: 50px;
    object-fit: cover;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

.lang-switch {
    margin-left: 2rem;
    font-weight: bold;
}

.lang-switch a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0 5px;
}

.lang-switch a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* RTL Support */
[dir="rtl"] body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Ensure font supports Arabic */
}

[dir="rtl"] .nav-links li {
    margin-left: 0;
    margin-right: 2rem;
}

[dir="rtl"] .lang-switch {
    margin-left: 0;
    margin-right: 2rem;
}

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

[dir="rtl"] .service-item,
[dir="rtl"] .goals-list,
[dir="rtl"] .contact-container {
    text-align: right;
}

[dir="rtl"] .goals-list li i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .social-links a {
    flex-direction: row; /* Keep icon next to text */
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    padding: 80px 20px 0; /* Added top padding for fixed header */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.9); /* In case the image has transparency or needs pop */
    padding: 10px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background-color: var(--bg-color);
}

/* Sections */
.content-section {
    padding: 4rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* Cards (Mission/Vision) */
.cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Services Grid */
.alt-bg {
    background-color: #e8f5e9; /* Very light green */
}

.lead-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.goals-list {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.goals-list h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.goals-list ul {
    list-style: none;
}

.goals-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.goals-list li i {
    color: var(--primary-color);
    margin-right: 10px;
    margin-top: 5px;
}

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

.service-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.service-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Contact Section */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    justify-content: center;
    text-align: left;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.social-links-container {
    margin-top: 2rem;
}

.social-links-container h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.contact-form-container {
    flex: 1;
    min-width: 300px;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: #333;
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

/* Mobile Burger */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--white);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    }

    .nav-links li {
        opacity: 0;
        margin: 2rem 0;
    }

    .burger {
        display: block;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}