/* Scrolling testimonial columns — port of testimonials-columns-1 (motion/react) */

.lm-testimonials.section-testimonials {
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #f8fafc calc(var(--lm-gradient-bridge) * 0.5),
    #f1f5f9 48%,
    var(--lm-white) calc(100% - var(--lm-gradient-bridge)),
    var(--lm-white) 100%
  );
  overflow: hidden;
}

.lm-testimonials-header {
  max-width: 34rem;
  margin: 0 auto var(--space-10);
  text-align: center;
}

.lm-testimonials-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--lm-border, var(--border));
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lm-muted, #64748b);
  background: var(--lm-white, #fff);
}

.lm-testimonials-title {
  margin: var(--space-4) 0 var(--space-3);
  font-size: clamp(1.5rem, 3.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--lm-navy, #0f172a);
}

.lm-testimonials-sub {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--lm-muted, #64748b);
}

.lm-testimonials-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-4);
  max-height: min(740px, 70vh);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  padding: var(--space-2) 0;
}

.lm-testimonials-column {
  flex: 0 1 20rem;
  max-width: 20rem;
  width: 100%;
  overflow: hidden;
  height: min(740px, 70vh);
}

.lm-testimonials-column--md {
  display: none;
}

.lm-testimonials-column--lg {
  display: none;
}

@media (min-width: 768px) {
  .lm-testimonials-column--md {
    display: block;
  }
}

@media (min-width: 1024px) {
  .lm-testimonials-column--lg {
    display: block;
  }
  .lm-testimonials-stage {
    gap: var(--space-6);
  }
}

.lm-testimonials-track {
  display: flex;
  flex-direction: column;
  animation: lm-testimonials-scroll var(--lm-scroll-duration, 16s) linear infinite;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.lm-testimonial-text,
.lm-testimonial-name,
.lm-testimonial-role {
  -webkit-font-smoothing: antialiased;
}

.lm-testimonials-set {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
}

@keyframes lm-testimonials-scroll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

.lm-testimonial-card {
  background: var(--lm-white, #fff);
  border: 1px solid var(--lm-border, var(--border));
  border-radius: 1.5rem;
  padding: var(--space-6) var(--space-6);
  box-shadow: var(--shadow-lg);
  max-width: 20rem;
  width: 100%;
  box-sizing: border-box;
}

.lm-testimonial-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--lm-text, #1f2937);
  font-style: normal;
  quotes: none;
}

.lm-testimonial-text[dir='rtl'] {
  text-align: end;
}

.lm-testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: 0;
  border: 0;
}

.lm-testimonial-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #059669, #047857);
}

.lm-testimonial-card:nth-child(3n + 1) .lm-testimonial-avatar {
  background: linear-gradient(135deg, #059669, #047857);
}
.lm-testimonial-card:nth-child(3n + 2) .lm-testimonial-avatar {
  background: linear-gradient(135deg, #0f766e, #115e59);
}
.lm-testimonial-card:nth-child(3n) .lm-testimonial-avatar {
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
}

.lm-testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.lm-testimonial-name a {
  color: inherit;
  text-decoration: none;
  font-style: normal;
}

.lm-testimonial-name a:hover {
  color: var(--lm-teal, #0f766e);
  text-decoration: underline;
}

.lm-testimonial-store-link {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lm-teal, #0f766e);
  text-decoration: none;
}

.lm-testimonial-store-link:hover {
  text-decoration: underline;
}

.lm-testimonial-name {
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--lm-navy, #0f172a);
}

.lm-testimonial-role {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--lm-terracotta, #c2410c);
  font-weight: 500;
}

@media (max-width: 767px) {
  .lm-testimonials-stage {
    max-height: min(520px, 65vh);
  }
  .lm-testimonials-column {
    flex: 1 1 auto;
    max-width: min(20rem, 100%);
    height: min(520px, 65vh);
  }
  .lm-testimonial-card {
    padding: var(--space-6) var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lm-testimonials-track {
    animation: none;
  }
  .lm-testimonials-stage {
    max-height: none;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    flex-direction: column;
    align-items: center;
  }
  .lm-testimonials-column,
  .lm-testimonials-column--md,
  .lm-testimonials-column--lg {
    display: block !important;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .lm-testimonials-set[aria-hidden='true'] {
    display: none;
  }
}
