/* =========================================================
   TQP EXPANDIBLE OPTIONS
   Estilos públicos del componente flotante.

   Estructura visual:
   - Pestaña vertical "Índice".
   - Panel desplegable con título fijo "Tabla de contenidos".
   - Navegación jerárquica H1-H6 o índice manual de enlaces.
   ========================================================= */


/* =========================================================
   1. VARIABLES Y CONTENEDOR GENERAL
   ========================================================= */

.tqp-eop {
    /* Separación automática cuando hay varios índices en el mismo lateral. */
    --tqp-eop-stack-offset: 0px;
    --tqp-eop-mobile-stack-offset: 0px;

    /* Medidas principales del componente. */
    --tqp-eop-tab-width: 49px;
    --tqp-eop-tab-height: 122px;
    --tqp-eop-panel-width: 402px;
    --tqp-eop-panel-height: 535px;
    --tqp-eop-title-column: 92px;

    /* Colores principales. */
    --tqp-eop-tab-bg: #1978b8;
    --tqp-eop-panel-bg: #4bb0cc;
    --tqp-eop-panel-light: #e3f1f6;
    --tqp-eop-title-muted: #62acd0;
    --tqp-eop-title-main: #087daf;
    --tqp-eop-text: #ffffff;

    /* Ancho efectivo del panel según el viewport. */
    --tqp-eop-open-width: min(
        var(--tqp-eop-panel-width),
        calc(100vw - var(--tqp-eop-tab-width) - 8px)
    );

    position: fixed;
    top: calc(48% + var(--tqp-eop-stack-offset));

    z-index: 999990;

    width: var(--tqp-eop-tab-width);
    height: var(--tqp-eop-tab-height);

    font-family: inherit;
}


/* =========================================================
   2. POSICIÓN GENERAL: IZQUIERDA / DERECHA
   ========================================================= */

/* El shortcode está configurado para aparecer desde la izquierda. */
.tqp-eop--left {
    left: 0;
}

/* El shortcode está configurado para aparecer desde la derecha. */
.tqp-eop--right {
    right: 0;
}


/* =========================================================
   3. PESTAÑA VERTICAL "ÍNDICE"
   ========================================================= */

.tqp-eop__tab {
    /*
     * La pestaña se posiciona de forma absoluta para que su borde superior
     * quede alineado con el borde superior del panel desplegable.
     *
     * El panel mide como máximo 535px / 70vh, por eso usamos la mitad
     * de esa altura para calcular exactamente su parte superior.
     */
    position: absolute;
    top: calc(50% - min(267.5px, 35vh) + 11px);
    left: 0;

    z-index: 30;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: var(--tqp-eop-tab-width);
    min-width: var(--tqp-eop-tab-width);
    max-width: var(--tqp-eop-tab-width);

    height: var(--tqp-eop-tab-height);
    min-height: var(--tqp-eop-tab-height);
    max-height: var(--tqp-eop-tab-height);

    padding: 12px 8px;
    box-sizing: border-box;

    border: 0;
    border-radius: 0 14px 14px 0;

    background: var(--tqp-eop-tab-bg);
    color: var(--tqp-eop-text);

    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);

    cursor: pointer;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;

    /* Cuando el panel izquierdo se abre, la pestaña viaja suavemente
       hasta quedar pegada al borde derecho del panel. */
    transform: translateX(0);

    transition:
        transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 180ms ease,
        box-shadow 180ms ease;
}

/* La pestaña configurada a la derecha se alinea con el borde derecho
   y usa la curvatura opuesta. */
.tqp-eop--right .tqp-eop__tab {
    left: auto;
    right: 0;

    border-radius: 14px 0 0 14px;
}

/* En el lado izquierdo, la pestaña acompaña la apertura del panel. */
.tqp-eop--left.is-open .tqp-eop__tab {
    transform: translateX(var(--tqp-eop-open-width));
}

/* Estado hover/focus de la pestaña. */
.tqp-eop__tab:hover,
.tqp-eop__tab:focus-visible {
    background: #116fab;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    outline: none;
}

