/* ============================================
   HEADER — Pérez Gómez Theme
   Based on Figma design (node 103:2)
   ============================================ */



/* ---- Header container ---- */
.pg-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: transparent;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                background 0.4s ease,
                box-shadow 0.4s ease;
}

/* Visible state — toggled by JS after intro completes */
.pg-header.pg-header-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Solid state — white background on scroll */
.pg-header.pg-header-solid {
    background: #f8f5f1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ---- WordPress Admin Bar offset ---- */
body.admin-bar .pg-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .pg-header {
        top: 46px;
    }
}

/* ---- Inner layout ---- */
.pg-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 59px;
    max-width: 100%;
}

/* ---- Logo area (left) ---- */
.pg-header-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.pg-header-logo {
    height: 26px;
    width: auto;
    display: block;
}

.pg-header-subtitle {
    font-family: 'Mona Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #2C2621;
    text-transform: uppercase;
    white-space: nowrap;
    align-self: flex-end;
    margin-bottom: 2px;
    transition: color 0.4s ease;
}



/* ---- Navigation (right) ---- */
.pg-header-nav {
    display: flex;
    align-items: center;
}

.pg-header-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
    align-items: center;
}

.pg-header-nav-list li {
    margin: 0;
    padding: 0;
}

.pg-header-nav-list a {
    font-family: 'Mona Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #392F29;
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.pg-header-nav-list a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 0;
    height: 1px;
    background: #2C2621;
    transition: width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.pg-header-nav-list a:hover {
    color: #2C2621;
}

.pg-header-nav-list a:hover::after {
    width: 100%;
}

/* Active / current page — keep strikethrough visible */
.pg-header-nav-list .current-menu-item > a::after,
.pg-header-nav-list .current_page_item > a::after,
.pg-header-nav-list .pg-nav-active > a::after {
    width: 100%;
}

/* ---- Language switcher ---- */
.pg-header-lang {
    font-family: 'Mona Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #392F29;
    letter-spacing: 0.04em;
    margin-left: 40px;
    white-space: nowrap;
}

.pg-header-lang a {
    color: #392F29;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pg-header-lang a:hover {
    color: #2C2621;
}

.pg-header-lang .pg-lang-separator {
    margin: 0 4px;
    opacity: 0.5;
}

/* ---- Spacer (push content below fixed header) ---- */
.pg-header-spacer {
    height: 82px;
}

/* ============================================
   MOBILE / HAMBURGER
   ============================================ */

.pg-header-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
}

.pg-header-hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: #2C2621;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger active (X) */
.pg-header-hamburger.pg-is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.pg-header-hamburger.pg-is-open span:nth-child(2) {
    opacity: 0;
}

.pg-header-hamburger.pg-is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .pg-header-inner {
        padding: 20px 30px;
    }

    .pg-header-nav-list {
        gap: 24px;
    }

    .pg-header-lang {
        margin-left: 24px;
    }
}

@media (max-width: 768px) {
    .pg-header-hamburger {
        display: flex;
    }

    .pg-header-inner {
        padding: 16px 24px;
    }

    .pg-header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 40px 40px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
        transition: right 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
        z-index: 10000;
    }

    .pg-header-nav.pg-nav-open {
        right: 0;
    }

    .pg-header-nav-list {
        flex-direction: column;
        gap: 28px;
        align-items: flex-start;
    }

    .pg-header-nav-list a {
        font-size: 16px;
    }

    .pg-header-lang {
        margin-left: 0;
        margin-top: 28px;
    }

    .pg-header-spacer {
        height: 64px;
    }

    .pg-header-logo {
        height: 22px;
    }
}

/* Mobile nav overlay */
.pg-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pg-nav-overlay.pg-is-active {
    display: block;
    opacity: 1;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .pg-header {
        transition-duration: 0.01ms !important;
    }

    .pg-header-nav {
        transition-duration: 0.01ms !important;
    }
}
