/**
 * Professional Header Design for 2M E-Learning Platform
 * تصميم هيدر احترافي لمنصة التعلم الإلكتروني 2M
 * Colors: Royal Purple (#6A0DAD) and Golden Yellow (#FFB400)
 */

/* ===== متغيرات الألوان المخصصة للهيدر ===== */
:root {
    /* الألوان الأساسية */
    --header-purple: #6A0DAD;
    --header-purple-dark: #4B0082;
    --header-purple-light: #8B5CF6;
    --header-purple-lighter: #A855F7;
    
    --header-gold: #FFB400;
    --header-gold-light: #FFD700;
    --header-gold-dark: #E6A200;
    
    /* ألوان إضافية */
    --header-white: #FFFFFF;
    --header-white-off: #F8FAFC;
    --header-gray-light: #E2E8F0;
    --header-gray: #64748B;
    --header-gray-dark: #334155;
    
    /* الظلال المخصصة */
    --header-shadow-sm: 0 1px 2px 0 rgba(106, 13, 173, 0.05);
    --header-shadow: 0 4px 6px -1px rgba(106, 13, 173, 0.1), 0 2px 4px -1px rgba(106, 13, 173, 0.06);
    --header-shadow-md: 0 10px 15px -3px rgba(106, 13, 173, 0.1), 0 4px 6px -2px rgba(106, 13, 173, 0.05);
    --header-shadow-lg: 0 20px 25px -5px rgba(106, 13, 173, 0.1), 0 10px 10px -5px rgba(106, 13, 173, 0.04);
    --header-shadow-xl: 0 25px 50px -12px rgba(106, 13, 173, 0.25);
    --header-shadow-gold: 0 4px 20px rgba(255, 180, 0, 0.3);
    
    /* الانتقالات */
    --header-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --header-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== الهيدر الرئيسي ===== */
.professional-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, 
        rgba(106, 13, 173, 0.95) 0%, 
        rgba(75, 0, 130, 0.98) 25%, 
        rgba(106, 13, 173, 0.95) 50%, 
        rgba(139, 92, 246, 0.92) 75%, 
        rgba(106, 13, 173, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 3px solid transparent;
    background-clip: padding-box;
    border-image: linear-gradient(90deg, 
        rgba(106, 13, 173, 0.8) 0%, 
        rgba(255, 180, 0, 0.6) 50%, 
        rgba(106, 13, 173, 0.8) 100%) 1;
    box-shadow: 
        0 8px 32px rgba(106, 13, 173, 0.4),
        0 4px 16px rgba(255, 180, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: var(--header-transition);
}

.professional-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 180, 0, 0.05) 0%, 
        transparent 25%, 
        rgba(139, 92, 246, 0.05) 50%, 
        transparent 75%, 
        rgba(255, 180, 0, 0.05) 100%);
    pointer-events: none;
    animation: headerShimmer 8s ease-in-out infinite;
}

