/* ==========================================================================
   TESTIMONIALS / CLIENT STORIES SECTION (BEXLEY CLONE)
   Strictly adheres to Design System Tokens in tokens.css
   Container max-width: 1840px
   Theme: Light Pearl (#f5f4f0) with Midnight Navy & Brand Blue undertones
   ========================================================================== */

.testimonials-section {
  position: relative;
  width: 100%;
  background-color: var(--color-brand-pearl, #f5f4f0);
  color: var(--_colors---swatch--black, #0c0f17);
  padding: 120px 0 140px;
  overflow: hidden;
  box-sizing: border-box;
}

/* 1840px Container */
.testimonials-container {
  width: 100%;
  max-width: var(--container-max, 1840px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Header: Title & CTA Button
   -------------------------------------------------------------------------- */
.testimonials-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 56px;
  position: relative;
  z-index: 2;
}

.testimonials-header-title-wrap {
  max-width: 860px;
}

.testimonials-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--_fonts---fonts--geist-mono, monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand-blue-slate, #52667e);
  margin-bottom: 16px;
}

.testimonials-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-brand-navy, #212e4e);
}

.testimonials-title {
  font-family: var(--_fonts---fonts--alt-heading, "ivypresto-headline", Georgia, serif);
  font-size: clamp(34px, 3.8vw, 56px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--color-brand-navy, #212e4e);
  margin: 0;
}

.testimonials-title .title-word {
  display: inline-block;
  will-change: transform, opacity;
}

.testimonials-header-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   3-Column Layout: Featured Card + Up Column + Down Column
   -------------------------------------------------------------------------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr 1fr;
  gap: 20px;
  height: 640px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Left Column: Featured Card (Anna Rahman)
   -------------------------------------------------------------------------- */
.testimonials-featured-card {
  position: relative;
  height: 100%;
  border-radius: var(--radius-card, 6px);
  overflow: hidden;
  border: 1px solid rgba(33, 46, 78, 0.12);
  background-color: var(--color-brand-sand, #efebdf);
  box-shadow: 0 10px 30px rgba(12, 15, 23, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.testimonials-featured-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.testimonials-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonials-featured-card:hover .testimonials-featured-img {
  transform: scale(1.03);
}

/* Gradient overlay on image */
.testimonials-featured-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 15, 23, 0) 35%, rgba(12, 15, 23, 0.5) 100%);
  pointer-events: none;
}

/* Featured Overlay Card at bottom */
.testimonials-featured-overlay {
  position: relative;
  z-index: 2;
  margin: 20px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(33, 46, 78, 0.1);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(12, 15, 23, 0.12);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.testimonials-featured-quote {
  font-family: var(--_fonts---fonts--alt-heading, "ivypresto-headline", Georgia, serif);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.25;
  color: var(--color-brand-navy, #212e4e);
  margin: 0;
  letter-spacing: -0.015em;
}

.testimonials-featured-author {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.testimonials-featured-name {
  font-family: var(--_fonts---fonts--paragraph, -apple-system, sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--_colors---swatch--black, #0c0f17);
  letter-spacing: -0.01em;
}

.testimonials-featured-position {
  font-family: var(--_fonts---fonts--paragraph, -apple-system, sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brand-blue-slate, #52667e);
}

/* --------------------------------------------------------------------------
   Columns 2 & 3: Infinite Vertical Marquees (Up & Down)
   -------------------------------------------------------------------------- */
.testimonials-col-marquee {
  position: relative;
  height: 100%;
  overflow: hidden;
  /* Top and bottom gradient fade mask */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0) 100%);
}

.testimonials-marquee-track {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  will-change: transform;
}

/* Up Track: Moves translateY(0) -> translateY(-50%) */
.testimonials-marquee-track.is-up {
  animation: marqueeScrollUp 32s linear infinite;
}

/* Down Track: Moves translateY(-50%) -> translateY(0) */
.testimonials-marquee-track.is-down {
  animation: marqueeScrollDown 32s linear infinite;
}

/* Pause on hover */
.testimonials-col-marquee:hover .testimonials-marquee-track,
.testimonials-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScrollUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

@keyframes marqueeScrollDown {
  0% {
    transform: translateY(-50%);
  }
  100% {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Individual Testimonial Cards
   -------------------------------------------------------------------------- */
.testimonial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-card, 6px);
  box-sizing: border-box;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-2px);
}

/* Card Variant 1: White solid card */
.testimonial-card.is-variant-solid {
  background-color: #ffffff;
  border: 1px solid rgba(33, 46, 78, 0.08);
  box-shadow: 0 4px 20px rgba(12, 15, 23, 0.04);
}

.testimonial-card.is-variant-solid:hover {
  box-shadow: 0 8px 28px rgba(12, 15, 23, 0.08);
  border-color: rgba(33, 46, 78, 0.18);
}

/* Card Variant 2: Subtle translucent tinted card */
.testimonial-card.is-variant-subtle {
  background-color: rgba(33, 46, 78, 0.025);
  border: 1px solid rgba(33, 46, 78, 0.1);
  box-shadow: none;
}

.testimonial-card.is-variant-subtle:hover {
  background-color: rgba(33, 46, 78, 0.045);
  border-color: rgba(33, 46, 78, 0.2);
}

/* Quote text */
.testimonial-quote {
  font-family: var(--_fonts---fonts--paragraph, -apple-system, sans-serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--_colors---swatch--black, #0c0f17);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Star Rating */
.testimonial-stars {
  display: flex;
  align-items: center;
  gap: 3px;
}

.testimonial-star-svg {
  width: 14px;
  height: 14px;
  fill: #e8b85f; /* Warm golden brass */
  flex-shrink: 0;
}

/* Client info footer */
.testimonial-client {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(33, 46, 78, 0.12);
  background-color: var(--color-brand-symbol, #bdc4d4);
}

.testimonial-client-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.testimonial-client-name {
  font-family: var(--_fonts---fonts--paragraph, -apple-system, sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-brand-navy, #212e4e);
  margin: 0;
  letter-spacing: -0.01em;
}

.testimonial-client-role {
  font-family: var(--_fonts---fonts--paragraph, -apple-system, sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brand-blue-slate, #52667e);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1200px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
    height: 600px;
  }
  .testimonials-featured-card {
    display: none; /* In Bexley, on smaller screens the featured card is adapted or replaced */
  }
}

@media screen and (max-width: 991px) {
  .testimonials-section {
    padding: 80px 0 100px;
  }
  .testimonials-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    height: 520px;
  }
  .testimonials-col-marquee.is-secondary {
    display: none;
  }
}

@media screen and (max-width: 479px) {
  .testimonials-section {
    padding: 60px 0 80px;
  }
  .testimonials-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .testimonials-grid {
    height: 480px;
  }
  .testimonial-card {
    padding: 18px;
    gap: 12px;
  }
  .testimonial-quote {
    font-size: 14px;
  }
  .testimonial-avatar {
    width: 42px;
    height: 42px;
  }
}
