/* ============================================
   navbar.css — Idarti AI
   يُحمَّل في جميع الصفحات
   ============================================ */

/* ── التنبيه العلوي ── */
.smart-announcement {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Cairo', sans-serif;
}

.smart-announcement .badge {
    background: #2563eb;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
}

.smart-announcement p {
    margin: 0;
    padding: 0;
}

/* ── الناف بار الرئيسي ── */
.main-nav-wrapper {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 30px;
    gap: 20px;
}

/* ── الشعار ── */
.logo {
    flex-shrink: 0;
    text-decoration: none;
}

.logo h2 {
    color: #2563eb;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    font-family: 'Cairo', sans-serif;
    line-height: 1;
}

/* ── روابط القائمة ── */
.nav-links-horizontal {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    list-style-type: none !important;
    gap: 4px;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center;
}

.nav-links-horizontal li {
    list-style: none !important;
    list-style-type: none !important;
    display: block;
    margin: 0;
    padding: 0;
}

.nav-links-horizontal li::before,
.nav-links-horizontal li::marker {
    display: none !important;
    content: none !important;
}

.nav-links-horizontal li a {
    text-decoration: none !important;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: block;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    line-height: 1.5;
}

.nav-links-horizontal li a:hover {
    background: #eff6ff;
    color: #2563eb;
}

.nav-links-horizontal li a.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

/* ── أزرار الدخول والتسجيل ── */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-login-premium {
    background: #2563eb;
    color: white !important;
    padding: 9px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    display: inline-block;
    line-height: 1.5;
}

.btn-login-premium:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-register-outline {
    background: transparent;
    color: #2563eb !important;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1.5px solid #2563eb;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    transition: background 0.2s;
    display: inline-block;
    line-height: 1.5;
}

.btn-register-outline:hover {
    background: #eff6ff;
}

/* ── زر القائمة في الموبايل (Hamburger) ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.nav-toggle:hover { background: #f1f5f9; }

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #374151;
    border-radius: 3px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ── الموبايل (max 768px) ── */
@media (max-width: 768px) {

    .header-container {
        flex-wrap: wrap;
        padding: 12px 15px;
        gap: 0;
    }

    .logo { flex: 1; }

    .nav-toggle {
        display: block;
        order: 2;
    }

    .auth-actions {
        order: 3;
        display: none; /* تظهر داخل القائمة في الموبايل */
    }

    .nav-links-horizontal {
        order: 4;
        width: 100%;
        flex-direction: column !important;
        gap: 4px;
        padding: 12px 0 8px !important;
        border-top: 1px solid #f1f5f9;
        display: none !important; /* مخفية افتراضياً */
        margin-top: 10px !important;
    }

    .nav-links-horizontal.open {
        display: flex !important;
    }

    .nav-links-horizontal li {
        width: 100%;
    }

    .nav-links-horizontal li a {
        width: 100%;
        padding: 10px 15px;
        border-radius: 8px;
    }

    /* إظهار أزرار الدخول داخل القائمة */
    .nav-links-horizontal.open + .auth-actions-mobile {
        display: flex;
        padding: 8px 0 15px;
        gap: 10px;
        width: 100%;
        order: 5;
    }
}

/* ── شاشات كبيرة جداً ── */
@media (min-width: 1400px) {
    .header-container {
        max-width: 1400px;
        padding: 14px 40px;
    }
}