/* ===============================
   Customer Feedback / Testimonials
   Mobile-first, fully responsive
   =============================== */

.testimonials-section {
  margin: 0 auto;
  text-align: left;
}
div.testimonials-section {
  padding-top: 0 !important;
}
/* ---------- Titles ---------- */
.section-title {
  font-weight: var(--font-weight-700);
  font-size: clamp(var(--font-size-24), 2.4vw, var(--font-size-40));
  line-height: 1.2;
  color: #1f2937; /* rgba(31,41,55,1) */
  margin-bottom: var(--mp8);
}

.section-subtitle {
  font-weight: var(--font-weight-400);
  font-size: clamp(var(--font-size-16), 1.6vw, var(--font-size-20));
  line-height: clamp(var(--line-height-24), 2.2vw, var(--line-height-28));
  color: var(--danger-color);
  margin-bottom: var(--mp20);
}

/* ---------- Grid wrapper ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mp24);
  align-items: stretch;
}

/* ---------- Card ---------- */
.testimonial-box {
  display: flex;
  flex-direction: column;
  gap: var(--mp16);
  background: var(--text-white);
  border-radius: var(--border-radius-12);
  padding: var(--mp16);
  align-items: center;
  text-align: left;
  box-shadow: 0.154rem 0.308rem 2.462rem 0 rgba(0, 0, 0, 0.04);
  height: 100%;
}

/* ---------- Image ---------- */
.testimonial-image {
  inline-size: 100%;
  block-size: clamp(180px, 56vw, 300px);
  border-radius: var(--border-radius-8);
  overflow: hidden;
  position: relative;
  max-height: 16.92rem;
}

.testimonial-image > .product-hover,
.testimonial-image > img {
  inline-size: 100%;
  block-size: 100%;
  display: block;
}

.product-hover > img,
.testimonial-image > img {
  object-fit: cover;
  object-position: top;
  width: 100%;
  height: 100%;
}

/* ---------- Content ---------- */
.testimonial-content {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--mp12);
}

.testimonial-content h3 {
  font-weight: var(--font-weight-700);
  font-size: var(--font-size-20);
  line-height: var(--line-height-28);
  color: #1f2937;
  margin-bottom: var(--mp8);
}

.testimonial-position {
  font-weight: var(--font-weight-400);
  font-size: var(--font-size-16);
  line-height: var(--line-height-20);
  color: #7f1d1d;
  margin-bottom: var(--mp12);
}

.testimonial-text {
  font-weight: var(--font-weight-400);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  color: #4b5563;
}

.product-hover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--border-radius-8);
}

.product-hover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-hover .hover-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 0.75rem 1rem;
}

/* Watermark text */
.product-hover .hover-watermark {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  user-select: none;
}

/* ---------- Responsive ---------- */

/* ≥ 640px (phablet) */
@media (min-width: 640px) {
  .testimonials-grid {
    gap: var(--mp24);
  }
  .testimonial-box {
    padding: var(--mp20);
    gap: var(--mp20);
  }
}

/* ≥ 768px (tablet) */
@media (min-width: 769px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mp32);
  }

  .testimonial-box {
    padding: var(--mp24);
    gap: var(--mp24);
  }

  .testimonial-image {
    max-height: 280px;
  }
}

@media (max-width: 768px) {
  .testimonial-image {
    max-height: 100%;
  }
}

/* ≥ 1024px (desktop) */
@media (min-width: 1024px) {
  .testimonials-grid .testimonial-box.testimonial-box--reverse {
    flex-direction: row-reverse !important;
  }
  .testimonial-box {
    flex-direction: row;
    align-items: stretch;
  }
  .testimonial-image,
  .testimonial-content {
    flex: 1 1 50%;
    align-self: stretch;
  }
  .testimonial-image {
    max-height: none;
    height: auto;
    display: flex;
  }
  .testimonial-image > .product-hover,
  .testimonial-image > img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
  }
}

@media (min-width: 1280px) {
  .section-title {
    line-height: 1.1;
  }
  .testimonials-grid {
    gap: calc(var(--mp32) + 0.5rem);
  }
}

@media (max-width: 640px) {
  .section-title,
  .section-subtitle,
  .testimonial-content h3,
  .testimonial-position,
  .testimonial-text,
  .testimonial-cta {
    text-align: center;
  }

  .testimonial-image {
    max-width: 100%;
    margin: 0 auto;
  }
}

/* accessibility */
@media (prefers-reduced-motion: reduce) {
  .product-hover img {
    transition: none;
  }
}
