/* =============================================================================
   Trusted By Logo Marquee — [trusted_by] shortcode
   ============================================================================= */

.tby-wrap {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Each row clips its track */
.tby-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* The track holds two identical sets of logos side-by-side.
   Animating by ±50% returns to the visual start, making the loop seamless. */
.tby-track {
  display: flex;
  width: max-content;
}

.tby-set {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-right: 56px; /* trailing gap so the seam matches inter-logo spacing */
}

.tby-row--left .tby-track {
  animation: tby-scroll-left var(--tby-duration, 75s) linear infinite;
}

.tby-row--right .tby-track {
  animation: tby-scroll-right var(--tby-duration, 75s) linear infinite;
}

@keyframes tby-scroll-left {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

@keyframes tby-scroll-right {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* Pause on hover */
.tby-row:hover .tby-track {
  animation-play-state: paused;
}

.tby-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.tby-item img {
  height: auto;
  max-height: 36px;
  width: auto;
  max-width: 140px;
  display: block;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.tby-item img:hover,
.tby-item a:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

.tby-item a {
  display: flex;
  align-items: center;
}

@media (max-width: 767px) {
  .tby-set {
    gap: 40px;
    padding-right: 40px;
  }

  .tby-item img {
    max-height: 28px;
    max-width: 110px;
  }
}
