/* =========================================================
   GAMMA XG · Guías: fila "Guías" del pie de página como cápsula de cristal
   líquido estilo iOS (opciones juntas + burbuja que se desliza con rebote).
   La cabecera y el resto del pie mantienen su diseño original.
   ========================================================= */
.gxp footer nav[aria-label] { gap: 12px !important; }
.gxp footer nav[aria-label] > span {
    flex-basis: 100%;
    font-size: .68rem !important; font-weight: 600 !important; letter-spacing: .2em; text-transform: uppercase;
    color: #3b82f6 !important; margin-bottom: 2px;
}

/* ---------- Cápsula ---------- */
.gx-seg {
    position: relative; isolation: isolate;
    display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
    padding: 5px; border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .085) 0%, rgba(255, 255, 255, .02) 50%, rgba(255, 255, 255, .05) 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .2),
        inset 0 -1px 0 rgba(255, 255, 255, .04),
        inset 0 0 24px rgba(255, 255, 255, .025),
        0 20px 44px -24px rgba(0, 0, 0, .95);
    touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.gx-seg.is-grid {
    display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
    width: 100%; border-radius: 22px; gap: 3px;
}
.gx-seg > a {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    min-height: 38px; padding: 0 15px; border-radius: 999px;
    font-size: .8rem !important; font-weight: 500; letter-spacing: .005em; line-height: 1.2;
    color: #94a3b8 !important; text-decoration: none; white-space: nowrap; text-align: center;
    transition: color .35s ease, transform .35s cubic-bezier(.34, 1.5, .5, 1);
    -webkit-tap-highlight-color: transparent; -webkit-user-drag: none;
}
.gx-seg.is-grid > a { min-height: 44px; padding: 4px 10px; white-space: normal; border-radius: 17px; }
.gx-seg > a[aria-current] { color: #e2e8f0 !important; }
.gx-seg > a.is-hot { color: #fff !important; }
.gx-seg > a:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

/* ---------- Burbuja que se desliza ---------- */
.gx-seg-pill {
    position: absolute; z-index: 0; left: 0; top: 0;
    width: var(--w, 0); height: var(--h, 0);
    transform: translate3d(var(--x, 0), var(--y, 0), 0);
    transition:
        transform .62s cubic-bezier(.34, 1.36, .5, 1),
        width .62s cubic-bezier(.34, 1.36, .5, 1),
        height .5s cubic-bezier(.34, 1.36, .5, 1),
        opacity .3s ease;
    pointer-events: none;
}
.gx-seg-pill.sin-anim { transition: none; }
.gx-seg-pill > i {
    position: absolute; inset: 0; display: block; border-radius: 999px; overflow: hidden;
    background: linear-gradient(135deg, rgba(59, 130, 246, .36) 0%, rgba(59, 130, 246, .13) 50%, rgba(59, 130, 246, .27) 100%);
    border: 1px solid rgba(59, 130, 246, .5);
    -webkit-backdrop-filter: blur(6px) saturate(200%) brightness(1.15); backdrop-filter: blur(6px) saturate(200%) brightness(1.15);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .38),
        inset 0 -6px 14px rgba(59, 130, 246, .2),
        inset 0 0 18px rgba(255, 255, 255, .06),
        0 8px 26px -8px rgba(59, 130, 246, .75);
    transition: transform .4s cubic-bezier(.34, 1.6, .5, 1), background .3s ease, box-shadow .3s ease;
}
.gx-seg.is-grid .gx-seg-pill > i { border-radius: 17px; }
/* reflejo superior (cristal) */
.gx-seg-pill > i::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 55%;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 70%, rgba(255, 255, 255, 0));
}
/* hover sutil (la burbuja NO se mueve: se queda en la guía actual) */
@media (hover: hover) {
    .gx-seg:not(.is-drag):not(.is-yendo) > a:not([aria-current]):hover { color: #e2e8f0 !important; background: rgba(255, 255, 255, .055); }
}
.gx-seg > a { transition: color .35s ease, background .35s ease; }
.gx-seg:has(> a.is-hot) > a[aria-current]:not(.is-hot) { color: #94a3b8 !important; }
.gx-seg.is-drag, .gx-seg.is-drag > a { cursor: grabbing; }

/* presionar sobre la burbuja: crece como una lupa de cristal */
.gx-seg-pill.is-press > i,
.gx-seg-pill.is-drag > i,
.gx-seg-pill.is-viaje > i {
    transform: scale(1.1, 1.18);
    background: linear-gradient(135deg, rgba(59, 130, 246, .42) 0%, rgba(59, 130, 246, .2) 50%, rgba(59, 130, 246, .34) 100%);
    border-color: rgba(59, 130, 246, .7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .55),
        inset 0 -8px 16px rgba(59, 130, 246, .22),
        inset 0 0 24px rgba(255, 255, 255, .14),
        0 16px 38px -8px rgba(59, 130, 246, .9),
        0 0 0 1px rgba(59, 130, 246, .15);
}
/* arrastrando: la burbuja va pegada al cursor o al dedo */
.gx-seg.is-drag .gx-seg-pill { transition: opacity .3s ease; will-change: transform, width, height; }
/* en el arrastre se quita el desenfoque propio de la burbuja: movimiento fluido en celulares */
.gx-seg.is-drag .gx-seg-pill > i { -webkit-backdrop-filter: none; backdrop-filter: none; transition: transform .3s cubic-bezier(.34, 1.5, .5, 1); }
/* tomar la burbuja con el dedo la arrastra (sin mover la página); el resto deja desplazar */
.gx-seg > a[aria-current] { touch-action: none; }
.gx-seg > a { -webkit-touch-callout: none; }
/* viaje hacia la guía elegida: se estira en el camino */
.gx-seg-pill.is-viaje {
    transition: transform .5s cubic-bezier(.3, 1.22, .42, 1), width .5s cubic-bezier(.3, 1.22, .42, 1), height .5s ease;
}
.gx-seg-pill.is-viaje > i { animation: gxViaje .5s cubic-bezier(.3, 1, .4, 1) forwards; }
@keyframes gxViaje {
    0% { transform: scale(1.1, 1.18); }
    35% { transform: scale(1.26, 1.06); }
    100% { transform: scale(1.12, 1.18); }
}
/* aterrizaje: rebote elegante + onda de luz */
.gx-seg-pill.is-land > i, .gx-seg-pill.is-back > i { animation: gxLand .55s cubic-bezier(.22, 1, .36, 1); }
@keyframes gxLand {
    0% { transform: scale(1.12, 1.18); }
    32% { transform: scale(.93, 1.04); }
    58% { transform: scale(1.04, .97); }
    80% { transform: scale(.99, 1.01); }
    100% { transform: scale(1, 1); }
}
.gx-seg-pill::after {
    content: ""; position: absolute; inset: 0; border-radius: 999px; pointer-events: none;
    border: 1px solid rgba(59, 130, 246, .8); opacity: 0;
}
.gx-seg.is-grid .gx-seg-pill::after { border-radius: 17px; }
.gx-seg-pill.is-land::after { animation: gxOnda .7s cubic-bezier(.22, 1, .36, 1) .05s; }
@keyframes gxOnda {
    0% { opacity: .9; transform: scale(1); box-shadow: 0 0 18px rgba(59, 130, 246, .6); }
    100% { opacity: 0; transform: scale(1.18, 1.5); box-shadow: 0 0 0 rgba(59, 130, 246, 0); }
}
.gx-seg.is-yendo > a.is-hot { color: #fff !important; text-shadow: 0 0 14px rgba(59, 130, 246, .6); }

/* celular · modo imán: la burbuja salta con resorte a cada opción y se inclina hacia el dedo */
.gx-seg.is-drag.is-iman .gx-seg-pill {
    transition: transform .46s cubic-bezier(.34, 1.42, .5, 1), width .46s cubic-bezier(.34, 1.42, .5, 1), height .4s cubic-bezier(.34, 1.42, .5, 1), opacity .3s ease;
}
.gx-seg.is-iman .gx-seg-pill.is-drag > i {
    transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(1.1, 1.18);
    transition: transform .25s cubic-bezier(.2, .8, .3, 1);
}
.gx-seg-pill.is-snap::after { animation: gxOnda .5s cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: reduce) {
    .gx-seg-pill, .gx-seg-pill > i, .gx-seg-pill::after, .gx-seg > a { transition: none !important; animation: none !important; }
}
