/* الألوان الأساسية للمشروع */
:root {
    --primary-color: #0e595f; /* اللون الزيتي المطلوب */
    --white: #ffffff;
    --text-dark: #333333;
    --light-gray: #f8f9fa;
}

/* تنسيق الهيدر */
.navbar {
    background-color: var(--white) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    transition: 0.3s;
    position: relative;
    padding-bottom: 5px;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: bold;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}
/* --- تعديلات الهيدر لواجهات الموبايل --- */
@media (max-width: 991px) {
    /* 1. زيادة طول الناف بار */
    .navbar {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        min-height: 90px; /* يعطي ارتفاعاً ثابتاً ومريحاً للوغو */
    }

    /* 2. التحكم في حجم اللوغو بالموبايل ليبقى واضحاً وكبيراً */
    .main-logo {
        height: 70px !important; /* طول مناسب جداً للموبايل دون مبالغة */
        width: auto;
    }

    /* 3. موازنة زر القائمة (الهامبرغر) ليكون في المنتصف تماماً مع اللوغو الكبير */
    .navbar-toggler {
        margin-top: 5px;
        border: 1px solid rgba(0,0,0,0.1); /* لمسة جمالية للزر */
        padding: 8px;
    }

    /* 4. تحسين شكل القائمة المنسدلة بعد التكبير */
    .navbar-collapse {
        background-color: #fff;
        margin-top: 10px;
        border-radius: 10px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 15px;
    }
}

/* تنسيق الفوتر */
.main-footer {
    background-color: var(--primary-color);
    color: var(--white);
}

.main-footer h4 {
    border-right: 4px solid var(--white);
    padding-right: 15px;
    margin-bottom: 25px;
}

.main-footer a {
    transition: 0.3s;
}

.main-footer a:hover {
    opacity: 0.8;
}

/* تنسيق الفورم داخل الفوتر */
.footer-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 5px;
    margin-bottom: 10px;
}

.footer-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

.footer-form .btn-submit {
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: bold;
    border: none;
    transition: 0.3s;
}

.footer-form .btn-submit:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
}

/* --- Hero Section Custom Styles --- */
.hero-section {
    position: relative;
    background: url('../images/hero-bg.jpeg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* تأثير بارالاكس احترافي */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    overflow: hidden;
}

/* طبقة التعتيم لجعل النص مقروءاً */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55); /* تغبيش بنسبة 55% */
    z-index: 1;
}

/* جعل المحتوى فوق التعتيم */
.hero-section .container {
    position: relative;
    z-index: 2;
}

/* تنسيق النصوص */
.hero-section h1 {
    font-size: 3.5rem;
    text-shadow: 0px 4px 15px rgba(0,0,0,0.6);
    margin-bottom: 1.5rem;
}

.hero-description {
    max-width: 800px;
    margin: 0 auto 2.5rem auto; /* توسيط النص ومسافة تحتية */
}

.hero-description p {
    font-size: 1.2rem;
    line-height: 1.9;
    font-weight: 400; /* وزن متوسط أفضل للقراءة فوق الصور */
    color: #f8f9fa;
}

/* --- الأزرار والتجاوب --- */
.hero-btns .btn {
    transition: all 0.3s ease;
}

.hero-btns .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* --- التجاوب مع الموبايل (Responsive) --- */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh; /* تقليل الارتفاع قليلاً في الموبايل */
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px; /* مسافة بين الأزرار عند ترتيبها عمودياً */
        align-items: center;
    }

    .hero-btns .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-description p {
        font-size: 1.05rem;
        padding: 0 10px;
        line-height: 1.7;
    }
}

/* خط العنوان (Title Line) العام */
.title-line {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color, #198754);
    margin: 10px auto;
    border-radius: 2px;
}

/* ============================================================
   تنسيق معرض الصور الموحد - (حل مشكلة التضارب والظهور الكامل)
   ============================================================ */
