/* Modern Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(20, 40, 75, 0.97) 0%, rgba(31, 105, 150, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* Enhanced scroll effect */
header.sticky,
header.scrolled {
    background: linear-gradient(135deg, rgba(20, 40, 75, 0.98) 0%, rgba(31, 105, 150, 0.96) 100%);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    height: 80px;
    padding: 0 32px;
    position: relative;
}

/* Enhanced logo styling */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-family: 'David Libre', serif;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 2;
}

.logo:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logo img {
    height: 44px;
    width: auto;
    margin-right: 12px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.logo span {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced navigation menu */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    align-items: center;
    position: relative;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.3px;
    padding: 12px 20px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: block;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

/* Gradient border effect */
.nav-menu li a::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 50px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-menu li a:hover::before,
.nav-menu li a.active::before {
    opacity: 1;
}

/* Hover and active states */
.nav-menu li a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-menu li a.active {
    color: white;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* Ripple effect on click */
.nav-menu li a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-menu li a:active::after {
    width: 100px;
    height: 100px;
}

/* Enhanced mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    outline: none;
}

.mobile-menu-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle:hover::before {
    opacity: 1;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
        height: 70px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .logo img {
        height: 38px;
        margin-right: 10px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(180deg, rgba(20, 40, 75, 0.98) 0%, rgba(31, 105, 150, 0.96) 100%);
        backdrop-filter: blur(25px) saturate(180%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 40px 20px;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        gap: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        max-width: 300px;
    }

    .nav-menu li a {
        font-size: 16px;
        padding: 16px 24px;
        width: 100%;
        text-align: center;
        border-radius: 16px;
        margin: 4px 0;
        font-weight: 500;
        letter-spacing: 0.5px;
    }
    
    .nav-menu li a:hover {
        transform: translateY(-1px) scale(1.02);
        background: rgba(255, 255, 255, 0.2);
    }
    
    .nav-menu li a.active {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo img {
        height: 34px;
        margin-right: 8px;
    }
    
    .nav-menu {
        padding: 30px 16px;
    }
    
    .nav-menu li {
        max-width: 280px;
    }
    
    .nav-menu li a {
        font-size: 15px;
        padding: 14px 20px;
    }
}

/* Body padding adjustment for fixed header */
body {
    padding-top: 80px;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

/* Additional smooth animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-container {
    animation: slideInFromTop 0.6s ease-out;
}

.nav-menu li {
    animation: slideInFromTop 0.4s ease-out both;
}

.nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.15s; }
.nav-menu li:nth-child(3) { animation-delay: 0.2s; }
.nav-menu li:nth-child(4) { animation-delay: 0.25s; }
.nav-menu li:nth-child(5) { animation-delay: 0.3s; }
.nav-menu li:nth-child(6) { animation-delay: 0.35s; }
.nav-menu li:nth-child(7) { animation-delay: 0.4s; }
