/* Carrusel sutil — Confianza y recomendaciones */
.trust-marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.trust-marquee__track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: trust-marquee-scroll 42s linear infinite;
  padding: 0.5rem 0;
  will-change: transform;
}

.trust-marquee:hover .trust-marquee__track,
.trust-marquee.is-touch-paused .trust-marquee__track {
  animation-play-state: paused;
}

.trust-logo-item {
  flex: 0 0 auto;
  width: 140px;
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #f1f5f9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

a.trust-logo-item:hover {
  border-color: #e5e7eb;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.trust-logo-item__img-wrap {
  width: 120px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-logo-item img {
  max-width: 120px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(15%);
  opacity: 0.92;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.trust-logo-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

.trust-logo-item__label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  line-height: 1.2;
  max-width: 130px;
}

#home-trust-section.is-empty {
  display: none;
}

#home-trust-section {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

@keyframes trust-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ── Móvil: carrusel táctil optimizado ── */
@media (max-width: 639px) {
  #home-trust-section {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  #home-trust-section .max-w-\[1150px\] {
    padding-left: 0;
    padding-right: 0;
  }

  #home-trust-title {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .trust-marquee {
    mask-image: linear-gradient(to right, transparent, #000 2%, #000 98%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 2%, #000 98%, transparent);
    margin: 0;
    padding: 0.25rem 0;
    touch-action: pan-y;
  }

  .trust-marquee--scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .trust-marquee--scroll::-webkit-scrollbar {
    display: none;
  }

  .trust-marquee--scroll .trust-marquee__track {
    animation: none;
    width: max-content;
    gap: 0.75rem;
    padding: 0.35rem 1rem 0.5rem;
  }

  .trust-marquee:not(.trust-marquee--scroll) .trust-marquee__track {
    gap: 1.25rem;
    animation-duration: 36s;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .trust-logo-item {
    width: 108px;
    min-height: 64px;
    height: auto;
    padding: 0.45rem 0.55rem;
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  .trust-logo-item__img-wrap {
    width: 92px;
    height: 38px;
  }

  .trust-logo-item img {
    max-width: 92px;
    max-height: 38px;
  }

  .trust-logo-item__label {
    font-size: 10px;
    max-width: 100px;
    line-height: 1.15;
  }
}

@media (max-width: 380px) {
  .trust-logo-item {
    width: 96px;
    min-height: 58px;
  }

  .trust-logo-item__img-wrap {
    width: 84px;
    height: 34px;
  }

  .trust-logo-item img {
    max-width: 84px;
    max-height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trust-marquee__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 1rem;
    padding: 0 1rem;
  }

  .trust-marquee {
    mask-image: none;
    -webkit-mask-image: none;
    overflow: visible;
  }
}
