/* =============================
   Logo Ticker (infinite horizontal scroll) — seamless version
   ============================= */
.logo-ticker{
  --gap: 2rem;
  --logo-height: 56px;
  --scroll-duration: 30s;          /* fallback */
  --loop-distance: 50%;            /* fallback; JS sets px for perfect loop */
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
          mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.logo-ticker .logo-track{
  display: flex;
  align-items: center;
  gap: var(--gap);
  will-change: transform;
  animation: logo-scroll var(--scroll-duration) linear infinite;
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
}

.logo-ticker:hover .logo-track,
.logo-ticker:focus-within .logo-track{
  animation-play-state: paused;
}

.logo-ticker .logo{
  flex: 0 0 auto;
  height: var(--logo-height);
  width: auto;
  max-width: none; /* ensure logos don't shrink due to .img-fluid elsewhere */
  display: block;
  opacity: 0.95;
}

@keyframes logo-scroll{
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(calc(-1 * var(--loop-distance)), 0, 0); }
}

/* Responsive sizing */
@media (min-width: 768px){
  .logo-ticker{ --logo-height: 128px; --gap: 2.5rem; }
}
@media (min-width: 1200px){
  .logo-ticker{ --logo-height: 200px; --gap: 3rem; }
}

/* Accessibility: reduce motion shows a manual horizontal scroller */
@media (prefers-reduced-motion: reduce){
  .logo-ticker{ overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .logo-ticker .logo-track{ animation: none; }
}
