/* ==========================================================================
   RESIZABLE FLOATING DOCK NAVBAR (Awwwards Noir & Gold Edition)
   ========================================================================== */

/* Contenedor base de la cabecera */
.global-glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 36px;
    background: linear-gradient(180deg, rgba(3, 7, 5, 0.96) 0%, rgba(3, 7, 5, 0.88) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.9), 0 1px 0 0 rgba(0, 255, 136, 0.18);
    z-index: 99999;
    box-sizing: border-box;
    transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-radius 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                background 0.4s ease,
                border-color 0.4s ease,
                transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: width, max-width, transform, border-radius;
}

/* Logotipo */
.global-glass-header .logo {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: 3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #d4af37 60%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: filter 0.3s ease, transform 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
}
.global-glass-header .logo:hover {
    filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.65));
    transform: scale(1.02);
}
.global-glass-header .logo::after {
    content: '✦';
    font-size: 12px;
    color: #d4af37;
    -webkit-text-fill-color: #d4af37;
    margin-left: 2px;
}

/* Envoltura de navegación */
.global-glass-header .nav-links {
    position: relative;
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    transition: all 0.35s ease;
}

/* Spotlight flotante magnético tras los enlaces */
.nav-spotlight-pill {
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.35);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.25);
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    z-index: 1;
}

/* Botón flotante para desplegar categorías en modo Docked */
.dock-more-cats-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    color: #d4af37;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-left: 6px;
}
.dock-more-cats-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: #d4af37;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.4);
    color: #fff;
}

/* Menú flotante emergente de categorías en modo Docked */
.dock-categories-flyout {
    position: absolute;
    top: calc(100% + 14px);
    right: 10px;
    background: rgba(3, 7, 5, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;
    padding: 14px 12px;
    min-width: 240px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 255, 136, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100000;
}
.dock-categories-flyout.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.dock-categories-flyout a {
    display: block;
    padding: 8px 14px;
    color: #c4d4cc;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.dock-categories-flyout a:hover {
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
    padding-left: 18px;
}

/* ==========================================================================
   ESTADO RETRÁCTIL / FLOTANTE DOCKED (.is-docked)
   ========================================================================== */
/* --------------------------------------------------------------------------
   v11.6.2 — LA BURBUJA, REORDENADA
   Antes: la cápsula tenía `max-width:min(880px,94vw)` + `flex-wrap:wrap`; al
   encogerse el contenedor a ~153px, los 7 enlaces caían uno por renglón y la
   burbuja medía 314px de alto (medido en Chrome real, 1440x900).
   Ahora: UNA sola fila (48px de alto) y, cuando la pantalla no da de sí,
   una retícula de 2 filas ordenada — nunca 7 renglones sueltos.
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
    .global-glass-header.is-docked {
        top: 14px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: min(1280px, 96vw);
        padding: 6px 14px;
        gap: 12px;
        border-radius: 999px;
        background: rgba(3, 7, 5, 0.97) !important;
        backdrop-filter: blur(28px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
        border: 1px solid rgba(212, 175, 55, 0.45) !important;
        box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 
                    0 0 24px rgba(0, 255, 136, 0.25), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    }

    /* Ocultar Línea 1 (categorías estándar) y mostrar solo Línea 2 (Páginas Especiales) */
    .global-glass-header.is-docked .nav-links > li.is-line-1 {
        display: none !important;
    }
    .global-glass-header.is-docked .nav-links li.pillar-line-break {
        display: none !important;
    }
    .global-glass-header.is-docked .dock-more-cats-btn {
        display: inline-flex;
        padding: 5px 9px !important;
        font-size: 9.5px !important;
        margin-left: 0 !important;
    }
    /* La clave: los enlaces no se envuelven nunca */
    .global-glass-header.is-docked .nav-links {
        flex-wrap: nowrap !important;
        gap: 1px !important;
        min-width: 0 !important;
    }
    .global-glass-header.is-docked .nav-links > li {
        padding: 0 !important;
    }
    .global-glass-header.is-docked .nav-links a {
        padding: 5px 7px !important;
        font-size: 10px !important;
        letter-spacing: 0.3px !important;
    }
    .global-glass-header.is-docked .logo {
        font-size: 16px !important;
        letter-spacing: 1.2px !important;
        margin-right: 2px !important;
    }
    .global-glass-header.is-docked .header-actions {
        gap: 6px !important;
    }
    .global-glass-header.is-docked .rel-ts {
        padding: 2px !important;
    }
    .global-glass-header.is-docked .rel-ts-btn {
        padding: 4px 7px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }
    .global-glass-header.is-docked .rel-ts-btn .rel-ts-ico {
        font-size: 11px !important;
    }
    .global-glass-header.is-docked .relatando-lang-switcher {
        padding: 3px 8px !important;
        font-size: 10px !important;
    }
}

