/* ==========================================================================
   testimonials.css — Client Testimonials 3D Carousel & Social Proof
   ========================================================================== */

.testi-section {
  position: relative;
  padding: 100px 24px 80px;
  background:
    radial-gradient(60% 50% at 8% 12%, rgba(219, 234, 254, 0.55) 0%, transparent 65%),
    radial-gradient(60% 50% at 92% 88%, rgba(224, 242, 254, 0.6) 0%, transparent 65%),
    linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 50%, #F1F5F9 100%);
  overflow: hidden;
}

.testi-container {
  max-width: 1320px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Pill badge */
.testi-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  background: #DBEAFE;
  border: 1px solid rgba(147, 197, 253, 0.7);
  color: #1D4ED8;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.testi-pill-quote {
  font-size: 16px;
  line-height: 1;
}

/* Heading */
.testi-heading {
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: clamp(32px, 3.8vw, 44px);
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.testi-heading-accent {
  color: #2563EB;
}

/* Subtitle */
.testi-sub {
  color: #64748B;
  font-size: 17px;
  max-width: 650px;
  margin: 0 auto 52px;
  line-height: 1.5;
}

/* Carousel Stage */
.testi-carousel-stage {
  position: relative;
  max-width: 1240px;
  height: 420px;
  margin: 0 auto 36px;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nav Buttons */
.testi-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: #1E40AF;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 30;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.testi-nav-btn:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.testi-nav-btn svg {
  width: 20px;
  height: 20px;
}

.testi-nav-prev {
  left: 8px;
}

.testi-nav-next {
  right: 8px;
}

/* Cards Track */
.testi-cards-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card Base */
.testi-card {
  position: absolute;
  width: min(390px, 86vw);
  height: 350px;
  padding: 34px 30px;
  border-radius: 28px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.5s ease,
              box-shadow 0.5s ease,
              background 0.4s ease;
  will-change: transform, opacity;
}

/* Side (Inactive) White Cards */
.testi-card.card-side {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(15, 23, 42, 0.04);
  color: #1E293B;
}

.testi-card.card-prev {
  transform: translateX(-355px) scale(0.9) rotateY(6deg) rotate(-2deg);
  z-index: 5;
  opacity: 0.95;
}

.testi-card.card-next {
  transform: translateX(355px) scale(0.9) rotateY(-6deg) rotate(2deg);
  z-index: 5;
  opacity: 0.95;
}

.testi-card.card-hidden {
  transform: translateX(0) scale(0.7);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Center (Active) Glowing Blue Card */
.testi-card.card-active {
  transform: translateX(0) scale(1) translateZ(0);
  z-index: 15;
  opacity: 1;
  background:
    radial-gradient(circle at 100% 100%, rgba(30, 64, 175, 0.9) 0%, transparent 65%),
    linear-gradient(145deg, #0284C7 0%, #1D4ED8 100%);
  box-shadow: 0 25px 60px -10px rgba(37, 99, 235, 0.45), 0 0 40px -10px rgba(2, 132, 199, 0.3);
  border: 1px solid rgba(147, 197, 253, 0.3);
  color: #FFFFFF;
}

/* Card Quote Icon */
.testi-card-quote-icon {
  font-size: 38px;
  line-height: 1;
  font-family: Georgia, serif;
  font-weight: 700;
  margin-bottom: 6px;
}

.testi-card.card-side .testi-card-quote-icon {
  color: #2563EB;
}

.testi-card.card-active .testi-card-quote-icon {
  color: #93C5FD;
}

/* Quote Text */
.testi-card-quote {
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 500;
  margin: 0 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testi-card.card-side .testi-card-quote {
  color: #334155;
}

.testi-card.card-active .testi-card-quote {
  color: #FFFFFF;
  font-size: 16.5px;
}

/* Author Footer Row */
.testi-card-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.testi-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testi-card.card-side .testi-card-avatar {
  border: 2px solid #E2E8F0;
}

.testi-card.card-active .testi-card-avatar {
  border: 2.5px solid rgba(255, 255, 255, 0.9);
}

.testi-card-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.testi-card-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
}

.testi-card.card-side .testi-card-name {
  color: #0F172A;
}

.testi-card.card-active .testi-card-name {
  color: #FFFFFF;
}

.testi-card-title {
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 4px;
}

.testi-card.card-side .testi-card-title {
  color: #64748B;
}

.testi-card.card-active .testi-card-title {
  color: #BAE6FD;
}

/* Stars */
.testi-card-stars {
  color: #FBBF24;
  font-size: 16px;
  letter-spacing: 2px;
  line-height: 1;
}

/* Pagination Dots */
.testi-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 56px;
}

.testi-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #CBD5E1;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
  opacity: 0.7;
}

.testi-dot:hover {
  opacity: 1;
}

.testi-dot.is-active {
  width: 26px;
  height: 9px;
  border-radius: 999px;
  background: #2563EB;
  opacity: 1;
}

/* Stats Bar */
.testi-stats-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 10px;
}

.testi-stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: left;
}

.testi-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #2563EB;
  flex-shrink: 0;
}

.testi-stat-icon svg {
  width: 38px;
  height: 38px;
  stroke-width: 2;
}

.testi-stat-info {
  display: flex;
  flex-direction: column;
}

.testi-stat-num {
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: 30px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.testi-stat-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #64748B;
  margin-top: 3px;
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .testi-card.card-prev {
    transform: translateX(-240px) scale(0.84);
  }
  .testi-card.card-next {
    transform: translateX(240px) scale(0.84);
  }
  .testi-stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 20px;
  }
}

@media (max-width: 768px) {
  .testi-card.card-prev,
  .testi-card.card-next {
    display: none;
  }
  .testi-card.card-active {
    position: relative;
    transform: none;
    width: 100%;
    max-width: 380px;
  }
  .testi-carousel-stage {
    height: auto;
  }
  .testi-nav-prev {
    left: -8px;
  }
  .testi-nav-next {
    right: -8px;
  }
  .testi-stats-container {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }
  .testi-stat-num {
    font-size: 26px;
  }
  .testi-stat-label {
    font-size: 13px;
  }
}

