/* ================================================
   CLOUDMATE — CUSTOMER STORIES
   Design: white / navy / electric blue
   ================================================ */

.testimonials {
  --ts-blue: #0877f9;
  --ts-navy: #101c34;
  --ts-muted: #61718b;
  --ts-border: #e0e8f2;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 88px 0 40px;

  background:
    radial-gradient(
      ellipse at 3% 0%,
      rgba(220, 235, 255, 0.48),
      transparent 28%
    ),
    radial-gradient(
      ellipse at 96% 100%,
      rgba(220, 235, 255, 0.38),
      transparent 28%
    ),
    #ffffff;

  color: var(--ts-navy);
  font-family: "DM Sans", sans-serif;
}

.testimonials *,
.testimonials *::before,
.testimonials *::after {
  box-sizing: border-box;
}

.testimonials .container-test {
  width: min(100% - 80px, 1500px);
  margin-inline: auto;
}

/* HEADER */

.testimonials__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.testimonials .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 19px;

  border-radius: 100px;
  background: #e8f1ff;
  color: #076af2;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.testimonials .section-tag svg {
  width: 18px;
  height: 18px;
}

.testimonials .section-title {
  max-width: 1250px;
  margin: 23px 0 12px;

  font-size: clamp(32px, 3.1vw, 52px);
  line-height: 1.15;
  letter-spacing: -2.1px;
  font-weight: 800;
}

.testimonials .section-title span {
  color: var(--ts-blue);
}

.testimonials .section-description {
  max-width: 900px;
  margin: 0;

  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--ts-muted);
}

/* TRUSTPILOT SUMMARY */

.testimonials .trustpilot-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;

  margin-top: 26px;
}

.testimonials .trustpilot-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: #101820;
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
}

.testimonials .trustpilot-logo {
  color: #00b67a;
  font-size: 34px;
  line-height: 1;
}

.testimonials .trustpilot-divider {
  width: 1px;
  height: 28px;
  background: #cbd6e5;
}

.testimonials .trustpilot-score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonials .trustpilot-score strong {
  font-size: 23px;
  font-weight: 800;
}

.testimonials .trustpilot-score a {
  font-size: 14px;
  color: #43516a;
  text-decoration: none;
}

.testimonials .trustpilot-score a:hover {
  text-decoration: underline;
}

.testimonials .all-reviews-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;

  min-height: 45px;
  padding: 0 25px;

  border: 1.5px solid var(--ts-blue);
  border-radius: 100px;

  background: #fff;
  color: #086af0;

  font-size: 14px;
  font-weight: 700;
  text-decoration: none;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.testimonials .all-reviews-btn:hover {
  background: var(--ts-blue);
  color: #fff;
  transform: translateY(-2px);
}

/* CAROUSEL */

.testimonials .testimonial-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 58px;
}

.testimonials .testimonial-carousel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 24px 0 35px;
  touch-action: pan-y;
}

.testimonials .testimonial-track {
  display: flex;
  align-items: stretch;
  gap: 20px;

  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* CARD */

.testimonials .testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;

  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 0;
  min-height: 330px;
  padding: 28px 29px;

  border: 1px solid var(--ts-border);
  border-radius: 23px;
  background: #fff;

  box-shadow: 0 5px 15px rgba(18, 45, 85, 0.018);

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease,
    transform 0.3s ease;
}

.testimonials .testimonial-card.active {
  z-index: 1;
  border-color: #6baaff;

  background:
    radial-gradient(ellipse at 105% 115%, #d6eaff 0%, transparent 43%), #fff;

  box-shadow:
    0 15px 32px rgba(30, 93, 169, 0.12),
    0 2px 8px rgba(30, 93, 169, 0.04);

  transform: translateY(-10px);
}

/* QUOTATION ICON */

.testimonials .testimonial-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 52px;
}

