/* Header.css - Vibrant Orange & White Wavy Gradient Theme */
:root {
    --vibrant-orange: #ff5722;
    --primary-orange: #ff6b35;
    --secondary-orange: #ff8e53;
    --bright-orange: #ff4500;
    --gold-orange: #ffa726;
    --deep-orange: #e64a19;
    --pure-white: #ffffff;
    --off-white: #f8f9fa;
    --warm-white: #fffaf0;
    --pure-black: #000000;
    --dark-gray: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.navbar {
    background: 
        /* Vibrant orange base */
        linear-gradient(135deg, var(--vibrant-orange) 0%, var(--primary-orange) 50%, var(--bright-orange) 100%),
        /* Wavy white overlay */
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    border-bottom: 3px solid var(--pure-white);
    box-shadow: 
        0 6px 25px rgba(255, 87, 34, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    backdrop-filter: blur(15px);
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced wavy gradient overlay */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Dynamic white waves */
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 25%),
        radial-gradient(circle at 90% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 30% 60%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        /* Shimmer effect */
        linear-gradient(125deg, 
            transparent 0%,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.1) 75%,
            transparent 100%);
    background-size: 300% 300%, 200% 200%, 250% 250%, 180% 180%, 400% 400%;
    animation: waveMove 12s ease-in-out infinite, shimmer 8s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes waveMove {
    0%, 100% {
        background-position: 0% 50%, 20% 30%, 80% 70%, 40% 60%, 0% 0%;
    }
    50% {
        background-position: 100% 50%, 80% 70%, 20% 30%, 60% 40%, 100% 100%;
    }
}

@keyframes shimmer {
    0%, 100% {
        background-position: -100% -100%, 0% 0%, 0% 0%, 0% 0%, -100% -100%;
    }
    50% {
        background-position: 200% 200%, 100% 100%, 100% 100%, 100% 100%, 200% 200%;
    }
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1002;
    transition: all 0.3s ease;
}

/* Enhanced Logo Styles */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    z-index: 1003;
    box-shadow: 
        0 4px 15px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover::before {
    left: 100%;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    margin-right: 12px;
    filter: 
        drop-shadow(0 4px 8px rgba(255, 255, 255, 0.3))
        drop-shadow(0 2px 4px rgba(255, 107, 53, 0.4));
    transition: all 0.4s ease;
    background: linear-gradient(45deg, var(--vibrant-orange), var(--gold-orange));
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.logo:hover img {
    transform: scale(1.15) rotate(3deg);
    filter: 
        drop-shadow(0 6px 12px rgba(255, 255, 255, 0.4))
        drop-shadow(0 4px 8px rgba(255, 107, 53, 0.6));
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--pure-white), var(--warm-white), var(--off-white));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        2px 2px 4px rgba(255, 87, 34, 0.3),
        0 0 20px rgba(255, 255, 255, 0.4);
    letter-spacing: -0.5px;
    transition: all 0.4s ease;
}

.logo:hover .brand-name {
    background: linear-gradient(135deg, var(--warm-white), var(--pure-white), var(--off-white));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        2px 2px 6px rgba(255, 87, 34, 0.4),
        0 0 25px rgba(255, 255, 255, 0.6);
}

/* Welcome Message - Enhanced */
.welcome-message {
    color: var(--pure-white);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    box-shadow: 
        0 4px 15px rgba(255, 255, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 2px 8px rgba(255, 87, 34, 0.3);
    animation: pulseGlow 3s ease-in-out infinite;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 1003;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(255, 255, 255, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 2px 8px rgba(255, 87, 34, 0.3);
        transform: translateX(-50%) scale(1);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(255, 255, 255, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            0 4px 15px rgba(255, 87, 34, 0.5);
        transform: translateX(-50%) scale(1.05);
    }
}

/* Enhanced Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.9) 0%, 
        rgba(255, 87, 34, 0.85) 50%, 
        rgba(255, 167, 38, 0.9) 100%);
    border-top: 2px solid rgba(255, 255, 255, 0.4);
    padding: 0 2rem;
    position: relative;
    justify-content: center;
    margin: 0 auto;
    max-width: 1200px;
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        rgba(255, 255, 255, 0.8), 
        rgba(255, 255, 255, 0.6), 
        transparent
    );
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.nav-links a {
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.9rem 1.4rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
    background: transparent;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--pure-white), 
        rgba(255, 255, 255, 0.8), 
        var(--pure-white));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
}

.nav-links a:hover::after {
    width: 85%;
}

.nav-links a:hover {
    color: var(--pure-white);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 0 10px rgba(255, 255, 255, 0.6);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 4px 15px rgba(255, 255, 255, 0.3);
}

.nav-links a:active {
    transform: translateY(0);
}

/* Active page styling */
.nav-links a.active {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.15)) !important;
    color: var(--pure-white) !important;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-links a.active::after {
    width: 95% !important;
    background: var(--pure-white) !important;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.7);
}

/* Enhanced auth links */
.nav-links a[href*="login"],
.nav-links a[href*="logout"],
.nav-links a[href*="profile"] {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.15));
    color: var(--pure-white);
    border-radius: 25px;
    margin-left: 2rem;
    padding: 0.7rem 1.5rem;
    font-weight: 800;
    box-shadow: 
        0 4px 15px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 2px 8px rgba(255, 87, 34, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.nav-links a[href*="login"]::before,
.nav-links a[href*="logout"]::before,
.nav-links a[href*="profile"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a[href*="login"]:hover::before,
.nav-links a[href*="logout"]:hover::before,
.nav-links a[href*="profile"]:hover::before {
    left: 100%;
}

.nav-links a[href*="login"]:hover,
.nav-links a[href*="logout"]:hover,
.nav-links a[href*="profile"]:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.35), 
        rgba(255, 255, 255, 0.25));
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(255, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 4px 15px rgba(255, 87, 34, 0.5);
}