/* Texto vertical dentro de la pestaña. */
.tqp-eop__tab span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
}


/* =========================================================
   4. PANEL DESPLEGABLE: CONTENEDOR Y ANIMACIÓN
   ========================================================= */

.tqp-eop__panel {
    position: absolute;
    top: 50%;

    z-index: 20;

    display: flex;
    flex-direction: column;

    /* Cerrado: ancho cero. Esto permite una contracción real y suave. */
    width: 0;
    height: min(var(--tqp-eop-panel-height), 70vh);

    box-sizing: border-box;

    overflow: hidden;

    /* Franja clara izquierda + zona turquesa del contenido. */
    background:
        linear-gradient(
            to right,
            var(--tqp-eop-panel-light) 0,
            var(--tqp-eop-panel-light) var(--tqp-eop-title-column),
            var(--tqp-eop-panel-bg) var(--tqp-eop-title-column),
            var(--tqp-eop-panel-bg) 100%
        );

    border: 0;
    border-radius: 0 15px 15px 0;

    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-50%);

    /* La visibilidad se retrasa al cerrar para que la contracción sea visible. */
    transition:
        width 360ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease,
        visibility 0s linear 360ms;
}

/* Panel cuando el componente está a la izquierda. */
.tqp-eop--left .tqp-eop__panel {
    left: 0;
}

/* Panel cuando el componente está a la derecha.
   Se abre hacia la izquierda y termina justo antes de la pestaña. */
.tqp-eop--right .tqp-eop__panel {
    right: var(--tqp-eop-tab-width);
    border-radius: 15px 0 0 15px;
}

/* Estado abierto: expansión suave del panel. */
.tqp-eop.is-open .tqp-eop__panel {
    width: var(--tqp-eop-open-width);

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transition:
        width 360ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease,
        visibility 0s linear 0s;
}


/* =========================================================
   5. CABECERA DEL PANEL
   Contiene "Tabla de contenidos" y el botón de cerrar.
   ========================================================= */

.tqp-eop__panel-head {
    position: relative;
    z-index: 3;

    flex: 0 0 82px;

    width: var(--tqp-eop-open-width);
    min-width: var(--tqp-eop-open-width);
    height: 82px;
    font-family: 'lato',sans-serif;

    box-sizing: border-box;

    padding: 15px 54px 8px 16px;
}


/* =========================================================
   6. TÍTULO FIJO "TABLA DE CONTENIDOS"
   La estructura permite dar un tono distinto a "contenidos".
   ========================================================= */

.tqp-eop__title {
    display: block;

    width: 285px;
    max-width: calc(var(--tqp-eop-open-width) - 74px);

    margin: 0;
    padding: 0;

    color: var(--tqp-eop-title-muted);

    font-size: 25px;
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.5px;

    text-transform: uppercase;

    pointer-events: none;
}

/* Cada parte del título ocupa su propia línea. */
.tqp-eop__title-line {
    display: block;
    white-space: nowrap;
}

/* "de" usa el tono suave del título. */
.tqp-eop__title-muted {
    color: var(--tqp-eop-title-muted);
}

/* "contenidos" usa un azul más fuerte para destacar. */
.tqp-eop__title-main {
    color: var(--tqp-eop-title-main);
}


/* =========================================================
   7. BOTÓN CERRAR (×)
   ========================================================= */

.tqp-eop__close {
    position: absolute;
    top: 14px;
    right: 18px;

    z-index: 10;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #ffffff;

    cursor: pointer;

    font-size: 27px;
    font-weight: 300;
    line-height: 1;

    transition:
        transform 180ms ease,
        background-color 180ms ease,
        opacity 180ms ease;
}

/* Hover/focus del botón cerrar. */
.tqp-eop__close:hover,
.tqp-eop__close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(5deg) scale(1.06);
    outline: none;
}


/* =========================================================
   8. ÁREA DE NAVEGACIÓN
   El scroll pertenece solo a esta zona, no a todo el panel.
   ========================================================= */

