/* wcreate-header.css */

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
    transition: background-color var(--transition), box-shadow var(--transition);
}

#main-header.scrolled {
    background-color: var(--color-bg);
    box-shadow: 0 1px 0 var(--color-border);
}

.header__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 32px;
}

.header__menu a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding-bottom: 3px;
}

.header__menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out);
}

.header__menu a:hover {
    color: var(--color-secondary);
}

.header__menu a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* =============================================
   BURGER BUTTON
   ============================================= */

.burger {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
    position: relative;
}

.burger__line {
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                width 0.3s ease;
}

/* Open state — burger to X */
.burger.is--open {
    background-color: var(--color-secondary);
}

.burger.is--open .burger__line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.burger.is--open .burger__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger.is--open .burger__line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* =============================================
   NAV OVERLAY
   ============================================= */

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-fixed) - 1);
    background-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.nav-overlay.is--open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay__inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: calc(var(--header-height) + 40px) 32px 40px;
}

.nav-overlay__nav {
    flex: 1;
}

.nav-overlay__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-overlay__menu li a {
    display: inline-block;
    font-size: clamp(28px, 6vw, 48px);
    font-weight: 600;
    color: var(--color-white);
    text-decoration: none;
    line-height: 1.2;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.nav-overlay__menu li a:hover {
    color: var(--color-secondary);
}

.nav-overlay__cta {
    padding-top: 32px;
}

/* Full-width button variant */
.btn--full {
    width: 100%;
    justify-self: stretch;
}

.btn--full .btn__inner {
    justify-content: space-between;
    padding: 0.5em 0.5em 0.5em 1.25em;
}

/* =============================================
   RESPONSIVE — hide/show
   ============================================= */

@media (max-width: 1024px) {
    .header__nav {
        display: none;
    }

    .burger {
        display: flex;
    }
}

/* Hide overlay on desktop just in case */
@media (min-width: 1025px) {
    .nav-overlay {
        display: none !important;
    }

    .burger {
        display: none !important;
    }
}
