/* =========================================
   الألوان الأساسية (مستوحاة من اللوجو)
========================================= */
:root {
    --primary-green: #899a80; 
    --dark-green: #4a5d43;    
    --cream-light: #f2ead6;   
    --text-color: #333333;
    --white: #ffffff;
    --whatsapp-color: #25d366;
    --gold: #d4af37;
}

/* =========================================
   الإعدادات العامة
========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--cream-light);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: auto; 
    overflow: hidden; 
}

.section-title { 
    text-align: center; 
    color: var(--dark-green); 
    margin-bottom: 2rem; 
    font-size: 2.2rem; 
}

.btn {
    display: inline-block; 
    background-color: var(--dark-green); 
    color: var(--white);
    padding: 12px 30px; 
    text-decoration: none; 
    border-radius: 5px; 
    border: 2px solid var(--dark-green);
    font-family: inherit; 
    font-size: 1.1rem; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s;
}

.btn:hover { 
    background-color: var(--primary-green); 
    border-color: var(--primary-green); 
    color: var(--white); 
}

.btn-outline { 
    background-color: transparent; 
    color: var(--dark-green); 
}

.btn-outline:hover { 
    background-color: var(--dark-green); 
    color: var(--white); 
}

/* =========================================
   زر الواتساب العائم
========================================= */
.whatsapp-float {
    position: fixed; 
    bottom: 30px; 
    left: 30px; 
    width: 80px; 
    height: 80px;
    background-color: var(--whatsapp-color); 
    color: white; 
    font-size: 40px;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2); 
    z-index: 1000;
    text-decoration: none; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover { 
    transform: scale(1.1); 
    box-shadow: 2px 2px 20px rgba(37, 211, 102, 0.5); 
}

/* =========================================
   الرأس (Header) والروابط
========================================= */
header { 
    background-color: var(--white); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); 
    padding: 15px 0; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

.header-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    text-decoration: none; 
}

.logo-img { height: 50px; }
.logo h1 { color: var(--dark-green); font-size: 1.5rem; margin: 0; }

nav ul { list-style: none; display: flex; gap: 20px; align-items: center; }
nav ul li a { text-decoration: none; color: var(--dark-green); font-weight: 700; transition: 0.3s; }
nav ul li a:hover { color: var(--primary-green); }

.admin-link { 
    background-color: var(--dark-green); 
    color: var(--white) !important; 
    padding: 5px 15px; 
    border-radius: 5px; 
}

.admin-link:hover { background-color: var(--primary-green) !important; }

.header-social { display: flex; gap: 10px; }
.header-social a {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 35px; 
    height: 35px;
    background-color: var(--primary-green); 
    color: var(--white); 
    border-radius: 50%;
    text-decoration: none; 
    transition: 0.3s;
}
.header-social a:hover { background-color: var(--dark-green); transform: scale(1.1); }

/* =========================================
   القسم المدمج (الرئيسية + من نحن)
========================================= */
.hero-about-section {
    padding: 6rem 0;
    background-color: #fcfcfc;
}

.hero-about-wrapper {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-about-content {
    flex: 1;
}

.hero-about-content .main-headline {
    font-size: 2.5rem;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

/* .hero-about-content .sub-headline {
    font-size: 1.4rem;
    color: var(--dark-green);
    margin-bottom: 1.5rem;
} */

.about-description p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.about-features li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--dark-green);
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-features li i {
    color: var(--dark-green);
    font-size: 1.2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-about-image {
    flex: 1;
}
.hero-about-image .main-img {
    width: 100%;
    max-width: 450px; /* يمكنك تعديل هذا الرقم لتصغير أو تكبير الشعار */
    border-radius: 0; /* إزالة الحواف الدائرية */
    box-shadow: none; /* إزالة الظل (الإطار) */
    background-color: transparent; /* التأكد من أن الخلفية شفافة */
    object-fit: contain; /* للحفاظ على أبعاد الشعار بدون قص */
    display: block;
    margin: 0 auto; /* لتوسيط الشعار */
}

/* =========================================
   قسم الإحصائيات المتحرك (الجديد)
========================================= */
.stats-animated-section {
    padding: 100px 0;
    background-color: var(--white); /* خلفية بيضاء لنظافة بصرية */
    overflow: hidden; /* لمنع ظهور شريط التمرير أثناء الحركة */
}

.stats-flex-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px; /* مسافة بين الصورة والأرقام */
}

/* الجزء الأيمن: الصورة */
.stats-image-container {
    flex: 1;
    max-width: 500px;
    opacity: 0; /* مخفية في البداية */
    will-change: transform, opacity;
}

.stats-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* الجزء الأيسر: الأرقام والنصوص */
.stats-info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* محاذاة النص لليمين (بداية السطر) */
}

.stats-number-wrapper {
    display: flex;
    align-items: center;
    color: var(--dark-green);
    margin-bottom: 10px;
    opacity: 0; /* مخفية في البداية */
    will-change: transform, opacity;
}

.stats-number-prefix {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
}

.stats-number-animated {
    font-size: 7rem; /* رقم كبير وبارز */
    font-weight: 800;
    line-height: 1;
    direction: ltr; /* لضمان قراءة الرقم من اليسار لليمين */
}

.stats-text {
    font-size: 2rem;
    color: #555;
    font-weight: 400;
    margin-top: 10px;
    opacity: 0; /* مخفية في البداية */
    will-change: transform, opacity;
}