.tqp-eop__nav {
    position: relative;
    z-index: 2;

    flex: 1 1 auto;
    min-height: 0;

    width: var(--tqp-eop-open-width);
    min-width: var(--tqp-eop-open-width);

    box-sizing: border-box;

    /* Reserva la franja clara izquierda para el diseño del título. */
    padding: 0 10px 14px calc(var(--tqp-eop-title-column) + 16px);

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 255, 255, 0.82)
        rgba(255, 255, 255, 0.14);
}


/* =========================================================
   9. SCROLLBAR DEL ÍNDICE
   ========================================================= */

.tqp-eop__nav::-webkit-scrollbar {
    width: 8px;
}

.tqp-eop__nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}

.tqp-eop__nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 10px;
}

.tqp-eop__nav::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}


/* =========================================================
   10. LISTAS DEL ÍNDICE
   La lista raíz y las sublistas usan una jerarquía HTML real.
   ========================================================= */

.tqp-eop__list {
    margin: 0;
    padding: 0;

    list-style: none;
}

/* Lista raíz. */
.tqp-eop__list--root {
    width: 100%;
}

/* Sublistas H3, H4, H5, etc.
   La guía vertical se dibuja con un pseudo-elemento propio en vez de
   depender de border-left. Esto evita que estilos globales del tema,
   Oxygen o un optimizador CSS oculten la barra de jerarquía. */
.tqp-eop__list--nested {
    position: relative;
    display: block;

    margin: 2px 0 4px 8px !important;
    padding-left: 14px !important;

    border-left: 0 !important;
}

/* Barra vertical visible para los niveles inferiores (H3, H4, etc.). */
.tqp-eop__list--nested::before {
    content: "";

    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 3px;
    z-index: 1;

    width: 1px;

    background: rgba(255, 255, 255, 0.78);
    border-radius: 999px;

    pointer-events: none;
}

/* Los elementos y enlaces quedan por encima de la guía. */
.tqp-eop__list--nested > .tqp-eop__item,
.tqp-eop__list--nested > .tqp-eop__item > .tqp-eop__link {
    position: relative;
    z-index: 2;
}

/* Si el panel está configurado a la derecha, espejamos la guía. */
.tqp-eop--right .tqp-eop__list--nested {
    margin-right: 8px !important;
    margin-left: 0 !important;

    padding-right: 14px !important;
    padding-left: 0 !important;
}

.tqp-eop--right .tqp-eop__list--nested::before {
    right: 3px;
    left: auto;
}

/* Fallback: si un H3 queda directamente en la lista raíz por una
   estructura HTML irregular, también mostramos una guía lateral. */
.tqp-eop__list--root > .tqp-eop__item--level-3 {
    position: relative;

    margin-left: 8px !important;
    padding-left: 14px !important;
}

.tqp-eop__list--root > .tqp-eop__item--level-3::before {
    content: "";

    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 3px;

    width: 1px;

    background: rgba(255, 255, 255, 0.78);
    border-radius: 999px;

    pointer-events: none;
}

.tqp-eop--right .tqp-eop__list--root > .tqp-eop__item--level-3 {
    margin-right: 8px !important;
    margin-left: 0 !important;

    padding-right: 14px !important;
    padding-left: 0 !important;
}

.tqp-eop--right .tqp-eop__list--root > .tqp-eop__item--level-3::before {
    right: 3px;
    left: auto;
}


/* =========================================================
   11. ITEMS DEL ÍNDICE
   ========================================================= */

.tqp-eop__item {
    position: relative;

    margin: 0;
    padding: 0;

    list-style: none;
}


/* =========================================================
   12. ENLACES DEL ÍNDICE
   ========================================================= */

.tqp-eop__link {
    position: relative;

    display: block;

    width: 100%;

    padding: 6px 4px 6px 17px;
    box-sizing: border-box;

    border: 0;
    border-radius: 3px;

    background: transparent;
    color: var(--tqp-eop-text);

    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;

    text-decoration: none;

    transform: translateX(0) scale(1);
    transform-origin: left center;
    font-family: 'Lato', sans-serif;

    transition:
        transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 180ms ease,
        color 180ms ease,
        opacity 180ms ease;
}


