/* Portada del Home con video (prefijo hp-), desde 2026-11-18.
   PC y tablet (768 px o más): recorrido de 16 s de fondo (videos/web/home-recorrido.mp4).
   Celular (menos de 768 px): tira de 9 sedes que avanza sola.
   Los videos los carga js/home-portada.js solo en el tamaño de pantalla que los usa. */

.hp-hero { background: radial-gradient(110% 80% at 50% 0%, #0a4aa0 0%, #00387d 45%, #00265e 100%); }
.hp-hero .hero-slider__content { z-index: 4; }

/* Nota: espacios reales, escenas recreadas */
.hp-nota {
    position: absolute; right: 18px; bottom: 214px; z-index: 6;
    font-size: 11.5px; color: rgba(255,255,255,0.8); letter-spacing: .01em;
    background: rgba(0,38,94,0.35); padding: 4px 10px; border-radius: 999px;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

/* ---------- PC y tablet: video de fondo ---------- */
.hp-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
    opacity: 0; transition: opacity .8s ease; }
.hp-bg.is-on { opacity: 1; }
.hp-velo { position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,38,94,0.66) 0%, rgba(0,56,125,0.42) 45%, rgba(0,38,94,0.62) 100%); }
.hp-tira { display: none; }

@media (min-width: 768px) {
    /* Imagen fija mientras llega el video (solo se descarga en este tamaño) */
    .hp-hero { background: #00265e url('/videos/web/home-recorrido.webp') center / cover no-repeat; }
}

/* ---------- Celular: tira de sedes ---------- */
@media (max-width: 767px) {
    .hp-bg, .hp-velo { display: none; }
    .hp-hero .hero-slider__content { padding-bottom: 230px; }
    .hp-tira {
        display: block; align-self: stretch; overflow: hidden;
        margin: 20px calc(-1 * var(--spacing-md, 24px)) 0;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
                mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    }
    .hp-tira__pista { display: flex; gap: 12px; width: max-content; padding: 4px 0; animation: hp-tira 45s linear infinite; }
    .hp-card { position: relative; flex: none; width: 220px; aspect-ratio: 16 / 9; margin: 0; border-radius: 16px; overflow: hidden;
        background: #0b2f63; border: 1px solid rgba(255,255,255,0.16); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
    .hp-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
    .hp-card figcaption { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700; color: #fff;
        background: rgba(0,38,94,0.62); padding: 3px 9px; border-radius: 999px; }
    .hp-nota { bottom: 186px; right: 50%; transform: translateX(50%); white-space: nowrap; }
}
@keyframes hp-tira { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
    .hp-tira__pista { animation: none; }
    .hp-bg { transition: none; }
}
