/* =========================================================
   header.css — رؤية الظل
   مستخرج من: header.php (inline <style>)
   ========================================================= */

/* إعادة تعيين جذرية للهيدر */
#royal-header-v4 {
    all: initial;
    font-family: 'Cairo', sans-serif;
    width: 100%;
    position: relative;
    z-index: 99999;
    background: white;
    display: block;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}
#royal-header-v4 * { box-sizing: border-box; }

/* الألوان */
:root {
    --royal-gold: #d4af37;
    --royal-black: #000000;
}

/* 1. الشريط العلوي */
.top-bar-v4 {
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 12px;
    padding: 8px 0;
    display: none;
    font-family: 'Cairo', sans-serif;
}
@media (min-width: 1024px) { .top-bar-v4 { display: block; } }

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-item { display: flex; align-items: center; gap: 8px; color: white !important; text-decoration: none !important; }

/* 2. الهيدر الرئيسي */
.main-header-v4 {
    background: #ffffff !important;
    width: 100%;
    border-bottom: 1px solid #f3f4f6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
}

.header-content {
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* الشعار */
.logo-link { display: flex; flex-direction: column; text-decoration: none !important; }
.logo-title {
    font-size: 30px; font-weight: 900 !important; color: #000000 !important;
    margin: 0; line-height: 1; font-family: 'Reem Kufi', sans-serif;
}
.logo-title span { color: #d4af37 !important; }
.logo-sub {
    font-size: 10px; color: #666 !important; letter-spacing: 2px;
    text-transform: uppercase; font-weight: 700; margin-top: 5px; display: block;
    font-family: sans-serif;
}

/* 3. القائمة (Desktop) */
.desktop-nav { display: none; align-items: center; gap: 32px; }
@media (min-width: 1024px) { .desktop-nav { display: flex; } }

.nav-link {
    font-weight: 800 !important; color: #000000 !important; font-size: 16px;
    position: relative; padding: 10px 0; text-decoration: none !important;
}
.nav-link:hover { color: #d4af37 !important; }

/* القائمة المنسدلة */
.dropdown-wrapper { position: relative; padding: 20px 0; }
.dropdown-trigger {
    background: none; border: none; padding: 0;
    font-weight: 800 !important; color: #000000 !important; font-size: 16px;
    display: flex; align-items: center; gap: 4px; cursor: pointer;
}
.dropdown-trigger:hover { color: #d4af37 !important; }

.mega-menu {
    display: none; position: absolute; top: 100%; right: -50px; width: 600px;
    background: white; border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15); border-top: 4px solid #d4af37;
    padding: 24px; z-index: 10001; grid-template-columns: 1fr 1fr; gap: 24px;
}
.dropdown-wrapper:hover .mega-menu { display: grid; }

.menu-col h3 {
    font-size: 16px; font-weight: 800 !important; color: #d4af37 !important;
    border-bottom: 2px solid #f3f4f6; padding-bottom: 10px; margin: 0 0 12px 0;
    font-family: 'Cairo', sans-serif;
}
.menu-item {
    display: block; padding: 8px 0; font-size: 14px; color: #444 !important;
    font-weight: 600; text-decoration: none !important;
}
.menu-item:hover { color: #d4af37 !important; }

/* 4. الأزرار */
.header-actions { display: flex; align-items: center; gap: 12px; }

.whatsapp-btn {
    display: none; background: #ecfdf5 !important; color: #16a34a !important; padding: 10px; border-radius: 50%;
}
.quote-btn {
    display: none; background: #000000 !important; color: white !important;
    padding: 12px 28px; border-radius: 50px; font-weight: 800; font-size: 14px;
    align-items: center; gap: 8px; text-decoration: none !important;
}
.quote-btn:hover { background: #d4af37 !important; }

@media (min-width: 768px) { .whatsapp-btn, .quote-btn { display: flex; } }

.mobile-toggle {
    display: block; padding: 10px; background: #f3f4f6; border-radius: 8px; border: none; color: #000000;
}
@media (min-width: 1024px) { .mobile-toggle { display: none; } }

/* 5. القائمة الجانبية (Mobile) */
.drawer-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    z-index: 20000; display: none;
}
.mobile-drawer {
    position: fixed; top: 0; right: -100%;
    width: 85%; max-width: 350px; height: 100%;
    background: white; z-index: 20001;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto; display: flex; flex-direction: column;
}
.drawer-open { right: 0; }

.drawer-header {
    padding: 24px; border-bottom: 1px solid #eee; background: #f9fafb;
    display: flex; justify-content: space-between; align-items: center;
}
.drawer-body { padding: 16px; flex: 1; }

.drawer-link {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; margin-bottom: 6px; border-radius: 8px;
    color: #000000 !important; font-weight: 800; font-size: 16px; text-decoration: none !important;
}

/* أكورديون */
.accordion-btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 14px; background: transparent; border: 1px solid #eee;
    border-radius: 12px; margin-bottom: 8px; color: #000000 !important; font-weight: 800; font-size: 16px;
}
.accordion-content {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out;
    background: #f9fafb; border-radius: 8px; margin-bottom: 8px;
}

/* إصلاح زر اتصل الآن (Mobile CTA) */
#final-cta-btn {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 18px !important;
    border-radius: 12px !important;
    background-color: #d4af37 !important;
    background: #d4af37 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
    border: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 10px;
}

/* 6. زر الاتصال العائم (يسار — جوال فقط) */
.floating-call-btn {
    position: fixed;
    bottom: 25px; left: 25px;
    width: 60px; height: 60px;
    background-color: #d4af37 !important;
    color: white !important;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 9999999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-decoration: none !important;
    animation: pulse-gold 2s infinite;
}
@media (min-width: 1024px) { .floating-call-btn { display: none !important; } }

@keyframes pulse-gold {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(212,175,55,0.7); }
    70%  { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(212,175,55,0);   }
    100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(212,175,55,0);   }
}

/* 7. زر واتساب العائم (يمين) */
.floating-wa-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-wa-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.floating-wa-btn:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.7);
}

.floating-wa-btn:active { transform: scale(0.95); }

.floating-wa-btn .tooltip {
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%) translateY(-10px);
    background-color: #F3E2B3;
    color: #000000;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    border: 1px solid #D4AF37;
    min-width: 140px;
    text-align: center;
}

.floating-wa-btn .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    border-width: 6px;
    border-style: solid;
    border-color: #F3E2B3 transparent transparent transparent;
}

.floating-wa-btn:hover .tooltip,
.floating-wa-btn:focus .tooltip,
.floating-wa-btn:active .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}
.floating-wa-btn { animation: gentlePulse 2s infinite ease-in-out; }

/* إظهار زر واتساب على الجوال فقط */
@media (max-width: 768px) {
    .floating-wa-btn {
        display: flex;
        bottom: max(20px, env(safe-area-inset-bottom));
        right:  max(20px, env(safe-area-inset-right));
    }
}
@media (max-width: 350px) {
    .floating-wa-btn .tooltip { font-size: 12px; padding: 6px 10px; min-width: 120px; }
}