@keyframes headerShimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ===== تأثيرات الخلفية ===== */
.header-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.tech-shape {
    position: absolute;
    background: linear-gradient(135deg, 
        rgba(255, 180, 0, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 100%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.tech-shape-1 {
    width: 120px;
    height: 120px;
    top: -60px;
    right: 10%;
    animation-delay: 0s;
}

.tech-shape-2 {
    width: 80px;
    height: 80px;
    top: 20px;
    left: 15%;
    animation-delay: 2s;
}

.tech-shape-3 {
    width: 100px;
    height: 100px;
    bottom: -50px;
    right: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
        opacity: 0.6;
    }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, 
        rgba(255, 180, 0, 0.1) 0%, 
        transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ===== حاوي الهيدر ===== */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

/* ===== الشعار ===== */
.header-logo {
    flex-shrink: 0;
}

/* إظهار اللوجو في الشاشات المتوسطة والكبيرة */
@media (min-width: 769px) {
    .logo-image {
        display: block;
    }
    
    .logo-container::before {
        display: none;
    }
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--header-transition);
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, 
        var(--header-gold) 0%, 
        var(--header-gold-light) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 25px rgba(255, 180, 0, 0.3),
        0 4px 12px rgba(106, 13, 173, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.logo-link:hover .logo-icon::before {
    left: 100%;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--header-purple);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-main {
    font-size: 28px;
    font-weight: 800;
    color: var(--header-white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    line-height: 1;
}

.logo-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--header-gold);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== القائمة الرئيسية ===== */
.header-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--header-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 25px;
    transition: var(--header-transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 180, 0, 0.2), transparent);
    transition: left 0.6s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(255, 180, 0, 0.1);
    color: var(--header-gold-light);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(255, 180, 0, 0.2),
        0 4px 12px rgba(106, 13, 173, 0.1);
}

.nav-link.active {
    background: linear-gradient(135deg, 
        rgba(255, 180, 0, 0.2) 0%, 
        rgba(255, 180, 0, 0.1) 100%);
    color: var(--header-gold-light);
    box-shadow: 
        0 4px 15px rgba(255, 180, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-icon {
    font-size: 16px;
    transition: var(--header-transition);
}

.nav-link:hover .nav-icon {
    transform: scale(1.1);
    color: var(--header-gold-light);
}

.nav-text {
    transition: var(--header-transition);
}

/* ===== أزرار المصادقة ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* ===== مبدل اللغة ===== */
.language-switcher {
    position: relative;
    margin: 0 12px;
    z-index: 100;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%);
    color: white;
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.3),
        0 2px 8px rgba(255, 215, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    min-width: 140px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.language-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.6s ease;
}

.language-toggle:hover::before {
    left: 100%;
}

.language-toggle:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 50%, #A855F7 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.4),
        0 4px 12px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 215, 0, 0.4);
}

.language-flag {
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.language-toggle:hover .language-flag {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 6px rgba(255, 215, 0, 0.3));
}

.language-name {
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-left: 6px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.language-dropdown.active .dropdown-arrow {
    transform: rotate(180deg) scale(1.1);
}

.language-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.1);
    list-style: none;
    padding: 12px 8px;
    margin: 12px 0 0 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.language-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(139, 92, 246, 0.1);
    border-bottom: none;
    border-right: none;
    transform: translateX(-50%) rotate(45deg);
}

.language-dropdown.active .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.language-option {
    margin: 4px 0;
}

.language-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: #4B5563;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 12px;
    margin: 0 6px;
    position: relative;
    overflow: hidden;
}

.language-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    transition: left 0.4s ease;
    z-index: -1;
}

.language-link:hover::before {
    left: 0;
}