/* =========================================================
   13. VIÑETAS DE LOS ITEMS
   Sirven para diferenciar visualmente cada contenido.
   ========================================================= */

/* Viñeta base de cada enlace. */
/*.tqp-eop__link::before {
    content: "";

    position: absolute;
    top: 0.78em;
    left: 3px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.96);

    transform: translateY(-50%);
}*/

/* Los subniveles usan una viñeta hueca para diferenciarse. */
.tqp-eop__list--nested > .tqp-eop__item > .tqp-eop__link::before {
    width: 5px;
    height: 5px;

    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.92);
}

/* Los niveles aún más profundos reducen ligeramente la viñeta. */
.tqp-eop__list--nested .tqp-eop__list--nested > .tqp-eop__item > .tqp-eop__link::before {
    width: 4px;
    height: 4px;
}


/* =========================================================
   14. HOVER / FOCUS DE LOS ENLACES
   Las letras crecen sutilmente y se desplazan unos píxeles.
   ========================================================= */

.tqp-eop__link:hover,
.tqp-eop__link:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;

    text-decoration: none;

    transform: translateX(3px) scale(1.018);

    outline: none;
}


/* =========================================================
   15. ENLACE ACTIVO SEGÚN EL SCROLL DE LA PÁGINA
   ========================================================= */

.tqp-eop__link.is-active,
.tqp-eop__link[aria-current="location"] {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* La viñeta activa se destaca un poco más. */
.tqp-eop__link.is-active::before,
.tqp-eop__link[aria-current="location"]::before {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}


/* =========================================================
   16. JERARQUÍA TIPOGRÁFICA H1-H6
   Las clases son creadas por JavaScript según el encabezado real.
   ========================================================= */

/* Nivel principal del índice. */
.tqp-eop__item--level-1 > .tqp-eop__link,
.tqp-eop__item--level-2 > .tqp-eop__link {
    font-weight: 500;
}

/* Subniveles. */
.tqp-eop__item--level-3 > .tqp-eop__link,
.tqp-eop__item--level-4 > .tqp-eop__link,
.tqp-eop__item--level-5 > .tqp-eop__link,
.tqp-eop__item--level-6 > .tqp-eop__link {
    font-weight: 500;
}


/* =========================================================
   17. ESTADOS ESPECIALES
   ========================================================= */

/* El índice automático se oculta hasta confirmar que existen headings. */
.tqp-eop--pending,
.tqp-eop.is-empty {
    display: none !important;
}


/* =========================================================
   18. TABLET Y MÓVIL
   ========================================================= */

@media (max-width: 768px) {
    .tqp-eop {
        --tqp-eop-tab-width: 42px;
        --tqp-eop-tab-height: 105px;
        --tqp-eop-panel-width: 365px;
        --tqp-eop-panel-height: 520px;
        --tqp-eop-title-column: 82px;

        top: auto;
        bottom: calc(80px + var(--tqp-eop-mobile-stack-offset));
    }

    /* Pestaña en tablet/móvil.
       Sigue alineada con la parte superior del panel. */
    .tqp-eop__tab {
        top: calc(50% - min(260px, 35vh));

        padding: 10px 6px;
        font-size: 13px;
    }

    /* Cabecera del panel en tablet/móvil. */
    .tqp-eop__panel-head {
        flex-basis: 74px;
        height: 74px;
        padding: 13px 48px 7px 13px;
    }

    /* Título en tablet/móvil. */
    .tqp-eop__title {
        width: 245px;
        max-width: calc(var(--tqp-eop-open-width) - 64px);

        font-size: 21px;
        line-height: 0.98;
        letter-spacing: -0.3px;
    }

    /* Botón cerrar en tablet/móvil. */
    .tqp-eop__close {
        top: 11px;
        right: 12px;

        width: 28px;
        height: 28px;

        font-size: 25px;
    }

    /* Navegación en tablet/móvil. */
    .tqp-eop__nav {
        padding:
            0
            8px
            12px
            calc(var(--tqp-eop-title-column) + 12px);
    }

    /* Texto de enlaces en tablet/móvil. */
    .tqp-eop__link {
        padding-top: 5px;
        padding-bottom: 5px;
        font-size: 13px;
        line-height: 1.48;
    }
}


/* =========================================================
   19. MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 480px) {
    .tqp-eop {
        --tqp-eop-panel-width: calc(100vw - 42px);
        --tqp-eop-panel-height: 500px;
        --tqp-eop-title-column: 72px;
    }

    /* Pestaña alineada con el borde superior del panel pequeño. */
    .tqp-eop__tab {
        top: calc(50% - min(250px, 35vh));
    }

    /* Cabecera más compacta. */
    .tqp-eop__panel-head {
        flex-basis: 68px;
        height: 68px;
        padding: 12px 44px 6px 11px;
    }

    /* Título más compacto. */
    .tqp-eop__title {
        width: 215px;
        max-width: calc(var(--tqp-eop-open-width) - 58px);

        font-size: 19px;
        letter-spacing: -0.2px;
    }

    /* Navegación más compacta. */
    .tqp-eop__nav {
        padding:
            0
            7px
            11px
            calc(var(--tqp-eop-title-column) + 10px);
    }

    /* Enlaces más compactos. */
    .tqp-eop__link {
        font-size: 12.5px;
    }
}


