.home-logos-carousel {
  --marquee-item-height: 70px;
  --marquee-gap: 5rem;
  --marquee-duration: 180s;
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: var(--marquee-gap, 1rem);
  block-size: var(--marquee-item-height, 70px);
  position: relative;
}

.home-logos-carousel::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 25%;
  height: 100%;
  background-image: linear-gradient(90deg, #ffffff, transparent);
  z-index: 2;
}

.home-logos-carousel::after {
  position: absolute;
  content: "";
  top: 0;
  right: 0;
  width: 25%;
  height: 100%;
  background-image: linear-gradient(-90deg, #ffffff, transparent);
  z-index: 2;
}

@media (min-width: 1400px) {
  .home-logos-carousel::before,
  .home-logos-carousel::after {
    width: calc(50% - 570px);
  }
  .home-logos-carousel::before {
    background-image: linear-gradient(90deg, #ffffff 75%, transparent);
  }
  .home-logos-carousel::after {
    background-image: linear-gradient(-90deg, #ffffff 75%, transparent);
  }
}
.home-logos-carousel__group {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--marquee-gap);
  min-width: 100%;
  animation: scroll linear var(--marquee-duration) infinite;
  filter: grayscale(1);
  opacity: 0.5;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

/* Pause the scrolling animation on hover to allow users to read/look closely */
.home-logos-carousel:hover .home-logos-carousel__group {
  filter: grayscale(0);
  opacity: 1;
  animation-play-state: paused;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* Translate by exactly -100% of the group width minus the gap to create a perfect seamless loop */
    transform: translateX(calc(-100% - var(--marquee-gap)));
  }
}
