/* css/header.css */

:root {
    --gold-glow: 0 0 15px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.3);
    --gold-solid: #d4af37;
    --gold-light: #f3e5ab;
    --royal-green-deep: rgba(0, 38, 26, 0.96);
    --header-overlay: rgba(0, 71, 49, 0.85);
    --announcement-bg: rgba(128, 0, 32, 0.65); /* أحمر عنابي فخم */
    --white: #ffffff;
    --transition-smooth: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* تنسيقات عامة */
body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- الهيدر الرئيسي (Header) --- */
header {
    background: linear-gradient(var(--header-overlay), var(--header-overlay)), 
                url('../photo video/photo/zelidj.jpg');
    background-size: cover;
    background-position: center;
    padding: 12px 5%;
    border-bottom: 3px solid var(--gold-solid);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.brand-link {
    text-decoration: none;
    display: block;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    border: 2px solid var(--gold-solid);
    background: var(--white);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--gold-glow);
}

.header-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(90deg, #f3e5ab 10%, #d4af37 50%, #f3e5ab 90%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7)); 
    animation: shineEffect 4s linear infinite; 
}

/* --- زر الهمبرغر المطور --- */
.hamburger {
    background: rgba(0, 38, 26, 0.8);
    border: 2px solid var(--gold-solid);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.hamburger::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(30deg);
    animation: buttonShimmer 4s infinite;
}

@keyframes buttonShimmer {
    0% { left: -150%; }
    30% { left: 150%; }
    100% { left: 150%; }
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--gold-solid);
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.6);
}

/* --- شريط الإعلانات (للحواسب - تدفق أفقي) --- */
.announcement-bar {
    background: linear-gradient(var(--announcement-bg), var(--announcement-bg)), 
                url('../photo video/photo/zelidj.jpg');
    background-size: cover;
    background-position: center 30%;
    color: var(--white);
    padding: 10px 0;
    border-bottom: 2px solid var(--gold-solid);
    overflow: hidden;
    position: relative;
    z-index: 999;
}

.announcement-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: marqueeFlow 45s linear infinite; /* سرعة الحواسيب كما هي */
    will-change: transform;
}

@keyframes marqueeFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100vw); }
}

.ad-text {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* الفواصل الموسيقية */
.music-separator {
    display: inline-flex;
    position: relative;
    margin: 0 15px;
    color: var(--gold-solid);
    font-size: 1.4rem;
}

.flying-note {
    position: absolute;
    font-size: 0.9rem;
    opacity: 0;
    animation: flyUp 2.5s infinite ease-in-out;
}

.n1 { left: -5px; animation-delay: 0s; }
.n2 { left: 5px; animation-delay: 0.8s; }
.n3 { left: 15px; animation-delay: 1.6s; }

@keyframes flyUp {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(-30px) scale(1.2); opacity: 0; }
}

/* --- القائمة الجانبية (Side Menu) --- */
.side-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100%;
    background: linear-gradient(var(--royal-green-deep), var(--royal-green-deep)), 
                url('../photo video/photo/zelidj.jpg');
    background-size: cover;
    z-index: 2000;
    transition: var(--transition-smooth);
    border-left: 3px solid var(--gold-solid);
}

.side-menu.active {
    right: 0;
}

.close-menu-btn {
    position: absolute;
    top: 50%;
    left: -25px;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #f3e5ab 0%, #d4af37 100%);
    border: 2px solid #8b6d13;
    border-radius: 50%;
    color: #002e20;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    z-index: 2001;
    cursor: pointer;
}

.menu-logo-circle {
    width: 140px;
    height: 140px;
    margin: 60px auto 15px;
    border-radius: 50% !important;
    border: 4px solid var(--gold-solid);
    background: var(--white);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-brand-name {
    color: var(--gold-solid);
    font-size: 1.5rem;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(90deg, #d4af37, #f3e5ab, #d4af37);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8)); 
    animation: shineEffect 4s linear infinite;
}

@keyframes shineEffect {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.nav-links {
    list-style: none;
    padding: 0 25px;
    margin-top: 30px;
}

.nav-links li {
    margin-bottom: 15px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border: 1.5px solid var(--gold-solid);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.nav-links li a:hover {
    background: var(--gold-solid);
    color: #002e20;
}

.nav-links li a i {
    margin-left: 10px;
    color: var(--gold-solid);
}

.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1500;
}

.overlay.active {
    display: block;
}

/* --- [الحل النهائي لشريط الهواتف - تم الدمج بعناية] --- */
@media (max-width: 768px) {
    .header-title { font-size: 1rem; }

    .announcement-bar {
        height: 90px; /* زيادة الطول قليلاً كما طلبت */
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        position: relative;
    }

    .announcement-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        white-space: normal;
        /* أنميشن عمودي: 10 ثوانٍ لكل إعلان (الإجمالي 40 ثانية للأربعة) */
        animation: verticalFlowDynamic 40s cubic-bezier(0.85, 0, 0.15, 1) infinite;
    }

    .ad-text {
        height: 90px; /* يطابق ارتفاع الشريط تماماً */
        min-height: 90px;
        width: 100%;
        display: flex !important;
        align-items: center !important; /* توسيط عمودي مطلق لأي إعلان */
        justify-content: center !important; /* توسيط أفقي */
        text-align: center;
        padding: 0 15px;
        box-sizing: border-box;
        font-size: 1rem;
        line-height: 1.4;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    }

    /* حذف الفواصل على الهواتف لجمالية التصميم كما طلبت */
    .music-separator { display: none !important; }

    /* أنميشن يضمن وقوف كل إعلان في المنتصف الميت */
    @keyframes verticalFlowDynamic {
        0%, 20% { transform: translateY(0); }             /* إعلان 1 */
        25%, 45% { transform: translateY(-90px); }        /* إعلان 2 */
        50%, 70% { transform: translateY(-180px); }       /* إعلان 3 */
        75%, 95% { transform: translateY(-270px); }       /* إعلان 4 */
        100% { transform: translateY(-360px); }
    }
}