/* =====================================================================
 * CARRUSEL ANIMADO DE LA PORTADA (prefijo hs-)
 * Fotos con zoom lento ("Ken Burns"), fundido entre diapositivas y
 * textos que entran palabra por palabra. El comportamiento está en
 * js/hero-slider.js y las diapositivas se cargan en index.php ($hsSlides).
 * ===================================================================== */

.hs { position: relative; height: clamp(520px, 80vh, 780px); overflow: hidden; background: #062f55; color: #fff; outline: none; }
.hs-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.4s ease, visibility 0s linear 1.4s; }
.hs-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.4s ease, visibility 0s; z-index: 1; }

/* Foto con movimiento lento */
.hs-img { position: absolute; inset: -2%; background-size: cover; background-position: center; will-change: transform; }
.hs-slide.is-active .hs-img { animation: var(--hs-mov) var(--hs-dur) linear forwards; }
.hs.is-paused .hs-img { animation-play-state: paused; }
@keyframes zoom-in-der { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.16) translate(-2.5%, -1.5%); } }
@keyframes zoom-in-izq { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.16) translate(2.5%, -1.5%); } }
@keyframes zoom-out    { from { transform: scale(1.18) translate(-1.5%, 1%); } to { transform: scale(1.03) translate(0, 0); } }
@keyframes pan-der     { from { transform: scale(1.12) translate(3%, 0); } to { transform: scale(1.12) translate(-3%, 0); } }

/* Degradado institucional para que el texto se lea siempre */
.hs-slide::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(6,47,85,.92) 0%, rgba(6,47,85,.78) 35%, rgba(6,47,85,.45) 62%, rgba(6,47,85,.15) 100%),
        linear-gradient(0deg, rgba(6,47,85,.75) 0%, rgba(6,47,85,0) 35%);
}

/* Textos */
.hs-texto { position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; }
.hs-texto .container { position: relative; }
.hs-eyebrow, .hs-sub, .hs-botones { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.hs-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ff851b; margin-bottom: 16px; }
.hs-eyebrow::before { content: ""; width: 34px; height: 2px; background: #ff851b; }
.hs-titulo { font-size: clamp(36px, 5.6vw, 76px); font-weight: 800; line-height: 1.03; color: #fff; margin: 0 0 18px; max-width: 900px; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.hs-titulo .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.hs-titulo .w > span { display: inline-block; transform: translateY(110%); transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.hs-sub { font-size: clamp(17px, 2vw, 26px); font-weight: 600; color: #dbe6f2; max-width: 680px; margin: 0 0 30px; }
.hs-botones { display: flex; flex-wrap: wrap; gap: 12px; }
.hs-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; transition: background-color .2s, color .2s, transform .2s; }
.hs-btn:hover { text-decoration: none; transform: translateY(-2px); }
.hs-btn--primario { background: #ff851b; color: #fff; }
.hs-btn--primario:hover { background: #fff; color: #062f55; }
.hs-btn--secundario { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(4px); }
.hs-btn--secundario:hover { background: #fff; color: #062f55; }

/* Entrada escalonada cuando la diapositiva está activa */
.hs-slide.is-active .hs-eyebrow  { opacity: 1; transform: none; transition-delay: .35s; }
.hs-slide.is-active .hs-titulo .w > span { transform: none; }
.hs-slide.is-active .hs-sub      { opacity: 1; transform: none; transition-delay: 1s; }
.hs-slide.is-active .hs-botones  { opacity: 1; transform: none; transition-delay: 1.25s; }

/* Controles */
.hs-ui { position: absolute; z-index: 3; left: 0; right: 0; bottom: 34px; }
.hs-ui .container { display: flex; align-items: center; gap: 24px; }
.hs-contador { font-weight: 800; font-size: 14px; letter-spacing: .08em; color: #fff; min-width: 70px; }
.hs-contador span { color: rgba(255,255,255,.5); }
.hs-dots { display: flex; gap: 10px; flex: 1; max-width: 420px; }
.hs-dot { flex: 1; height: 4px; border: 0; padding: 0; border-radius: 4px; background: rgba(255,255,255,.25); cursor: pointer; position: relative; overflow: hidden; }
.hs-dot i { position: absolute; inset: 0; width: 0; background: #ff851b; border-radius: 4px; }
.hs-dot.is-done i { width: 100%; background: rgba(255,255,255,.7); }
.hs-flechas { display: flex; gap: 8px; margin-left: auto; }
.hs-flecha, .hs-pausa { padding: 0; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.hs-flecha { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 16px; transition: background-color .2s, border-color .2s; }
.hs-flecha:hover { background: #ff851b; border-color: #ff851b; }
.hs-pausa { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; cursor: pointer; }
.hs-pausa:hover { border-color: #ff851b; color: #ff851b; }

/* Redes con sus colores oficiales, para que se distingan sobre cualquier foto */
.hs-redes { position: absolute; z-index: 3; right: 34px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; }
.hs-redes a { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px;
    border: 2px solid rgba(255,255,255,.85); box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s; }
.hs-redes a:hover { transform: scale(1.12); box-shadow: 0 10px 24px rgba(0,0,0,.45); color: #fff; }
.hs-red--facebook  { background: #1877f2; }
.hs-red--youtube   { background: #ff0000; }
.hs-red--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }

@media (max-width: 767px) {
    .hs { height: 600px; }
    .hs-slide::after { background: linear-gradient(0deg, rgba(6,47,85,.95) 0%, rgba(6,47,85,.7) 55%, rgba(6,47,85,.45) 100%); }
    .hs-texto { align-items: flex-end; padding-bottom: 110px; }
    .hs-redes { display: none; }
    .hs-flechas { display: none; }
    .hs-ui { bottom: 26px; }
}

/* Si la persona pidió "reducir movimiento" en su sistema: sin zoom y entradas suaves */
@media (prefers-reduced-motion: reduce) {
    .hs-slide.is-active .hs-img { animation: none; transform: scale(1.04); }
    .hs-titulo .w > span { transform: none !important; }
    .hs-eyebrow, .hs-sub, .hs-botones { transform: none !important; }
}
