/* ========================================================
   ملف التنسيق النهائي - Header & Sidebar
   ======================================================== */
:root {
    --bg-color: #FCFAF5;        /* الأبيض الكريمي */
    --text-color: #006745;      /* الأخضر */
    --btn-color: #A5122D;       /* الأحمر */
    --border-color: #A07755;    /* البني */
    --white-color: #FFFFFF;
}

/* --- [1] تنسيق رأس الصفحة المتحرك (Sticky Header) --- */
.sticky-header {
    position: sticky; 
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--royal-green-heavy); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}

/* --- [1] تنسيق الجسم لتفادي اختفاء المحتوى خلف الرأس الثابت --- */
body {
    margin: 0; padding: 0;
    padding-top: 100px; /* هذه القيمة تعتمد على ارتفاع الهيدر لديك، يمكنك زيادتها إذا لزم الأمر */
    background-color: var(--bg-color);
    color: #333333;
    font-family: 'Arial', sans-serif;
    direction: rtl;
}

/* --- [2] تنسيق رأس الصفحة الثابت --- */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; 
    border-bottom: 2px solid var(--border-color);
    
    /* الخصائص المسؤولة عن التثبيت */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box; /* لضمان عدم خروج الهيدر عن الشاشة */
    
    background-image: url('../photo%20video/photo/zelidj.jpg');
    background-size: cover;
    color: var(--text-color);
}

header::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(252, 250, 245, 0.90);
    z-index: 1;
}
header > * { position: relative; z-index: 2; }

.logo-area { display: flex; align-items: center; gap: 15px; }
.logo-img { 
    width: 70px; height: 70px; border-radius: 50%; 
    border: 3px solid var(--border-color); object-fit: cover; 
}
.site-title { color: var(--text-color); font-weight: bold; font-size: 1.3rem; }

.hamburger { 
    font-size: 35px; color: var(--text-color); 
    cursor: pointer; padding: 10px; display: block; 
}

/* 2. شريط الإعلانات (نظام عدم التكدس) */
.announcement-bar {
    background-color: var(--border-color);
    color: #fff; padding: 10px 15px;
    text-align: center; height: auto;
    min-height: 25px; font-weight: bold; font-size: 1.1rem;
    line-height: 1.5;
}
/* إخفاء كل الإعلانات افتراضياً لمنع التكدس */
.ad-item { display: none; }
/* إظهار الإعلان النشط فقط */
.ad-item.active { display: block; }

/* 3. القائمة الجانبية */
.side-menu {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
    z-index: 1000; transition: 0.5s;
    background-image: url('../photo%20video/photo/zelidj.jpg');
    background-size: cover;
}
.side-menu::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(252, 250, 245, 0.90);
    z-index: 1;
}
.side-menu > * { position: relative; z-index: 2; color: var(--text-color); }
.side-menu.active { right: 0; }
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }
.side-menu.active + .overlay { display: block; }

.close-btn { font-size: 3rem; cursor: pointer; padding: 10px; text-align: left; color: var(--text-color); }
.menu-header { display: flex; align-items: center; gap: 15px; padding: 15px; font-size: 1.1rem; font-weight: 900; white-space: nowrap; }
.menu-header img { width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--text-color); }

.side-menu a { 
    padding: 18px; display: block; background-color: var(--text-color); color: var(--white-color);
    text-decoration: none; font-weight: bold; font-size: 1.1rem;
    margin: 10px 20px; border-radius: 50px; text-align: center; transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.side-menu a:hover { background-color: #008f5d; transform: scale(1.03); }

.share-btn { 
    background-color: var(--btn-color); color: #fff;
    display: block; margin: 20px auto; width: 80%; padding: 15px;
    border-radius: 50px; font-size: 1.1rem; cursor: pointer; font-weight: bold; border: none;
}

/* 4. زر الدعم */
.support-container { position: fixed; bottom: 30px; right: 30px; z-index: 999; }
.support-fab { 
    background: var(--text-color); color: white;
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; font-size: 1.5rem;
}
.support-icons { display: none; flex-direction: column; gap: 15px; background: #fff; padding: 15px; border-radius: 15px; border: 2px solid var(--border-color); margin-bottom: 15px; }
.support-icons.show { display: flex; }
.support-icons i { font-size: 1.8rem; cursor: pointer; transition: 0.3s; }
.support-icons i:hover { transform: scale(1.2); }

.fa-facebook { color: #1877f2; }
.fa-instagram { color: #e1306c; }
.fa-whatsapp { color: #25d366; }
.fa-envelope { color: #d44638; }
.fa-telegram { color: #0088cc; }
.fa-map-marker-alt { color: var(--border-color); }

/* 5. التنبيهات */
.toast { 
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: var(--btn-color); color: #fff;
    padding: 15px 30px; border-radius: 50px;
    display: none; z-index: 2000; font-size: 1.2rem;
    font-weight: 900; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .site-title { font-size: 0.9rem; }
    .menu-header { font-size: 0.9rem; }
    /* تصغير الخط في الهاتف ليظهر في سطر واحد */
    .announcement-bar { font-size: 0.75rem !important; padding: 5px; }
}