/* ══════════════════════════════════════════════════════════════
   TESTIMONIALS SECTION
   ══════════════════════════════════════════════════════════════ */

.testimonials {
  padding: 80px 0;
    background: #F7F7F7;
  position: relative;
}

.testimonials .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.testimonials__header {
  text-align: center;
  margin-bottom: 60px;
}

.testimonials__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

/* ── Wrapper with Fade Effects ── */
.testimonials__wrapper {
  position: relative;
  max-height: 800px;
  overflow: hidden;
}

/* ── Grid Layout (Staggered/Masonry) ── */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
  padding: 60px 0;
}

/* Create staggered effect with nth-child */
/* .testimonials__grid .testimonial-card:nth-child(3n+1) {
  transform: translateY(80px);
} */

.testimonials__grid .testimonial-card:nth-child(3n+2) {
  transform: translateY(40px);
}

/* .testimonials__grid .testimonial-card:nth-child(3n+3) {
  transform: translateY(80px);
} */

/* ── Fade Overlays ── */
.testimonials__fade-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to bottom, #F7F7F7 0%, rgba(247, 247, 247, 0.9) 30%, rgba(247, 247, 247, 0.6) 60%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.testimonials__fade-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, #F7F7F7 0%, rgba(247, 247, 247, 0.9) 30%, rgba(247, 247, 247, 0.6) 60%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* ── Testimonial Card ── */
.testimonial-card {
  background: #ffffff;
  /* border: 1px solid #e5e5e5; */
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ── Card Header ── */
.testimonial-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-card__name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.testimonial-card__role {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* ── Card Text ── */
.testimonial-card__text {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin: 0;
  flex: 1;
}

/* ── Rating Stars ── */
.testimonial-card__rating {
  display: flex;
  gap: 4px;
}

.testimonial-card__rating .star {
  width: 16px;
  height: 16px;
  color: #1a6ff4;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE: TABLET
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .testimonials {
    padding: 60px 0;
  }

  .testimonials__header {
    margin-bottom: 40px;
  }

  .testimonials__wrapper {
    max-height: 900px;
  }

  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 50px 0;
  }

  /* Adjust stagger for 2 columns */
  .testimonials__grid .testimonial-card:nth-child(3n+1),
  .testimonials__grid .testimonial-card:nth-child(3n+2),
  .testimonials__grid .testimonial-card:nth-child(3n+3) {
    transform: translateY(0);
  }

  .testimonials__grid .testimonial-card:nth-child(2n+2) {
    transform: translateY(30px);
  }

  .testimonial-card {
    padding: 20px;
  }

  .testimonials__fade-top,
  .testimonials__fade-bottom {
    height: 120px;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE: MOBILE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .testimonials {
    padding: 40px 0;
  }

  .testimonials__header {
    margin-bottom: 30px;
  }

  .testimonials__wrapper {
    max-height: 700px;
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 40px 0;
  }

  /* Remove stagger for single column */
  .testimonials__grid .testimonial-card:nth-child(3n+1),
  .testimonials__grid .testimonial-card:nth-child(3n+2),
  .testimonials__grid .testimonial-card:nth-child(3n+3),
  .testimonials__grid .testimonial-card:nth-child(2n+2) {
    transform: translateY(0);
  }

  .testimonial-card {
    padding: 16px;
  }

  .testimonial-card__avatar {
    width: 40px;
    height: 40px;
  }

  .testimonial-card__name {
    font-size: 14px;
  }

  .testimonial-card__role {
    font-size: 12px;
  }

  .testimonial-card__text {
    font-size: 13px;
  }

  .testimonial-card__rating .star {
    width: 14px;
    height: 14px;
  }

  .testimonials__fade-top,
  .testimonials__fade-bottom {
    height: 100px;
  }
}