/* =========================================================
   20. ACCESIBILIDAD: REDUCIR MOVIMIENTO
   Respeta la preferencia del sistema del visitante.
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .tqp-eop__panel,
    .tqp-eop__tab,
    .tqp-eop__link,
    .tqp-eop__close {
        transition: none !important;
    }

    .tqp-eop__link:hover,
    .tqp-eop__link:focus-visible,
    .tqp-eop__close:hover,
    .tqp-eop__close:focus-visible {
        transform: none;
    }
}

/* =========================================================
   21. DISEÑO MÓVIL - ÍNDICE NO INTRUSIVO
   En móvil la pestaña pasa a la zona inferior para no
   bloquear títulos, párrafos ni el área principal de lectura.
   ========================================================= */

@media (max-width: 768px) {

    /* =====================================================
       CONTENEDOR GENERAL
       ===================================================== */

    .tqp-eop {
        position: fixed;

        top: auto !important;
        bottom: 18px;

        width: auto;
        max-width: none;

        transform: none !important;

        display: flex;
        align-items: flex-end;

        z-index: 999990;
    }


    /* Posición cuando está configurado a la izquierda */

    .tqp-eop--left {
        left: 14px;
        right: auto;
    }


    /* Posición cuando está configurado a la derecha */

    .tqp-eop--right {
        right: 14px;
        left: auto;
    }


    /* =====================================================
       PESTAÑA "ÍNDICE"
       En móvil deja de ser vertical y se convierte
       en un pequeño botón horizontal.
       ===================================================== */

    .tqp-eop__tab {
        position: relative !important;

        top: auto !important;
        left: auto !important;
        right: auto !important;

        width: auto;
        min-width: 82px;
        max-width: none;

        height: 42px;
        min-height: 42px;
        max-height: 42px;

        flex: 0 0 auto;

        margin: 0;

        padding: 0 14px;

        border: 0;

        border-radius: 12px !important;

        background: #1978b8;
        color: #ffffff;

        box-shadow:
            0 5px 16px rgba(0, 0, 0, 0.22);

        font-size: 13px;
        font-weight: 700;
        line-height: 1;

        cursor: pointer;
    }


    /* Texto de la pestaña vuelve a horizontal */

    .tqp-eop__tab span {
        writing-mode: horizontal-tb;

        transform: none;

        white-space: nowrap;

        text-align: center;
    }


    /* =====================================================
       PANEL ABIERTO
       Se comporta como una ventana inferior.
       ===================================================== */

    .tqp-eop__panel,
    .tqp-eop--right .tqp-eop__panel {
        position: fixed;

        left: 10px;
        right: 10px;
        bottom: 70px;

        width: auto;
        max-width: none;

        height: auto;
        max-height: 62vh;

        margin: 0;

        border-radius: 16px;

        overflow: hidden;

        box-shadow:
            0 10px 35px rgba(0, 0, 0, 0.28);

        /*
         * Cerrado:
         * ligeramente desplazado hacia abajo.
         */
        transform: translateY(22px);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition:
            transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
            opacity 220ms ease,
            visibility 220ms ease;
    }


    /* Panel abierto */

    .tqp-eop.is-open .tqp-eop__panel {
        transform: translateY(0);

        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


    /* =====================================================
       ELIMINAMOS LA GRAN COLUMNA LATERAL EN MÓVIL
       En escritorio funciona bien, pero en un teléfono
       consume demasiado ancho.
       ===================================================== */

    .tqp-eop__panel::before {
        display: none;
    }


    /* =====================================================
       CABECERA
       ===================================================== */

    .tqp-eop__panel-head {
        position: relative;

        width: 100%;
        height: auto;

        min-height: 68px;

        padding: 14px 52px 12px 16px;

        box-sizing: border-box;

        background: #e3f1f6;

        pointer-events: auto;
    }


    /* =====================================================
       TÍTULO
       ===================================================== */

    .tqp-eop__title,
    .tqp-eop--right .tqp-eop__title {
        position: static;

        display: block;

        width: auto;
        max-width: 100%;

        margin: 0;

        color: #087daf;

        font-size: 20px;
        font-weight: 800;
        line-height: 1;

        letter-spacing: -0.2px;

        text-align: left;

        pointer-events: none;
    }


    .tqp-eop__title-line {
        display: inline;
    }


    /*
     * Fuerza salto entre:
     *
     * TABLA
     * DE CONTENIDOS
     */

    .tqp-eop__title-line:first-child {
        display: block;
    }


    /* =====================================================
       BOTÓN CERRAR
       ===================================================== */

    .tqp-eop__close,
    .tqp-eop--right .tqp-eop__close {
        position: absolute;

        top: 14px;
        right: 15px;
        left: auto;

        width: 34px;
        height: 34px;

        display: flex;
        align-items: center;
        justify-content: center;

        color: #087daf;

        font-size: 27px;

        background: transparent;

        border: 0;

        cursor: pointer;
    }


    /* =====================================================
       NAVEGACIÓN
       El scroll se produce dentro del índice.
       ===================================================== */

    .tqp-eop__nav {
        width: 100%;

        max-height: calc(62vh - 68px);

        overflow-y: auto;
        overflow-x: hidden;

        background: #4bb0cc;

        overscroll-behavior: contain;

        -webkit-overflow-scrolling: touch;
    }


    /* =====================================================
       LISTA PRINCIPAL
       Ya no necesitamos reservar espacio lateral para
       la columna decorativa de escritorio.
       ===================================================== */

    .tqp-eop__list--root,
    .tqp-eop--right .tqp-eop__list--root {
        min-height: 0;

        margin: 0;

        padding:
            12px
            12px
            18px
            14px;
    }


    /* =====================================================
       LINKS
       Tamaño cómodo para leer y tocar con el dedo.
       ===================================================== */

    .tqp-eop__link,
    .tqp-eop--right .tqp-eop__link {
        padding:
            7px
            8px
            7px
            16px;

        font-size: 13px;
        line-height: 1.4;

        transform-origin: left center;
    }


    /*
     * En móvil reducimos la expansión del hover.
     * En pantallas táctiles casi no se utiliza hover.
     */

    .tqp-eop__link:hover,
    .tqp-eop__link:focus,
    .tqp-eop--right .tqp-eop__link:hover,
    .tqp-eop--right .tqp-eop__link:focus {
        transform: translateX(2px);
    }


    /* =====================================================
       SUBNIVELES H3 / H4
       ===================================================== */

    .tqp-eop__list--nested {
        margin:
            2px
            0
            4px
            7px !important;

        padding-left: 13px !important;
    }


    /* Barra vertical de los subniveles */

    .tqp-eop__list--nested::before {
        left: 2px;

        background: rgba(255, 255, 255, 0.72);
    }


    /* =====================================================
       ELEMENTO ACTIVO
       ===================================================== */

    .tqp-eop__link.is-active,
    .tqp-eop__link[aria-current="location"] {
        background: rgba(255, 255, 255, 0.14);

        border-radius: 4px;
    }
}


/* =========================================================
   22. TELÉFONOS PEQUEÑOS
   Optimización adicional para aproximadamente <= 480 px.
   ========================================================= */

@media (max-width: 480px) {

    /* Botón índice */

    .tqp-eop__tab {
        min-width: 76px;

        height: 40px;
        min-height: 40px;
        max-height: 40px;

        padding: 0 12px;

        font-size: 12px;
    }


    /* Un poco menos de separación con los bordes */

    .tqp-eop--left {
        left: 10px;
    }


    .tqp-eop--right {
        right: 10px;
    }


    /* Panel */

    .tqp-eop__panel,
    .tqp-eop--right .tqp-eop__panel {
        left: 8px;
        right: 8px;

        bottom: 64px;

        max-height: 58vh;

        border-radius: 14px;
    }


    /* Navegación */

    .tqp-eop__nav {
        max-height: calc(58vh - 64px);
    }


    /* Cabecera */

    .tqp-eop__panel-head {
        min-height: 64px;

        padding:
            12px
            48px
            10px
            14px;
    }


    /* Título */

    .tqp-eop__title,
    .tqp-eop--right .tqp-eop__title {
        font-size: 18px;
    }


    /* Lista */

    .tqp-eop__list--root,
    .tqp-eop--right .tqp-eop__list--root {
        padding:
            10px
            10px
            16px
            12px;
    }


    /* Enlaces */

    .tqp-eop__link,
    .tqp-eop--right .tqp-eop__link {
        padding:
            6px
            6px
            6px
            15px;

        font-size: 12.5px;
        line-height: 1.4;
    }
}

/* =========================================================
   23. AJUSTE MÓVIL - PESTAÑA "ÍNDICE" CENTRADA AL ABRIR
   Evita que la pestaña viaje hasta el extremo derecho,
   donde puede superponerse con el botón flotante de WhatsApp.

   Cerrado:
   - Respeta la posición lateral configurada.

   Abierto:
   - La pestaña se desplaza aproximadamente al centro
     horizontal de la pantalla.
   ========================================================= */

@media (max-width: 768px) {

    /* Componente configurado a la IZQUIERDA */
    .tqp-eop--left.is-open .tqp-eop__tab {
        /*
         * 50vw = centro del viewport.
         * 14px = separación izquierda definida para móvil.
         * 50% = mitad del ancho real de la propia pestaña.
         */
        transform: translateX(
            calc(50vw - 14px - 50%)
        ) !important;
    }

    /* Componente configurado a la DERECHA */
    .tqp-eop--right.is-open .tqp-eop__tab {
        /*
         * Mismo comportamiento desde el lateral derecho
         * hacia el centro de la pantalla.
         */
        transform: translateX(
            calc(-50vw + 14px + 50%)
        ) !important;
    }
}


/* =========================================================
   24. AJUSTE EXTRA PARA TELÉFONOS PEQUEÑOS
   En <= 480 px el componente usa 10 px de separación lateral.
   ========================================================= */

@media (max-width: 480px) {

    .tqp-eop--left.is-open .tqp-eop__tab {
        transform: translateX(
            calc(50vw - 10px - 50%)
        ) !important;
    }

    .tqp-eop--right.is-open .tqp-eop__tab {
        transform: translateX(
            calc(-50vw + 10px + 50%)
        ) !important;
    }
}
