/* =========================================================
   UGO · Home v3 — carruseles horizontales, bandas de color,
   barra de categorías. Se carga DESPUÉS de home.css.
   ========================================================= */
:root { --hv3-gap: 16px; --hv3-alt: #F8FAFC; --hv3-linea: #EEF2F6; }

/* ---------- Bandas (fondos alternados + aire vertical) ---------- */
.hv3-banda { background: #fff; padding: 56px 0; }
.hv3-banda--alt { background: var(--hv3-alt); border-block: 1px solid var(--hv3-linea); }
.hv3-banda[hidden] { display: none; }
.hv3-banda > .seccion { padding-block: 0; }
.hv3-banda .seccion__encabezado { margin-bottom: 24px; align-items: flex-end; }
.hv3-banda .seccion__titulo { margin-bottom: 2px; }
.hv3-banda--video { padding: 20px 0 26px; }
.hv3-banda--video > .seccion { padding-block: 0; }
@media (max-width: 767px) {
  .hv3-banda { padding: 36px 0; }
  .hv3-banda--video { padding: 16px 0 20px; }
  .hv3-banda .seccion__encabezado { margin-bottom: 16px; }
}

/* ---------- Barra de categorías (pills) ---------- */
.hv3-pills { background: #fff; border-bottom: 1px solid var(--hv3-linea); }
.hv3-pills__fila {
  display: flex; gap: 10px; align-items: center;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 14px 2px;
}
.hv3-pills__fila::-webkit-scrollbar { display: none; }
.hv3-pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid #E2E8F0; background: #fff; color: #334155;
  font-weight: 600; font-size: .9rem; line-height: 1; font-family: inherit; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.hv3-pill:hover { border-color: var(--color-primario, #FF6B00); color: var(--color-primario, #FF6B00); }
.hv3-pill:focus-visible { outline: 2px solid var(--color-primario, #FF6B00); outline-offset: 2px; }
.hv3-pill[aria-pressed="true"] { background: var(--color-primario, #FF6B00); border-color: var(--color-primario, #FF6B00); color: #fff; }

/* ---------- Carrusel horizontal con scroll-snap ---------- */
.hv3-carrusel { position: relative; }
.hv3-pista {
  display: flex; gap: var(--hv3-gap);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 0 18px; margin: -6px 0 -18px;   /* aire para sombra/hover sin empujar el layout */
}
.hv3-pista::-webkit-scrollbar { display: none; }
.hv3-item { flex: 0 0 calc((100% - 3 * var(--hv3-gap)) / 4); scroll-snap-align: start; min-width: 0; }
@media (max-width: 1023px) { .hv3-item { flex-basis: calc((100% - 2 * var(--hv3-gap)) / 3); } }
@media (max-width: 767px)  { .hv3-item { flex-basis: calc((100% - var(--hv3-gap)) / 2.2); } }
@media (max-width: 519px)  { .hv3-item { flex-basis: calc(100% / 1.4 - var(--hv3-gap)); } .hv3-pista { --hv3-gap: 12px; } }

/* variante de 3 tarjetas (noticias) */
.hv3-carrusel--3 .hv3-item { flex-basis: calc((100% - 2 * var(--hv3-gap)) / 3); }
@media (max-width: 1023px) { .hv3-carrusel--3 .hv3-item { flex-basis: calc((100% - var(--hv3-gap)) / 2); } }
@media (max-width: 767px)  { .hv3-carrusel--3 .hv3-item { flex-basis: 86%; } }
.hv3-carrusel .tarjeta-noticia { height: 100%; }

/* Flechas discretas (solo escritorio con mouse) */
.hv3-flecha {
  position: absolute; top: calc(50% - 12px); transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
  display: none; align-items: center; justify-content: center;
  background: #fff; color: #0F172A; border: 1px solid #E2E8F0; cursor: pointer;
  box-shadow: 0 6px 18px rgba(15,23,42,.16);
  opacity: 0; transition: opacity .2s, transform .2s, background .2s;
}
.hv3-flecha svg { width: 20px; height: 20px; }
.hv3-flecha--prev { left: -14px; }
.hv3-flecha--next { right: -14px; }
.hv3-flecha:hover { background: #F8FAFC; transform: translateY(-50%) scale(1.06); }
.hv3-flecha:focus-visible { opacity: 1; outline: 2px solid var(--color-primario, #FF6B00); outline-offset: 2px; }
@media (hover: hover) and (min-width: 768px) {
  .hv3-flecha { display: flex; }
  .hv3-carrusel:hover .hv3-flecha, .hv3-carrusel:focus-within .hv3-flecha { opacity: 1; }
}
.hv3-flecha[disabled] { opacity: 0 !important; pointer-events: none; }
.hv3-carrusel--sin-scroll .hv3-flecha { display: none; }

@media (prefers-reduced-motion: reduce) { .hv3-pista { scroll-behavior: auto; } }

/* ---------- Eventos: el flyer se ve COMPLETO (antes se recortaba) ---------- */
.ev-home__media { aspect-ratio: 4 / 5; }
.ev-home__media::before {
  content: ""; position: absolute; inset: -20px; z-index: 0;
  background: var(--ev-img) center / cover no-repeat; filter: blur(22px) brightness(.7); transform: scale(1.1);
}
.ev-home__media img { position: relative; z-index: 1; object-fit: contain; }
.ev-home__card:hover .ev-home__media img { transform: scale(1.02); }
.ev-home__velo { z-index: 2; background: linear-gradient(to bottom, rgba(15,23,42,.22) 0%, rgba(15,23,42,0) 16%); }
.ev-home__fecha, .ev-home__agotado { z-index: 3; }
@media (min-width: 768px) { .ev-home__grid { grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); } }
