/* ====================================================================
   CABECERA SOBERANA DE XXIII MAGAZINE — HOJA DE ESTILOS v1.0
   - Disciplina tipográfica: Wix Madefor Display
   - Estricto apego al Manual de Identidad: Borde Duro (0 radius) & Cero Box Shadows
   - Arquitectura de navegación horizontal en 3 ejes condensados
   - Mini Dock Soberano a la izquierda (top: 20px; left: 28px)
   ==================================================================== */

:root {
    --cat-color: #751D2D;
    --hover-accent: #BDA161;
    --header-height: 75px;
    --text-nav-inactive: #BDBBB1;
    --text-nav-active: #F2F0E2;
}

/* ====================================================================
   SUPRESIÓN TOTAL DE CABECERAS DIVI (THEME BUILDER & LEGACY)
   ==================================================================== */
header.et-l--header,
.et-l--header,
header.et-l,
.et_theme_builder_header,
[class*="_tb_header"],
.et_pb_section_0_tb_header,
#main-header,
#top-header,
#et-secondary-nav,
#et-top-navigation,
#page-container > header:not(#xxiii-header-wrapper),
body > header:not(#xxiii-header-wrapper):not(.custom-menu-panel) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

#page-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ====================================================================
   2. CABECERA SOBERANA DE XXIII MAGAZINE (TOPE Y = 0)
   - Contenedor sólido sin bordes
   - Altura amplia (60px)
   ==================================================================== */
#xxiii-header-wrapper,
.xxiii-header-wrapper {
    background: var(--cat-color) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 99999 !important;
    width: 100% !important;
    height: auto !important;
    min-height: var(--header-height) !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    font-family: 'Wix Madefor Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

#xxiii-header-wrapper .xxiii-sovereign-header {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: var(--header-height) !important;
    min-height: var(--header-height) !important;
}

.xxiii-header-wrapper * {
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Ranura de Comunicados Oracle en la cabecera */
.xxiii-header-oracle-slot {
    width: 100%;
    position: relative;
    z-index: 9001;
}

.xxiii-header-oracle-slot #comunicado-diario-banner {
    margin: 0 !important;
}

/* Barra Principal en 3 ejes: SÓLIDA, SIN BORDES, ANCHO 80% EN PC */
.xxiii-sovereign-header {
    background: transparent !important;
    color: var(--text-nav-active);
    height: var(--header-height);
    min-height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80% !important;
    max-width: 80% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    position: relative;
    transition: background-color 0.3s ease;
}

/* EJE 1: LOGO DE MARCA / SECCIÓN A LA IZQUIERDA */
.header-col-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    z-index: 12;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.brand-official-imagotipo {
    height: 48px;
    display: flex;
    align-items: center;
    color: var(--text-nav-active);
}

.brand-official-imagotipo svg,
.brand-official-imagotipo img,
.brand-official-imagotipo lottie-player,
.xxiii-brand-custom-img {
    height: 44px;
    width: auto;
    max-width: 280px;
    display: block;
    object-fit: contain;
}

.xxiii-brand-svg-wrap svg {
    height: 44px;
    width: auto;
    display: block;
}

.xxiii-brand-svg-wrap svg path,
.xxiii-brand-svg-wrap svg polygon,
.xxiii-brand-svg-wrap svg rect {
    fill: var(--text-nav-active) !important;
}

/* EJE 2: ENLACES EN EL CENTRO EXACTO DEL HEADER */
.header-col-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    flex-grow: 1;
}

.main-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    position: relative;
}

.nav-item-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    color: var(--text-nav-inactive);
    cursor: pointer;
    z-index: 3;
    transition: color 0.18s ease;
    white-space: nowrap;
}

/* Foco o Activo: #F2F0E2 */
.nav-item-link.is-active {
    color: var(--text-nav-active) !important;
}

/* Hover dinámico con contraste inteligente */
.nav-item-link:hover,
.nav-item-link.hover-active {
    color: var(--hover-accent) !important;
}

/* Filamento Deslizante Magnético */
.magnetic-glider {
    position: absolute;
    bottom: 0px;
    height: 2.5px;
    background: var(--hover-accent);
    pointer-events: none;
    will-change: transform, width, opacity;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.26s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.22s ease,
                background-color 0.2s ease;
    opacity: 0;
    transform: translateX(0);
    z-index: 2;
}

/* EJE 3: ACCIONES PLANAS Y MINIMALISTAS (EXTREMO DERECHO DEL CONTENEDOR 80%) */
.header-col-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-shrink: 0;
    z-index: 12;
}

/* Botón Buscar: HOMOGÉNEO CON EL LOGO, ELEVADO Y PROPORCIONAL */
.xxiii-search-nav-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-nav-active) !important;
    height: 40px !important;
    min-height: 0 !important;
    max-height: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding: 0 4px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    font-family: inherit;
    box-sizing: border-box !important;
    transition: color 0.18s ease;
}

