/* ===== TESTIMONIALS CAROUSEL ===== */
/* Shared component — used on homepage and Ai1 page */
/* Uses fallback custom properties: var(--primary, var(--color-primary)) */

.testimonials-section {
  padding: 3rem 0;
  background: radial-gradient(77% 120% at 52% 50%, #FFFFFF 0%, #DFEAFF 100%);
}

.testimonials-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.testimonials-heading {
  font-size: 36px;
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--dark, var(--color-dark, #252C39));
  font-weight: 700;
}

.testimonials-subheading {
  text-align: center;
  color: #64748b;
  font-size: 16px;
  margin-bottom: 2.5rem;
}

.testimonials-carousel {
  position: relative;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-slide {
  min-width: 100%;
  box-sizing: border-box;
}

.testimonial-card-new {
  display: flex;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--grey-200, #e5e7eb);
  overflow: hidden;
  min-height: 0;
  height: auto;
}

.testimonial-photo {
  width: 270px;
  min-width: 270px;
  object-fit: cover;
  display: block;
}

.testimonial-content {
  flex: 1;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.testimonial-quote-new {
  font-size: 16px;
  line-height: 1.75;
  color: var(--dark, var(--color-dark, #252C39));
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-quote-new::before {
  content: '\201C';
  font-size: 48px;
  line-height: 0;
  vertical-align: -16px;
  color: var(--primary, var(--color-primary, #3361FF));
  margin-right: 4px;
  font-style: normal;
  font-weight: 700;
}

.testimonial-author-new {
  font-weight: 700;
  color: var(--dark, var(--color-dark, #252C39));
  font-size: 16px;
}

.testimonial-role {
  color: #64748b;
  font-size: 14px;
  margin-top: 2px;
}

.testimonial-role a {
  color: var(--primary, var(--color-primary, #3361FF));
  text-decoration: none;
  font-weight: 600;
}

.testimonials-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 1rem;
}

.testimonial-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--primary, var(--color-primary, #3361FF));
  background: white;
  color: var(--primary, var(--color-primary, #3361FF));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.testimonial-btn:hover {
  background: var(--primary, var(--color-primary, #3361FF));
  color: white;
}

.testimonial-btn svg {
  width: 18px;
  height: 18px;
}

.testimonials-dots {
  display: flex;
  gap: 8px;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.testimonial-dot.active {
  background: var(--primary, var(--color-primary, #3361FF));
  transform: scale(1.2);
}

/* ---- Mobile-only elements (hidden on desktop) ---- */
.testimonial-chevron {
  display: none;
}
.testimonials-dots-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Strip section background and extra padding — match page edge */
  .testimonials-section {
    background: none;
    padding: 2rem 0;
  }
  .testimonials-container {
    padding: 0 1rem;
  }
  .testimonial-slide {
    padding: 0;
  }

  /* Switch card from flex to block so photo float works across children */
  .testimonial-card-new {
    display: block;
    height: auto;
    min-height: 220px;
    border-radius: 12px;
    padding: 24px 20px 28px;
    position: relative;
    border: 1px solid var(--grey-200, #e5e7eb);
  }
  .testimonial-photo {
    width: 64px;
    min-width: 64px;
    height: 64px;
    border-radius: 50%;
    float: left;
    margin: 0 1rem 0.5rem 0;
    object-fit: cover;
    object-position: top center;
  }
  .testimonial-content {
    display: block;
    padding: 0;
  }
  .testimonial-quote-new {
    font-size: 14px;
    line-height: 1.65;
  }
  .testimonial-author-new {
    clear: left;
    padding-top: 0.5rem;
  }
  .testimonials-heading {
    font-size: 28px;
    text-align: left;
  }
  .testimonials-subheading {
    font-size: 14px;
    margin-bottom: 1.5rem;
    text-align: left;
  }

  /* ---- Hide the big desktop nav bar on mobile ---- */
  .testimonials-nav {
    display: none !important;
  }

  /* ---- Mobile dots: small, subtle, centered below card ---- */
  .testimonials-dots-mobile {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 1rem;
  }
  .testimonials-dots-mobile .testimonial-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
  }
  .testimonials-dots-mobile .testimonial-dot.active {
    background: var(--primary, #3361FF);
    transform: scale(1.3);
  }

  /* ---- Floating chevron arrows on card edges ---- */
  .testimonial-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--dark, #252C39);
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, box-shadow 0.15s ease;
  }
  .testimonial-chevron:active {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  }
  .testimonial-chevron svg {
    width: 16px;
    height: 16px;
  }
  .testimonial-chevron-prev {
    left: -6px;
  }
  .testimonial-chevron-next {
    right: -6px;
  }

  /* Carousel wrapper needs relative for chevron positioning */
  .testimonials-carousel {
    position: relative;
  }
}
