/* Global Burger Menu Styles */

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    margin: 0;
    align-self: center;
}

.burger-menu:focus {
    outline: none;
}

.burger-line {
    width: 100%;
    height: 3px;
    background: #ff2c2c;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Burger Menu Animation States */
.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-right: 2px solid #ff2c2c;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-menu.active {
    left: 0;
}

/* Mobile Navigation Header */
.mobile-nav-header {
    padding: 20px;
    border-bottom: 1px solid #ff2c2c30;
    background: rgba(255, 44, 44, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Close Button */
.mobile-nav-close {
    background: transparent;
    border: none;
    color: #ff2c2c;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close:hover {
    background: rgba(255, 44, 44, 0.2);
    transform: scale(1.1);
}

.mobile-nav-close:active {
    transform: scale(0.95);
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #ff2c2c;
    text-decoration: none;
}

.mobile-nav-logo i {
    color: #ff2c2c;
}

/* Mobile Navigation Links */
.mobile-nav-links {
    padding: 20px 0;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(255, 44, 44, 0.1);
    color: #ff2c2c;
    border-left-color: #ff2c2c;
    transform: translateX(5px);
}

.mobile-nav-links a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Mobile Navigation Footer */
.mobile-nav-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid #ff2c2c30;
    background: rgba(255, 44, 44, 0.05);
}

.mobile-nav-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.mobile-nav-footer .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff2c2c;
}

.mobile-nav-footer .user-name {
    color: #ff2c2c;
    font-weight: 600;
    font-size: 14px;
}

.mobile-nav-footer .logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: 8px;
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.mobile-nav-footer .logout-btn:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-1px);
}


/* Header Left Container */
.header-left-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 0;
    padding-left: 0;
    position: absolute;
    left: 0;
    z-index: 1001;
}

/* Responsive Design */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    
    /* Hide desktop navigation on mobile */
    .nav-links {
        display: none !important;
    }
    
    /* Adjust header content for mobile */
    .header-content {
        justify-content: space-between;
        align-items: center;
    }
    
    .header-left-container {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-left: 0;
        padding-left: 0;
        position: absolute;
        left: 0;
        z-index: 1001;
    }
    
    .logo {
        margin-left: 0;
    }
    
    .header-right {
        order: 3;
    }
    
    /* Ensure burger menu is aligned with logo */
    .burger-menu {
        align-self: center;
        margin-right: 0;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .mobile-nav-menu {
        width: 60%;
        left: -100%;
    }
    
    .mobile-nav-menu.active {
        left: 0;
    }
    
    .header-left-container {
        margin-left: 0;
        gap: 15px;
    }
    
    .burger-menu {
        width: 28px;
        height: 28px;
        margin-right: 0;
    }
    
    .burger-line {
        height: 2.5px;
    }
}

/* Animation for smooth transitions */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Prevent body scroll when menu is open */
body.mobile-nav-open {
    overflow: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-nav-menu {
        border-right-color: #fff;
    }
    
    .mobile-nav-links a {
        border-left-color: #fff;
    }
    
    .mobile-nav-links a:hover,
    .mobile-nav-links a.active {
        border-left-color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .burger-menu,
    .mobile-nav-overlay,
    .mobile-nav-menu,
    .mobile-nav-links a {
        transition: none;
    }
    
    .burger-menu.active .burger-line {
        transition: none;
    }
}