.xxiii-search-nav-btn:hover,
.xxiii-search-nav-btn:active {
    color: var(--hover-accent) !important;
    background: transparent !important;
    background-color: transparent !important;
    transform: none !important;
    border: none !important;
    box-shadow: none !important;
}

.xxiii-search-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    display: block;
}

.kbd-pill {
    display: none !important;
}

/* Botón Conmutador Modo Oscuro en Cabecera (Plano, sin bordes, tamaño armonizado con buscar) */
.xxiii-header-dark-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--pergamino-xxiii, #F2F0E2) !important;
    cursor: pointer;
    width: auto !important;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px !important;
    margin-right: 2px;
    transition: color 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.xxiii-header-dark-btn:hover {
    color: var(--hover-accent, #BDA161) !important;
    transform: scale(1.15);
}

.xxiii-header-dark-btn svg {
    height: 15px !important;
    width: auto !important;
    fill: currentColor !important;
    display: block !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.xxiii-header-dark-btn .icon-sun { display: none !important; }
.xxiii-header-dark-btn .icon-moon { display: block !important; }
html.xxiii-dark-mode .xxiii-header-dark-btn .icon-sun { display: block !important; }
html.xxiii-dark-mode .xxiii-header-dark-btn .icon-moon { display: none !important; }

/* Iconos de Tienda y Login: PLANOS, SIN CUADRO ALREDEDOR */
.custom-icon-slot {
    width: auto;
    height: 32px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    color: var(--text-nav-inactive);
    cursor: pointer;
    transition: color 0.18s ease;
    position: relative;
    text-decoration: none;
}

.custom-icon-slot:hover {
    color: var(--hover-accent) !important;
    background: transparent !important;
}

.custom-icon-slot svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
}

/* Ocultar hamburguesa y drawer en escritorio */
@media (min-width: 901px) {
    .custom-menu-container,
    .custom-hamburger,
    .xxiii-mobile-header-burger {
        display: none !important;
    }
}

/* ====================================================================
   3. EL MINI DOCK SOBERANO DE XXIII MAGAZINE (A LA IZQUIERDA)
   • Posición: top: 20px; left: 28px
   • Color dinámico de la sección
   • Sólido, SIN bordes ni sombras
   • Isotipo real oficial (Isotipo-Blanco.svg)
   • Solo se muestra en Páginas Generales tras scroll
   ==================================================================== */
.xxiii-mini-dock-sovereign {
    position: fixed;
    top: 20px;
    left: 28px;
    right: auto;
    background: var(--cat-color);
    color: var(--text-nav-active);
    border: none !important;
    box-shadow: none !important;
    height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    gap: 12px;
    z-index: 99998;
    transform: translateY(-80px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.28s ease,
                background-color 0.3s ease,
                padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                gap 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Wix Madefor Display', -apple-system, BlinkMacSystemFont, sans-serif;
    will-change: transform, opacity;
}

.xxiii-mini-dock-sovereign * {
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.xxiii-mini-dock-sovereign.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Isotipo Oficial en Mini Dock (Clicable al Inicio) */
.dock-isotipo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.dock-isotipo-link:hover {
    opacity: 0.9;
    transform: scale(1.08);
}

.dock-isotipo-container {
    height: 22px;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-nav-active);
}

.dock-isotipo-container svg {
    height: 20px;
    width: auto;
    fill: currentColor;
    display: block;
}

/* Contenedor colapsable de Menú, Buscar y Minimizar */
.dock-collapsible-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 320px;
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
    transform: scaleX(1);
    transform-origin: left center;
    transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                gap 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-hairline-separator {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

/* Botón de Menú Rápido con Icono Vivo */
.dock-trigger-btn {
    background: transparent !important;
    color: var(--text-nav-active);
    border: none !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 4px;
    transition: color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-trigger-btn:hover {
    color: var(--hover-accent);
    transform: translateY(-0.5px);
}

/* Micro-animación viva de Hamburguesa a Cruz ✕ */
.dock-burger-icon {
    width: 14px;
    height: 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
}

.dock-burger-icon span {
    display: block;
    height: 1.5px;
    width: 100%;
    background: currentColor;
    border-radius: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

.dock-trigger-btn.is-active .dock-burger-icon span:nth-child(1) {
    transform: translateY(4.75px) rotate(45deg);
}

.dock-trigger-btn.is-active .dock-burger-icon span:nth-child(2) {
    opacity: 0;
}

.dock-trigger-btn.is-active .dock-burger-icon span:nth-child(3) {
    transform: translateY(-4.75px) rotate(-45deg);
}

/* Botón Buscar en Mini Dock: LIMPIO, PLANO, AL LADO DE MENÚ */
.dock-search-btn {
    background: transparent !important;
    color: var(--text-nav-active) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 6px 4px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}

.dock-search-btn:hover,
.dock-search-btn:active {
    color: var(--hover-accent) !important;
    background: transparent !important;
    background-color: transparent !important;
    transform: translateY(-0.5px) !important;
    border: none !important;
    box-shadow: none !important;
}

.dock-search-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-search-btn:hover svg {
    transform: scale(1.12);
}

/* Botón Minimizar Dock */
.dock-minimize-btn {
    background: transparent !important;
    color: var(--text-nav-inactive) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 6px 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-minimize-btn:hover,
.dock-minimize-btn:active {
    color: var(--hover-accent) !important;
    background: transparent !important;
    transform: translateX(-1.5px) !important;
}

.dock-minimize-btn svg {
    stroke: currentColor;
    display: block;
}

/* Botón Expandir Dock (visible en modo minimizado con transición fluida) */
.dock-expand-btn {
    display: inline-flex;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: scale(0.6);
    background: transparent !important;
    color: var(--text-nav-inactive) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 6px 0;
    align-items: center;
    justify-content: center;
    transition: max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.18s ease,
                padding 0.3s ease;
}

.dock-expand-btn:hover,
.dock-expand-btn:active {
    color: var(--hover-accent) !important;
    background: transparent !important;
    transform: scale(1.1) translateX(1px) !important;
}

.dock-expand-btn svg {
    stroke: currentColor;
    display: block;
}

/* Estado Minimizado Suave: Solo Isotipo + Flechita de Expandir */
.xxiii-mini-dock-sovereign.is-minimized {
    padding: 0 10px;
    gap: 4px;
}

.xxiii-mini-dock-sovereign.is-minimized .dock-collapsible-content {
    max-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scaleX(0.7) !important;
    gap: 0 !important;
}

.xxiii-mini-dock-sovereign.is-minimized .dock-expand-btn {
    max-width: 24px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: scale(1) !important;
    padding: 6px 2px !important;
}

/* DESPLIEGUE ARQUITECTÓNICO DEL DOCK (DESDE LA IZQUIERDA HACIA LA DERECHA) */
.dock-unfold-tray {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background: var(--cat-color);
    color: var(--text-nav-active);
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    padding: 0 6px;
    height: 42px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scaleY(0.92);
    transform-origin: top left;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.28s ease,
                background-color 0.3s ease;
    white-space: nowrap;
}

.dock-unfold-tray.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scaleY(1);
}

.dock-tray-link {
    color: var(--text-nav-inactive);
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 14px;
    position: relative;
    transition: color 0.18s ease,
                transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.18s ease;
}

.dock-tray-link.is-active {
    color: var(--text-nav-active) !important;
}

.dock-tray-link:hover,
.dock-tray-link.hover-active {
    color: var(--hover-accent) !important;
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, 0.06);
}

/* Filamento deslizante dentro del Dock Tray */
.dock-tray-glider {
    position: absolute;
    bottom: 0px;
    height: 2.5px;
    background: var(--hover-accent);
    pointer-events: none;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), width 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.2s ease;
    opacity: 0;
}

/* ====================================================================
   4. RESPONSIVIDAD Y TABLETS / MÓVILES (<= 900PX)
   ==================================================================== */
/* Eliminación de separación y huecos blancos entre la cabecera y el hero */
.home .et_pb_section_0,
.home .et_pb_section_0.video {
    background-color: #751D2D !important;
    margin-top: 0 !important;
}

@media (max-width: 900px) {
    /* El Mini Dock no se usa en móviles */
    #sovereignMiniDock {
        display: none !important;
    }
    .header-col-center {
        display: none !important;
    }
    .xxiii-search-nav-btn {
        display: none !important;
    }
    .custom-icon-slot {
        display: none !important;
    }
    .xxiii-sovereign-header {
        width: 85% !important;
        max-width: 85% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        height: 64px !important;
        min-height: 64px !important;
    }
    .brand-official-imagotipo {
        height: 40px !important;
    }
    .brand-official-imagotipo svg,
    .brand-official-imagotipo img,
    .brand-official-imagotipo lottie-player,
    .xxiii-brand-custom-img {
        height: 38px !important;
        max-width: 220px !important;
    }
    .header-col-left,
    .header-col-right {
        transform: none !important;
    }
    .custom-menu-container {
        display: block !important;
    }
    .custom-hamburger {
        display: block !important;
    }
    .custom-menu-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        z-index: 10000 !important;
    }
    .home .et_pb_section_0,
    .home .et_pb_section_0.video {
        background-color: #751D2D !important;
        background-size: cover !important;
        background-position: center top !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}
