/* ============================================================= */
/* Section: 12-testimonials */
/* ============================================================= */
/* ===== Testimonials — Figma node 12183:1708 (1440 x 682.5) ===== */
.ai-testimonials {
  position: relative;
  background: #fdfcfb;
}

.ai-testimonials-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Chip 12183:1709 */
.ai-testimonials-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 9.069px;
  background: rgba(39, 55, 117, 0.1);
  color: var(--ai-blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 9.976px;
  text-transform: capitalize;
}

.ai-testimonials-title {
  max-width: 718px;
  padding-top: 2.5px;
  color: var(--ai-blue);
  font-size: 32px;
  font-weight: 700;
  line-height: 45px;
}

.ai-testimonials-accent {
  color: var(--ai-orange);
}

/* Cards: a snap-scrolling row showing 3 at a time (Figma's 3 equal columns); the 4th is
   reached by swiping/scrolling or the dots below. Top room keeps overlapping avatars and
   their hover/entrance rings inside the scroll viewport; side padding keeps card shadows in. */
.ai-testimonials .ai-testimonials-grid {
  display: flex;
  gap: 20px;
  margin: 40px -20px 0;
  padding: 80px 20px 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
  scrollbar-width: none;
}

.ai-testimonials .ai-testimonials-grid::-webkit-scrollbar { display: none; }

.ai-testimonials-card {
  display: flex;
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
}

.ai-testimonials-figure {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 74px 20px 26px;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, var(--ai-blue) 0%, rgba(39, 55, 117, 0.85) 45%, var(--ai-orange) 100%) border-box;
  transition: translate 0.3s var(--ai-ease);
}

.ai-testimonials-figure:hover {
  translate: 0 -6px;
}

/* Avatar: 124px ring centred on the top edge. */
.ai-testimonials-avatar {
  position: absolute;
  top: -62px;
  left: 50%;
  width: 124px;
  height: 124px;
  margin-left: -62px;
  padding: 5px;
  border: 2px solid var(--ai-blue);
  border-radius: 62px;
  background: #fff;
  transition: box-shadow 0.3s var(--ai-ease);
}

.ai-testimonials-figure:hover .ai-testimonials-avatar {
  box-shadow: 0 0 0 6px rgba(252, 93, 97, 0.14);
}

.ai-testimonials-avatar-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 57px;
}

.ai-v2 .ai-testimonials-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: scale 0.5s var(--ai-ease);
}

.ai-testimonials-figure:hover .ai-testimonials-avatar-img {
  scale: 1.06;
}

.ai-testimonials-quote {
  position: absolute;
  top: 30px;
  width: 34px;
  height: 26px;
}

.ai-testimonials-quote--open { left: 26px; }
.ai-testimonials-quote--close { right: 26px; }

.ai-testimonials-stars {
  display: block;
  width: 130px;
  height: 22px;
}

.ai-testimonials-text {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ai-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 24.98px;
  text-align: center;
}

.ai-testimonials-text p {
  margin: 0;
  font: inherit;
  color: inherit;
}

/* Bottom strip 12183:1776 */
.ai-testimonials-foot {
  display: flex;
  justify-content: center;
  padding-top: 40px;
}

.ai-testimonials-strip {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 16px 30px;
  border-radius: 12px;
  background: rgba(39, 55, 117, 0.06);
}

.ai-testimonials-strip-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--ai-blue);
}

.ai-testimonials-strip-icon img {
  display: block;
  width: 24px;
  height: 24px;
}

.ai-testimonials-strip-rule {
  flex-shrink: 0;
  width: 1px;
  height: 30px;
  background: rgba(39, 55, 117, 0.24);
}

.ai-testimonials-strip-text {
  padding: 1px 0;
  color: var(--ai-blue);
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
}

/* ---------- Animation ---------- */
@keyframes ai-testimonials-pop {
  0%   { opacity: 0; scale: 0.3; }
  70%  { opacity: 1; scale: 1.12; }
  100% { opacity: 1; scale: 1; }
}

@keyframes ai-testimonials-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes ai-testimonials-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(39, 55, 117, 0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(39, 55, 117, 0); }
}

.ai-testimonials.is-armed:not(.is-in) :is(.ai-testimonials-head > *, .ai-testimonials-card, .ai-testimonials-avatar, .ai-testimonials-stars, .ai-testimonials-quote, .ai-testimonials-strip, .ai-testimonials-strip-icon) {
  opacity: 0;
}

.ai-testimonials.is-in .ai-testimonials-head > * { animation: ai-rise 0.7s var(--ai-ease) backwards; }
.ai-testimonials.is-in .ai-testimonials-head > :nth-child(2) { animation-delay: 0.1s; }

