/**
 * Trusted By Marquee Widget Styles
 *
 * CSS-only infinite marquee. The track contains two identical copies of
 * the partner list so animating it to translateX(-50%) loops seamlessly.
 *
 * @package BongoHive
 */

.bh-trusted-by {
  --bh-tb-font-heading: "PT Sans", "Lato", Arial, sans-serif;
  --bh-tb-font-body: "Noto Sans", "Ubuntu", Arial, sans-serif;
  --bh-tb-gold: #f0af24;
  --bh-tb-white: #ffffff;
  --bh-tb-shark-dark: #171b20;

  align-items: center;
  background-color: var(--bh-tb-shark-dark);
  display: flex;
  gap: 100px;
  justify-content: center;
  overflow: hidden;
  padding: 50px 110px;
  width: 100%;
}

.bh-trusted-by__label {
  color: var(--bh-tb-gold);
  flex-shrink: 0;
  font-family: var(--bh-tb-font-body);
  font-size: clamp(16px, 1vw + 12px, 22px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.bh-trusted-by__viewport {
  flex: 1 1 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  min-width: 0;
  overflow: hidden;
}

.bh-trusted-by__track {
  align-items: center;
  animation: bh-trusted-by-scroll 40s linear infinite;
  display: flex;
  gap: 100px;
  width: max-content;
  will-change: transform;
}

.bh-trusted-by__list {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 100px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bh-trusted-by__item-row {
  flex-shrink: 0;
}

.bh-trusted-by__item {
  color: var(--bh-tb-white);
  font-family: var(--bh-tb-font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

a.bh-trusted-by__item {
  transition: opacity 200ms ease;
}

a.bh-trusted-by__item:hover,
a.bh-trusted-by__item:focus-visible {
  opacity: 0.7;
}

/* Direction modifiers */
.bh-trusted-by--left .bh-trusted-by__track {
  animation-name: bh-trusted-by-scroll;
}

.bh-trusted-by--right .bh-trusted-by__track {
  animation-name: bh-trusted-by-scroll-reverse;
}

/* Pause on hover (opt-in via modifier) */
.bh-trusted-by--pause-hover:hover .bh-trusted-by__track,
.bh-trusted-by--pause-hover:focus-within .bh-trusted-by__track {
  animation-play-state: paused;
}

@keyframes bh-trusted-by-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

@keyframes bh-trusted-by-scroll-reverse {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* ==========================================================================
   Editor preview placeholder for dynamic mode
   ========================================================================== */

.bh-trusted-by__editor-notice {
  color: rgba(255, 255, 255, 0.7);
  flex: 1 1 auto;
  font-family: var(--bh-tb-font-body);
  font-size: 14px;
  text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .bh-trusted-by {
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
  }

  .bh-trusted-by__viewport {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .bh-trusted-by {
    padding: 24px 16px;
  }

  .bh-trusted-by__label {
    font-size: 18px;
  }

  .bh-trusted-by__item {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-trusted-by__viewport {
    -webkit-mask-image: none;
    mask-image: none;
    overflow-x: auto;
  }
  .bh-trusted-by__track {
    animation: none !important;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  /* Avoid duplicate names for assistive tech / static layout. */
  .bh-trusted-by__list[aria-hidden="true"] {
    display: none;
  }
}
