.company-carousel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  flex: 0 0 var(--company-band-height);
  width: 100%;
  min-height: var(--company-band-height);
  min-width: 0;
  padding: 24px max(24px, calc((100vw - 1320px) / 2)) 20px;
  background: #fff;
}

.company-carousel__heading {
  margin: 0 auto 16px;
  max-width: 900px;
  text-align: center;
}

.company-carousel h2 {
  margin: 0;
  color: #242833;
  font-family: Outfit, sans-serif;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 600;
  line-height: 1.3;
}

.company-carousel__list {
  --logo-edge-fade: clamp(24px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  gap: 28px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
  margin: 0;
  padding: 4px;
  list-style: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--logo-edge-fade), #000 calc(100% - var(--logo-edge-fade)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--logo-edge-fade), #000 calc(100% - var(--logo-edge-fade)), transparent);
}

/* Keep keyboard focus outlines fully visible while navigating the logos. */
.company-carousel__list:focus-within {
  -webkit-mask-image: none;
  mask-image: none;
}

.company-carousel__list::-webkit-scrollbar {
  display: none;
}

.company-carousel__item {
  flex: 0 0 132px;
  scroll-snap-align: start;
}

.company-carousel__link {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 70px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  transition: opacity .18s ease;
}

.company-carousel__link:hover {
  opacity: .7;
}

.company-carousel__link:focus-visible {
  outline: 2px solid #67458c;
  outline-offset: 2px;
}

.company-carousel__link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media screen and (max-width: 767px) {
  .company-carousel {
    flex-basis: auto;
    padding: 40px 20px 20px;
  }

  .company-carousel__heading {
    max-width: 340px;
    padding: 0 8px;
  }

  .company-carousel__item {
    flex-basis: 120px;
  }

  .company-carousel__list {
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .company-carousel__link {
    transition: none;
  }
}

.company-carousel[hidden],
.company-carousel__item[hidden] {
  display: none;
}

/* Continuous copies replace snap scrolling only while automatic movement is enabled. */
.company-carousel__list.is-looping {
  justify-content: flex-start;
  scroll-snap-type: none;
  scroll-behavior: auto;
}