.nav-links a[href*="login"]::after,
.nav-links a[href*="logout"]::after,
.nav-links a[href*="profile"]::after {
    display: none;
}

/* Enhanced Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.15));
    border: none;
    border-radius: 8px;
    padding: 0.7rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 2px 8px rgba(255, 87, 34, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1004;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.menu-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle:hover::before {
    left: 100%;
}

.menu-toggle:hover {
    transform: scale(1.15);
    box-shadow: 
        0 6px 20px rgba(255, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 4px 15px rgba(255, 87, 34, 0.5);
}

.menu-toggle .bar {
    width: 22px;
    height: 2.5px;
    background: var(--pure-white);
    margin: 3px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--pure-white);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--pure-white);
}

/* Desktop Layout - Perfectly Centered */
@media (min-width: 769px) {
    .navbar {
        display: block;
    }
    
    .nav-links {
        display: flex !important;
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        height: auto;
        padding: 0 2rem;
    }
    
    .nav-links a {
        width: auto;
        margin: 0;
    }
    
    .nav-links a[href*="login"],
    .nav-links a[href*="logout"],
    .nav-links a[href*="profile"] {
        margin-left: auto;
    }
    
    .menu-toggle {
        display: none !important;
    }
}

/* Mobile Responsive Design - FIXED */
@media (max-width: 768px) {
    .navbar {
        background: linear-gradient(135deg, var(--vibrant-orange) 0%, var(--primary-orange) 100%);
        overflow: visible;
    }
    
    .nav-container {
        padding: 0.4rem 1rem;
        position: relative;
    }
    
    .logo img {
        height: 35px;
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .welcome-message {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Mobile menu styles - FIXED */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--vibrant-orange) 0%, var(--primary-orange) 100%);
        border-top: 3px solid rgba(255, 255, 255, 0.5);
        flex-direction: column;
        padding: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        display: flex !important;
        height: 0;
        overflow: hidden;
        margin: 0;
        max-width: none;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        height: auto;
        overflow: visible;
        padding: 1rem 0;
    }
    
    .nav-links a {
        width: 90%;
        margin: 0.3rem auto;
        text-align: center;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-links a[href*="login"],
    .nav-links a[href*="logout"],
    .nav-links a[href*="profile"] {
        margin-left: auto;
        margin-right: auto;
        width: 90%;
    }
    
    .nav-links.active a:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }
    
    /* Adjust body padding for mobile */
    body {
        padding-top: 50px !important;
    }
}

/* Body padding to account for fixed header - Reduced */
body {
    padding-top: 60px !important;
    background: var(--pure-white);
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.nav-links a:focus,
.menu-toggle:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Enhanced wave animation for the navbar */
@keyframes gradientWave {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating particles effect */
.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 141, 83, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 87, 34, 0.05) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: gradientWave 15s ease infinite;
    pointer-events: none;
    z-index: -1;
}

/* Smooth transitions for all states */
.nav-links a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Logo click animation */
.logo:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Sticky scroll JavaScript enhancement */
.navbar.scrolled {
    background: 
        radial-gradient(ellipse at 20% 50%, var(--gradient-3) 0%, transparent 50%),
        linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 100%);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    border-bottom: 3px solid var(--primary-orange);
}