/* Faixa de marcas v3: marquee infinito em todas as larguras.
   No desktop a janela do marquee e o proprio container da pagina (max 1520px),
   e o conjunto de 11 logos e mais largo que a janela em qualquer tela: nenhuma
   marca aparece duas vezes ao mesmo tempo. No mobile a janela ocupa a tela.
   Os tamanhos por logo igualam a massa visual (raiz da area de tinta),
   nao a caixa: marcas com texto/composicao ganham mais altura. */

.trust-strip--brand-logos .trust-name--clone {
  display: none;
}

/* Mesma caixa da Home; remove o padding lateral herdado pelo bundle de Agentes. */
.trust-strip.trust-strip--brand-logos .trust-strip__inner {
  width: min(calc(100% - (clamp(20px, 5.55vw, 80px) * 2)), 1280px);
  max-width: none;
  padding: 26px 0 30px;
}

@media (min-width: 681px) {
  .trust-strip.trust-strip--brand-logos .trust-strip__inner {
    padding-block: 48px 34px;
  }
}

@media (min-width: 1600px) {
  .trust-strip.trust-strip--brand-logos .trust-strip__inner {
    width: min(calc(100% - 160px), 1520px);
    padding-block: 96px 38px;
  }
}

.trust-strip--marquee {
  overflow: hidden;
}

.trust-strip--brand-logos.trust-strip--marquee .trust-strip__inner {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.trust-strip--brand-logos.trust-strip--marquee .trust-names {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  gap: 0;
  animation: logo-marquee 52s linear infinite;
}

.trust-strip--brand-logos.trust-strip--marquee .trust-name,
.trust-strip--brand-logos.trust-strip--marquee .trust-name--clone {
  display: flex;
  flex: 0 0 auto;
  min-height: 60px;
  margin: 0 72px 0 0;
}

/* A Home soma este gap aos 72px de margem em telas amplas (104px no total). */
@media (min-width: 1600px) {
  .trust-strip--brand-logos.trust-strip--marquee .trust-names {
    column-gap: clamp(24px, 1.5vw, 32px);
    padding-right: clamp(24px, 1.5vw, 32px);
  }
}

/* Alturas balanceadas (desktop, x0,9 da medida cheia). */
.trust-strip--brand-logos .trust-name img { max-width: 220px; opacity: 0.72; }
.trust-strip--brand-logos .trust-name--vieira img { max-height: 50px; }
.trust-strip--brand-logos .trust-name--empreende img { max-height: 49px; }
.trust-strip--brand-logos .trust-name--lagos img { max-height: 47px; }
.trust-strip--brand-logos .trust-name--enkrateia img { max-height: 44px; }
.trust-strip--brand-logos .trust-name--gim img { max-height: 40px; }
.trust-strip--brand-logos .trust-name--wide img { max-height: 36px; }
.trust-strip--brand-logos .trust-name--artfex img { max-height: 31px; }
.trust-strip--brand-logos .trust-name--trust img { max-height: 31px; }
.trust-strip--brand-logos .trust-name--bsb img { max-height: 33px; }
.trust-strip--brand-logos .trust-name--musiflex img { max-height: 22px; max-width: 260px; }
.trust-strip--brand-logos .trust-name--moai img { width: auto; height: 25px; max-width: none; max-height: 25px; }

/* Mobile: janela na largura da tela, loop mais curto. */
@media (max-width: 880px) {
  .trust-strip--brand-logos.trust-strip--marquee .trust-strip__inner {
    width: 100%;
    max-width: none;
    padding-inline: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  }

  .trust-strip--brand-logos.trust-strip--marquee .trust-names {
    animation-duration: 38s;
  }

  .trust-strip--brand-logos.trust-strip--marquee .trust-name,
  .trust-strip--brand-logos.trust-strip--marquee .trust-name--clone {
    min-height: 52px;
    margin-right: 44px;
  }

  .trust-strip--brand-logos .trust-name img { max-width: 184px; }
  .trust-strip--brand-logos .trust-name--vieira img { max-height: 47px; }
  .trust-strip--brand-logos .trust-name--empreende img { max-height: 45px; }
  .trust-strip--brand-logos .trust-name--lagos img { max-height: 43px; }
  .trust-strip--brand-logos .trust-name--enkrateia img { max-height: 41px; }
  .trust-strip--brand-logos .trust-name--gim img { max-height: 37px; }
  .trust-strip--brand-logos .trust-name--wide img { max-height: 33px; }
  .trust-strip--brand-logos .trust-name--artfex img { max-height: 28px; }
  .trust-strip--brand-logos .trust-name--trust img { max-height: 28px; }
  .trust-strip--brand-logos .trust-name--bsb img { max-height: 30px; }
  .trust-strip--brand-logos .trust-name--musiflex img { max-height: 20px; max-width: 252px; }
  .trust-strip--brand-logos .trust-name--moai img { width: auto; height: 23px; max-width: none; max-height: 23px; }
}

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

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

/* A pausa preserva a posição do loop e não introduz hover persistente no touch. */
@media (hover: hover) and (pointer: fine) {
  .trust-strip--brand-logos.trust-strip--marquee:hover .trust-names {
    animation-play-state: paused;
  }
}

/* Todas as marcas permanecem visíveis também ao mudar a preferência em runtime. */
@media (prefers-reduced-motion: reduce) {
  .trust-strip.trust-strip--brand-logos .trust-strip__inner {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .trust-strip.trust-strip--brand-logos .trust-names {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 24px 32px;
    padding-right: 0;
    animation: none;
    transform: none;
  }

  .trust-strip.trust-strip--brand-logos .trust-name {
    margin: 0;
  }

  .trust-strip.trust-strip--brand-logos .trust-name--clone {
    display: none;
  }
}