.testimonials .testimonial-quote {
  display: block;
  height: 47px;

  color: #0877f9;
  font-family: Georgia, serif;
  font-size: 77px;
  font-weight: 700;
  line-height: 0.85;
}

/* REVIEW TEXT */

.testimonials .testimonial-text {
  flex: 1;
  margin: 15px 0 26px;

  font-size: clamp(14px, 1.13vw, 17px);
  line-height: 1.52;
  letter-spacing: -0.18px;
  color: #182133;
}

/* REVIEWER */

.testimonials .testimonial-user {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: auto;
}

.testimonials .user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 48px;

  width: 48px;
  height: 48px;

  border-radius: 50%;
  background: #f1e5ff;
  color: #8b22c5;

  font-size: 25px;
  font-weight: 800;
}

.testimonials .testimonial-user > div:last-child {
  padding-left: 15px;
  border-left: 1px solid #c8d4e5;
}

.testimonials .testimonial-user h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.testimonials .testimonial-user span {
  color: var(--ts-muted);
  font-size: 13px;
}

/* NAVIGATION */

.testimonials .testimonial-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 50px;

  width: 50px;
  height: 50px;

  border: 1px solid #d8e1ee;
  border-radius: 50%;
  background: #fff;
  color: #111827;

  cursor: pointer;
  box-shadow: 0 5px 12px rgba(10, 32, 60, 0.045);

  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
}

.testimonials .testimonial-arrow svg {
  width: 21px;
  height: 21px;
}

.testimonials .testimonial-arrow:hover {
  background: var(--ts-blue);
  border-color: var(--ts-blue);
  color: #fff;
  transform: translateY(-2px);
}

.testimonials .testimonial-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.testimonials :is(a, button):focus-visible {
  outline: 3px solid #75b5ff;
  outline-offset: 3px;
}

.testimonials .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* TABLET */

@media (max-width: 1050px) {
  .testimonials .container-test {
    width: min(100% - 40px, 900px);
  }

  .testimonials .testimonial-card {
    flex-basis: calc((100% - 20px) / 2);
    min-height: 340px;
  }

  .testimonials .testimonial-carousel-wrap {
    gap: 12px;
  }

  .testimonials .testimonial-arrow {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .testimonials .section-title {
    letter-spacing: -1.5px;
  }
}

/* MOBILE */

@media (max-width: 680px) {
  .testimonials {
    padding: 65px 0 65px;
  }

  .testimonials .container-test {
    width: calc(100% - 30px);
  }

  .testimonials .section-title {
    margin-top: 19px;
    font-size: clamp(31px, 8vw, 39px);
    letter-spacing: -1.3px;
  }

  .testimonials .section-description {
    font-size: 14px;
  }

  .testimonials .trustpilot-summary {
    gap: 12px;
    margin-top: 25px;
  }

  .testimonials .trustpilot-brand {
    font-size: 18px;
  }

  .testimonials .trustpilot-score strong {
    font-size: 19px;
  }

  .testimonials .all-reviews-btn {
    width: 100%;
    max-width: 290px;
    margin-top: 6px;
  }

  .testimonials .testimonial-carousel-wrap {
    display: block;
    margin-top: 27px;
  }

  .testimonials .testimonial-carousel {
    padding: 20px 0 28px;
  }

  .testimonials .testimonial-card {
    flex-basis: 100%;
    min-height: 310px;
    padding: 26px;
  }

  .testimonials .testimonial-card.active {
    transform: translateY(-5px);
  }

  .testimonials .testimonial-text {
    font-size: 16px;
  }

  .testimonials .testimonial-arrow {
    position: absolute;
    bottom: -36px;
    z-index: 3;
  }

  .testimonials .testimonial-prev {
    left: calc(50% - 52px);
  }

  .testimonials .testimonial-next {
    right: calc(50% - 52px);
  }

  .testimonials .testimonial-carousel-wrap {
    margin-bottom: 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonials *,
  .testimonials *::before,
  .testimonials *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
