.ml-testimonials {
  --ml-testimonial-gap: 18px;
  --ml-testimonial-width: 262px;

  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 12px 0;
  box-sizing: border-box;
}

.ml-testimonials *,
.ml-testimonials *::before,
.ml-testimonials *::after {
  box-sizing: border-box;
}

.ml-testimonials-track {
  display: flex;
  align-items: stretch;
  gap: var(--ml-testimonial-gap);
  width: max-content;
  animation: ml-testimonial-scroll 55s linear infinite;
  will-change: transform;
}

.ml-testimonial-card {
  flex: 0 0 var(--ml-testimonial-width);
  width: var(--ml-testimonial-width);
  overflow: hidden;
  border-radius: 10px;
  
}

.ml-testimonial-card a {
  display: block;
  width: 100%;
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.ml-testimonial-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.ml-testimonial-card a:hover img {
  transform: scale(1.04);
}

.ml-instagram-icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
}

.ml-instagram-icon svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ml-instagram-icon .ml-instagram-dot {
  fill: currentColor;
  stroke: none;
}

.ml-testimonials:hover .ml-testimonials-track {
  animation-play-state: paused;
}

@keyframes ml-testimonial-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .ml-testimonials {
    --ml-testimonial-width: 230px;
    --ml-testimonial-gap: 16px;
  }

  .ml-testimonials-track {
    animation-duration: 48s;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ml-testimonials {
    --ml-testimonial-width: 68vw;
    --ml-testimonial-gap: 12px;
    padding: 8px 0;
  }

  .ml-testimonials-track {
    animation-duration: 38s;
  }

  .ml-instagram-icon {
    width: 32px;
    height: 32px;
    right: 9px;
    bottom: 9px;
  }

  .ml-instagram-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ml-testimonials-track {
    animation: none;
  }
}

/* Left & Right Fade Gradient */
.ml-testimonials {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.ml-testimonials::before,
.ml-testimonials::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(35px, 8vw, 150px);
  z-index: 5;
  pointer-events: none;
}

/* Left fade */
.ml-testimonials::before {
  left: 0;
  background: linear-gradient(
    to right,
    #ffffff 0%,
    rgba(255, 255, 255, 0.92) 20%,
    rgba(255, 255, 255, 0.6) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* Right fade */
.ml-testimonials::after {
  right: 0;
  background: linear-gradient(
    to left,
    #ffffff 0%,
    rgba(255, 255, 255, 0.92) 20%,
    rgba(255, 255, 255, 0.6) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}