/* Header · replica pixel-perfect del Blocksy original */

/* === Base === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    transition: background-color 300ms ease, box-shadow 300ms ease;
}

/* Header OPACO (negro) siempre — evita el flash blanco del header en las
   transiciones de página (un header transparente deja ver el backdrop blanco).
   Excepción: servicios (header claro), que se resetea a transparente en servicios.css. */
.site-header--transparent {
    background-color: var(--zander-black);
}

/* Al hacer scroll: fondo oscuro */
.site-header--scrolled {
    background-color: var(--zander-black);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Con el menú móvil abierto: el header queda VISIBLE encima del off-canvas
   (fondo sólido para que se lea como barra y se vea la animación del burger→X). */
body.zw-menu-open .site-header {
    background-color: var(--zander-black);
}

/* === Desktop row === */
.site-header__desktop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 20px 48px;
    max-width: var(--container-max);
    margin: 0 auto;
}

/* === Logo (SVG inline) === */
.site-header__logo img,
.site-header__logo svg {
    height: 70px;
    width: auto;
    display: block;
}

/* === Navs desktop === */
.site-nav--left {
    display: flex;
    align-items: center;
    gap: 36px;
}

.site-nav--right {
    display: flex;
    align-items: center;
    gap: 36px;
}

.site-nav__link {
    color: var(--zander-white-hi);
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    position: relative;
    transition: color var(--t-fast);
}

.site-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: var(--zander-yellow);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav__link:hover,
.site-nav__link.is-active { color: var(--zander-yellow); }

.site-nav__link:hover::after,
.site-nav__link.is-active::after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* === Mobile row === */
.site-header__mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 50px;          /* antes ~67px (16+35+16) → reducido a 50px */
    padding: 0 20px;
}

.site-header__mobile .site-header__logo img,
.site-header__mobile .site-header__logo svg {
    height: 35px;
}

/* === Burger móvil: MISMO SVG ham7 que en desktop (anima a X igual) === */
.site-header__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
}

.site-header__burger .ham {
    width: 40px;
    height: 40px;
}

/* === Off-canvas móvil === */
.site-offcanvas {
    position: fixed;
    top: 50px;              /* arranca DEBAJO del header (50px) → no lo tapa */
    right: 0;
    bottom: 0;
    left: 0;
    z-index: calc(var(--z-header) - 1);   /* DEBAJO del header → header visible */
    background: var(--zander-black);
    display: flex;
    flex-direction: column;
    padding: 24px 32px 40px;
    transform: translateX(100%);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.site-offcanvas.is-open {
    transform: translateX(0);
}

/* X interna eliminada: el cierre es vía el burger del header (que anima a X). */
.site-offcanvas__close {
    display: none;
}

.site-offcanvas__close svg {
    display: block;
}

.site-offcanvas__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.site-offcanvas__link {
    color: var(--zander-white-hi);
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: color var(--t-fast), padding-left var(--t-base);
}

.site-offcanvas__link:hover {
    color: var(--zander-yellow);
    padding-left: 8px;
}

/* Botón Soporte (amarillo) en el menú móvil */
.site-offcanvas__support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: 24px;
    padding: 14px 32px;
    background: var(--zander-yellow);
    color: var(--zander-black);
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    transition: transform var(--t-fast), filter var(--t-fast);
}

.site-offcanvas__support:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

/* === Burger desktop (esquina derecha) === */
.site-header__drawer-btn {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
}

/* === Ham SVG · ham7 === */
.ham {
    display: block;
    width: 48px;
    height: 48px;
    cursor: pointer;
    user-select: none;
}

