/* ==========================================
   TESTIMONIALS SECTION
========================================== */

.testimonials-section {
  width: 100%;
  padding: 80px 16px;

  background: linear-gradient(
    to bottom,
    #f5f8fc 0%,
    #fafbfd 50%,
    #f0f4f8 100%
  );
}


.testimonials-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}


/* ==========================================
   HEADING
========================================== */

.testimonials-heading {
  margin: 0 0 16px;

  text-align: center;

  font-size: 40px;
  line-height: 1.2;
  font-weight: 300;

  color: #475569;

  letter-spacing: -0.025em;
}


/* ==========================================
   TOP AREA
========================================== */

.testimonials-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 48px;
}


.testimonials-title {
  margin: 0;

  font-size: 36px;
  line-height: 1.2;

  font-weight: 700;

  background: linear-gradient(
    135deg,
    #1a8fd1 0%,
    #353a80 35%,
    #7c3aed 65%,
    #4a0750 100%
  );

  -webkit-background-clip: text;
  background-clip: text;

  -webkit-text-fill-color: transparent;
}


/* ==========================================
   CONTROLS
========================================== */

.testimonials-controls {
  display: flex;

  align-items: center;

  gap: 16px;
}


/* ==========================================
   RATING
========================================== */

.review-rating {
  display: flex;

  align-items: center;

  gap: 12px;

  padding: 12px 24px;

  background: #ffffff;

  border-radius: 999px;

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.06);
}


.rating-star {
  width: 20px;
  height: 20px;

  color: #475569;

  flex-shrink: 0;
}


.rating-score {
  color: #334155;

  font-size: 18px;

  font-weight: 600;
}


.rating-text {
  color: #64748b;

  font-size: 14px;

  white-space: nowrap;
}


/* ==========================================
   NAVIGATION
========================================== */

.testimonial-navigation {
  display: flex;

  align-items: center;

  gap: 8px;
}


.testimonial-nav-btn {
  width: 40px;
  height: 40px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;

  border-radius: 999px;

  background: #ffffff;

  color: #475569;

  cursor: pointer;

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.06);

  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}


.testimonial-nav-btn svg {
  width: 20px;
  height: 20px;
}


.testimonial-nav-btn:hover {
  background: #f8fafc;

  box-shadow:
    0 5px 14px rgba(15, 23, 42, 0.12);

  transform: translateY(-2px);
}


.testimonial-nav-btn:active {
  transform: translateY(0);
}


/* ==========================================
   SLIDER
========================================== */

.testimonials-slider-wrapper {
  position: relative;

  width: 100%;

  overflow: hidden;
}


.testimonials-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 24px;

  margin-bottom: 32px;

  opacity: 1;

  transform: translateX(0);

  filter: blur(0);

  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    filter 0.5s ease;
}


.testimonials-grid.is-transitioning {
  opacity: 0;

  transform: translateX(32px);

  filter: blur(4px);
}


/* ==========================================
   TESTIMONIAL CARD
========================================== */

.testimonial-card {
  position: relative;

  min-width: 0;

  padding: 32px;

  border-radius: 24px;

  overflow: hidden;

  background: #ffffff;

  cursor: pointer;

  box-shadow:
    0 6px 18px rgba(15, 23, 42, 0.10);

  will-change: transform;

  transition:
    transform 0.55s cubic-bezier(
      0.22,
      1,
      0.36,
      1
    );
}


.testimonial-card:hover {
  transform:
    translateY(-18px)
    scale(1.01);
}


/* ==========================================
   CARD MESH
========================================== */

.card-mesh {
  position: absolute;

  inset: 0;

  border-radius: inherit;

  clip-path:
    inset(100% 0% 0% 0%);

  pointer-events: none;

  will-change: clip-path;

  z-index: 1;
}


.card-mesh.entering {
  clip-path:
    inset(0% 0% 0% 0%);

  transition:
    clip-path
    1.85s
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    );
}


/* ==========================================
   CARD SHINE
========================================== */

.card-shine {
  position: absolute;

  inset: 0;

  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 70%
  );

  transform:
    translateX(-130%);

  pointer-events: none;

  border-radius: inherit;

  z-index: 6;
}


.card-shine.entering {
  transform:
    translateX(130%);

  transition:
    transform
    0.8s
    ease
    0.1s;
}


