/* ====================================================== */
/* SECCIÓN NIVEL – CARRUSEL TIPO RUEDA                    */
/* ====================================================== */

.nivel {
  position: relative;
  padding: 120px 6%;
  color: var(--blanco-hielo);
  overflow: hidden;
  text-align: center;
}

/* Fondo tipo backstage oscuro (puedes cambiar la imagen) */
.nivel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/background-players.png") center/cover no-repeat;
  filter: brightness(0.75) saturate(1.15);
  z-index: 0;
}

/* Todo el contenido arriba del fondo */
.nivel > * {
  position: relative;
  z-index: 2;
}

.nivel h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.nivel-desc {
  font-size: 1.15rem;
  color: rgba(242, 247, 255, 0.92);
  margin-bottom: 46px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ========= CARRUSEL TIPO RUEDA ========= */

.wheel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

/* Flechas laterales */
.wheel-arrow {
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: var(--blanco-hielo);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.4rem;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.wheel-arrow:hover {
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

/* Viewport scrollable – aquí se hace el drag en móvil */
.wheel-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  flex: 1;
  padding-bottom: 12px;
}

/* Para ocultar barra de scroll en la mayoría de navegadores */
.wheel-viewport::-webkit-scrollbar {
  height: 0;
}
.wheel-viewport {
  scrollbar-width: none;
}

/* Track de tarjetas */
.wheel-track {
  display: flex;
  gap: 24px;
  padding-inline: 6%;
}

/* Tarjetas */
.wheel-card {
  scroll-snap-align: center;
  flex: 0 0 260px;
  background: rgba(3, 10, 16, 0.82);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 18px 16px;
  color: var(--blanco-hielo);
  text-align: left;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  transform-origin: center center;
  transform: scale(0.85);
  opacity: 0.6;
  transition: transform 0.18s ease-out, opacity 0.18s ease-out, box-shadow 0.18s ease-out;
}

.wheel-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
}

.wheel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.wheel-text {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Estado "activo" (centrado) – lo manejará JS */
.wheel-card.is-active {
  transform: scale(1.05) translateZ(0);
  opacity: 1;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.75);
}

/* Responsive */
@media (max-width: 768px) {
  .nivel {
    padding: 90px 4%;
  }

  .nivel h2 {
    font-size: 2rem;
  }

  .nivel-desc {
    font-size: 1.02rem;
    margin-bottom: 34px;
  }

  .wheel-wrapper {
    gap: 8px;
  }

  .wheel-arrow {
    display: none; /* En móvil el drag es suficiente */
  }

  .wheel-track {
    padding-inline: 10%;
  }

  .wheel-card {
    flex: 0 0 240px;
  }
}
