/* date reviewed: 2025-11-07 */
/* score: 8.0 */
/* To-Do: [Good] sticky header with nav, hover effects, hamburger menu; [A11y] nav hover animation good, needs focus-visible; [Responsive] hamburger for mobile (good); [Performance] 235 lines; [Enhancement] add scroll-based header shrink; [Testing] visual + responsive tests. */

/* Header/Navigation */
.header {
    background: var(--ghost-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--platinum);
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--eerie-black);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blue-de-france);
    transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a:active,
.nav-menu a:focus {
    color: var(--blue-de-france);
}

.nav-menu a:hover::after,
.nav-menu a:active::after,
.nav-menu a:focus::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--blue-de-france);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    z-index: 1001;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    justify-content: center;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--eerie-black);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* Contact button now uses btn-primary-3d class */
.btn-contact {
    position: relative;
    z-index: 100;
}

/* No JavaScript Fallback */
.no-js .hamburger {
    display: none;
}

.no-js .nav-menu {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    display: flex !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .btn-contact.btn-primary-3d .btn-primary-3d__content {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Tablet and Below */
@media (max-width: 991px) {
    .btn-contact {
        order: 2;
    }
    
    .btn-contact.btn-primary-3d .btn-primary-3d__content {
        padding: 10px 20px;
        font-size: 14px;
    }

    .hamburger {
        display: flex;
        order: 3;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: var(--ghost-white);
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        pointer-events: none;
    }

    .nav-menu.active {
        right: 0;
        pointer-events: auto;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding: 20px;
        margin-top: 60px;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--platinum);
    }
    
    .nav-menu a {
        display: flex;
        align-items: center;
        padding: 16px 10px;
        min-height: 44px;
    }
    
    .nav-menu a::after {
        display: none;
    }
}

/* Smaller Mobile */
@media (max-width: 480px) {
    .btn-contact {
        display: none;
    }
    
    .logo img {
        height: 32px;
    }
    
    .hamburger {
        justify-self: end;
        margin-left: auto;
    }

    .nav-menu.active {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Mobile Touch Optimization */
@media (max-width: 768px) {
    .nav-menu a,
    /* btn-contact sizing handled by btn-primary-3d class */

    .nav-menu ul {
        gap: 20px;
    }
}

/* Mobile Scroll Optimization */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

