.brands-section {
  background: var(--bg-muted);
  padding: 100px 0;
  overflow: hidden;
}

.brands-label {
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 600;
    color: var(--text-page);
    margin-bottom: 3rem;
    line-height: 1.2;
    text-align: center;
}

/* Wrapper con fade en los bordes */
.marquee-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.marquee-wrap:last-child {
  margin-bottom: 0;
}

/* Fade izquierda y derecha */
.marquee-wrap::before,
.marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-muted) 0%, transparent 100%);
}

.marquee-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-muted) 0%, transparent 100%);
}

/* Track — flex horizontal */
.marquee-track {
  display: flex;
  width: max-content;
}

/* Animación izquierda (fila 1) */
.marquee-left {
  animation: marquee-left 25s linear infinite;
}

/* Animación derecha (fila 2) */
.marquee-right {
  animation: marquee-right 25s linear infinite;
}

/* Pausa al hover */
.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* Contenido de cada fila */
.marquee-content {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 0 48px;
  flex-shrink: 0;
}

/* Logos de marcas */
.brand-logo {
  height: 35px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.brand-logo:hover {
  opacity: 1;
}

/* Tema oscuro (default): se muestra la variante _blanco */
.brand-logo--light {
  display: none;
}

/* Tema claro: se intercambian las variantes */
[data-theme="light"] .brand-logo--dark {
  display: none;
}

[data-theme="light"] .brand-logo--light {
  display: block;
}

/* Reducir velocidad en mobile */
@media (max-width: 768px) {
  .marquee-left,
  .marquee-right {
    animation-duration: 18s;
  }

  .brand-logo {
    height: 32px;
  }
}
