/* Header Styles */

header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 100px;
    width: auto;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

.logo-container a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Skip link: hidden off-screen by default, visible when focused for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.skip-link:focus,
.skip-link:active {
    position: fixed;
    left: 20px;
    top: 20px;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    background: var(--bg-white);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1100;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Header Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    header .container {
        position: relative;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-white);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 100;
        padding-top: 80px;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    nav a {
        display: block;
        padding: 1.2rem 2rem;
        width: 100%;
        border-radius: 0;
    }

    nav a:hover,
    nav a.active {
        background-color: var(--bg-light);
    }

    /* Overlay when menu is open */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    header h1 {
        font-size: 1.2rem;
    }

    .logo {
        height: 50px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
    }

    .logo {
        height: 40px;
    }

    nav {
        width: 80%;
    }
}
