/* 
 * Header Styles - Critical for header functionality
 */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.site-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

.header-container {
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.custom-logo-link {
    display: block;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.header-cta {
    flex-shrink: 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--color-text-primary);
    transition: all 0.3s;
}

/* Mobile Styles */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 4rem 2rem 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        justify-content: flex-start;
        /* Fix for mobile alignment */
    }

    .main-navigation.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-menu a {
        padding: 1rem 0;
    }

    .header-cta {
        width: 100%;
        margin-top: 1rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0.75rem 0;
    }

    .custom-logo {
        max-height: 50px;
    }

    .site-title {
        font-size: 1.25rem;
    }
}