/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TESTIMONIAL SECTION — Infinite Marquee Cards
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Section fade-in on scroll ───────────────────── */
.testimonial-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Marquee Slider Container ────────────────────── */
.testimonial-slider {
  position: relative;
  overflow: hidden;
  padding: 8px 0;
}

/* Gradient fade masks on edges */
.testimonial-slider::before,
.testimonial-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.testimonial-slider::before {
  left: 0;
  background: linear-gradient(to right, rgb(248 250 252) 0%, transparent 100%);
}

.testimonial-slider::after {
  right: 0;
  background: linear-gradient(to left, rgb(248 250 252) 0%, transparent 100%);
}

/* ── Marquee Track ───────────────────────────────── */
.testimonial-marquee {
  display: flex;
  width: max-content;
  animation: testimonialSlide 50s linear infinite;
  will-change: transform;
}

/* Pause on hover (desktop) */
.testimonial-slider:hover .testimonial-marquee {
  animation-play-state: paused;
}

/* Pause on touch (mobile) — toggled via JS */
.testimonial-marquee.paused {
  animation-play-state: paused;
}

@keyframes testimonialSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ── Testimonial Card ────────────────────────────── */
.testimonial-card {
  flex-shrink: 0;
  width: 380px;
  margin: 0 16px;
  padding: 30px 28px 26px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(79, 70, 229, 0.04);
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.4s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient accent line at top */
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  background: linear-gradient(135deg, #6366f1 0%, #f97316 100%);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.testimonial-card:hover::before {
  opacity: 1;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 48px rgba(79, 70, 229, 0.10),
    0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: rgba(99, 102, 241, 0.18);
}

/* ── Quote Icon ──────────────────────────────────── */
.testimonial-quote-icon {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 40px;
  height: 40px;
  color: #6366f1;
  opacity: 0.08;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.testimonial-card:hover .testimonial-quote-icon {
  opacity: 0.16;
}

/* ── Project Preview Thumbnail ───────────────────── */
.testimonial-preview {
  width: 100%;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.testimonial-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover .testimonial-preview img {
  transform: scale(1.06);
}

.testimonial-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.06) 100%);
  pointer-events: none;
}

/* ── Star Rating ─────────────────────────────────── */
.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}

.testimonial-stars svg {
  width: 18px;
  height: 18px;
  color: #f59e0b;
  filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.25));
}

/* ── Quote Text ──────────────────────────────────── */
.testimonial-text {
  font-size: 14.5px;
  line-height: 1.8;
  color: #334155;
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

/* ── Client Info Row ─────────────────────────────── */
.testimonial-client {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.testimonial-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar {
  border-color: rgba(99, 102, 241, 0.25);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-client-info {
  display: flex;
  flex-direction: column;
}

.testimonial-client-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.testimonial-client-role {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* Verified badge */
.testimonial-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.07);
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 4px;
  width: fit-content;
}

.testimonial-verified svg {
  width: 12px;
  height: 12px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
  .testimonial-card {
    width: 310px;
    margin: 0 10px;
    padding: 22px 22px 20px;
  }

  .testimonial-preview {
    height: 95px;
  }

  .testimonial-slider::before,
  .testimonial-slider::after {
    width: 40px;
  }

  .testimonial-text {
    font-size: 13.5px;
  }

  .testimonial-marquee {
    animation-duration: 35s;
  }
}

/* ── Reduced Motion Preference ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .testimonial-marquee {
    animation-duration: 120s;
  }

  .testimonial-card:hover {
    transform: none;
  }
}
