/* Promociones – estilos de la página de la oferta y del carrusel de videos. */

/* La ruta es relativa a este archivo (assets/css/), no a la página. */
.promo-banner {
    background: url(../img/banners/Promociones.webp) center center no-repeat;
    background-size: cover;
}

/* Etiqueta amarilla de vigencia; solo se pinta si $promo['vigencia'] no está vacío. */
.promo-vigencia {
    background: var(--bannerTextColor);
    color: var(--primary);
    letter-spacing: .1em;
}

.promo-titulo {
    color: var(--primary);
}

.promo-texto {
    color: var(--gray);
}

/* Antetítulo de sección ("Más del canal"). */
.promo-antetitulo {
    color: var(--secondary);
    letter-spacing: .1em;
}

.promo-beneficio {
    color: var(--primary_ligth);
}

/* Marco 9:16 para la utilidad .ratio de Bootstrap: el canal sube Shorts.
   Si algún día suben horizontal, cambiar a ratio-16x9 en el HTML. */
.ratio-9x16 {
    --bs-aspect-ratio: 177.78%;
}

/* Riel: scroll horizontal nativo con snap. Los botones solo lo empujan. */
.gst-riel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    /* ponytail: "proximity" y no "mandatory" — con mandatory el navegador rebota al primer punto y anula el scrollBy de las flechas */
    scroll-snap-type: x proximity;
    /* El suavizado va en el scrollBy() de las flechas, no aquí: en CSS también afecta al scroll táctil y a los anclajes. */
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: .25rem;
}

.gst-riel::-webkit-scrollbar {
    display: none;
}

.gst-riel:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.gst-video {
    flex: 0 0 118px;
    scroll-snap-align: start;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.gst-video span {
    color: var(--gray);
}

.gst-video img {
    object-fit: cover;
    transition: transform .3s, opacity .3s;
    opacity: .85;
}

.gst-video:hover img,
.gst-video:focus-visible img {
    transform: scale(1.06);
    opacity: 1;
}

.gst-video.activo img {
    opacity: 1;
}

.gst-video.activo .ratio {
    outline: 3px solid #ff0000;
    outline-offset: 2px;
}

.gst-video:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Flechas: fuera del riel para no tapar miniaturas en pantallas anchas. */
.gst-carrusel {
    padding: 0 34px;
}

.gst-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid #dcdfe3;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(18, 19, 52, .12);
    transition: background .2s, color .2s, opacity .2s;
    z-index: 2;
}

.gst-nav:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
}

.gst-nav:disabled {
    opacity: .3;
    cursor: default;
}

.gst-nav-prev {
    left: 0;
}

.gst-nav-next {
    right: 0;
}

.gst-carrusel.sin-scroll {
    padding: 0;
}

.gst-carrusel.sin-scroll .gst-nav {
    display: none;
}

/* En táctil se desliza con el dedo: las flechas solo quitarían 68 px de riel
   y como botones de 38 px se quedan cortas para el pulgar. */
@media (max-width: 767.98px) {
    .gst-carrusel {
        padding: 0;
    }

    .gst-nav {
        display: none;
    }
}

/* ── Celular: marco del iPhone de GST Kanban con contenido real debajo ── */

/* La pantalla ocupa el hueco transparente de iphone.png (380×750: x 29–349, y 31–721).
   El marco va encima con pointer-events: none, así el iframe de abajo recibe clics y scroll. */
.gst-cel {
    position: relative;
    max-width: 300px;
    margin-inline: auto;
    /* El navbar es sticky (~71 px): sin esto, al elegir un video en móvil tapa la parte de arriba del reproductor. */
    scroll-margin-top: 5rem;
}

.gst-cel-marco {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 1.5rem 1.5rem rgba(18, 19, 52, .35));
}

.gst-cel-pantalla {
    position: absolute;
    z-index: 1;
    top: 4.13%;
    left: 7.63%;
    width: 84.47%;
    height: 92.13%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 9% / 4.4%;
    background: #000;
}

