/**
 * Header Slider «escaparate» (22-oct-2026).
 *
 * Escritorio: avanza de una en una; la que entra pasa a grande (≈62 %) y la
 * siguiente se ve pequeña (en bucle, lo mueve js/escaparate.js). Cada tarjeta
 * = panel de texto (azul #1c5e75 sobre una foto de fondo del tema) + imagen
 * de la oferta, con un degradado que funde el panel con la imagen.
 * Móvil: una tarjeta por pantalla, imagen arriba y texto debajo.
 */
.hse {
  --hse-azul: #1c5e75;
  --hse-azul-osc: #0b2a36;
  --hse-alto: 340px;
  --hse-gap: 20px;
  position: relative;
  /* Mismo ancho y márgenes que el slider de siempre (.hs). */
  max-width: 1340px;
  /* El tema sube 100 px lo que va debajo (section.section, pensado para el
     slider de siempre): se compensa para que flechas y puntos tengan su fila. */
  margin: 8px auto 86px;
  padding: 0 22px;
  box-sizing: border-box;
}
@media (max-width: 767px) {
  .hse { padding: 0 16px; margin-bottom: 40px; }
  .hse__nav { max-width: none; }
}

.hse__pista {
  overflow: hidden;
  touch-action: pan-y;
  /* Aire para que la sombra de las cajas no se corte (el overflow del
     carril recorta todo lo que sale de él). */
  padding: 10px 2px 24px;
  margin-bottom: -12px;
}
.hse__fila {
  display: flex;
  gap: var(--hse-gap);
  --hse-curva: cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hse__fila.is-moviendo { transition: transform 0.5s var(--hse-curva); }

/* ---- Tarjeta ---------------------------------------------------------- */
.hse__card {
  position: relative;
  flex: 0 0 calc(38% - var(--hse-gap) / 2);
  display: grid;
  grid-template-columns: 52% 48%;
  height: var(--hse-alto);
  border-radius: 18px;
  overflow: hidden;
  background: var(--hse-azul-osc);
  color: #fff !important;
  text-decoration: none !important;
  cursor: pointer; /* también cuando es <div data-lk> (tarjeta con afiliado) */
  /* Sombra corta y suave: da volumen sin halo grande. */
  box-shadow:
    0 12px 22px -12px rgba(11, 42, 54, 0.45),
    0 3px 8px -3px rgba(11, 42, 54, 0.18);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
/* La de delante: grande. */
.hse__card.is-grande {
  flex-basis: calc(62% - var(--hse-gap) / 2);
  grid-template-columns: 40% 60%;
}
/* Al pasar, la que sale encoge y la que entra crece a la vez que se desliza. */
.hse__fila.is-moviendo .hse__card {
  transition: flex-basis 0.5s var(--hse-curva), grid-template-columns 0.5s var(--hse-curva), transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .hse__card:hover {
    transform: translateY(-3px);
    box-shadow:
      0 16px 26px -12px rgba(11, 42, 54, 0.5),
      0 4px 10px -3px rgba(11, 42, 54, 0.2);
  }
  .hse__card:hover .hse__cta { background: #00c97e; }
}
.hse__card:focus-visible { outline: 3px solid #00e08c; outline-offset: 3px; }

/* ---- Panel de texto --------------------------------------------------- */
.hse__texto {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  padding: 28px 8px 28px 30px;
  background:
    linear-gradient(120deg, rgba(28, 94, 117, 0.9) 0%, rgba(28, 94, 117, 0.68) 55%, rgba(28, 94, 117, 0.45) 100%),
    var(--hse-fondo, none) center / cover no-repeat,
    var(--hse-azul);
}
/* Funde el panel con la imagen (la «sombra» que entra en la foto). */
.hse__texto::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 100%;
  width: 90px;
  background: linear-gradient(90deg, rgba(28, 94, 117, 0.75), rgba(28, 94, 117, 0));
  pointer-events: none;
}

.hse__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Igual que la etiqueta de las cabeceras con fondo (cian inclinada). */
  padding: 4px 16px;
  border-radius: 0;
  background: #04C4F6;
  color: #131313;
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hse .hse__eyebrow .wa-emo { display: inline-flex; color: #131313 !important; font-size: 13px; }
.hse__ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hse__titulo {
  margin: 0 !important;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #fff;
  text-wrap: balance;
}
.hse__card.is-grande .hse__titulo { font-size: 32px; }
.hse__fila.is-moviendo .hse__titulo { transition: font-size 0.5s var(--hse-curva); }
.hse__titulo::before, .hse__titulo::after { content: none !important; }

.hse__sub {
  margin: 0 !important;
  font-size: 16px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

.hse__cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  background: #00e08c;
  color: #131313;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s ease-out;
}
.hse__card:active .hse__cta { transform: scale(0.97); }

/* ---- Imagen ----------------------------------------------------------- */
.hse__img {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--hse-azul);
}
.hse__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hse__img img.hse__logo {
  object-fit: contain;
  padding: 18%;
}

/* ---- Navegación ------------------------------------------------------- */
.hse__nav {
  display: flex;
  align-items: center;
  /* Centrada y ancha: flechas a los lados y la barra de páginas en medio. */
  justify-content: center;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hse__flecha {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d5e3e8;
  background: #fff;
  color: var(--hse-azul);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.hse__flecha:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .hse__flecha:not(:disabled):hover { background: var(--hse-azul); color: #fff; }
}
.hse__flecha:focus-visible { outline: 3px solid #00e08c; outline-offset: 2px; }
.hse__flecha:active { transform: scale(0.97); }

.hse__puntos { display: flex; flex: 1; gap: 8px; }
.hse__punto {
  flex: 1;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #c3d6dd;
  cursor: pointer;
  transition: background-color 0.2s ease-out;
}
.hse__punto.is-activo { background: var(--hse-azul); }
/* Zona táctil mayor sin cambiar el dibujo. */
.hse__punto { position: relative; }
.hse__punto::before { content: ""; position: absolute; inset: -10px -4px; }

/* ---- Tableta: tarjetas algo más bajas --------------------------------- */
@media (max-width: 1100px) {
  .hse { --hse-alto: 300px; }
  .hse__titulo { font-size: 21px; }
  .hse__card.is-grande .hse__titulo { font-size: 26px; }
  .hse__texto { padding: 22px 6px 22px 22px; }
}

/* ---- Móvil: una por pantalla, imagen arriba ---------------------------- */
@media (max-width: 767px) {
  /* En móvil, deslizar nativo: todas iguales. touch-action: el pan-y de
     escritorio/tableta (allí desliza el JS) impedía deslizar con el dedo
     (26-oct-2026). */
  .hse__pista {
    overflow-x: auto;
    touch-action: pan-x pan-y;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 2px 18px;
    margin-bottom: -6px;
  }
  .hse__pista::-webkit-scrollbar { display: none; }
  .hse__fila { gap: 12px; transform: none !important; }
  .hse__card,
  .hse__card.is-grande {
    flex-basis: 86%;
    grid-template-columns: 1fr;
    grid-template-rows: 170px auto;
    height: auto;
    scroll-snap-align: start;
  }
  .hse__img { grid-row: 1; }
  .hse__texto { grid-row: 2; padding: 16px 18px 20px; gap: 8px; }
  .hse__texto::after {
    left: 0; right: 0; top: auto; bottom: 100%;
    width: auto; height: 50px;
    background: linear-gradient(0deg, rgba(25, 86, 108, 0.9), rgba(25, 86, 108, 0));
  }
  .hse__titulo,
  .hse__card.is-grande .hse__titulo { font-size: 22px; }
  .hse__sub { font-size: 14px; }
  .hse__cta { min-height: 42px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hse__pista { scroll-behavior: auto; }
  .hse__card, .hse__punto, .hse__cta,
  .hse__fila.is-moviendo, .hse__fila.is-moviendo .hse__card, .hse__fila.is-moviendo .hse__titulo { transition: none; }
}
.hse__nav[hidden] { display: none; }
