/* ============================================
   NAVBAR.css - Header, Logo, Desktop Nav, Mobile Menu, Hamburger
   ============================================
   Contains:
   - Header styles
   - Logo and logo text
   - Header right section
   - Desktop navigation
   - Mobile hamburger menu button
   - Mobile menu dropdown
   - Mobile menu items
   - Language switcher (mobile)
   ============================================ */

/* Header */
header { width: 100%; background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); padding: 1rem 2rem; display: flex; justify-content: center; box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3); position: relative; z-index: 100; }
.header-content { max-width: 1400px; width: 100%; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo img { height: 40px; width: auto; object-fit: contain; }
.logo-text { font-size: 1.5rem; font-weight: 700; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.header-right { display: flex; align-items: center; gap: 1rem; }

/* ============================================
   MOBILE HAMBURGER MENU
   ============================================ */

/* Hamburger button - hidden on desktop */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    /* No z-index - stays behind modals (z-index: 1000) */
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger animation when open */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

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

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobile menu dropdown */
.mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.15), 0 4px 12px rgba(0,0,0,0.08);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    border-radius: 0 0 20px 20px;
}

.mobile-menu-dropdown.open {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-content {
    padding: 1rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-align: left;
    cursor: pointer;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #7c3aed, #a78bfa);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-menu-item:hover {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
    border-color: #c4b5fd;
    color: #6d28d9;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.mobile-menu-item:hover::before {
    opacity: 1;
}

.mobile-menu-item:active {
    transform: scale(0.98) translateX(4px);
}

/* Icon styling for menu items */
.mobile-menu-item > span:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.mobile-menu-item:hover > span:first-child {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: scale(1.1);
}

.mobile-menu-item.highlight {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    margin: 0.75rem 0;
    border-radius: 16px;
    justify-content: center;
    padding: 1.1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    border: none;
}

.mobile-menu-item.highlight::before {
    display: none;
}

.mobile-menu-item.highlight:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
}

.mobile-menu-item.highlight > span:first-child {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-item.highlight:hover > span:first-child {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
}

.mobile-menu-item.danger {
    color: #dc2626;
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.mobile-menu-item.danger::before {
    background: linear-gradient(180deg, #ef4444, #f87171);
}

.mobile-menu-item.danger:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
    border-color: #fca5a5;
    color: #b91c1c;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.mobile-menu-item.danger > span:first-child {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.mobile-menu-item.danger:hover > span:first-child {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.mobile-menu-item.user-info-item {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #6d28d9;
    font-weight: 600;
    border: 2px solid #c4b5fd;
}

.mobile-menu-item.user-info-item:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    transform: none;
}

.mobile-menu-item.user-info-item > span:first-child {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    font-size: 1.1rem;
}

.mobile-menu-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #c4b5fd, transparent);
    margin: 1rem 0;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.mobile-lang-switcher {
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-top: 0.25rem;
    border: 1px solid #c4b5fd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mobile-lang-switcher span {
    color: #6d28d9;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-lang-switcher select {
    padding: 0.6rem 1.25rem;
    border: 2px solid #c4b5fd;
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    color: #6d28d9;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.1);
}

.mobile-lang-switcher select:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.mobile-lang-switcher select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    header {
        padding: 0.75rem 1rem;
        position: relative;
    }
    
    .header-content {
        flex-direction: row !important;
        gap: 0 !important;
        position: relative;
        align-items: center;
    }
    
    .logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .logo img {
        height: 36px;
        width: auto;
        object-fit: contain;
    }
    
    .logo-text {
        font-size: 1.15rem;
        white-space: nowrap;
        font-weight: 700;
    }
    
    /* Style the hamburger button for better touch target */
    .mobile-menu-btn {
        width: 48px;
        height: 48px;
        padding: 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.15);
        transition: all 0.2s ease;
        backdrop-filter: blur(4px);
    }
    
    .mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
    .hamburger-line {
        height: 2.5px;
        background: white;
        border-radius: 3px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
}