/* =========================================
   تعريفات الحركة (Keyframes) والكلاسات المُفعلة
========================================= */

/* 1. الصورة تأتي من اليمين */
@keyframes slideFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 2. الأرقام تأتي من اليسار */
@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 3. الاسم يأتي من الأسفل */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* كلاسات التفعيل (ستضاف بواسطة الجافاسكربت) */
.animate .slide-from-right {
    animation: slideFromRight 1s ease-out forwards;
}

.animate .slide-from-left {
    animation: slideFromLeft 1s ease-out forwards;
    animation-delay: 0.2s; /* تأخير بسيط للحركة الثانية */
}

.animate .fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 0.5s; /* تأخير أطول لظهور النص */
}

/* تنسيق متجاوب (للهواتف) */
@media (max-width: 992px) {
    .stats-flex-wrapper {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .stats-info-container {
        align-items: center;
    }
    
    .stats-number-animated { font-size: 5rem; }
    .stats-number-prefix { font-size: 3.5rem; }
    .stats-text { font-size: 1.5rem; }
}
/* =========================================
   المشاريع (Projects)
========================================= */
.projects { padding: 4rem 0; background-color: var(--cream-light); }
.main-categories-container { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.main-category-box { width: 100%; max-width: 48%; }

.project-box {
    display: flex; 
    flex-direction: column; 
    background-color: var(--white); 
    border-radius: 15px;
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); 
    height: 100%; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-box:hover { transform: translateY(-8px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.project-box img { width: 100%; height: 250px; object-fit: cover; display: block; }
.project-box .project-info { padding: 1.5rem; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.project-box .project-info h3 { color: var(--dark-green); margin-bottom: 5px; font-size: 1.5rem; }

.btn-more {
    display: inline-block; 
    padding: 8px 25px; 
    background-color: var(--primary-green);
    color: var(--white); 
    text-decoration: none; 
    border-radius: 5px; 
    font-size: 1rem; 
    font-weight: bold; 
    transition: 0.3s;
}

.btn-more:hover { background-color: var(--dark-green); color: var(--white); }

/* =========================================
   الخدمات (Services)
========================================= */
.services { padding: 4rem 0; background-color: var(--white); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.service-card { 
    background: var(--cream-light); 
    padding: 2.5rem 1.5rem; 
    border-radius: 12px; 
    text-align: center; 
    transition: 0.3s; 
    border-bottom: 5px solid var(--primary-green); 
}

.service-card:hover { transform: translateY(-5px); }
.service-card i { font-size: 3rem; color: var(--dark-green); margin-bottom: 20px; }
.service-card h3 { color: var(--dark-green); margin-bottom: 1rem; font-size: 1.4rem; }

/* =========================================
   معلومات التواصل (Contact Info)
========================================= */
.contact-info-section { padding: 4rem 0; background-color: var(--white); border-top: 1px solid #eaeaea; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; text-align: center; }

.info-item { background-color: var(--cream-light); padding: 2rem; border-radius: 12px; transition: 0.3s; }
.info-item:hover { transform: translateY(-5px); background-color: var(--primary-green); color: var(--white); }
.info-item:hover h3, .info-item:hover p, .info-item:hover i { color: var(--white); }
.info-item i { font-size: 2.5rem; color: var(--dark-green); margin-bottom: 15px; transition: 0.3s;}
.info-item h3 { color: var(--dark-green); margin-bottom: 10px; transition: 0.3s;}
.info-item p { font-size: 1.1rem; font-weight: bold; transition: 0.3s;}

.btn-location {
    display: inline-block; 
    margin-top: 10px; 
    padding: 8px 15px; 
    background-color: var(--primary-green);
    color: white !important; 
    text-decoration: none; 
    border-radius: 5px; 
    font-size: 0.85rem; 
    font-weight: bold; 
    transition: 0.3s;
}

.btn-location:hover { background-color: var(--dark-green); transform: translateY(-2px); }

/* =========================================
   تذييل الصفحة (Footer)
========================================= */
footer { 
    background-color: var(--dark-green); 
    color: var(--cream-light); 
    text-align: center; 
    padding: 1.5rem 0; 
    font-size: 1.1rem;
}

/* =========================================
   التوافق مع الشاشات الصغيرة (الجوال والتابلت)
========================================= */
@media (max-width: 992px) {
    /* القسم المدمج (الرئيسية + من نحن) */
    .hero-about-wrapper {
        flex-direction: column-reverse;
        text-align: right;
        gap: 2.5rem;
    }
    
    .hero-about-content .main-headline { font-size: 2rem; }
    
    .hero-buttons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    /* زر الواتساب */
    .whatsapp-float { 
        bottom: 20px; 
        left: 20px; 
        width: 60px; 
        height: 60px; 
        font-size: 35px; 
    }
    
    /* القائمة العلوية (Header) */
    header { padding: 10px 0; }
    header .logo { display: none !important; } /* إخفاء اللوجو في الموبايل */
    .header-container { flex-direction: column; text-align: center; gap: 10px; }
    
    nav ul { 
        margin-top: 0; 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 12px; 
    }
    
    nav ul li a { font-size: 0.9rem; }
    .admin-link { padding: 4px 12px; font-size: 0.85rem; }

    /* مربعات المشاريع الرئيسية */
    .main-category-box { max-width: 100%; }
}