/* === Carrusel de marcas HEXAPOWER === */
/* Este CSS es 100% aislado y no modifica el body ni layout global */

#marcas {
  position: relative;
  padding: 6rem 0;
  text-align: center;
  overflow: hidden;
  background: var(--section-bg, transparent);
}

#marcas .container {
  position: relative;
  z-index: 1;
}

#marcas h2 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-strong, #ff7a00);
}

#marcas .sub {
  color: var(--text-soft, #555);
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.5;
}

/* --- Carrusel --- */
#marcas .brands-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 2rem 0;
}

/* === Fade lateral dinámico === */
#marcas .brands-carousel::before,
#marcas .brands-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  transition: background 0.3s ease;
}

/* Modo claro */
:root:not([data-theme="dark"]) #marcas .brands-carousel::before {
  left: 0;
  background: linear-gradient(to right, #f4f5f7 0%, transparent 100%);
}
:root:not([data-theme="dark"]) #marcas .brands-carousel::after {
  right: 0;
  background: linear-gradient(to left, #f4f5f7 0%, transparent 100%);
}

/* --- Fade modo oscuro corregido (profesional y sutil) --- */
:root[data-theme="dark"] #marcas .brands-carousel::before,
:root[data-theme="dark"] #marcas .brands-carousel::after {
  position: absolute;
  top: 0;
  width: 160px;
  height: 100%;
  content: "";
  z-index: 1;
  pointer-events: none;
  background: transparent;
  transition: opacity 0.3s ease;
}

/* Fade izquierdo */
:root[data-theme="dark"] #marcas .brands-carousel::before {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(10, 14, 20, 1) 0%,
    rgba(10, 14, 20, 0.85) 20%,
    rgba(10, 14, 20, 0.6) 50%,
    transparent 100%
  );
}

/* Fade derecho */
:root[data-theme="dark"] #marcas .brands-carousel::after {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(10, 14, 20, 1) 0%,
    rgba(10, 14, 20, 0.85) 20%,
    rgba(10, 14, 20, 0.6) 50%,
    transparent 100%
  );
}

/* Track de logos */
#marcas .carousel-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  transform: translateX(0);
  will-change: transform;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
}

#marcas .carousel-track img {
  height: 50px;
  width: auto;
  filter: grayscale(100%) brightness(0.85);
  opacity: 0.9;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

#marcas .carousel-track img:hover {
  transform: scale(1.25);
  filter: grayscale(0%) brightness(1.2) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  #marcas .carousel-track { gap: 2rem; }
  #marcas .carousel-track img { height: 36px; }
}
