/*
 * Antra Sticky Header EI v1.3
 * Autor: Christopher Troncoso R. | Estudio Ideas
 */

:root {
    --antra-ei-sticky-bg: #10131c;
    --antra-ei-sticky-duration: 420ms;
    --antra-ei-sticky-z: 99999;
}

/* Header real detectado en la plantilla adjunta */
#masthead.antra-ei-sticky-ready,
#masthead.antra-ei-sticky-ready .elementor-42,
#masthead.antra-ei-sticky-ready .header-absolute,
#masthead.antra-ei-sticky-ready .elementor-element-3ae6e686,
.antra-sticky-header.antra-ei-sticky-ready {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: var(--antra-ei-sticky-z) !important;
    box-sizing: border-box !important;
}

/* Estado inicial: flotando sobre el contenido y transparente */
#masthead.antra-ei-sticky-ready,
.antra-sticky-header.antra-ei-sticky-ready {
    position: fixed !important;
    top: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    will-change: transform, opacity, background-color;
    transition:
        transform var(--antra-ei-sticky-duration) ease,
        opacity var(--antra-ei-sticky-duration) ease,
        background-color var(--antra-ei-sticky-duration) ease,
        box-shadow var(--antra-ei-sticky-duration) ease !important;
}

#masthead.antra-ei-sticky-ready .header-absolute,
#masthead.antra-ei-sticky-ready .elementor-element-3ae6e686,
.antra-sticky-header.antra-ei-sticky-ready {
    background: transparent !important;
    background-color: transparent !important;
    transition:
        background-color var(--antra-ei-sticky-duration) ease,
        box-shadow var(--antra-ei-sticky-duration) ease !important;
}

/* Evita que reglas absolutas internas de Antra peleen contra el header fijo */
#masthead.antra-ei-sticky-ready .header-absolute,
#masthead.antra-ei-sticky-ready .elementor-element-3ae6e686.header-absolute {
    position: relative !important;
    top: auto !important;
}

/* Durante el micro-ocultamiento antes de reaparecer */
#masthead.antra-ei-sticky-hiding,
.antra-sticky-header.antra-ei-sticky-hiding {
    transform: translate3d(0, -115%, 0) !important;
    opacity: 0 !important;
}

/* Estado scrolled: reaparece con fondo oscuro */
#masthead.antra-ei-sticky-active,
.antra-sticky-header.antra-ei-sticky-active {
    background: var(--antra-ei-sticky-bg) !important;
    background-color: var(--antra-ei-sticky-bg) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16) !important;
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
}

#masthead.antra-ei-sticky-active .header-absolute,
#masthead.antra-ei-sticky-active .elementor-element-3ae6e686,
.antra-sticky-header.antra-ei-sticky-active {
    background: var(--antra-ei-sticky-bg) !important;
    background-color: var(--antra-ei-sticky-bg) !important;
}

/* Estado top: siempre transparente */
#masthead.antra-ei-sticky-top,
.antra-sticky-header.antra-ei-sticky-top,
#masthead.antra-ei-sticky-top .header-absolute,
#masthead.antra-ei-sticky-top .elementor-element-3ae6e686 {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Submenús por encima del contenido */
#masthead.antra-ei-sticky-ready .sub-menu,
.antra-sticky-header.antra-ei-sticky-ready .sub-menu {
    z-index: calc(var(--antra-ei-sticky-z) + 1) !important;
}

@media (prefers-reduced-motion: reduce) {
    #masthead.antra-ei-sticky-ready,
    #masthead.antra-ei-sticky-ready .header-absolute,
    #masthead.antra-ei-sticky-ready .elementor-element-3ae6e686,
    .antra-sticky-header.antra-ei-sticky-ready {
        transition: none !important;
    }
}
