/* Logo marquee — infinite horizontal scroll of partner/client logos.
   Content is duplicated in the template; translating by -50% loops seamlessly. */

.logo-marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  /* Edge fade so logos enter/exit smoothly without hard cutoff. */
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.logo-marquee__track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  will-change: transform;
  animation: logo-marquee-scroll 60s linear infinite;
}

/* Multiple tracks stack vertically with a small gap */
.logo-marquee__track + .logo-marquee__track {
  margin-top: 0.75rem;
}

/* Alternate direction row-to-row for visual interest */
.logo-marquee__track--rtl {
  animation-direction: reverse;
  animation-duration: 75s;  /* slight offset prevents synchronized start */
}

.logo-marquee:hover .logo-marquee__track {
  animation-play-state: paused;
}

.logo-marquee__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  min-width: 120px;
  padding: 0.5rem 1rem;
}

.logo-marquee__item img {
  max-height: 48px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Variant: dark section (home trust-bar). White pill card per logo so dark SVGs stay legible. */
.logo-marquee--on-dark .logo-marquee__item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* White-on-transparent logos: invert so they render dark on light pages,
   and keep them dark on the home trust-bar's white pill containers. */
.logo--invert {
  filter: invert(1) brightness(0.85);
}

/* Variant: single-logo category (no marquee, center-aligned). */
.logo-marquee--single {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.logo-marquee--single .logo-marquee__item {
  height: auto;
  padding: 1rem 2rem;
}

.logo-marquee--single .logo-marquee__item img {
  max-height: 80px;
  max-width: 240px;
}

@keyframes logo-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Reduced-motion: stop animation, wrap logos as a grid instead. */
@media (prefers-reduced-motion: reduce) {
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
  .logo-marquee__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  /* Hide the duplicated set in reduced-motion mode (it's decorative). */
  .logo-marquee__track > [aria-hidden="true"] { display: none; }
}

/* Organizations page — category section wrapper around marquee */
.org-logos {
  margin-top: 1.5rem;
}

.org-logos__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
  text-align: center;
  margin-bottom: 0.75rem;
}
