/* ===== HEADER BASE ===== */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
}

/* Transparent state */
.main-header {
    background: transparent;
}

/* Glass effect when scrolled */
.main-header.scrolled {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Container - Responsive */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--container-padding-xs);
    max-width: var(--container-xl);
    margin: 0 auto;
    position: relative;
}

@media (min-width: 480px) {
    .nav-container {
        padding: 18px var(--container-padding-sm);
    }
}

@media (min-width: 768px) {
    .nav-container {
        padding: 18px var(--container-padding-md);
    }
}

@media (min-width: 1024px) {
    .nav-container {
        padding: 18px var(--container-padding-lg);
    }
}

@media (min-width: 1440px) {
    .nav-container {
        padding: 18px 60px;
    }
}

/* ===== ENHANCED LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-blue, #0B2578), var(--brand-green, #1A9464));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(11, 37, 120, 0.3);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-blue, #0B2578);
    letter-spacing: -0.5px;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    line-height: 1;
}

/* ===== CENTER NAV ===== */
.nav-center {
    display: none;
    gap: var(--spacing-fluid-md);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--spacing-fluid-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile Navigation Active */
.nav-center.active {
    display: flex;
}

/* Desktop Navigation */
@media (min-width: 992px) {
    .nav-center {
        display: flex;
        position: static;
        background: transparent;
        backdrop-filter: none;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        border-top: none;
    }
}

/* Nav Links */
.nav-link {
    position: relative;
    text-decoration: none;
    color: #222;
    font-weight: 500;
    font-size: var(--text-fluid-sm);
    transition: color 0.3s ease;
    padding: var(--spacing-fluid-sm) 0;
    line-height: 1;
    display: block;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .nav-link {
        padding: 8px 0;
        display: inline-flex;
        text-align: left;
        justify-content: flex-start;
    }
}

/* Hover Effect */
.nav-link:hover {
    color: #007bff;
}

/* Underline Slide Animation */
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: #007bff;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Active Link - MORE VISIBLE */
.nav-link.active {
    color: #007bff;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
    background: #007bff;
    height: 3px;
    bottom: -7px;
}

/* ===== MOBILE HAMBURGER MENU ===== */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--brand-blue, #0B2578);
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hide hamburger on desktop */
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* ===== ENHANCED BUTTONS ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-fluid-sm);
}

/* Mobile Actions Container */
.mobile-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-fluid-sm);
}

@media (min-width: 992px) {
    .mobile-actions {
        display: none;
    }
}

/* Desktop Actions */
.desktop-actions {
    display: none;
}

@media (min-width: 992px) {
    .desktop-actions {
        display: flex;
        align-items: center;
        gap: var(--spacing-fluid-sm);
    }
}

/* Base button styles - Responsive */
.dashboard-btn, .logout-btn, .login-btn, .register-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-fluid-xs);
    padding: var(--spacing-fluid-sm) var(--spacing-fluid-md);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: var(--text-fluid-xs);
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1;
    min-height: 44px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .dashboard-btn, .logout-btn, .login-btn, .register-btn {
        font-size: var(--text-fluid-sm);
        padding: var(--spacing-fluid-sm) var(--spacing-fluid-lg);
        gap: var(--spacing-fluid-sm);
    }
}

@media (min-width: 1024px) {
    .dashboard-btn, .logout-btn, .login-btn, .register-btn {
        font-size: 14px;
        padding: 10px 20px;
        gap: 8px;
    }
}

/* Dashboard Button - Square with Icon */
.dashboard-btn {
    background: var(--brand-blue, #0B2578);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(11, 37, 120, 0.25);
}

.dashboard-btn:hover {
    background: #091e63;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 37, 120, 0.35);
}

/* Logout Button - Red Outline Square */
.logout-btn {
    background: transparent;
    color: #EF4444;
    border: 1.5px solid #EF4444;
}

.logout-btn:hover {
    background: #EF4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

/* Login Button - Premium Outline */
.login-btn {
    background: transparent;
    color: #0B2578;
    border: 1.5px solid #0B2578;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1;
}

.login-btn:hover {
    background: #0B2578;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 37, 120, 0.3);
}

/* Register Button - Premium Primary */
.register-btn {
    background: #0B2578;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(11, 37, 120, 0.25);
    line-height: 1;
}

.register-btn:hover {
    background: #091e63;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 37, 120, 0.35);
}

/* ===== BODY PADDING FIX ===== */
body {
    padding-top: 90px;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Mobile menu overlay */
@media (max-width: 991px) {
    body.nav-open {
        overflow: hidden;
    }
    
    .nav-center {
        gap: var(--spacing-fluid-md);
        padding: var(--spacing-fluid-lg);
    }
    
    .nav-link {
        font-size: var(--text-fluid-lg);
        padding: var(--spacing-fluid-md);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 991px) {
    .nav-container {
        padding: 18px var(--container-padding-md);
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Desktop styles */
@media (min-width: 992px) {
    .nav-center {
        gap: 35px;
    }
    
    .nav-link {
        font-size: 15px;
        padding: 8px 0;
    }
}

/* Large desktop styles */
@media (min-width: 1440px) {
    .nav-center {
        gap: 40px;
    }
    
    .nav-link {
        font-size: 16px;
    }
}