.ai-testimonials.is-in .ai-testimonials-card { animation: ai-rise 0.8s var(--ai-ease) 0.2s backwards; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(2) { animation-delay: 0.32s; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(3) { animation-delay: 0.44s; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(4) { animation-delay: 0.56s; }

.ai-testimonials.is-in .ai-testimonials-avatar { animation: ai-testimonials-pop 0.7s var(--ai-ease) 0.55s backwards; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(2) .ai-testimonials-avatar { animation-delay: 0.67s; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(3) .ai-testimonials-avatar { animation-delay: 0.79s; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(4) .ai-testimonials-avatar { animation-delay: 0.91s; }

.ai-testimonials.is-in .ai-testimonials-stars { animation: ai-testimonials-draw 0.8s ease-out 0.75s backwards; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(2) .ai-testimonials-stars { animation-delay: 0.87s; }
.ai-testimonials.is-in .ai-testimonials-card:nth-child(3) .ai-testimonials-stars { animation-delay: 0.99s; }

.ai-testimonials.is-in .ai-testimonials-quote { animation: ai-pop 0.6s var(--ai-ease) 0.8s backwards; }
.ai-testimonials.is-in .ai-testimonials-quote--close { animation-delay: 0.9s; }

.ai-testimonials.is-in .ai-testimonials-strip { animation: ai-rise 0.7s var(--ai-ease) 0.9s backwards; }
.ai-testimonials.is-in .ai-testimonials-strip-icon {
  animation: ai-testimonials-pop 0.6s var(--ai-ease) 1.15s backwards, ai-testimonials-glow 3s ease-in-out 2s infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .ai-testimonials .ai-testimonials-grid { gap: 16px; }
  .ai-testimonials-figure { padding: 70px 16px 24px; }
  .ai-testimonials-quote { top: 22px; }
  .ai-testimonials-quote--open { left: 18px; }
  .ai-testimonials-quote--close { right: 18px; }
}

@media (max-width: 991px) {
  .ai-testimonials-title { font-size: 30px; line-height: 40px; }

  /* Horizontal snap-scroll row so the cards keep a readable width. */
  .ai-testimonials .ai-testimonials-grid {
    display: flex;
    gap: 20px;
    margin: 30px -20px 0;
    padding: 72px 20px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: thin;
  }

  .ai-testimonials-card {
    flex: 0 0 min(400px, 80%);
    scroll-snap-align: start;
  }

  .ai-testimonials-figure:hover { translate: none; }
  .ai-testimonials-foot { padding-top: 24px; }
  .ai-testimonials-strip-text { font-size: 16px; }
}

/* Position dots: mark / jump to a card (script-v2.js [data-spb-carousel]). */
.ai-testimonials-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.ai-testimonials-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #c9d5f0;
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.ai-testimonials-dots button:hover {
  background: #9fb1de;
  filter: none;
}

.ai-testimonials-dots button.is-active {
  width: 22px;
  background: var(--ai-blue);
}

@media (min-width: 992px) {
  .ai-testimonials-dots button:nth-child(n + 3) { display: none; }
}

@media (max-width: 767px) {
  .ai-testimonials-title { font-size: 26px; line-height: 36px; }

  /* Phones: one full testimonial per swipe, dots underneath track / jump to it. */
  .ai-testimonials .ai-testimonials-grid {
    gap: 14px;
    margin: 30px 0 0;
    padding: 72px 0 14px;
    scroll-padding: 0;
    scrollbar-width: none;
  }

  .ai-testimonials .ai-testimonials-grid::-webkit-scrollbar { display: none; }

  .ai-testimonials-card { flex: 0 0 100%; }

  /* Touch browsers can retain :hover after a tap; keep mobile cards flat. */
  .ai-testimonials-figure:hover {
    translate: none;
    box-shadow: none;
  }

  .ai-testimonials-dots {
    margin-top: 6px;
  }

  /* Bottom strip: full width, icon | rule | text in a row. */
  .ai-testimonials-strip { display: flex; width: 100%; gap: 10px; padding: 16px 10px; }
  .ai-testimonials-strip-text { flex: 1 1 0; min-width: 0; font-size: 16px; }
}

@media (max-width: 575px) {
  .ai-testimonials-title { font-size: 24px; line-height: 34px; }
  .ai-testimonials-avatar { top: -52px; width: 104px; height: 104px; margin-left: -52px; padding: 4px; }
  .ai-testimonials .ai-testimonials-grid { padding-top: 62px; }
  .ai-testimonials-figure { padding: 62px 16px 22px; }
  .ai-testimonials-quote { width: 26px; height: 20px; top: 18px; }
  .ai-testimonials-text { font-size: 13.5px; line-height: 23px; }
}
