/**
 * assets/css/testimonials.css
 * CSS riêng cho sections/06-testimonials.php
 * Dùng biến từ base.css (var(--green), var(--font-display)...), không khai báo lại token.
 */

.section-testimonials {
  background-color: var(--cream);
  /* Giảm padding-top riêng để không cộng dồn khoảng cách quá lớn với section
     Results phía trên (section đó đã có padding-bottom riêng của nó rồi). */
  padding: clamp(24px, 4vw, 56px) 16px clamp(60px, 10vw, 120px);
}

.section-testimonials .container {
  max-width: 1040px;
  text-align: center;
}

/* --- Wrapper chứa slide + 2 nút mũi tên trái/phải --- */
.testimonial-viewport {
  position: relative;
}

.testimonial-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(36px, 4vw, 44px);
  height: clamp(36px, 4vw, 44px);
  border-radius: 50%;
  border: 1px solid var(--champagne);
  background: var(--cream);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.testimonial-arrow:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.testimonial-arrow--prev {
  left: clamp(-8px, -4vw, 8px);
}

.testimonial-arrow--next {
  right: clamp(-8px, -4vw, 8px);
}

@media (min-width: 900px) {
  .testimonial-arrow--prev {
    left: -56px;
  }

  .testimonial-arrow--next {
    right: -56px;
  }
}

/* Các slide xếp chồng lên nhau trong cùng 1 ô grid -> crossfade mượt,
   không bị giật layout khi độ dài quote khác nhau giữa các slide. */
.testimonial-slides {
  display: grid;
  padding: 0 clamp(40px, 10vw, 56px);
}

.testimonial {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.testimonial.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* --- Avatar tròn: placeholder chữ cái đầu, tự thay bằng ảnh thật khi có --- */
.testimonial__avatar {
  position: relative;
  width: clamp(64px, 8vw, 88px);
  height: clamp(64px, 8vw, 88px);
  border-radius: 50%;
  background: var(--champagne);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
}

.testimonial__avatar-fallback {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--green-deep);
  letter-spacing: 0.5px;
}

.testimonial__avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial__meta {
  font-family: var(--font-body);
  font-size: clamp(12px, 1.4vw, 15px);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(20px, 3vw, 28px);
}

.testimonial__meta-sep {
  margin: 0 6px;
  color: var(--gold);
}

.testimonial__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.35;
  max-width: 820px;
}

/* --- Dots điều hướng --- */
.testimonial-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 40px);
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--champagne);
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.testimonial-dot:hover {
  background: var(--gold);
}

.testimonial-dot.is-active {
  background: var(--ink);
  transform: scale(1.15);
}