.language-link:hover {
    background: transparent;
    color: white;
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.language-link .language-flag {
    font-size: 18px;
    transition: all 0.3s ease;
}

.language-link:hover .language-flag {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--header-transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.login-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--header-white);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--header-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.register-btn {
    background: linear-gradient(135deg, 
        var(--header-gold) 0%, 
        var(--header-gold-light) 100%);
    color: var(--header-purple);
    border: 2px solid transparent;
    box-shadow: 
        0 4px 15px rgba(255, 180, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.register-btn:hover {
    background: linear-gradient(135deg, 
        var(--header-gold-light) 0%, 
        var(--header-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(255, 180, 0, 0.4),
        0 4px 12px rgba(106, 13, 173, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ===== زر القائمة المحمولة ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--header-transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 10000;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 180, 0, 0.1);
    border-color: rgba(255, 180, 0, 0.3);
    transform: scale(1.05);
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--header-white);
    border-radius: 2px;
    transition: var(--header-transition);
    margin: 2px 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== القائمة المحمولة ===== */
.mobile-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(106, 13, 173, 0.98) 0%, 
        rgba(75, 0, 130, 0.99) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    transform: translateX(-100%);
    transition: var(--header-transition);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    width: 100vw;
    height: 100vh;
}

.mobile-navigation.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* منع التمرير عند فتح القائمة المحمولة */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.mobile-nav-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.mobile-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-logo-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 
        0 8px 25px rgba(255, 180, 0, 0.3),
        0 4px 12px rgba(106, 13, 173, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mobile-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-logo .logo-text {
    font-size: 32px;
    font-weight: 800;
    color: var(--header-gold);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-logo .logo-subtitle {
    font-size: 14px;
    color: var(--header-white);
    margin-top: 5px;
}

.mobile-nav-close {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: var(--header-white);
    font-size: 20px;
    cursor: pointer;
    transition: var(--header-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close:hover {
    background: rgba(255, 180, 0, 0.2);
    border-color: rgba(255, 180, 0, 0.4);
    transform: scale(1.05);
}

.mobile-nav-menu {
    flex: 1;
    margin-bottom: 30px;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    margin-bottom: 10px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    color: var(--header-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 15px;
    transition: var(--header-transition);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:hover {
    background: rgba(255, 180, 0, 0.1);
    color: var(--header-gold-light);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(255, 180, 0, 0.2);
}

.mobile-nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.mobile-nav-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.mobile-language-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mobile-lang-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--header-white);
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--header-transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-lang-link:hover,
.mobile-lang-link.active {
    background: rgba(255, 180, 0, 0.2);
    color: var(--header-gold-light);
    border-color: rgba(255, 180, 0, 0.4);
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: var(--header-transition);
}

.mobile-login-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--header-white);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mobile-login-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mobile-register-btn {
    background: linear-gradient(135deg, 
        var(--header-gold) 0%, 
        var(--header-gold-light) 100%);
    color: var(--header-purple);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(255, 180, 0, 0.3);
}

.mobile-register-btn:hover {
    background: linear-gradient(135deg, 
        var(--header-gold-light) 0%, 
        var(--header-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 180, 0, 0.4);
}

/* ===== المحتوى الرئيسي ===== */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* ===== التصميم المتجاوب ===== */
@media (max-width: 1200px) {
    .header-container {
        padding: 0 15px;
    }
    
    .header-navigation {
        margin: 0 20px;
    }
    
    .nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .header-navigation {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .auth-buttons {
        gap: 8px;
    }
    
    .auth-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 12px;
    }
    
    .logo-container {
        gap: 10px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-main {
        font-size: 24px;
    }
    
    .logo-subtitle {
        font-size: 11px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .language-switcher {
        margin: 0 8px;
    }
    
    .language-toggle {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 120px;
        gap: 8px;
    }
    
    .language-name {
        font-size: 14px;
    }
    
    .language-flag {
        font-size: 18px;
    }
    
    .language-menu {
        min-width: 140px;
        left: 50%;
        transform: translateX(-50%) translateY(-15px) scale(0.95);
        margin-top: 10px;
    }
    
    .language-dropdown.active .language-menu {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .language-link {
        padding: 12px 16px;
        font-size: 14px;
        gap: 10px;
    }
    
    .auth-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .auth-btn span {
        display: none;
    }
    
    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
        display: flex !important;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    .main-content {
        margin-top: 70px;
        min-height: calc(100vh - 70px);
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 70px;
        padding: 0 15px;
    }
    
    .logo-container {
        gap: 8px;
    }
    
    .logo-icon {
        width: 42px;
        height: 42px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-main {
        font-size: 22px;
    }
    
    .logo-subtitle {
        font-size: 11px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .language-switcher {
        margin: 0 6px;
    }
    
    .language-toggle {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 120px;
        gap: 8px;
        border-radius: 25px;
    }
    
    .language-name {
        font-size: 14px;
    }
    
    .language-flag {
        font-size: 18px;
    }
    
    .dropdown-arrow {
        font-size: 11px;
        margin-left: 5px;
    }
    
    .language-menu {
        min-width: 130px;
        margin-top: 8px;
        padding: 10px 6px;
    }
    
    .language-link {
        padding: 10px 14px;
        font-size: 13px;
        gap: 9px;
        margin: 0 4px;
    }
    
    .language-link .language-flag {
        font-size: 16px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
        display: flex !important;
        position: relative;
        z-index: 10001;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2.5px;
    }
    
    .main-content {
        margin-top: 70px;
        min-height: calc(100vh - 70px);
    }
    
    /* تحسينات إضافية للقائمة المحمولة */
    .mobile-navigation {
        padding: 0;
        background: linear-gradient(135deg, 
            rgba(106, 13, 173, 0.98) 0%, 
            rgba(75, 0, 130, 0.99) 50%,
            rgba(139, 92, 246, 0.95) 100%);
    }
    
    .mobile-nav-content {
        padding: 15px;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 20px 20px 0 0;
        margin-top: 70px;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .mobile-nav-header {
        padding: 20px 0;
        margin-bottom: 25px;
        border-bottom: 2px solid rgba(255, 180, 0, 0.3);
        position: relative;
    }
    
    .mobile-nav-header::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 60px;
        height: 2px;
        background: var(--header-gold);
        border-radius: 2px;
    }
    
    .mobile-logo .logo-text {
        font-size: 32px;
        background: linear-gradient(45deg, var(--header-gold), var(--header-gold-light));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: none;
    }
    
    .mobile-logo .logo-subtitle {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.9);
        margin-top: 5px;
    }
    
    /* إضافة صورة اللوجو في القائمة المحمولة على الشاشات الصغيرة */
    .mobile-logo::before {
        content: '';
        display: block;
        width: 50px;
        height: 50px;
        background-image: url('../images/logo.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 15px;
        box-shadow: 
            0 8px 25px rgba(255, 180, 0, 0.3),
            0 4px 12px rgba(106, 13, 173, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        margin-bottom: 10px;
        margin-right: auto;
        margin-left: auto;
    }
    
    /* إخفاء النص في القائمة المحمولة على الشاشات الصغيرة جداً */
    @media (max-width: 480px) {
        .mobile-logo .logo-text,
        .mobile-logo .logo-subtitle {
            display: none;
        }
        
        .mobile-logo::before {
            width: 45px;
            height: 45px;
            border-radius: 12px;
        }
    }
    
    .mobile-nav-close {
        width: 50px;
        height: 50px;
        background: rgba(255, 180, 0, 0.1);
        border: 2px solid rgba(255, 180, 0, 0.3);
        border-radius: 50%;
        color: var(--header-gold);
        font-size: 20px;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    .mobile-nav-close:hover {
        background: var(--header-gold);
        color: var(--header-purple);
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 0 20px rgba(255, 180, 0, 0.4);
    }
    
    .mobile-nav-link {
        padding: 18px 20px;
        font-size: 16px;
        border-radius: 15px;
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(10px);
    }
    
    .mobile-nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 180, 0, 0.2), transparent);
        transition: left 0.6s ease;
    }
    
    .mobile-nav-link:hover::before {
        left: 100%;
    }
    
    .mobile-nav-link:hover {
        background: rgba(255, 180, 0, 0.15);
        color: var(--header-gold-light);
        transform: translateX(8px) scale(1.02);
        box-shadow: 0 8px 25px rgba(255, 180, 0, 0.3);
        border-color: rgba(255, 180, 0, 0.4);
    }
    
    .mobile-nav-link i {
        font-size: 20px;
        width: 28px;
        text-align: center;
        margin-right: 12px;
        color: var(--header-gold);
    }
    
    .mobile-auth-btn {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 15px;
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(10px);
    }
    
    .mobile-auth-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.6s ease;
    }
    
    .mobile-auth-btn:hover::before {
        left: 100%;
    }
    
    .mobile-login-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.3);
        margin-bottom: 12px;
    }
    
    .mobile-login-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
    }
    
    .mobile-register-btn {
        background: linear-gradient(135deg, var(--header-gold), var(--header-gold-light));
        color: var(--header-purple);
        border: 2px solid transparent;
        font-weight: 700;
    }
    
    .mobile-register-btn:hover {
        background: linear-gradient(135deg, var(--header-gold-light), var(--header-gold));
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(255, 180, 0, 0.5);
    }
    
    .mobile-language-switcher {
        margin-bottom: 25px;
        padding: 15px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-lang-link {
        padding: 14px 18px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        border: 2px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        position: relative;
        overflow: hidden;
    }
    
    .mobile-lang-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 180, 0, 0.3), transparent);
        transition: left 0.6s ease;
    }
    
    .mobile-lang-link:hover::before,
    .mobile-lang-link.active::before {
        left: 100%;
    }
    
    .mobile-lang-link:hover,
    .mobile-lang-link.active {
        background: rgba(255, 180, 0, 0.2);
        color: var(--header-gold-light);
        border-color: rgba(255, 180, 0, 0.5);
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(255, 180, 0, 0.3);
    }
    
    
    /* Navigation Indicators */
    .nav-indicator {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 0;
        background: var(--header-gold);
        border-radius: 0 4px 4px 0;
        transition: height 0.3s ease;
    }
    
    .mobile-nav-link.active .nav-indicator {
        height: 30px;
    }
    
    .mobile-nav-link.active {
        background: rgba(255, 180, 0, 0.15);
        color: var(--header-gold-light);
        border-color: rgba(255, 180, 0, 0.3);
        font-weight: 700;
    }
    
    .mobile-nav-link.active i {
        color: var(--header-gold-light);
        transform: scale(1.1);
    }
    
}

/* ===== دعم RTL ===== */
[dir="rtl"] .header-container {
    direction: rtl;
}

[dir="rtl"] .logo-text-container {
    align-items: flex-end;
}

[dir="rtl"] .language-toggle {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-arrow {
    margin-left: 0;
    margin-right: 6px;
}

[dir="rtl"] .language-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-link:hover {
    transform: translateX(-4px) scale(1.02);
}

[dir="rtl"] .language-menu {
    left: 50%;
    right: auto;
}

[dir="rtl"] .language-menu::before {
    left: 50%;
    right: auto;
}

[dir="rtl"] .mobile-nav-link:hover {
    transform: translateX(-10px);
}

[dir="rtl"] .mobile-language-switcher {
    flex-direction: row-reverse;
}

/* ===== تأثيرات إضافية ===== */
.professional-header.scrolled {
    background: linear-gradient(135deg, 
        rgba(106, 13, 173, 0.98) 0%, 
        rgba(75, 0, 130, 0.99) 100%);
    box-shadow: 
        0 12px 40px rgba(106, 13, 173, 0.5),
        0 6px 20px rgba(255, 180, 0, 0.15);
}

/* تأثير التمرير السلس */
html {
    scroll-behavior: smooth;
}

/* تحسين الأداء */
.professional-header,
.mobile-navigation {
    will-change: transform;
}

.nav-link,
.auth-btn,
.mobile-nav-link {
    will-change: transform, background-color;
}

/* إخفاء شريط التمرير في القائمة المحمولة */
.mobile-navigation::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* تحسينات للهواتف الذكية الحديثة */
@media (max-width: 414px) {
    .header-container {
        height: 75px;
        padding: 0 16px;
    }
    
    .logo-container {
        gap: 10px;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        border-radius: 12px;
    }
    
    .logo-text {
        font-size: 22px;
        font-weight: 900;
    }
    
    .logo-main {
        font-size: 26px;
        font-weight: 900;
        letter-spacing: 3px;
    }
    
    .logo-subtitle {
        font-size: 12px;
        font-weight: 600;
        opacity: 0.9;
    }
    
    .language-toggle {
        padding: 12px 18px;
        font-size: 15px;
        min-width: 130px;
    }
    
    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    .hamburger-line {
        width: 22px;
        height: 3px;
        border-radius: 2px;
    }
    
    .main-content {
        margin-top: 75px;
        min-height: calc(100vh - 75px);
    }
}

/* تحسينات للشاشات 360px */
@media (max-width: 360px) {
    .header-container {
        height: 60px;
        padding: 0 10px;
    }
    
    .logo-container {
        gap: 6px;
    }
    
    .logo-container::before {
        width: 35px;
        height: 35px;
        border-radius: 9px;
        margin-right: 6px;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        border-radius: 9px;
    }
    
    .logo-text {
        font-size: 16px;
        display: none; /* إخفاء النص في الشاشات 360px */
    }
    
    .logo-main {
        font-size: 20px;
        letter-spacing: 1.5px;
    }
    
    .logo-subtitle {
        font-size: 9px;
        margin-top: 0.5px;
    }
    
    .header-actions {
        gap: 5px;
    }
    
    .language-switcher {
        margin: 0 3px;
    }
    
    .language-toggle {
        padding: 7px 10px;
        font-size: 12px;
        border-radius: 7px;
    }
    
    .language-toggle i {
        font-size: 13px;
    }
    
    .user-profile-menu {
        gap: 5px;
    }
    
    .user-avatar {
        width: 30px;
        height: 30px;
        border-radius: 7px;
    }
    
    .user-name {
        font-size: 12px;
        display: none; /* إخفاء الاسم في الشاشات 360px */
    }
    
    .user-dropdown-toggle {
        padding: 7px 10px;
        font-size: 12px;
        border-radius: 7px;
    }
    
    .user-dropdown-toggle i {
        font-size: 13px;
    }
    
    .mobile-menu-toggle {
        width: 34px;
        height: 34px;
        border-radius: 7px;
    }
    
    .mobile-menu-toggle i {
        font-size: 15px;
    }
    
    .main-content {
        margin-top: 60px;
        min-height: calc(100vh - 60px);
    }
    
    /* تحسينات للقائمة المنسدلة */
    .user-dropdown-menu {
        right: 8px;
        top: 55px;
        min-width: 220px;
        border-radius: 10px;
    }
    
    .dropdown-item {
        padding: 9px 14px;
        font-size: 13px;
    }
    
    .dropdown-item i {
        font-size: 13px;
        margin-left: 7px;
    }
    
    /* تحسينات للقائمة المحمولة */
    .mobile-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .mobile-menu-content {
        padding: 1.2rem 1rem;
    }
    
    .mobile-nav-item {
        padding: 13px 18px;
        font-size: 15px;
        margin-bottom: 5px;
        border-radius: 9px;
    }
    
    .mobile-nav-item i {
        font-size: 15px;
        margin-left: 9px;
    }
}

/* تحسينات للشاشات الصغيرة جداً (300px وأقل) */
@media (max-width: 300px) {
    .header-container {
        height: 50px;
        padding: 0 8px;
    }
    
    .logo-container {
        gap: 5px;
    }
    
    .logo-container::before {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        margin-right: 5px;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }
    
    .logo-text {
        font-size: 14px;
        display: none; /* إخفاء النص في الشاشات الصغيرة جداً */
    }
    
    .logo-main {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .logo-subtitle {
        font-size: 8px;
        margin-top: 0;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .language-switcher {
        margin: 0 2px;
    }
    
    .language-toggle {
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .language-toggle i {
        font-size: 12px;
    }
    
    .user-profile-menu {
        gap: 4px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }
    
    .user-name {
        font-size: 11px;
        display: none; /* إخفاء الاسم في الشاشات الصغيرة جداً */
    }
    
    .user-dropdown-toggle {
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .user-dropdown-toggle i {
        font-size: 12px;
    }
    
    .mobile-menu-toggle {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }
    
    .mobile-menu-toggle i {
        font-size: 14px;
    }
    
    .main-content {
        margin-top: 50px;
        min-height: calc(100vh - 50px);
    }
    
    /* تحسينات للقائمة المنسدلة */
    .user-dropdown-menu {
        right: 5px;
        top: 45px;
        min-width: 200px;
        border-radius: 8px;
    }
    
    .dropdown-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .dropdown-item i {
        font-size: 12px;
        margin-left: 6px;
    }
    
    /* تحسينات للقائمة المحمولة */
    .mobile-menu {
        top: 50px;
        height: calc(100vh - 50px);
    }
    
    .mobile-menu-content {
        padding: 1rem 0.8rem;
    }
    
    .mobile-nav-item {
        padding: 12px 16px;
        font-size: 14px;
        margin-bottom: 4px;
        border-radius: 8px;
    }
    
    .mobile-nav-item i {
        font-size: 14px;
        margin-left: 8px;
    }
}

/* إظهار اللوجو مكان النص في الهيدر على الهواتف المحمولة */
@media (max-width: 768px) {
    /* إخفاء النص في الشعار على الهواتف المحمولة */
    .logo-text-container {
        display: none !important;
    }
    
    /* إظهار صورة اللوجو مكان النص */
    .logo-container::before {
        content: '';
        display: block;
        width: 45px;
        height: 45px;
        background-image: url('../images/logo.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 12px;
        box-shadow: 
            0 8px 25px rgba(255, 180, 0, 0.3),
            0 4px 12px rgba(106, 13, 173, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        margin-right: 10px;
    }
    
    /* إخفاء صورة اللوجو العادية في الشاشات الصغيرة */
    .logo-image {
        display: none;
    }
    
    /* إخفاء أيقونة النص في الشعار */
    .logo-icon {
        display: none !important;
    }
}

/* تحسينات للشاشات الصغيرة جداً (iPhone SE وما شابه) */
@media (max-width: 375px) {
    .header-container {
        height: 70px;
        padding: 0 12px;
    }
    
    .logo-container {
        gap: 8px;
    }
    
    .logo-container::before {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        margin-right: 8px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-main {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .logo-subtitle {
        font-size: 10px;
        margin-top: 1px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .language-switcher {
        margin: 0 4px;
    }
    
    .language-toggle {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 110px;
        gap: 6px;
    }
    
    .language-name {
        font-size: 13px;
    }
    
    .language-flag {
        font-size: 16px;
    }
    
    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
    }
    
    .main-content {
        margin-top: 70px;
        min-height: calc(100vh - 70px);
    }
    
    /* تحسينات القائمة المحمولة للشاشات الصغيرة */
    .mobile-nav-content {
        padding: 12px;
        margin-top: 70px;
        height: calc(100vh - 70px);
    }
    
    .mobile-nav-header {
        padding: 15px 0;
        margin-bottom: 20px;
    }
    
    .mobile-logo .logo-text {
        font-size: 28px;
    }
    
    .mobile-logo .logo-subtitle {
        font-size: 11px;
    }
    
    .mobile-nav-close {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    
    .mobile-nav-link {
        padding: 16px 18px;
        font-size: 15px;
    }
    
    .mobile-nav-link i {
        font-size: 18px;
        width: 24px;
    }
    
    .mobile-auth-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .quick-action-btn {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .quick-action-btn i {
        font-size: 16px;
    }
}

/* تحسينات للآيفون X وما بعده (safe area) */
@supports (padding-top: env(safe-area-inset-top)) {
    .professional-header {
        padding-top: env(safe-area-inset-top);
    }
    
    .header-container {
        padding-top: 0;
    }
    
    .main-content {
        margin-top: calc(70px + env(safe-area-inset-top));
    }
    
    @media (max-width: 414px) {
        .main-content {
            margin-top: calc(75px + env(safe-area-inset-top));
        }
    }
}



