/* === JUGADORES DESTACADOS — Carrusel con avatar circular === */
.cj-jug-wrap{
  margin: 6px 0 28px 0;
}
@media (min-width: 768px){ .cj-jug-wrap{ padding: 0 32px; } }

.cj-jug-head{
  max-width: 1200px;
  margin: 0 auto 8px auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}
.cj-jug-title{
  margin: 0;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 800;
  color: #111827;
}

/* Flechas (desktop) */
.cj-jug-arrows{ display: none; }
@media (min-width: 992px){
  .cj-jug-arrows{ display: flex; gap: 8px; }
  .cj-jug-arrows button{
    width: 40px; height: 40px; border-radius: 6px;
    border: 1px solid #e5e7eb; background: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; transition: background .15s ease, transform .1s ease;
  }
  .cj-jug-arrows button:hover{ background:#f9fafb; transform: translateY(-1px); }
  .cj-jug-arrows img{ width: 18px; height: 18px; display:block; }
}

/* Scroller horizontal (esconde barra) */
.cj-jug-scroller{
  max-width: 1200px; margin: 0 auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px; margin-bottom: -8px; /* truco por si aparece barra */
}
.cj-jug-scroller::-webkit-scrollbar{ display: none; }

/* Lista horizontal */
.cj-jug-list{
  list-style: none; margin: 0; padding: 6px 2px 10px 2px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 28%;  /* móvil: 3–4 avatares a la vista */
  gap: 35px !important;
}
@media (min-width: 480px){  .cj-jug-list{ grid-auto-columns: 22%; } }
@media (min-width: 768px){  .cj-jug-list{ grid-auto-columns: 16%; gap: 14px; } }
@media (min-width: 1024px){ .cj-jug-list{ grid-auto-columns: 12%; } }

.cj-jug-item{ scroll-snap-align: start; }

/* Link = contenedor del avatar + nombre */
.cj-jug-link{
  position: relative;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}

/* Avatar circular */
.cj-jug-avatar{
  width: 110px; height: 110px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
@media (min-width: 768px){ .cj-jug-avatar{ width: 120px; height: 120px; } }

.cj-jug-avatar img{
  width: 88%; height: 88%;
  object-fit: contain; border-radius: 50%;
  display: block;
}

.cj-jug-link:hover .cj-jug-avatar{
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* Nombre: aparece debajo del círculo SOLO al hover (sin mover layout) */
.cj-jug-name{
  position: absolute;
  top: calc(100% + 6px); left: 50%;
  transform: translate(-50%, 8px);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  font-weight: 700; color: #111827;
  font-size: .9rem; white-space: nowrap;
  pointer-events: none;
}
.cj-jug-link:hover .cj-jug-name{
  opacity: 1;
  transform: translate(-50%, 0);
}

.cj-jug-empty{
  padding: 12px; text-align: center; color:#6b7280;
}
/* SCROLLER: permitir overflow vertical + ocultar solo la barra horizontal */
.cj-jug-scroller{
  max-width: 1200px; margin: 0 auto;
  overflow-x: auto;
  overflow-y: visible;           /* <- IMPORTANTE: que el nombre no se corte */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 28px;          /* espacio para el nombre debajo del avatar */
  margin-bottom: -28px;          /* truco para que no cambie el layout */
}
.cj-jug-scroller::-webkit-scrollbar{ display: none; }

/* Asegura que nada “corte” al nombre */
.cj-jug-list,
.cj-jug-item,
.cj-jug-link{
  overflow: visible;             /* <- evita recortes locales */
}

/* Nombre: asegúrate de que queda por encima visualmente */
.cj-jug-name{
  position: absolute;
  top: calc(100% + 6px); left: 50%;
  transform: translate(-50%, 8px);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  font-weight: 700; color: #111827;
  font-size: .9rem; white-space: nowrap;
  pointer-events: none;
  z-index: 2;                    /* <- por si hay solapes con ítems vecinos */
}
.cj-jug-link:hover .cj-jug-name{
  opacity: 1;
  transform: translate(-50%, 0);
}
/* Blanco y negro por defecto → color al hover */
.cj-jug-avatar img{
  width: 88%; height: 88%;
  object-fit: contain; border-radius: 50%;
  display: block;
  transition: filter .2s ease;         /* suave al pasar a color */
  will-change: filter;
}
.cj-jug-link:hover .cj-jug-avatar img{
  filter: none;                         /* color al hover */
}
