/* Carrusel de testimonios en video.
   Hoja independiente: no depende de las clases del diseño ni las pisa. */

.rv-bloque {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.rv-bloque *,
.rv-bloque *::before,
.rv-bloque *::after {
  box-sizing: border-box;
}

.rv-pista {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 20px 22px;
  scroll-padding: 0 20px;
}
.rv-pista::-webkit-scrollbar {
  display: none;
}
/* Centradas cuando caben; con scroll cuando no. */
.rv-pista > :first-child {
  margin-left: auto;
}
.rv-pista > :last-child {
  margin-right: auto;
}

.rv-tarjeta {
  position: relative;
  flex: 0 0 auto;
  width: min(64vw, 250px);
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  scroll-snap-align: center;
  background: #0f1115;
  border: 2px solid #45f08d;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.rv-poster,
.rv-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  margin: 0;
  max-width: none;
}
.rv-video {
  background: #0f1115;
  z-index: 1;
}

.rv-capa {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  width: 100%;
  padding: 0 16px 18px;
  border: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  color: #fff;
  font: inherit;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.78) 100%
  );
  -webkit-tap-highlight-color: transparent;
}
.rv-tarjeta.rv-sonando .rv-capa {
  display: none;
}

.rv-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #68f6c1, #45f08d);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.rv-play svg {
  width: 24px;
  height: 24px;
  margin-left: 4px;
  display: block;
}
.rv-capa:hover .rv-play,
.rv-capa:focus-visible .rv-play {
  transform: scale(1.08);
}
.rv-capa:focus-visible {
  outline: 3px solid #45f08d;
  outline-offset: -3px;
}

.rv-nombre {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.rv-texto {
  display: block;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* Flechas: solo con ratón y solo si las tarjetas no caben. */
.rv-flecha {
  display: none;
  position: absolute;
  top: calc(50% - 8px);
  z-index: 3;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #111827;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.rv-flecha svg {
  width: 20px;
  height: 20px;
  display: block;
}
.rv-flecha-ant {
  left: 6px;
}
.rv-flecha-sig {
  right: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .rv-bloque.rv-desborda .rv-flecha {
    display: flex;
  }
}

/* Ancho propio, centrado sobre la sección aunque esta sea más estrecha:
   en el móvil va de borde a borde (la tarjeta siguiente asomando invita a
   deslizar) y en escritorio caben las cinco sin flechas.

   Selector reforzado y !important: la página fuerza con !important el
   ancho al 100% de todo lo que hay dentro de sus secciones, con
   selectores de hasta seis atributos. */
[data-rv-bloque].rv-bloque.rv-bloque.rv-bloque.rv-bloque.rv-bloque.rv-bloque {
  --rv-ancho: 100vw;
  width: var(--rv-ancho) !important;
  max-width: none !important;
  flex-shrink: 0;
  align-self: auto;
  margin-left: calc((100% - var(--rv-ancho)) / 2);
  margin-right: calc((100% - var(--rv-ancho)) / 2);
  margin-bottom: 14px;
}
@media (min-width: 768px) {
  [data-rv-bloque].rv-bloque.rv-bloque.rv-bloque.rv-bloque.rv-bloque.rv-bloque {
    --rv-ancho: min(1240px, calc(100vw - 48px));
  }
}

@media (min-width: 768px) {
  .rv-pista {
    gap: 18px;
  }
  .rv-tarjeta {
    width: 220px;
  }
}
@media (min-width: 1280px) {
  .rv-tarjeta {
    width: 224px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rv-play {
    transition: none;
  }
}
