/* ================================================
   COTAPAREDES — Header
   Fullwidth, sticky, transparente en home.
   Layout: Logo | Nav links | Hamburger
   ================================================ */

/* ============ BASE HEADER ============ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    transition: background 0.4s ease;
}

.site-header__inner {
    width: 100%;
    padding: 0 clamp(20px, 3vw, 40px);
    height: 15vh;
    min-height: 70px;
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 4vw, 48px);
}

/* ============ LOGO ============ */
.site-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.site-header__logo img {
    height: auto;
    width: 255px;
    display: block;
    transition: filter 0.3s ease;
}

/* ============ NAV LINKS ============ */
.site-header__nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-header__menu {
    display: flex;
    list-style: none;
    gap: clamp(24px, 3vw, 42px);
    margin: 0;
    padding: 0;
}

.site-header__menu li a {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.3px;
    color: #54595F;
    text-decoration: none;
    transition: color 0.25s ease;
    white-space: nowrap;
    position: relative;
    padding-bottom: 4px;
}

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

.site-header__menu li a:hover,
.site-header__menu li.current-menu-item a,
.site-header__menu li.current_page_item a {
    color: #000;
}

.site-header__menu li a:hover::after,
.site-header__menu li.current-menu-item a::after,
.site-header__menu li.current_page_item a::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ============ HAMBURGER ============ */
.site-header__hamburger {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    color: #54595F;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.site-header__hamburger:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* ============ TRANSPARENT (HOME) ============ */
.site-header.header--transparent {
    background: transparent;
}

.site-header.header--transparent .site-header__menu li a {
    color: rgba(255, 255, 255, 0.8);
}

.site-header.header--transparent .site-header__menu li a:hover,
.site-header.header--transparent .site-header__menu li.current-menu-item a {
    color: #fff;
}

.site-header.header--transparent .site-header__logo img {
    filter: brightness(0) invert(1);
}

.site-header.header--transparent .site-header__hamburger {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.site-header.header--transparent .site-header__hamburger:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* ============ SIDEBAR PANEL (OFF-CANVAS) ============ */
.sidebar-panel {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    visibility: hidden;
}

.sidebar-panel.active {
    pointer-events: auto;
    visibility: visible;
}

.sidebar-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.sidebar-panel.active .sidebar-panel__backdrop {
    opacity: 1;
}

.sidebar-panel__content {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 60px 40px 40px;
    display: flex;
    flex-direction: column;
}

.sidebar-panel.active .sidebar-panel__content {
    transform: translateX(0);
}

.sidebar-panel__close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #54595F;
    padding: 4px;
    transition: color 0.2s;
}

.sidebar-panel__close:hover {
    color: #000;
}

.sidebar-panel__menu {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-panel__menu li a {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.3px;
    color: #54595F;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-panel__menu li a:hover {
    color: #000;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .site-header__inner {
        height: 64px;
        min-height: 56px;
        max-height: 72px;
        padding: 0 16px;
    }

    .site-header__nav {
        display: none;
    }

    .site-header__logo img {
        width: 160px;
    }
}
