/* Reusable Safeguard logo marquee, portfolio / partner strips */

.sg-logo-marquee {
  padding-block: clamp(2rem, 4vw, 2.75rem);
  border-block: 1px solid var(--sg-line, #D7E3EC);
  overflow: hidden;
}

.sg-logo-marquee--wash {
  background: var(--sg-blue-wash, #ffffff);
}

.sg-logo-marquee--light {
  background: #fff;
}

.sg-logo-marquee__head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.sg-logo-marquee__title {
  margin: 0;
  font-family: var(--sg-font-head, "Chakra Petch", ui-sans-serif, sans-serif);
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--sg-navy, #0C2D44);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sg-logo-marquee__subtitle {
  margin: 0.5rem 0 0;
  font-family: var(--sg-font-body, "Inter", ui-sans-serif, sans-serif);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--sg-muted, #5A6B77);
}

.sg-logo-marquee__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.sg-logo-marquee__viewport:focus-visible {
  outline: 2px solid var(--sg-orange, #FB7523);
  outline-offset: 2px;
}

.sg-logo-marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 3.5rem);
  width: max-content;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  animation: sg-logo-marquee-scroll 55s linear infinite;
}

.sg-logo-marquee__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  max-width: 10rem;
  height: 3.5rem;
  padding-inline: 0.5rem;
}

.sg-logo-marquee__logo {
  display: block;
  max-width: 100%;
  max-height: 2.75rem;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.82;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.sg-logo-marquee__item:hover .sg-logo-marquee__logo,
.sg-logo-marquee__item:focus-within .sg-logo-marquee__logo {
  filter: grayscale(0%);
  opacity: 1;
}


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

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sg-logo-marquee__viewport {
    overflow-x: auto;
    mask-image: none;
    scrollbar-width: thin;
  }

  .sg-logo-marquee__track {
    animation: none;
    flex-wrap: nowrap;
    width: auto;
    padding-inline: var(--sg-gutter, 1.25rem);
  }
}

@media (max-width: 640px) {
  .sg-logo-marquee__item {
    min-width: 6.5rem;
    max-width: 8.5rem;
    height: 3rem;
  }

  .sg-logo-marquee__logo {
    max-height: 2.25rem;
  }
}
