/*
 * Client logo carousel and the "trusted worldwide" band around it: the one
 * stylesheet every page's logo strip loads (website/client-logo-carousel.blade.php
 * includes it, website/client-logo-section.blade.php builds the band). Rules for
 * every carousel belong here, not copied into a page's own stylesheet.
 */

/* The legacy theme puts a 6px navy dot on every `ul li` (style.min `ul li:before`).
   A logo strip is not a bulleted list. */
.lg-track li::before {
  content: none;
}

/* Logo size: every carousel shows its logos at the same height. */
.lg-track li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 72px;
}

.lg-track img {
  display: block;
  width: auto;
  height: 72px;
  max-width: 220px;
  object-fit: contain;
  transition: opacity .3s, transform .3s;
}

/* A coloured logo file (config/client-logos.php 'recolour') is shown white like the others. */
.lg-track img.lg-white {
  filter: brightness(0) invert(1);
}

/* The band (.lg-clients): same layout, spacing and speed on every page. */
.lg-clients {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 0;
  margin-top: -2px;
  /* The band takes its colours from the sections around it, so it fits whatever the page
     puts there: --lg-start is the colour of the section above (its wave), --lg-end the colour
     the section below starts in. client-logo-carousel.js measures both when the page loads;
     #0a2140 (the hero wave's colour) is only the fallback before that. */
  background: linear-gradient(180deg, var(--lg-start, #0a2140) 0%, var(--lg-end, #0a2140) 100%);
}

.lg-clients::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(42% 30% at 50% 34%, rgba(80, 188, 189, .07), transparent);
}

.lg-clients .lg-top {
  max-width: calc(var(--maxw, 1240px) - 40px);
  margin: 0 auto;
  padding: clamp(8px, 1.5vw, 20px) 24px clamp(14px, 2vw, 22px);
  text-align: center;
}

.lg-clients .lg-h {
  max-width: calc(var(--maxw, 1240px) - 120px);
  margin: 0 auto;
  font-size: calc(clamp(20px, 2.1vw, 28px) * var(--ts, 1));
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.lg-clients .lg-h b {
  color: #50bcbd;
  font-weight: 700;
}

.lg-clients .lg-bottom {
  position: relative;
  max-width: var(--maxw, 1240px);
  margin: 0 auto;
  padding: clamp(10px, 1.5vw, 18px) calc(var(--pad, clamp(20px, 5vw, 48px)) + 52px) clamp(20px, 2.4vw, 30px) var(--pad, clamp(20px, 5vw, 48px));
}

.lg-clients .lg-head {
  position: absolute;
  right: var(--pad, clamp(20px, 5vw, 48px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.lg-clients .lg-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(21, 43, 79, .85) !important;
  box-shadow: inset 0 0 0 1.5px rgba(147, 164, 192, .3);
  cursor: pointer;
  transition: box-shadow .2s, background .2s;
}

.lg-clients .lg-btn:hover {
  box-shadow: inset 0 0 0 1.5px #50bcbd;
  background: rgba(80, 188, 189, .08);
}

.lg-clients .lg-btn:focus-visible {
  outline: 2px solid #9adeda;
  outline-offset: 2px;
}

.lg-clients .lg-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lg-clients .lg-btn .i-play {
  display: none;
  fill: #fff;
  stroke-width: 1.5;
}

.lg-clients.paused .i-pause {
  display: none;
}

.lg-clients.paused .i-play {
  display: block;
}

.lg-clients .lg-view {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.lg-clients .lg-track {
  flex: none;
  display: flex;
  align-items: center;
  gap: clamp(64px, 7.5vw, 112px);
  margin: 0;
  padding: 0 0 0 clamp(64px, 7.5vw, 112px);
  list-style: none;
  /* Same scroll speed whatever the language's set size: 7.2s per logo, about 31px/s like the carousels on the live site (8 logos = 50s). */
  animation: lgMove calc(var(--lg-n, 8) * 7.2s) linear infinite;
}

.lg-clients .lg-track img:hover {
  opacity: 1;
  transform: scale(1.04);
}

.lg-clients .lg-view:hover .lg-track,
.lg-clients.paused .lg-track {
  animation-play-state: paused;
}

@keyframes lgMove {
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 700px) {
  .lg-clients .lg-bottom {
    padding-right: calc(var(--pad, clamp(20px, 5vw, 48px)) + 44px);
  }

  .lg-clients .lg-track li {
    height: 58px;
  }

  .lg-clients .lg-track img {
    zoom: .72;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-clients .lg-track {
    animation: none;
  }

  .lg-clients .lg-view {
    overflow-x: auto;
  }
}
