/* Depoimentos em vídeo: cards verticais (9:16) com player próprio. */

.video-testimonials {
  padding-block: 64px 56px;
  border-top: 1px solid var(--line);
}

.video-testimonials-intro {
  max-width: 540px;
  margin: 0 auto 34px;
  text-align: center;
}

.video-testimonials-intro .eyebrow {
  display: block;
  color: var(--orange);
}

.video-testimonials-intro h2 {
  margin: 12px 0 10px;
}

.video-testimonials-intro p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.video-testimonials-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  gap: 28px;
}

.testimonial-player {
  margin: 0;
  display: grid;
  gap: 14px;
}

.testimonial-screen {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #000;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.testimonial-player:hover .testimonial-screen,
.testimonial-player.playing .testimonial-screen {
  border-color: color-mix(in srgb, var(--orange) 70%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px color-mix(in srgb, var(--orange) 35%, transparent), 0 0 40px color-mix(in srgb, var(--orange) 18%, transparent);
}

.testimonial-player:hover:not(.playing) .testimonial-screen {
  transform: translateY(-4px);
}

.testimonial-screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Sombra embaixo e em cima para os controles ficarem legíveis sobre qualquer imagem. */
.testimonial-screen::before,
.testimonial-screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.testimonial-screen::before {
  top: 0;
  height: 22%;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
}

.testimonial-screen::after {
  bottom: 0;
  height: 38%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

/* Barra fina no topo, como nos stories. */
.testimonial-story {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 2;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.testimonial-story i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.testimonial-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: #1a1205;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 #ffbb65;
  transform: translate(-50%, -50%);
  transition: transform 0.2s, opacity 0.2s;
}

.testimonial-play::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid color-mix(in srgb, var(--orange) 60%, transparent);
  border-radius: 50%;
  animation: testimonial-pulse 2.2s ease-out infinite;
}

.testimonial-play svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  fill: currentColor;
}

.testimonial-play:hover {
  transform: translate(-50%, -50%) scale(1.07);
}

.testimonial-player.playing .testimonial-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

@keyframes testimonial-pulse {
  from {
    opacity: 0.9;
    transform: scale(0.92);
  }
  to {
    opacity: 0;
    transform: scale(1.35);
  }
}

.testimonial-controls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(10, 12, 15, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.testimonial-player.started .testimonial-controls {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Tocando e sem mexer: os controles somem para o vídeo aparecer inteiro. */
.testimonial-player.playing.idle .testimonial-controls {
  opacity: 0;
  transform: translateY(8px);
}

.testimonial-player.playing.idle .testimonial-screen::after {
  opacity: 0.4;
}

.testimonial-controls button {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
}

.testimonial-controls button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.testimonial-controls svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.testimonial-controls .icon-play,
.testimonial-player:not(.playing) .icon-pause,
.testimonial-controls .icon-muted,
.testimonial-player.muted .icon-sound {
  display: none;
}

.testimonial-player:not(.playing) .icon-play,
.testimonial-player.muted .icon-muted {
  display: block;
}

.testimonial-controls input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 4px;
  margin: 0 4px;
  border-radius: 4px;
  background: linear-gradient(var(--orange), var(--orange)) 0 / var(--progress, 0%) 100% no-repeat, rgba(255, 255, 255, 0.25);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.testimonial-controls input[type="range"]::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 45%, transparent);
  -webkit-appearance: none;
}

.testimonial-controls input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 45%, transparent);
}

.testimonial-time {
  flex: none;
  min-width: 34px;
  color: #e9ecf1;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.testimonial-player figcaption {
  display: grid;
  gap: 10px;
  padding: 0 4px;
}

.testimonial-quote {
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.testimonial-author {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.testimonial-author strong {
  color: var(--orange);
  font-weight: 600;
}

.testimonial-author small {
  color: var(--muted);
  font-size: 12px;
}

.video-testimonials-note {
  max-width: 560px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* Celular: faixa que desliza para o lado, um card e a ponta do próximo. */
@media (max-width: 640px) {
  .video-testimonials {
    padding-block: 42px 40px;
  }

  .video-testimonials-intro {
    margin-bottom: 24px;
  }

  .video-testimonials-intro h2 {
    font-size: 30px;
  }

  .video-testimonials-intro p {
    font-size: 15px;
  }

  .video-testimonials-track {
    display: flex;
    justify-content: flex-start;
    gap: 14px;
    margin-inline: -16px;
    padding: 4px 16px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .video-testimonials-track::-webkit-scrollbar {
    display: none;
  }

  .testimonial-player {
    flex: 0 0 min(76%, 290px);
    scroll-snap-align: start;
  }

  .testimonial-quote {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-play::before {
    animation: none;
  }
}