.ham .line {
    fill: none;
    stroke: var(--zander-white-hi);
    stroke-width: 5.5;
    stroke-linecap: round;
    transition: stroke-dasharray 400ms cubic-bezier(0.4, 0, 0.2, 1),
                stroke-dashoffset 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hamRotate {
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hamRotate.active { transform: rotate(45deg); }

/* ham7 estados iniciales */
.ham7 .top    { stroke-dasharray: 40 82; }
.ham7 .middle { stroke-dasharray: 40 111; }
.ham7 .bottom { stroke-dasharray: 40 161; }

/* ham7 estado activo */
.ham7.active .top    { stroke-dasharray: 17 82; stroke-dashoffset: -62px; }
.ham7.active .middle { stroke-dashoffset: 23px; }
.ham7.active .bottom { stroke-dashoffset: -83px; }

/* === Mega menu Servicios === */
.site-nav__item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.site-nav__mega {
    position: absolute;
    top: calc(100% + 20px);
    left: -20px;
    background: var(--zander-black);
    border: 1px solid rgba(252, 198, 28, 0.18);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
    pointer-events: none;
    z-index: calc(var(--z-header) + 2);
}

/* Puente invisible que cubre el gap entre el enlace y el dropdown */
.site-nav__mega::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.site-nav__item:hover .site-nav__mega,
.site-nav__item:focus-within .site-nav__mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.site-nav__mega-link {
    display: block;
    color: var(--zander-white-hi);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 20px;
    transition: color 150ms ease, background 150ms ease;
    white-space: nowrap;
}

.site-nav__mega-link:hover {
    color: var(--zander-yellow);
    background: rgba(252, 198, 28, 0.06);
}

/* === Side drawer desktop === */
.site-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background-color: var(--zander-black);
    border-left: 1px solid rgba(252, 198, 28, 0.15);
    z-index: calc(var(--z-header) + 1);   /* ENCIMA del header → título no se corta */
    transform: translateX(100%);
    transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 100px 48px 60px;
    overflow-x: hidden;
    overflow-y: auto;
}

.site-drawer.is-open {
    transform: translateX(0);
}

.site-drawer__label {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--zander-yellow);
    margin-bottom: 40px;
    display: block;
}

/* X interna eliminada (PC): el cierre es vía el ham7 del header (anima a X). */
.site-drawer__close-btn {
    display: none;
}

/* Tarjeta de contacto rápido */
.site-drawer__heading {
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 800;
    color: var(--zander-white-hi);
    line-height: 1.15;
    margin: 0 0 8px;
}

.site-drawer__subheading {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    color: rgba(251, 251, 251, 0.5);
    margin: 0 0 36px;
    line-height: 1.5;
}

.site-drawer__contact-list {
    list-style: none;
    margin: 0 0 48px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.site-drawer__contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-drawer__contact-link {
    color: var(--zander-white-hi);
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    transition: color 200ms ease;
}

.site-drawer__contact-link:hover {
    color: var(--zander-yellow);
}

.site-drawer__contact-text {
    color: var(--zander-white-hi);
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 500;
}

.site-drawer__cta {
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-width: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

/* Offcanvas: grupo servicios desplegable */
.site-offcanvas__group {
    border-bottom: 1px solid rgba(29, 29, 27, 0.1);
}

.site-offcanvas__link--group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.site-offcanvas__group-link {
    color: var(--zander-white-hi);
    text-decoration: none;
    flex: 1;
}

.site-offcanvas__group-toggle {
    background: none;
    border: none;
    color: var(--zander-white-hi);
    font-size: 36px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 8px 16px;
    transition: transform 200ms ease;
}

.site-offcanvas__group-toggle[aria-expanded="true"] {
    transform: rotate(45deg);
}

.site-offcanvas__sublinks {
    display: flex;
    flex-direction: column;
    padding-bottom: 12px;
}

.site-offcanvas__sublinks[hidden] {
    display: none;
}

.site-offcanvas__sublink {
    color: rgba(251, 251, 251, 0.6);
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 0 10px 20px;
    transition: color 200ms ease;
}

.site-offcanvas__sublink:hover {
    color: var(--zander-white-hi);
}

.site-offcanvas__sublink--all {
    color: var(--zander-yellow);
    font-weight: 700;
}

/* Overlay oscuro detrás del drawer */
.site-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-header) - 2);   /* debajo del drawer y del header */
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.site-drawer-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* === Responsive === */
@media (max-width: 999px) {
    .site-header__desktop { display: none; }
    .site-header__mobile  { display: flex; }
    .site-drawer          { display: none; }
    .site-drawer-overlay  { display: none; }
}

@media (min-width: 1000px) {
    .site-offcanvas { display: none; }
}

/* Compensar header fijo en el contenido */
body { padding-top: 0; }