/* ==========================================
   CARD NUMBER
========================================== */

.card-bg-number {
  position: absolute;

  top: 24px;
  right: 24px;

  z-index: 2;

  font-size: 160px;

  font-weight: 900;

  line-height: 1;

  user-select: none;

  pointer-events: none;

  opacity: 0;

  transform:
    scale(0.8)
    rotate(0deg);
}


.card-bg-number.entering {
  opacity: 1;

  transform:
    scale(1.1)
    rotate(5deg);

  transition:
    opacity 0.5s ease 0.1s,
    transform
      0.65s
      cubic-bezier(
        0.22,
        1,
        0.36,
        1
      )
      0.1s;
}


/* ==========================================
   CARD CONTENT
========================================== */

.testimonial-card-content {
  position: relative;

  z-index: 10;
}


/* ==========================================
   METRIC + STARS
========================================== */

.testimonial-header {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 16px;

  margin-bottom: 24px;
}


.testimonial-metric {
  color: #1e293b;

  font-size: 16px;

  font-weight: 700;
}


.testimonial-stars {
  display: flex;

  align-items: center;

  gap: 4px;
}


.testimonial-stars svg {
  width: 20px;
  height: 20px;

  fill: #818cf8;

  color: #818cf8;
}


/* ==========================================
   TESTIMONIAL TEXT
========================================== */

.testimonial-text {
  margin: 0 0 32px;

  min-height: 140px;

  color: #334155;

  font-size: 15px;

  line-height: 1.625;
}


/* ==========================================
   DIVIDER
========================================== */

.testimonial-divider {
  width: 100%;

  height: 1px;

  margin-bottom: 24px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(217, 119, 6, 0.4),
    transparent
  );
}


/* ==========================================
   AUTHOR
========================================== */

.testimonial-author {
  display: flex;

  align-items: center;

  gap: 16px;
}


.author-avatar {
  width: 56px;
  height: 56px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  overflow: hidden;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      #334155,
      #0f172a
    );
}


.author-avatar span {
  color: #ffffff;

  font-size: 18px;

  font-weight: 700;
}


.author-info {
  flex: 1;

  min-width: 0;
}


.author-name-row {
  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 4px;
}


.author-name {
  margin: 0;

  color: #1e293b;

  font-size: 16px;

  font-weight: 700;
}


.verified-icon {
  width: 20px;
  height: 20px;

  flex-shrink: 0;

  color: #6366f1;
}


.author-position {
  margin: 0;

  color: #64748b;

  font-size: 14px;

  line-height: 1.4;
}


/* ==========================================
   PAGINATION
========================================== */

.testimonial-pagination {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 8px;
}


.testimonial-page-btn {
  height: 32px;
  width: 32px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;

  border-radius: 999px;

  background: #e2e8f0;

  color: #475569;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    width 0.3s ease;
}


.testimonial-page-btn:hover {
  background: #cbd5e1;
}


.testimonial-page-btn.active {
  width: auto;

  min-width: 32px;

  padding: 0 12px;

  background: #3b9edd;

  color: #ffffff;
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 1024px) {

  .testimonials-section {
    padding: 70px 24px;
  }

  .testimonials-top {
    margin-bottom: 40px;
  }

  .testimonials-title {
    font-size: 32px;
  }

  .testimonials-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

  .testimonials-section {
    padding: 60px 16px;
  }

  .testimonials-heading {
    font-size: 32px;
  }

  .testimonials-top {
    flex-direction: column;

    align-items: center;

    margin-bottom: 36px;
  }

  .testimonials-title {
    text-align: center;

    font-size: 30px;
  }

  .testimonials-controls {
    width: 100%;

    justify-content: center;

    flex-wrap: wrap;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;

    gap: 20px;
  }

  .testimonial-card {
    padding: 28px;
  }

}


/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 480px) {

  .testimonials-section {
    padding: 50px 14px;
  }

  .testimonials-heading {
    font-size: 28px;
  }

  .testimonials-title {
    font-size: 27px;
  }

  .review-rating {
    padding: 10px 16px;

    gap: 8px;
  }

  .rating-text {
    font-size: 12px;
  }

  .rating-score {
    font-size: 16px;
  }

  .testimonial-card {
    padding: 24px;

    border-radius: 20px;
  }

  .testimonial-text {
    min-height: auto;
  }

}