/* ==========================================================================
   Client Voices — Video Testimonials v2
   Hover-to-preview, quote overlay, modern card design
   ========================================================================== */

.voices-v2 {
  padding: clamp(72px, 9vw, 120px) 0;
  background: #0a0a0b;
  color: #fff;
  position: relative;
}

/* ── Header — split layout ── */
.voices-v2__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.voices-v2__head-left {
  flex: 1;
}

.voices-v2__head-left h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.voices-v2__highlight {
  display: block;
  background: linear-gradient(135deg, var(--color-accent, #2f70ff), var(--color-accent-2, #7b61ff));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.voices-v2__head-right {
  max-width: 380px;
  flex-shrink: 0;
}

.voices-v2__copy {
  margin: 0 0 16px;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: 1.65;
  color: var(--color-muted, #a7a9ad);
}

.voices-v2__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent, #2f70ff);
  text-decoration: none;
  transition: gap 0.3s ease;
}

.voices-v2__link:hover {
  gap: 12px;
}

/* ── Grid ── */
.voices-v2__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

/* ── Card ── */
.voices-v2__card {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.voices-v2__card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--color-accent-rgb, 47,112,255), .25);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}

/* ── Media ── */
.voices-v2__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
}

.voices-v2__media video,
.voices-v2__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.4,0,.2,1);
}

.voices-v2__card:hover .voices-v2__media video,
.voices-v2__card:hover .voices-v2__media img {
  transform: scale(1.05);
}

/* Gradient overlay */
.voices-v2__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,11,.95) 0%,
    rgba(10,10,11,.4) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Play button ── */
.voices-v2__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  color: #0b0c0d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.voices-v2__play svg {
  margin-left: 2px; /* optical center for play icon */
}

.voices-v2__card:hover .voices-v2__play {
  transform: translate(-50%, -50%) scale(1.12);
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* Pulse ring */
.voices-v2__play::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  animation: voicesPlayPulse 2s ease-in-out infinite;
}

@keyframes voicesPlayPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0; }
}

/* Hide play button during hover-preview */
.voices-v2__card.is-previewing .voices-v2__play {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

/* ── Preview progress bar ── */
.voices-v2__preview-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,.1);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.voices-v2__card.is-previewing .voices-v2__preview-bar {
  opacity: 1;
}

.voices-v2__preview-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent, #2f70ff), var(--color-accent-2, #7b61ff));
  border-radius: 3px;
  transition: width 0.1s linear;
}

/* ── Quote ── */
.voices-v2__quote {
  padding: 16px 20px 0;
  position: relative;
}

.voices-v2__quote-icon {
  position: absolute;
  top: 12px;
  left: 16px;
  color: var(--color-accent, #2f70ff);
  opacity: 0.3;
}

.voices-v2__quote p {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
  color: rgba(255,255,255,.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Person info ── */
.voices-v2__person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 20px;
}

.voices-v2__avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-accent, #2f70ff), var(--color-accent-2, #7b61ff));
  display: flex;
  align-items: center;
  justify-content: center;
}

.voices-v2__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voices-v2__avatar span {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.voices-v2__info h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.voices-v2__info p {
  margin: 0;
  font-size: 12px;
  color: var(--color-muted, #a7a9ad);
}

/* ── Bottom CTA ── */
.voices-v2__bottom-cta {
  text-align: center;
  margin-top: clamp(36px, 5vw, 56px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .voices-v2__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .voices-v2__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .voices-v2__head-right {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .voices-v2__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .voices-v2__media {
    aspect-ratio: 4 / 5;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .voices-v2__card,
  .voices-v2__card:hover {
    transform: none;
  }

  .voices-v2__media video,
  .voices-v2__media img,
  .voices-v2__card:hover .voices-v2__media video,
  .voices-v2__card:hover .voices-v2__media img {
    transform: none;
    transition: none;
  }

  .voices-v2__play::after {
    animation: none;
  }

  .voices-v2__card:hover .voices-v2__play {
    transform: translate(-50%, -50%);
  }
}
