/* Testimonial Section Styles */

/* Slider */
.section-testimonial {
  padding: clamp(32px, 6vw, 80px) 0;
}

.slider {
  margin-top: clamp(20px, 3vw, 36px);
}

.slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(100%, var(--layout-container, 78rem));
  gap: 24px;
  overflow-x: auto;
  padding: 0 20px;
  margin: 0 auto;
  max-width: calc(var(--layout-container, 78rem) + 40px);
  list-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.slide {
  scroll-snap-align: start;
}

.slide-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}

@media (max-width: 900px) {
  .slide-card {
    grid-template-columns: 1fr;
  }
}

/* Media block with fixed aspect ratio */
.media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card, 1.25rem);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #000;
}

.media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: clamp(56px, 8vw, 88px);
  height: clamp(56px, 8vw, 88px);
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.15s ease, background 0.15s ease;
}

.play-btn:hover {
  transform: scale(1.03);
  background: #fff;
}

.play-btn:focus {
  outline: 2px solid var(--base-color-brand--blue, #2d62ff);
  outline-offset: 2px;
}

.play-btn svg {
  width: 46%;
  height: 46%;
  fill: #000;
}

/* Text area */
.content .rating {
  color: #FFB400;
  font-size: 20px;
  letter-spacing: 2px;
}

.content .quote {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--grayscale--600, #525866);
  line-height: 1.6;
  margin: 12px 0 16px;
}

.author-name {
  font-weight: 600;
  margin: 0;
  font-size: 18px;
}

.author-title {
  margin: 2px 0 0;
  font-size: 14px;
}

/* Modal */
.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.video-modal[data-state="open"] {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 32px);
}

.video-frame {
  width: min(var(--layout-container, 78rem), 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-card, 1.25rem);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.video-frame > video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.modal-close {
  position: absolute;
  top: clamp(8px, 2vw, 16px);
  right: clamp(8px, 2vw, 16px);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.modal-close:focus {
  outline: 2px solid var(--base-color-brand--blue, #2d62ff);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .play-btn {
    transition: none;
  }
}

/* Body scroll lock utility (toggled by JS) */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}
