:root {
    --royal-gold: #d4af37;
    --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    --deep-navy: #051628;
    --night-blue: #0a192f;
    --velvet-red: #720e1e;
    --marble: #fdfbf7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--deep-navy);
    color: var(--marble);
    overflow-x: hidden;
    line-height: 1.9;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--deep-navy); }
::-webkit-scrollbar-thumb { background: var(--gold-gradient); border-radius: 5px; }

/* شاشة التحميل الملكية */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--deep-navy); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader-logo { text-align: center; }
.loader-line { width: 0; height: 2px; background: var(--gold-gradient); margin-top: 10px; animation: loadLine 1.5s infinite; }
@keyframes loadLine { 0% { width: 0; opacity: 0;} 50% { width: 100px; opacity: 1;} 100% { width: 200px; opacity: 0;} }

/* شريط التنقل (Navbar) - الشاشات الكبيرة */
.smart-navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000; padding: 20px 0;
    transition: all 0.4s ease; background: transparent;
}
.smart-navbar.scrolled {
    background: rgba(5, 22, 40, 0.95); backdrop-filter: blur(10px);
    padding: 10px 0; box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.nav-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.nav-logo a { font-family: 'Aref Ruqaa', serif; font-size: 2rem; color: var(--royal-gold); text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { color: var(--marble); text-decoration: none; font-size: 1.1rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--royal-gold); }
.nav-auth { display: flex; gap: 15px; }
.nav-btn-gold { padding: 8px 20px; background: var(--gold-gradient); color: var(--deep-navy); text-decoration: none; border-radius: 4px; font-weight: bold; }
.nav-btn-outline { padding: 8px 20px; border: 1px solid var(--royal-gold); color: var(--royal-gold); text-decoration: none; border-radius: 4px; }

.hamburger { display: none; cursor: pointer; font-size: 1.8rem; color: var(--royal-gold); }
.mobile-auth { display: none !important; }

/* Hero Section */
.hero { height: 100vh; background: linear-gradient(rgba(5, 22, 40, 0.85), rgba(5, 22, 40, 0.6)), url('../assets/img/luxor_temple_bg.jpg'); background-size: cover; background-attachment: fixed; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 15px; left: 15px; right: 15px; bottom: 15px; border: 2px solid rgba(212, 175, 55, 0.2); border-radius: 8px; pointer-events: none; animation: pulseBorder 4s infinite alternate; z-index: 2; }
.sparks-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero-content { z-index: 3; max-width: 1050px; padding: 60px; background: rgba(5, 22, 40, 0.6); backdrop-filter: blur(12px); box-shadow: 0 0 50px rgba(0,0,0,0.8), inset 0 0 20px rgba(212, 175, 55, 0.1); animation: fadeInZoom 1.5s ease-out, floatBox 6s infinite ease-in-out; position: relative; border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 4px; margin-top: 50px; }
.corner { position: absolute; width: 50px; height: 50px; border-color: var(--royal-gold); border-style: solid; }
.tl { top: -3px; left: -3px; border-width: 4px 0 0 4px; } .tr { top: -3px; right: -3px; border-width: 4px 4px 0 0; } .bl { bottom: -3px; left: -3px; border-width: 0 0 4px 4px; } .br { bottom: -3px; right: -3px; border-width: 0 4px 4px 0; }

.hero-title { font-family: 'Aref Ruqaa', serif; font-size: 5.5rem; background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c, #bf953f); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 20px; text-shadow: 0 15px 40px rgba(0,0,0,0.8); line-height: 1.3; animation: shineText 5s linear infinite; }
.hero-subtitle { font-family: 'Amiri', serif; font-size: 1.9rem; color: #fdfbf7; margin-bottom: 40px; text-shadow: 0 5px 15px rgba(0,0,0,0.9); }
.social-proof { margin-top: 15px; font-size: 0.95rem; color: #ccc; font-style: italic; }

.btn-royal { position: relative; display: inline-block; padding: 18px 60px; color: var(--royal-gold); text-decoration: none; font-size: 1.3rem; font-weight: bold; text-transform: uppercase; overflow: hidden; transition: 0.5s; border: 1px solid var(--royal-gold); background: rgba(212, 175, 55, 0.05); z-index: 1; letter-spacing: 2px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.btn-royal:hover { color: var(--deep-navy); box-shadow: 0 0 40px rgba(212, 175, 55, 0.8); background: transparent; }
.btn-royal::before { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%; background: var(--gold-gradient); z-index: -1; transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); }
.btn-royal:hover::before { width: 100%; }
.scroll-down { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); color: var(--royal-gold); font-size: 2.5rem; z-index: 4; animation: bounce 2s infinite, glow 2s infinite alternate; cursor: pointer; background: none; border: none; }

/* تأثيرات الحركة */
@keyframes shineText { to { background-position: 200% center; } }
@keyframes fadeInZoom { from { opacity: 0; transform: scale(0.85); filter: blur(10px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes pulseBorder { 0% { border-color: rgba(212, 175, 55, 0.1); } 100% { border-color: rgba(212, 175, 55, 0.5); box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.2); } }
@keyframes floatBox { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); } 40% { transform: translateY(-20px) translateX(-50%); } 60% { transform: translateY(-10px) translateX(-50%); } }
@keyframes glow { from { filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.4)); } to { filter: drop-shadow(0 0 15px rgba(212, 175, 55, 1)); } }
.gold-spark { position: absolute; bottom: -10px; width: 4px; height: 4px; background-color: var(--royal-gold); border-radius: 50%; box-shadow: 0 0 15px 2px var(--royal-gold), 0 0 30px #fff; opacity: 0; animation: flyUp 5s infinite linear; }
@keyframes flyUp { 0% { transform: translateY(0) scale(1) translateX(0); opacity: 1; } 50% { opacity: 0.8; } 100% { transform: translateY(-100vh) scale(0) translateX(50px); opacity: 0; } }

/* الأقسام الداخلية */
.history-section { padding: 120px 20px; background: url('../assets/img/subtle_paper_texture.png'), var(--marble); color: var(--deep-navy); position: relative; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-title { font-family: 'Aref Ruqaa', serif; font-size: 3.8rem; color: var(--deep-navy); margin-bottom: 20px; position: relative; display: inline-block; }
.section-title::after { content: ''; display: block; width: 50%; height: 4px; background: var(--gold-gradient); margin: 15px auto; border-radius: 2px; }
.history-container { max-width: 1450px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: start; }
.history-content { padding: 45px; background: #ffffff; border-radius: 8px; box-shadow: 0 25px 50px rgba(0,0,0,0.05); border-right: 6px solid var(--royal-gold); }
.history-text { font-size: 1.2rem; text-align: justify; line-height: 2.2; }
.history-text p { margin-bottom: 25px; }
.history-text .intro-highlight { font-size: 1.4rem; color: var(--deep-navy); font-family: 'Amiri', serif; font-weight: bold; }
.history-text strong { color: var(--velvet-red); }

.sources-box { margin-top: 40px; padding: 30px; background: linear-gradient(to left, rgba(212, 175, 55, 0.1), rgba(255,255,255,0)); border-right: 4px solid var(--royal-gold); border-radius: 8px; position: relative; }
.sources-box::before { content: '\f02d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 20px; top: 20px; font-size: 4rem; color: rgba(212, 175, 55, 0.15); }
.sources-title { color: var(--velvet-red); margin-bottom: 20px; font-family: 'Aref Ruqaa', serif; font-size: 1.6rem; }
.sources-list { list-style: none; font-size: 1.05rem; }
.sources-list li { margin-bottom: 15px; padding-right: 25px; position: relative; }
.sources-list li::before { content: '♦'; color: var(--royal-gold); position: absolute; right: 0; top: 0; font-size: 1.2rem; }

.quotes-wrapper { display: flex; flex-direction: column; gap: 25px; }
.quote-card { padding: 35px 40px; border-radius: 8px; position: relative; transition: all 0.4s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.08); overflow: hidden; z-index: 1; }
.quote-card::before { content: '\f10e'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: -10px; left: -10px; font-size: 8rem; opacity: 0.05; z-index: -1; transform: rotate(15deg); }
.quote-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
.quote-text { font-family: 'Amiri', serif; font-size: 1.35rem; font-style: italic; position: relative; z-index: 2; }
.quote-author { display: block; margin-top: 20px; font-size: 0.95rem; font-weight: bold; }
.quote-style-1 { background: var(--deep-navy); color: var(--marble); border-right: 5px solid var(--royal-gold); } .quote-style-1 .quote-text { color: var(--royal-gold); } .quote-style-1::before { color: #ffffff; }
.quote-style-2 { background: var(--marble); color: var(--deep-navy); border-right: 5px solid var(--velvet-red); border: 1px solid rgba(0,0,0,0.05); } .quote-style-2 .quote-text { color: var(--deep-navy); } .quote-style-2 .quote-author { color: var(--velvet-red); } .quote-style-2::before { color: var(--deep-navy); }
.quote-style-3 { background: var(--velvet-red); color: var(--marble); border-right: 5px solid var(--royal-gold); } .quote-style-3 .quote-text { color: var(--marble); } .quote-style-3 .quote-author { color: var(--royal-gold); } .quote-style-3::before { color: #ffffff; }

.features-section { padding: 120px 20px; background: linear-gradient(to bottom, var(--deep-navy), #020b16); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto; }
.feature-box { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(212, 175, 55, 0.2); padding: 40px 25px; text-align: center; transition: 0.5s; }
.feature-box:hover { background: rgba(212, 175, 55, 0.08); border-color: var(--royal-gold); transform: translateY(-10px); }
.feature-icon { font-size: 2.5rem; color: var(--royal-gold); margin-bottom: 25px; background: rgba(255,255,255,0.05); width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px dashed rgba(212, 175, 55, 0.4); margin: 0 auto 25px; transition: 0.5s; }
.feature-box:hover .feature-icon { background: var(--royal-gold); color: var(--deep-navy); transform: rotateY(180deg); }
.feature-title { font-family: 'Aref Ruqaa', serif; font-size: 1.5rem; margin-bottom: 15px; }

.royal-footer { padding: 80px 20px; background: url('../assets/img/pattern_gold.png'), var(--velvet-red); background-blend-mode: multiply; text-align: center; border-top: 5px solid var(--royal-gold); }
.legal-disclaimer { margin-top: 40px; font-size: 0.85rem; color: rgba(255,255,255,0.7); max-width: 800px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; }

.reveal { opacity: 0; transform: translateY(50px); transition: all 1s ease; } .reveal.active { opacity: 1; transform: translateY(0); }

/* ------------------------------------------- */
/* Responsive Media Queries (لشاشات الجوال والآيباد) */
/* ------------------------------------------- */
@media (max-width: 992px) {
    .hamburger { display: block; cursor: pointer; font-size: 1.8rem; color: var(--royal-gold); z-index: 1001; } 
    .desktop-auth { display: none !important; }
    
    /* تصميم القائمة المنسدلة الذكية - الطريقة الأقوى والأكثر استقراراً */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(5, 22, 40, 0.98);
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 30px 0;
        border-bottom: 2px solid var(--royal-gold);
        box-shadow: 0 15px 40px rgba(0,0,0,0.9);
        
        /* الإخفاء بطريقة الإزاحة العمودية (مضمونة 100%) */
        display: flex;
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        z-index: -1;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* حركة نزول ناعمة ومرنة */
    }
    
    /* عند تفعيل القائمة */
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        z-index: 999;
    }

    .nav-links li { width: 100%; text-align: center; }
    .nav-links a { display: block; font-size: 1.3rem; padding: 12px; transition: 0.3s; }
    .nav-links a:hover { background: rgba(212, 175, 55, 0.1); color: var(--royal-gold); }
    
    .mobile-auth { 
        display: flex !important; 
        flex-direction: row; 
        justify-content: center; 
        gap: 15px; 
        margin-top: 15px; 
        width: 100%;
    }
    
    /* تصغير العناصر لتناسب الجوال */
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.2rem; margin-bottom: 30px; }
    .hero-content { padding: 30px 20px; margin-top: 50px; }
    .section-title { font-size: 2.2rem; }
    .btn-royal { padding: 12px 25px; font-size: 1.1rem; }
    .quotes-wrapper { display: grid; grid-template-columns: 1fr; gap: 20px; }
    .history-container { grid-template-columns: 1fr; }
    .history-content { padding: 25px; border-right: none; border-top: 6px solid var(--royal-gold); }
    .features-section, .history-section { padding: 60px 15px; }
}