/* Header Styles */
header {
    background: linear-gradient(135deg, #1a3a2e 0%, #2d5a45 100%);
    color: #fafafa;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(250, 250, 250, 0.1) 0%, transparent 70%);
    animation: gentleWave 8s ease-in-out infinite;
}

.header-content {
    position: relative;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    color: #fafafa;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo:hover {
    opacity: 0.8;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #fafafa;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* Header Navigation */
.header-nav {
    transition: all 0.3s ease;
}

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

.header-nav:hover .nav-link:not(:hover) {
    filter: blur(2px);
    opacity: 0.4;
    transform: scale(0.95);
}

.nav-link {
    color: #fafafa;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0.8;
    z-index: 1;
    display: block;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(250, 250, 250, 0.2);
    transform: translateY(-2px) scale(1.05);
    filter: blur(0px);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.nav-link.active {
    opacity: 1;
    background: rgba(250, 250, 250, 0.2);
    font-weight: 600;
    z-index: 5;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: #fafafa;
    border-radius: 2px;
}

.nav-link:hover::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, rgba(250, 250, 250, 0.1), rgba(250, 250, 250, 0.05));
    border-radius: 12px;
    z-index: -1;
    animation: glow 0.6s ease-in-out;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1002;
    }
    
    .header-nav {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 58, 46, 0.98);
        backdrop-filter: blur(15px);
        border-top: 1px solid rgba(250, 250, 250, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        opacity: 0;
        z-index: 999;
    }
    
    .header-nav.active {
        max-height: 500px;
        opacity: 1;
        overflow-y: auto;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        margin: 0;
    }
    
    .nav-link {
        padding: 1.2rem 2rem;
        border-radius: 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(250, 250, 250, 0.1);
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background: rgba(250, 250, 250, 0.15);
        transform: none;
        box-shadow: none;
        opacity: 1;
    }
    
    .nav-link:active {
        background: rgba(250, 250, 250, 0.2);
    }
    
    /* Touch device optimizations */
    .nav-link {
        -webkit-tap-highlight-color: rgba(250, 250, 250, 0.1);
        touch-action: manipulation;
    }
    
    .mobile-menu-toggle {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .header-nav:hover .nav-link:not(:hover) {
        filter: none;
        opacity: 0.8;
        transform: none;
    }
    
    /* Ensure mobile menu appears above other content */
    .header-nav.active {
        position: fixed;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

.header-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.header-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0.9;
    text-transform: uppercase;
}