/* ==========================================================================
   BAHIA DUNAS · TESTIMONIOS (3-dic-2026, Tash)
   Videos verticales tipo historia (9:16) con la marca del sitio: fondo arena,
   rotulo coral, titular DM Serif Display, tarjetas con el radio y la sombra
   de los tokens, boton de reproducir coral. Usa los tokens de bd-secciones.css.
   El movimiento lo lleva assets/js/bd-testimonios.js.
   ========================================================================== */
.testimonios{ background: var(--arena); overflow: hidden; }
.testimonios .rotulo{ color: var(--coral); }
.testimonios .titular{ margin: 0; }
.testi{ margin-top: clamp(2rem, 4vw, 3.2rem); }
.testi__aparador{ position: relative; }
.testi__lista{
  list-style: none; margin: 0; padding: 18px 0 12px;
  display: flex; align-items: flex-start; justify-content: center; gap: clamp(14px, 2vw, 28px);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.testi__lista::-webkit-scrollbar{ display: none; }
/* con mas de tres pasa como aparador: se alinea al inicio y las orillas se desvanecen */
.testi__lista.aparador{
  justify-content: flex-start;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.testi__i{ flex: 0 0 clamp(210px, 22vw, 280px); min-width: 0; }
.testi__video{ margin: 0; }
/* el video y su boton van en un marco propio: el boton queda al centro exacto del video, no de la tarjeta con su pie */
.testi__marco{ position: relative; display: block; }
.testi__video video{
  display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--tinta);
  border-radius: var(--radio); border: 2px solid transparent; box-shadow: var(--sombra); cursor: pointer;
  transition: border-color .3s ease, box-shadow .35s ease, opacity .35s ease;
}
.testi__play{
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 60px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 50%; background: var(--coral); color: #fff; box-shadow: 0 12px 26px rgba(224,109,78,.45);
  transition: transform .25s ease, background-color .25s ease, opacity .25s ease;
}
.testi__play svg{ width: 22px; height: 22px; fill: currentColor; display: block; }
@media (hover: hover){ .testi__video:hover .testi__play{ transform: translate(-50%, -50%) scale(1.08); background: var(--coral-oscuro); } }
.testi__play:focus-visible, .testi__flecha:focus-visible{ outline: 3px solid var(--turquesa-oscuro); outline-offset: 3px; }
.testi__i.suena .testi__play{ opacity: 0; pointer-events: none; }
.testi__i.carga .testi__play{ animation: testiCarga 1s ease-in-out infinite alternate; }
@keyframes testiCarga{ to{ opacity: .4; } }
/* pie: titulo y subtitulo en todos */
.testi__pie{ display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 50px; margin-top: 16px; text-align: center; }
.testi__nombre{ font-family: var(--display); font-weight: 400; font-size: 1.18rem; line-height: 1.2; color: var(--tinta); }
.testi__dato{ font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-suave); }
.testi__flecha{
  display: none; position: absolute; z-index: 2; top: calc(18px + (100% - 96px) / 2); transform: translateY(-50%);
  width: 46px; height: 46px; padding: 0; place-items: center; cursor: pointer;
  border: 1px solid var(--linea); border-radius: 50%; background: var(--papel); color: var(--tinta); box-shadow: var(--sombra);
}
.testi__flecha svg{ width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.testi__flecha--ant{ left: 4px; } .testi__flecha--sig{ right: 4px; }
.testi__aparador:has(.aparador) .testi__flecha{ display: grid; }
@media (hover: hover){ .testi__flecha:hover{ background: var(--coral); color: #fff; border-color: var(--coral); } }
/* entrada uno por uno: fundido suave hacia arriba */
.testi-js .testi__i{ opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 150ms); }
.testi-js .testi__lista.ver .testi__i{ opacity: 1; transform: none; }
.testi-js .testi__lista.hecho .testi__i{ transition: transform .35s cubic-bezier(.2,.7,.2,1); transition-delay: 0s; }
/* el elegido se alza y su filo se pone coral; los demas se atenuan mientras uno suena */
@media (hover: hover){
  .testi-js .testi__lista.hecho .testi__i:hover{ transform: translateY(-10px); }
  .testi__i:hover .testi__video video{ border-color: rgba(224,109,78,.55); }
}
.testi-js .testi__lista.hecho .testi__i:focus-within, .testi-js .testi__lista.hecho .testi__i.suena{ transform: translateY(-10px); }
.testi__i.suena .testi__video video{ border-color: var(--coral); box-shadow: 0 26px 56px rgba(74,43,32,.28); }
.testi__lista:has(.suena) .testi__i:not(.suena) .testi__video video{ opacity: .5; }
/* tableta y celular: fila que se desliza con el dedo */
@media (max-width: 860px){
  .testi__lista{ justify-content: flex-start; }
  .testi__i{ flex-basis: min(60vw, 240px); }
  .testi__aparador:has(.aparador) .testi__flecha{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  .testi__play, .testi__flecha{ transition: none; } .testi__i.carga .testi__play{ animation: none; }
  .testi-js .testi__i{ opacity: 1; transform: none !important; transition: none; }
}
