/* === assets/css/main.css === */

/* 1. تعريف الألوان والخطوط (كما في التصميم الأصلي) */
:root {
    --elite-blue: #003366;
    --elite-green: #4CAF50;
    --primary-action: #0d6efd;
    --hover-action: #0b5ed7;
    --text-main: #2c3e50;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--white); 
    color: var(--text-main); 
    overflow-x: hidden; 
    direction: rtl;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

/* === 2. القائمة العلوية (Navbar) - التوزيع الدقيق === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background-color: rgba(255, 255, 255, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    height: 80px;
}

/* منطقة اللوجو (يمين) */
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.logo-area img { height: 50px; width: auto; }
.logo-text-box { display: flex; flex-direction: column; line-height: 1.2; }
.logo-ar { font-size: 1.1rem; font-weight: 800; color: var(--elite-blue); }
.logo-en { font-size: 0.85rem; font-weight: 700; color: var(--elite-green); font-family: sans-serif; letter-spacing: 0.5px; }

/* القوائم (المنتصف) */
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    margin: 0 auto; /* هذا الأمر يضمن توسيط القائمة */
}

.nav-links li { display: inline-block; }

.nav-links a {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.05rem;
    position: relative;
    padding: 5px 0;
}
.nav-links a.active, .nav-links a:hover { color: var(--primary-action); }

/* الخط المتحرك تحت الروابط */
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 3px;
    bottom: -4px; right: 0; background-color: var(--primary-action);
    transition: width 0.3s ease; border-radius: 2px;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* === 3. الأزرار والمفاتيح (Restored Buttons Style) === */
/* تم استعادة التنسيق الدقيق للأزرار كما كانت في index.html */
.auth-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 25px; /* الحشوة الأصلية */
    border-radius: 50px;
    font-weight: 700; /* خط عريض */
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* زر شفاف (حدود فقط) */
.btn-outline {
    background: transparent;
    color: var(--primary-action);
    border-color: var(--primary-action);
}
.btn-outline:hover {
    background: var(--primary-action);
    color: var(--white);
}

/* زر مصمت (ملون كامل) */
.btn-solid {
    background: var(--primary-action);
    color: var(--white);
    border-color: var(--primary-action);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}
.btn-solid:hover {
    background: var(--hover-action);
    border-color: var(--hover-action);
    transform: translateY(-2px);
}

/* زر الموبايل (مخفي في الشاشات الكبيرة) */
.menu-toggle, .close-menu { display: none; }

/* === 4. تجاوب الموبايل (Mobile) === */
@media (max-width: 992px) {
    .navbar { padding: 15px 5%; justify-content: space-between; }
    
    /* إظهار زر الموبايل */
    .menu-toggle { 
        display: block; 
        font-size: 1.5rem; 
        color: var(--elite-blue); 
        cursor: pointer; 
        order: 3; /* يظهر أقصى اليسار */
    }
    
    .auth-buttons { display: none; } /* إخفاء الأزرار في الهيدر للموبايل */

    /* القائمة الجانبية للموبايل */
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.3s ease-in-out;
        margin: 0;
        z-index: 1001;
    }
    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; border-bottom: 1px solid #eee; padding: 10px 0; }
    
    .close-menu { 
        display: block; 
        position: absolute; 
        top: 20px; left: 20px; 
        font-size: 1.5rem; 
        color: #dc3545; 
        cursor: pointer;
    }
}