/* --- TESTIMONIALS --- */
.testimonials {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(0,255,136,0.08), transparent 40%),
    var(--bg);
  background-size: 68px 68px, 68px 68px, 100% 100%, auto;
}
.testimonials .container {
  max-width: 1440px;
}
.testimonials .section-header {
  position: relative;
  z-index: 2;
}
.testi-grid,
.testimonial-carousel-scene {
  --carousel-card-width: 220px;
  --carousel-card-height: 195px;
  --carousel-radius: 455px;
  position: relative;
  height: clamp(285px, 32vw, 380px);
  margin: 32px calc(50% - 50vw) 0;
  perspective: 1080px;
  perspective-origin: 50% 48%;
  overflow: hidden;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.testi-grid.visible,
.testimonial-carousel-scene.visible {
  opacity: 1;
  transform: translateY(0);
}
.testi-grid::before,
.testi-grid::after,
.testimonial-carousel-scene::before,
.testimonial-carousel-scene::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(18vw, 220px);
  z-index: 3;
  pointer-events: none;
}
.testi-grid::before,
.testimonial-carousel-scene::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.testi-grid::after,
.testimonial-carousel-scene::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.testi-grid.is-dragging,
.testimonial-carousel-scene.is-dragging {
  cursor: grabbing;
}
.testimonial-carousel-spin {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: rotateY 40s linear infinite;
}
.testi-grid > .tcard {
  display: none;
}
.testi-grid:hover .testimonial-carousel-spin,
.testi-grid.is-dragging .testimonial-carousel-spin,
.testimonial-carousel-scene:hover .testimonial-carousel-spin,
.testimonial-carousel-scene.is-dragging .testimonial-carousel-spin {
  animation-play-state: paused;
}
.tcard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--carousel-card-width);
  height: var(--carousel-card-height);
  display: flex;
  flex-direction: column;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    rgba(8, 12, 10, 0.72);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border: 1px solid rgba(0,255,136,0.18);
  border-radius: 12px;
  box-shadow:
    0 18px 54px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 0 32px rgba(0,255,136,0.08);
  transform: translate(-50%, -50%) var(--card-transform);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.16,1,0.3,1), border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  overflow: hidden;
}
.tcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 10%, rgba(0,255,136,0.16), transparent 32%),
    linear-gradient(120deg, rgba(255,255,255,0.12), transparent 38%);
  pointer-events: none;
}
.tcard::after {
  content: "\201C";
  position: absolute;
  top: 6px;
  right: 16px;
  font-size: 54px;
  font-family: var(--font-display);
  color: rgba(0,255,136,0.14);
  line-height: 1;
  pointer-events: none;
}
.tcard:hover {
  border-color: rgba(0,255,136,0.54);
  transform: translate(-50%, -50%) var(--card-transform) translateY(-5px) scale(1.035);
  box-shadow:
    0 24px 68px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 46px rgba(0,255,136,0.28);
}
.tcard-accent {
  background:
    linear-gradient(145deg, rgba(0,255,136,0.13), rgba(255,255,255,0.035)),
    rgba(8, 12, 10, 0.76);
  border-color: rgba(0,255,136,0.34);
}
.tcard-stars {
  color: var(--green);
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 11px;
  text-shadow: 0 0 14px rgba(0,255,136,0.48);
  position: relative;
  z-index: 1;
}
.tcard-quote {
  position: relative;
  z-index: 1;
  flex: 1;
  font-size: 11px;
  color: rgba(232,232,232,0.86);
  line-height: 1.5;
  margin-bottom: 14px;
}
.tcard-author {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tcard-avatar {
  width: 30px;
  height: 30px;
  background: radial-gradient(circle at 35% 25%, #fff, var(--green) 28%, var(--green-soft) 78%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(0,255,136,0.34);
}
.tcard-name {
  display: block;
  font-weight: 600;
  color: var(--white);
  font-size: 11px;
}
.tcard-role {
  display: block;
  font-size: 9.5px;
  color: var(--dim);
  margin-top: 2px;
}
@keyframes rotateY {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(-360deg); }
}
