/* ============================================================================
   Testimonials section — homepage
   Reuses the Relume `rl_testimonial15_*` + `testimonial-*` classes already in
   site.home.css for the card look (image left / quote right / avatar). This file
   only adds what those classes don't cover: the React-driven slider shell (the
   Webflow slider runtime isn't loaded), a brand tile for testimonials without a
   case-study image, and a monogram avatar (we never fabricate client photos).
   ============================================================================ */

/* Header reuses the shared `.services-header` rhythm; pin the alignment so the
   eyebrow + heading stay centered regardless of inherited rules. */
.testimonials .services-header {
  align-items: center;
  text-align: center;
  margin-bottom: 0;
}

/* ---- Slider shell -------------------------------------------------------- */
.testimonials-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 3rem;
}

/* Slides are stacked. The active one stays in normal flow, so the viewport is
   exactly its height — no trailing gap when one quote is much longer than the
   other. The rest are taken out of flow and parked to the side. All slides stay
   in the DOM (crawlable) — they're moved off-screen, not unmounted. */
.testimonials-slide-wrap {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.625, 0.05, 0, 1), opacity 0.5s ease;
  will-change: transform;
}

.testimonials-slide-wrap.is-active {
  position: relative;
  opacity: 1;
}

.testimonials-slide {
  min-width: 0; /* let the grid text wrap instead of overflowing */
  margin: 0;
}

.testimonials-slide.rl_testimonial15_content {
  align-items: stretch;
}

/* ---- Left column: case-study image OR brand tile ------------------------- */
.testimonials-media {
  width: 100%;
}

.testimonials .rl_testimonial15_client-image-wrapper,
.testimonials-brand {
  position: relative;
  width: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
}

/* The brand tile has no image, so it needs its own box. */
.testimonials-brand {
  aspect-ratio: 16 / 11;
}

/* In-flow image (NOT Next `fill`): with `fill` every child is absolutely
   positioned, the grid column has no in-flow content and collapses to 0. An
   in-flow image gives the column width and the wrapper its height; object-fit
   crops the screenshot to a tidy ratio. */
.testimonials .rl_testimonial15_client-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 0; /* the wrapper clips */
}

/* Brand tile stands in when there's no published case study to link to.
   It's a typographic label, not a fabricated screenshot. */
.testimonials-brand {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1.9rem;
  background: linear-gradient(155deg, var(--primary-brand-color), #0a2bb0);
  color: var(--white);
}

.testimonials-brand-name {
  font-family: var(--primary);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.testimonials-brand-label {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  opacity: 0.82;
}

/* ---- Right column: quote + attribution ----------------------------------- */
.testimonials .rl_testimonial15_content-right {
  gap: 1.5rem;
}

/* The quote is a <blockquote>; reset UA margins and the inherited testimonial-text
   spacing so it sits cleanly inside the right column. */
.testimonials .testimonial-text {
  margin: 0 0 1.75rem;
  max-width: 48rem;
  quotes: none;
}

.testimonials .rl_testimonial15_client {
  margin-left: 0;
  gap: 0.85rem;
}

.testimonials .rl_testimonial15_client-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonials .testimonial-name {
  margin: 0;
}

/* Monogram avatar — derived initials, not a photo we don't have. */
.testimonial-avatar--monogram {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-brand-color);
  color: var(--black);
  font-family: var(--primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

/* ---- Controls (prev / dots / next) --------------------------------------- */
.testimonials-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.75rem;
}

.testimonials-arrow {
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--black);
  border-radius: 100px;
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.testimonials-arrow:hover {
  background: var(--black);
  color: var(--off-white);
}

.testimonials-arrow-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.testimonials-dots {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.testimonials-dot {
  width: 0.62rem;
  height: 0.62rem;
  flex: none;
  padding: 0;
  border: 1px solid var(--black);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.testimonials-dot.is-active {
  background: var(--black);
  transform: scale(1.2);
}

.testimonials-arrow:focus-visible,
.testimonials-dot:focus-visible {
  outline: 2px solid var(--primary-brand-color);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .testimonials-slide-wrap {
    transition: none;
  }
}

/* On the stacked (single-column) layout the right column's top border reads as a
   divider between the media and the quote — keep a little breathing room. */
@media screen and (max-width: 767px) {
  .testimonials-viewport {
    margin-top: 2rem;
  }

  .testimonials .rl_testimonial15_content-right {
    padding-top: 1.25rem;
  }

  .testimonials-controls {
    gap: 1.1rem;
  }
}