/* Barra de estado: la hora y los íconos quedan a los lados del notch. */
.gst-cel-barra {
    flex: 0 0 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 9% 0 11%;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.gst-cel-apps {
    position: relative;
    flex: 1;
    min-height: 0;
}

.gst-cel-apps > iframe,
.gst-app {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Síguenos: pestañas por red + celular con la red elegida (offers.php #siguenos + promociones.js) ── */

/* Color de marca por red: lo usan la sección, la pestaña y el enlace de esa red.
   Todos pasan AA con texto blanco; el rojo (#FF0000) y el verde (#25D366) oficiales no. */
.gst-siguenos[data-red="facebook"],
.gst-siguenos [data-red="facebook"] {
    --marca: #0866ff;
}

.gst-siguenos[data-red="youtube"],
.gst-siguenos [data-red="youtube"] {
    --marca: #e00000;
}

.gst-siguenos[data-red="whatsapp"],
.gst-siguenos [data-red="whatsapp"] {
    --marca: #075e54;
}

/* Un poco oscurecido para que el celular y las pestañas blancas destaquen. */
.gst-siguenos {
    background-color: var(--marca);
    background-color: color-mix(in srgb, var(--marca) 78%, #000);
    transition: background-color .45s ease;
}

.gst-redes-tabs {
    display: grid;
    gap: .75rem;
    max-width: 26rem;
}

/* Pestaña sin elegir: cristal sobre el color. Elegida: tarjeta blanca con el logo en su color. */
.gst-red-tab {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    padding: .8rem 1rem;
    border: 0;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-align: left;
    transition: background-color .25s, color .25s, box-shadow .25s;
}

.gst-red-tab:hover {
    background: rgba(255, 255, 255, .22);
}

.gst-red-tab-logo {
    flex: 0 0 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--marca);
    font-size: 1.35rem;
    transition: background-color .25s, color .25s;
}

.gst-red-tab-texto {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.gst-red-tab-texto small {
    font-size: .85rem;
}

.gst-red-tab[aria-selected="true"] {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .25);
}

.gst-red-tab[aria-selected="true"] .gst-red-tab-logo {
    background: var(--marca);
    color: #fff;
}

.gst-red-tab[aria-selected="true"] small {
    color: var(--gray);
}

.gst-red-tab:focus-visible,
.gst-red-enlace:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.gst-red-enlace {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.5rem;
    padding: .7rem 1.4rem;
    border-radius: 50rem;
    background: #fff;
    color: var(--marca);
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.gst-red-enlace:hover,
.gst-red-enlace:focus {
    color: var(--marca);
}

.gst-red-enlace:hover {
    transform: translateY(-2px);
    box-shadow: 0 .6rem 1.2rem rgba(0, 0, 0, .25);
}

/* Celular de Síguenos: la barra de estado toma el color de la app que está en pantalla. */
.gst-cel[data-app] .gst-cel-pantalla,
.gst-cel[data-app] .gst-cel-barra {
    background: #fff;
    color: #0f0f0f;
}

.gst-cel[data-app="whatsapp"] .gst-cel-barra {
    background: #008069;
    color: #fff;
}

.gst-app {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    background: #fff;
    color: #0f0f0f;
    font-size: 13px;
    line-height: 1.35;
}

.gst-app::-webkit-scrollbar {
    display: none;
}

.gst-app small {
    display: block;
    font-size: 11px;
}

.gst-app a:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: -3px;
}

/* Facebook: el plugin trae su propio scroll; el respaldo solo se ve si el SDK no llega a pintar. */
.gst-app-fb {
    overflow: hidden;
}

/* El SDK exige que el blockquote solo tenga la clase fb-xfbml-parse-ignore: se estiliza por posición. */
.gst-app-fb blockquote {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1.5rem;
    text-align: center;
    color: #65676b;
}

.gst-app-fb blockquote .bi {
    font-size: 4rem;
    line-height: 1;
    color: #0866ff;
}

.gst-app-fb blockquote a {
    color: #0866ff;
    font-weight: 700;
    font-size: 15px;
}

/* YouTube: vista de canal armada con el feed. */
.gst-yt-top {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .5rem .75rem;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.gst-yt-top .bi {
    color: #f00;
    font-size: 20px;
    line-height: 1;
}

.gst-yt-canal {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .4rem .75rem;
}

.gst-yt-avatar {
    width: 52px;
    height: 52px;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
}

.gst-yt-canal strong {
    font-size: 15px;
}

.gst-yt-canal small {
    color: #606060;
}

.gst-yt-suscribir {
    margin: .4rem .75rem .6rem;
    padding: .45rem;
    border-radius: 50rem;
    background: #0f0f0f;
    color: #fff;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
}

.gst-yt-suscribir:hover,
.gst-yt-suscribir:focus {
    background: #272727;
    color: #fff;
}

.gst-yt-pestanas {
    display: flex;
    gap: 1rem;
    padding: 0 .75rem;
    border-bottom: 1px solid #e5e5e5;
    color: #606060;
    font-weight: 600;
}

.gst-yt-pestanas span {
    padding: .45rem 0;
}

.gst-yt-pestanas .activa {
    color: #0f0f0f;
    box-shadow: inset 0 -2px #0f0f0f;
}

.gst-yt-shorts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding-top: 2px;
}

.gst-yt-shorts a {
    position: relative;
    display: block;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #000;
    color: #fff;
    text-decoration: none;
}

.gst-yt-shorts img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gst-yt-shorts span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding: 0 .4rem .4rem;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

.gst-yt-shorts a::after {
    content: "";
    position: absolute;
    inset: 55% 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}

/* WhatsApp: chat simulado. */
.gst-app-wa {
    background: #efeae2;
    color: #111b21;
}

.gst-wa-cabecera {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .6rem;
    background: #008069;
    color: #fff;
    line-height: 1.2;
}

.gst-wa-cabecera .bi {
    font-size: 15px;
}

.gst-wa-cabecera strong {
    font-size: 14px;
}

.gst-wa-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
}

.gst-wa-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding: .75rem .6rem;
}

.gst-wa-fecha {
    align-self: center;
    padding: .15rem .6rem;
    border-radius: .5rem;
    background: #fff;
    color: #54656f;
    font-size: 11px;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}

.gst-wa-msj,
.gst-wa-escribiendo {
    margin: 0;
    border-radius: 0 .5rem .5rem;
    background: #fff;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}

.gst-wa-msj {
    max-width: 88%;
    padding: .35rem .5rem .3rem;
}

.gst-wa-msj time {
    float: right;
    margin: .4rem 0 0 .6rem;
    color: #667781;
    font-size: 10px;
    line-height: 1;
}

.gst-wa-escribiendo {
    display: flex;
    gap: 3px;
    overflow: hidden;
    padding: .55rem .65rem;
}

.gst-wa-escribiendo span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8696a0;
    animation: gst-punto 1s infinite;
}

.gst-wa-escribiendo span:nth-child(2) {
    animation-delay: .15s;
}

.gst-wa-escribiendo span:nth-child(3) {
    animation-delay: .3s;
}

.gst-wa-opciones {
    align-self: stretch;
    display: grid;
    gap: .35rem;
    margin-top: .25rem;
}

.gst-wa-opciones a {
    padding: .45rem .6rem;
    border-radius: .5rem;
    background: #fff;
    color: #008069;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}

.gst-wa-opciones a:hover {
    background: #f5f6f6;
}

.gst-wa-escribir {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .5rem;
    text-decoration: none;
}

.gst-wa-escribir span {
    flex: 1;
    padding: .5rem .8rem;
    border-radius: 50rem;
    background: #fff;
    color: #667781;
}

.gst-wa-escribir i {
    flex: 0 0 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #00a884;
    color: #fff;
}

/* Al mostrarse el panel (deja de estar hidden) las animaciones arrancan de nuevo:
   "escribiendo…" 1.4 s, luego llegan los mensajes y las respuestas rápidas. */
.gst-wa-escribiendo {
    animation: gst-escribe 1.4s ease both;
}

.gst-wa-msj {
    animation: gst-llega .3s ease-out 1.4s both;
}

.gst-wa-msj + .gst-wa-msj {
    animation-delay: 2s;
}

.gst-wa-opciones {
    animation: gst-llega .3s ease-out 2.6s both;
}

@keyframes gst-escribe {
    0% {
        opacity: 0;
    }

    15%,
    85% {
        opacity: 1;
        max-height: 2rem;
    }

    100% {
        opacity: 0;
        max-height: 0;
        margin-top: -.35rem;
        padding-block: 0;
    }
}

@keyframes gst-llega {
    from {
        opacity: 0;
        transform: translateY(.5rem) scale(.96);
    }
}

@keyframes gst-punto {
    30% {
        transform: translateY(-3px);
        opacity: 1;
    }

    0%,
    60%,
    100% {
        opacity: .5;
    }
}

/* En móvil el celular va debajo de las pestañas; un poco más chico para que quepa entero. */
@media (max-width: 767.98px) {
    .gst-siguenos .gst-cel {
        max-width: 270px;
    }

    .gst-redes-tabs {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gst-siguenos,
    .gst-red-tab,
    .gst-red-tab-logo,
    .gst-red-enlace {
        transition: none;
    }

    .gst-wa-escribiendo {
        display: none;
    }

    .gst-wa-msj,
    .gst-wa-opciones,
    .gst-wa-escribiendo span {
        animation: none;
    }
}