/* Pantallas medianas (portátiles pequeños): burbuja en retícula de 2 filas
   centradas, misma altura contenida (~77px) y sin solapes. */
@media (min-width: 1025px) and (max-width: 1274px) {
    .global-glass-header.is-docked .nav-links {
        display: grid !important;
        grid-template-columns: repeat(4, auto) !important;
        justify-content: center !important;
        gap: 3px 4px !important;
    }
    .global-glass-header.is-docked .nav-links a {
        padding: 4px 8px !important;
        font-size: 9.5px !important;
    }
    /* El interruptor pierde las palabras (Auto/Claro/Oscuro) y deja el icono:
       sigue siendo evidente y libera ~110px para que nada se apriete. */
    .global-glass-header.is-docked .rel-ts-label {
        display: none !important;
    }
    .global-glass-header.is-docked .logo {
        font-size: 15px !important;
    }
}

/* ==========================================================================
   RESPONSIVE EN MÓVILES Y PANTALLAS PEQUEÑAS
   ========================================================================== */
@media (max-width: 900px) {
    .global-glass-header.is-docked {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: calc(100vw - 28px);
        padding: 8px 16px;
        border-radius: 999px;
        background: rgba(3, 7, 5, 0.92);
        border: 1px solid rgba(212, 175, 55, 0.4);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 255, 136, 0.22);
    }
    .global-glass-header.is-docked .logo {
        font-size: 17px;
        letter-spacing: 2px;
    }
    .dock-more-cats-btn,
    .dock-categories-flyout {
        display: none !important;
    }
}

/* ==========================================================================
   SELECTOR BILINGÜE MINIMALISTA (TranslatePress ES | EN - Awwwards Noir Edition)
   ========================================================================== */
.global-glass-header .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    z-index: 10;
}

.relatando-lang-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 5px 12px;
    background: rgba(6, 15, 9, 0.78);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 999px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: 'Cinzel', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.relatando-lang-switcher:hover {
    border-color: rgba(0, 230, 118, 0.45);
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.25), 0 4px 20px rgba(0, 0, 0, 0.7);
}

.relatando-lang-switcher .lang-option {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 3px 4px;
    border-radius: 4px;
    transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

/* Idioma Activo: tono blanco / tenue pero nítido con aura suave */
.relatando-lang-switcher .lang-option.is-active {
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    cursor: default;
    pointer-events: none;
    opacity: 0.95;
}

/* Idioma Inactivo: tono tenue apagado que despierta en verde esmeralda al hover */
.relatando-lang-switcher .lang-option:not(.is-active) {
    color: #7d9487;
    cursor: pointer;
}

.relatando-lang-switcher .lang-option:not(.is-active):hover {
    color: #00e676;
    text-shadow: 0 0 12px rgba(0, 230, 118, 0.8), 0 0 20px rgba(0, 255, 136, 0.4);
    transform: scale(1.08);
}

/* Separador vertical gótico */
.relatando-lang-switcher .lang-divider {
    color: rgba(212, 175, 55, 0.4);
    font-size: 10px;
    font-weight: 400;
    opacity: 0.7;
    margin: 0 1px;
}

.menu-item-lang-switcher-mobile {
    display: none !important;
}

@media (max-width: 900px) {
    .global-glass-header .header-actions {
        gap: 9px;
    }
    .global-glass-header .relatando-lang-switcher {
        padding: 4px 9px;
        font-size: 10px;
    }
    .global-glass-header .nav-links li.menu-item-lang-switcher-mobile {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 14px 0 8px 0;
        margin-top: 8px;
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        list-style: none;
    }
    .global-glass-header .nav-links li.menu-item-lang-switcher-mobile .relatando-lang-switcher {
        padding: 7px 18px;
        font-size: 12px;
        background: rgba(6, 15, 9, 0.9);
        border-color: rgba(212, 175, 55, 0.4);
    }
}
