/* Modern navigation bar styling */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #007BFF;
    padding: 10px 20px;
    color: white;
}

.logo {
    height: 50px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #FFD700;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* Header Styles with Color Scheme */
:root {
    --nav-base-rgb: 13, 27, 42;
    --nav-mid-rgb: 18, 57, 90;
    --nav-accent-rgb: 125, 211, 247;
    --nav-opacity-factor: 0.9;
    --text-inverse: #ffffff;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.9rem 1.75rem;
    box-shadow: 0 2px 14px rgba(0,0,0,0.25);
    background: linear-gradient(100deg, 
        rgba(var(--nav-base-rgb), var(--nav-opacity-factor)) 0%, 
        rgba(var(--nav-mid-rgb), var(--nav-opacity-factor)) 58%, 
        rgba(var(--nav-accent-rgb), var(--nav-opacity-factor)) 110%);
    color: var(--text-inverse);
    backdrop-filter: blur(10px) saturate(150%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: padding .35s cubic-bezier(.4,0,.2,1), background .5s ease, box-shadow .35s ease;
    position: relative;
    overflow: visible;
}

header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(var(--nav-accent-rgb),0) 0%, 
        rgba(var(--nav-accent-rgb),.85) 35%, 
        rgba(var(--nav-accent-rgb),.85) 65%, 
        rgba(var(--nav-accent-rgb),0) 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}

.logo:focus-visible {
    outline: 2px solid rgba(var(--nav-accent-rgb), 1);
    outline-offset: 4px;
    border-radius: 8px;
}

.logo img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform .35s ease;
    margin-top: -3px;
}

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

.logo h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .5px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

nav {
    flex-shrink: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Hamburger Menu Button */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: .5rem;
    margin-left: auto;
}

.navbar-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}

.navbar-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.navbar-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav a {
    display: inline-block;
    padding: .55rem .95rem;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    color: #ffffff;
    line-height: 1;
    border-radius: 12px;
    transition: all .28s ease;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    position: relative;
}

nav a:hover,
nav a:focus-visible {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-3px);
}

nav a.active,
nav a[aria-current="page"] {
    background: linear-gradient(120deg, 
        rgba(var(--nav-base-rgb),0.65), 
        rgba(var(--nav-mid-rgb),0.65));
    box-shadow: 0 0 0 1px rgba(var(--nav-accent-rgb),0.55), 
                0 6px 18px -4px rgba(var(--nav-accent-rgb),0.55);
    color: #fff;
    position: relative;
}

nav a.active::after,
nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 12%;
    bottom: 6px;
    width: 76%;
    height: 2px;
    background: linear-gradient(90deg, rgba(var(--nav-accent-rgb),0) 0%, rgba(var(--nav-accent-rgb),0.9) 50%, rgba(var(--nav-accent-rgb),0) 100%);
    box-shadow: 0 0 6px rgba(var(--nav-accent-rgb),0.7);
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: .7rem 1rem;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    /* Show hamburger button on mobile */
    .navbar-toggle {
        display: flex;
    }
    
    /* Hide navigation by default on mobile */
    .navbar-links {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 1000;
        flex-direction: column;
        background: linear-gradient(120deg, 
            rgba(var(--nav-base-rgb), 0.95), 
            rgba(var(--nav-mid-rgb), 0.95));
        padding: 1rem 1.2rem;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.25);
        backdrop-filter: blur(15px);
        transform-origin: top right;
        transform: scale(0.9);
        opacity: 0;
        pointer-events: none;
        transition: all .25s ease;
        min-width: 220px;
        gap: 0.5rem;
    }
    
    /* Show navigation when open */
    .navbar-links.open {
        transform: scale(1);
        opacity: 1;
        pointer-events: auto;
    }
    
    .navbar-links li {
        width: 100%;
    }
    
    .navbar-links a {
        display: block;
        width: 100%;
        text-align: center;
        padding: .7rem 1rem;
        margin: 0.2rem 0;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .logo img {
        height: 40px;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    header {
        padding: .5rem .8rem;
    }
    
    .logo h1 {
        font-size: 0.9rem;
    }
    
    .logo img {
        height: 35px;
    }
    
    .navbar-links {
        min-width: 200px;
        padding: 0.8rem 1rem;
    }
}