/* ===== هيدر ناعم واحترافي ===== */
:root {
    --header-height: 74px;
    --primary-soft: #fce7f3;
    --primary-medium: #f9d7e8;
    --primary-dark: #f5c6db;
    --primary-deep: #db2777;
    --text-dark: #1e293b;
    --text-soft: #475569;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --border-light: #f1f5f9;
    --shadow-header: 0 4px 20px -8px rgba(0, 0, 0, 0.08);
}

/* ===== الهيدر الرئيسي ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-header);
    padding: 0.65rem 2rem;
    direction: rtl;
}

/* ===== حاوية الهيدر ===== */
.header-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

/* ===== لوجو أنيق ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: fit-content;
    text-decoration: none;
}

.logo-mark {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-deep));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.15);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    letter-spacing: -0.3px;
    position: relative;
}

.logo-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-deep));
    margin-right: 2px;
}

/* ===== القائمة ===== */
.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

/* ===== روابط القائمة ===== */
.nav-link,
.messages-link,
.btn-login,
.btn-register,
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-soft);
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* ===== تأثير hover ناعم جداً ===== */
.nav-link:hover,
.messages-link:hover,
.btn-login:hover,
.btn-register:hover,
.btn-logout:hover {
    background: rgba(249, 215, 232, 0.2);
    color: var(--primary-deep);
}

/* ===== الرابط النشط ===== */
.nav-link.active {
    color: var(--primary-deep);
    font-weight: 600;
    background: transparent;
}

/* ===== بادج الرسائل ===== */
.messages-link {
    position: relative;
}

.messages-badge {
    position: absolute;
    top: -4px;
    right: 0px;
    background: var(--primary-deep);
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ===== زر المنيو للجوال ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

/* ===== قائمة الجوال ===== */
.mobile-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    z-index: 999;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-menu a:hover {
    background: rgba(249, 215, 232, 0.15);
    color: var(--primary-deep);
}

.mobile-menu.show {
    display: block;
}

/* ===== أزرار تسجيل الدخول ===== */
.btn-login {
    border: 1px solid var(--border-light);
    background: var(--bg-white);
}

.btn-register {
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-deep));
    color: white;
    padding: 0.5rem 1.2rem;
}

.btn-register:hover {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary-dark));
    color: white;
}

/* ===== زر الخروج ===== */
.btn-logout {
    color: var(--text-soft);
}

.btn-logout:hover {
    background: rgba(249, 215, 232, 0.15);
    color: var(--primary-deep);
}

/* ===== تنسيقات الجوال ===== */
@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .site-header {
        padding: 0.6rem 1rem;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-mark {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

/* ===== دعم RTL ===== */
[dir="rtl"] .messages-badge {
    right: auto;
    left: 0;
}

[dir="rtl"] .mobile-menu a {
    text-align: right;
}

/* ===== ضبط المسافات للمحتوى تحت الهيدر ===== */
body {
    padding-top: var(--header-height);
}