/* 1. الحاوية الأساسية للميديا */
.gallery-media-holder {
    width: 100%;
    height: 250px;           /* ارتفاع ثابت للكمبيوتر */
    position: relative;
    overflow: hidden;
    background: #f8f9fa;     
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

/* 2. إظهار الصور والفيديوهات كاملة (Contain) */
.gallery-media-holder img, 
.gallery-media-holder video {
    width: 100%;
    height: 100%;
    object-fit: contain;     /* يضمن ظهور الصورة كاملة */
    display: block;
    transition: transform 0.5s ease;
    padding: 8px;            /* إطار داخلي بسيط لجمالية العرض */
}

/* 3. ستايل الـ Overlay */
.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.gallery-media-holder .overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(14, 89, 95, 0.4); 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-link:hover .overlay {
    opacity: 1;
}

/* 4. تأثيرات الكارد */
.gallery-card-front {
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.gallery-card-front:hover {
    transform: translateY(-5px);
}

/* 5. تحسين العرض للموبايل (Mobile Friendly) */
@media (max-width: 768px) {
    .gallery-media-holder {
        height: 220px; /* تقليل الارتفاع قليلاً ليناسب الشاشات الصغيرة */
    }
    
    .gallery-page h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    /* جعل الكارد يأخذ مساحة أكبر قليلاً في الموبايل الصغير جداً */
    .gallery-media-holder {
        height: 250px; 
    }
    .row-cols-1 > .col {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* تنظيف ستايلات Fancybox */
.fancybox__container {
    --fancybox-bg: rgba(0, 0, 0, 0.9);
}
/* ============================================================ */

/* Event Mini Card */
.event-mini-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s ease;
    border-right: 5px solid var(--primary-color);
}

.event-mini-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.event-date-box {
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    min-width: 80px;
    border-radius: 8px;
}


/* فاصل أرشيف الفعاليات */
.event-divider {
    text-align: center;
    position: relative;
    border-bottom: 2px solid #e0e0e0;
    height: 1px;
    width: 80%;
    margin: 0 auto;
}

.event-divider span {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #f8f9fa; /* لون خلفية الصفحة */
    padding: 0 15px;
    color: #0e595f;
    font-size: 1.2rem;
}

.event-archive-item:last-child .event-divider {
    display: none; /* إخفاء الفاصل بعد آخر عنصر */
}
/* --- ستايل الفقرات المتوازية --- */

.info-block {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.expand-box {
    max-height: 100px; /* الطول الموحد لكل الفقرات بالبداية */
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
    line-height: 1.6;
    color: #555;
}

/* تأثير التلاشي */
.expand-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, white);
}

.expand-box.expanded {
    max-height: 1000px; /* يتوسع عند الضغط */
}

.expand-box.expanded::after {
    display: none;
}

.btn-more {
    background: none;
    border: none;
    color: #198754;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px 0;
    align-self: flex-start;
}

/* محاذاة أزرار الإنجليزي لليسار */
/* استهداف أي عنصر داخل حاوية الـ ltr */
[dir="ltr"] {
    text-align: left !important;
}

/* محاذاة أزرار "Read more" لليسار أيضاً */
[dir="ltr"] .btn-more {
    margin-right: auto; /* دفع الزر لليسار */
    margin-left: 0;
    display: block;
}

/* لضمان أن النقاط (Lists) أو الفقرات تتبع المحاذاة */
[dir="ltr"] .expand-box p {
    text-align: left;
}

/* صفحة من نحن */
.about-card {
    background: #fff;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.leading-relaxed {
    line-height: 1.8;
    text-align: justify;
}

/* ستايل الأهداف */
.goal-item {
    transition: all 0.2s ease;
    height: 100%; /* لضمان تساوي الطول إذا كان النص طويلاً */
}

.goal-item:hover {
    background-color: #e9f5ee !important; /* لون أخضر فاتح جداً عند التمرير */
}

.goal-item i {
    min-width: 30px; /* لضمان عدم زحزحة النص */
}
/* تنسيق زر الواتساب العائم */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    left: 40px; /* بما أن الموقع عربي، الأفضل وضعها على اليسار لكي لا تغطي النصوص */
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    transform: scale(1.1);
}

/* تأثير النبض لجذب الانتباه */
@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* نص تلميحي يظهر عند حوم الماوس (اختياري) */
.whatsapp-float .tooltip-text {
    visibility: hidden;
    width: 100px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    right: 120%; 
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

.whatsapp-float:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* للتوافق مع الموبايل */
@media screen and (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
        font-size: 30px;
    }
}