/* assets/css/mobile-menu.css */

/* تنسيقات قائمة المستخدم */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-menu:hover {
    background: #e2e8f0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #374151, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu span {
    font-weight: 600;
    color: #374151;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: #f1f5f9;
    color: #1e40af;
}

.dropdown-menu a i {
    width: 20px;
    text-align: center;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-login {
    padding: 0.5rem 1.5rem;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.btn-login:hover {
    color: #1e40af;
}

.btn-register {
    background: #374151;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-register:hover {
    background: #1f2937;
}

/* تحديث تنسيقات النافبار */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #374151;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1e40af;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1e40af;
    border-radius: 2px;
}

/* زر الهمبرغر لقائمة الهاتف */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #374151;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* قائمة الهاتف المحمول */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 2rem 1.5rem;
    z-index: 1000;
    flex-direction: column;
    gap: 1rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    display: flex;
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #374151;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu a i {
    width: 20px;
    text-align: center;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: #f1f5f9;
    color: #1e40af;
}

.mobile-auth-buttons {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.mobile-auth-buttons a {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.mobile-login {
    color: #374151;
    border: 2px solid #e5e7eb;
}

.mobile-register {
    background: #374151;
    color: white;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* استعلامات الوسائط للهواتف */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .user-menu span {
        display: none;
    }

    .auth-buttons {
        display: none;
    }

    .mobile-auth-buttons {
        display: flex;
    }

    .nav-user .user-menu {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0.75rem;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .mobile-menu {
        width: 250px;
    }
}