/* ===============================
   TESTIMONIALS SECTION
   File: testimonials.css
================================ */

.testimonials {
  position: relative;
  overflow: hidden;

  padding: 70px 0 84px;

  text-align: center;

  background:
    radial-gradient(circle at 12% 18%, rgba(181, 139, 96, 0.11), transparent 28%),
    radial-gradient(circle at 88% 84%, rgba(90, 56, 37, 0.08), transparent 32%),
    linear-gradient(180deg, #fffaf4 0%, #f8efe6 100%);
}

.testimonials::before {
  content: "";
  position: absolute;
  inset: 22px 20px;

  border: 1px solid rgba(181, 139, 96, 0.14);
  border-radius: 26px;

  pointer-events: none;
}

.testimonials::after {
  content: "";
  position: absolute;
  top: -105px;
  left: 50%;

  width: min(680px, 90%);
  height: 250px;

  transform: translateX(-50%);

  background:
    radial-gradient(circle, rgba(217, 174, 124, 0.18), transparent 68%);

  pointer-events: none;
}

/* ===============================
   SECTION TITLE
================================ */

.testimonials h2 {
  position: relative;
  z-index: 2;

  display: inline-block;
  margin: 0 0 44px;

  color: var(--coffee);

  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 3.4vw, 52px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.testimonials h2::after {
  content: "";
  display: block;

  width: 78px;
  height: 3px;

  margin: 14px auto 0;

  border-radius: 999px;
  background: linear-gradient(90deg, var(--coffee), var(--accent));
}

/* ===============================
   SLIDER
================================ */

.testimonial-slider {
  position: relative;
  z-index: 2;

  width: 100%;
  overflow: hidden;

  padding: 8px 0 16px;
  margin: 0 auto;
}

.testimonial-slider::before,
.testimonial-slider::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 4;

  width: 110px;
  height: 100%;

  pointer-events: none;
}

.testimonial-slider::before {
  left: 0;
  background:
    linear-gradient(
      90deg,
      #f8efe6 0%,
      rgba(248, 239, 230, 0.92) 28%,
      rgba(248, 239, 230, 0) 100%
    );
}

.testimonial-slider::after {
  right: 0;
  background:
    linear-gradient(
      270deg,
      #f8efe6 0%,
      rgba(248, 239, 230, 0.92) 28%,
      rgba(248, 239, 230, 0) 100%
    );
}

.testimonial-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;

  gap: 22px;
  width: max-content;

  padding-left: 22px;

  animation: scrollTestimonials 34s linear infinite;
  will-change: transform;
}

.testimonial-slider:hover .testimonial-track {
  animation-play-state: paused;
}

/* ===============================
   TESTIMONIAL CARD
================================ */

.testimonial-slide {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  flex: 0 0 360px;
  min-width: 360px;
  min-height: 220px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 32px 28px 30px;

  border-radius: 24px;
  border: 1px solid rgba(181, 139, 96, 0.24);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 249, 242, 0.96));

  box-shadow:
    0 16px 38px rgba(45, 26, 17, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);

  text-align: center;

  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.testimonial-slide::before {
  content: "“";
  position: absolute;
  top: 8px;
  left: 18px;
  z-index: -1;

  color: rgba(181, 139, 96, 0.13);

  font-family: 'Playfair Display', serif;
  font-size: 84px;
  font-weight: 800;
  line-height: 1;

  transition: color 0.28s ease;
}

.testimonial-slide::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: -58px;
  z-index: -1;

  width: 132px;
  height: 132px;

  border-radius: 50%;
  background: rgba(181, 139, 96, 0.12);

  transition:
    transform 0.28s ease,
    background 0.28s ease;
}

