/* ========================================
   NAVIGATION STYLES
   ======================================== */

/* Main Navigation Container */
.main-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 110px;
    background: #0b0c15;
    border-bottom: 1px solid #333;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand/Logo Section */
.nav-brand {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 50px;
    width: auto;
    margin-right: 1rem;
    border-radius: 8px;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation Menu */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-primary {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #ccc;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.nav-text {
    white-space: nowrap;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu,
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #ccc;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.dropdown-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* User Profile Section */
.nav-user {
    display: flex;
    align-items: center;
    position: relative;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    border: 2px solid #444;
    transition: border-color 0.3s ease;
    object-fit: cover;
}

.user-avatar:hover {
    border-color: #666;
}

.user-avatar-placeholder {
    background: #444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #444;
}

.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.user-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-name {
    font-weight: 600;
    margin-right: 0.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 250px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-dropdown:hover .user-menu,
.user-toggle[aria-expanded="true"] + .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #444;
}

.user-details {
    text-align: center;
}

.user-details strong {
    display: block;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.user-details small {
    display: block;
    color: #ccc;
    font-size: 0.85rem;
}

.admin-badge {
    display: inline-block;
    background: #ff6b6b;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

.menu-divider {
    height: 1px;
    background: #444;
    margin: 0.5rem 0;
}

.logout-link {
    color: #ff6b6b !important;
}

.logout-link:hover {
    background: rgba(255, 107, 107, 0.1) !important;
}

/* Auth Section (for logged out users) */
.nav-auth {
    display: flex;
    align-items: center;
}

.nav-auth .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Mobile Navigation Toggle */
.nav-mobile-toggle {
    display: none;
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #fff;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Mobile Navigation Container */
.mobile-nav-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: #0b0c15;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-container.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    background: #2a2a2a;
}

.mobile-nav-brand {
    display: flex;
    align-items: center;
}

.mobile-brand-logo {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    position: relative;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-close::before,
.mobile-nav-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #fff;
    transform: translate(-50%, -50%);
}

.mobile-nav-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-nav-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-nav-items {
    padding: 1rem 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #333;
}

.mobile-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #ccc;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-section-title {
    display: block;
    padding: 1rem 1.5rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    background: #2a2a2a;
}

.login-link {
    color: #4CAF50 !important;
}

.login-link:hover {
    background: rgba(76, 175, 80, 0.1) !important;
}

/* Responsive Design */
@media (max-width: 900px) {
    .nav-menu,
    .nav-user,
    .nav-auth {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: block;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .brand-logo {
        height: 40px;
        margin-right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .brand-logo {
        height: 35px;
        margin-right: 0.5rem;
    }
    
    .mobile-nav-container {
        width: 100%;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Body padding for fixed navigation */
body {
    padding-top: 110px;
}