.testimonial-slide:hover {
  transform: translateY(-5px);
  border-color: rgba(181, 139, 96, 0.46);

  box-shadow:
    0 22px 52px rgba(45, 26, 17, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.testimonial-slide:hover::after {
  transform: scale(1.16);
  background: rgba(181, 139, 96, 0.16);
}

.testimonial-slide:hover::before {
  color: rgba(181, 139, 96, 0.18);
}

/* Stars */
.stars {
  position: relative;
  z-index: 2;

  margin-bottom: 14px;

  color: #c59d5f;

  font-size: 18px;
  letter-spacing: 2px;
  line-height: 1;

  text-shadow: 0 8px 18px rgba(197, 157, 95, 0.16);
}

/* Message */
.testimonial-slide p {
  position: relative;
  z-index: 2;

  max-width: 295px;
  margin: 0 0 20px;

  color: #4d3a2f;

  font-family: 'Lora', serif;
  font-size: 15.4px;
  line-height: 1.55;
}

/* Client Name */
.testimonial-slide h4 {
  position: relative;
  z-index: 2;

  margin: 0;

  color: var(--coffee);

  font-family: 'Playfair Display', serif;
  font-size: 18.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

/* Optional professional client circle */
.testimonial-slide h4::before {
  content: "";
  display: block;

  width: 34px;
  height: 3px;

  margin: 0 auto 12px;

  border-radius: 999px;
  background: linear-gradient(90deg, var(--coffee), var(--accent));
  opacity: 0.55;
}

/* ===============================
   ANIMATION
================================ */

@keyframes scrollTestimonials {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 11px));
  }
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 900px) {
  .testimonials {
    padding: 82px 0 92px;
  }

  .testimonials h2 {
    margin-bottom: 54px;
    font-size: 42px;
  }

  .testimonial-track {
    gap: 24px;
    padding-left: 20px;
  }

  .testimonial-slide {
    flex-basis: 370px;
    min-width: 370px;
    min-height: 260px;

    padding: 40px 30px 36px;
  }

  .testimonial-slider::before,
  .testimonial-slider::after {
    width: 90px;
  }
}

@media (max-width: 520px) {
  .testimonials {
    padding: 68px 0 78px;
  }

  .testimonials::before {
    inset: 16px 10px;
    border-radius: 24px;
  }

  .testimonials h2 {
    margin-bottom: 42px;
    padding: 0 14px;

    font-size: 36px;
  }

  .testimonials h2::after {
    width: 76px;
    height: 3px;
    margin-top: 14px;
  }

  .testimonial-slider {
    padding: 8px 0 18px;
  }

  .testimonial-track {
    gap: 18px;
    padding-left: 14px;

    animation-duration: 38s;
  }

  .testimonial-slide {
    flex-basis: 305px;
    min-width: 305px;
    min-height: 245px;

    padding: 34px 24px 32px;

    border-radius: 24px;
  }

  .testimonial-slide::before {
    top: 10px;
    left: 18px;
    font-size: 86px;
  }

  .testimonial-slide::after {
    width: 130px;
    height: 130px;
    right: -58px;
    bottom: -58px;
  }

  .testimonial-slide p {
    max-width: 260px;

    font-size: 15.5px;
    line-height: 1.62;
  }

  .testimonial-slide h4 {
    font-size: 19px;
  }

  .stars {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .testimonial-slider::before,
  .testimonial-slider::after {
    width: 36px;
  }
}

@media (max-width: 380px) {
  .testimonial-slide {
    flex-basis: 280px;
    min-width: 280px;

    padding: 32px 20px 30px;
  }

  .testimonial-slide p {
    max-width: 240px;
    font-size: 15px;
  }

  .testimonials h2 {
    font-size: 32px;
  }
}

/* ===============================
   REDUCED MOTION
================================ */

@media (prefers-reduced-motion: reduce) {
  .testimonial-track {
    animation: none;
    width: auto;
    padding: 0 14px;

    display: grid !important;
    grid-template-columns: 1fr;
  }

  .testimonial-slide {
    min-width: 0;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
  }

  .testimonial-slide,
  .testimonial-slide::before,
  .testimonial-slide::after {
    transition: none;
  }
}
