/* Importar fuente Bebas Neue */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* === ESTILOS BASE === */
/* Nuevo contenedor para asegurar que la lista de logos flote sobre otro contenido */
.hub-icons-overlay {
    /* Si quieres que flote sobre el slider, usa position: absolute/relative */
    position: absolute;
    width: 100%;
    top: 600px; /* Ajusta la posición vertical según tu header */

    /* Si solo quieres que el contenido se ajuste: */
    width: 100%;
    padding: 20px 0; /* Espacio vertical alrededor del bloque de logos */
    margin-top: -80px; /* Mueve el bloque hacia arriba para que se superponga al elemento de arriba (e.g., slider) */
    z-index: 10; /* Asegura que esté por encima del slider */
}

.ligas-hub {
  padding: 30px 10px;
}


/* === LISTA DE LIGAS === */
.logos-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 3rem;
}

/* Cada tarjeta de liga */
.logos-list__item {
  position: relative;
  width: 100%;
  max-width: 410px;
  aspect-ratio: 5 / 6;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

.logos-list__item:hover {
  transform: scale(1.90);
}

/* Fondos específicos de cada liga
.logos-list__item.starcup {
  background-image: url("/static/CD/images/starcup_banner.jpg");
}

.logos-list__item.latam {
  background-image: url("/static/CD/images/copa_latam_banner.jpg");
}

.logos-list__item.sf {
  background-image: url("/static/CD/images/copa_sf_banner.jpg");
}*/

/* === OVERLAY DE LAS TARJETAS === */
.overlay {
  background-color: transparent;/*rgba(0, 0, 0, 0.45);*/
  color: white;
  height: 100%;
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  transition: background-color 0.3s ease;
}

.overlay:hover {
  background-color: transparent;/*rgba(0, 0, 0, 0.45);*/
}

.overlay img {
  width: clamp(140px, 30vw, 300px);
  margin: 0 auto 10px;
}

.overlay h2 {
  margin: 10px 0 5px;
}

.overlay p {
  font-size: 1.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {

  .logos-list {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }

  .logos-list__item {
    width: 90%;
    max-width: 380px;
  }

  .overlay p {
    font-size: 1.2rem;
  }
}

@media (max-width: 600px) {

  .logo-img {
    width: 180px;
  }

  .logos-list__item {
    max-width: 320px;
  }

  .overlay img {
    width: 180px;
  }

  .overlay p {
    font-size: 1rem;
  }
}

/* === PRELOADER === */
.preloader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #1a202c;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader-item {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Root visible al cargar */
#root {
  opacity: 1;
  transition: opacity 0.5s ease;
}


/* === FIX: logos en fila horizontal en móviles === */
@media (max-width: 900px) {
  .logos-list {
    flex-wrap: nowrap;              /* No permite que se apilen */
    overflow-x: auto;              /* Scroll horizontal si no caben */
    justify-content: flex-start;   /* Alinea al inicio para scroll natural */
    gap: 1rem;                     /* Espaciado entre logos */
    scroll-snap-type: x mandatory; /* Scroll suave por logo (opcional) */
    -webkit-overflow-scrolling: touch;
  }

  .logos-list__item {
    flex: 0 0 auto;                /* Mantiene tamaño fijo */
    scroll-snap-align: center;
  }

  .overlay img {
    width: 140px;                  /* Ajusta tamaño de logo en móviles */
  }
}
/* === 🔧 Ajustes extra para móvil: logos más grandes y centrados === */
@media (max-width: 600px) {
  .logos-list {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 0 10px;
  }

  .logos-list__item {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 4 / 5; /* más compacto verticalmente */
  }

  .overlay {
    padding: 15px;
    justify-content: center;
  }

  .overlay img {
    width: 160px; /* tamaño más legible */
    height: auto;
  }

  .overlay h2 {
    font-size: 1.2rem;
    margin: 8px 0 4px;
  }

  .overlay p {
    font-size: 0.9rem;
  }
}

/* Extra pequeño: teléfonos antiguos o muy angostos */
@media (max-width: 400px) {
  .overlay img {
    width: 130px;
  }

  .logos-list__item {
    max-width: 290px;
  }
}
/* === ESTILOS BASE === */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  text-align: center;
  background: linear-gradient(
    120deg,
    #1b7b80 0%,
    #cccccc 33%,
    #cccccc 66%,
    #033c4c 100%
  );
  background-attachment: fixed;
  background-size: cover;
  overflow-x: hidden;
}

.ligas-hub {
  padding: 30px 10px;
}

/* === TÍTULO PRINCIPAL === */
.sweet-title {
  order: 2;
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 10vw, 12rem);
  line-height: 0.9em;
  text-align: center;
  text-shadow:
    3px 1px 1px #1b7b80, 2px 2px 1px #033c4c,
    4px 2px 1px #1b7b80, 3px 3px 1px #033c4c,
    5px 3px 1px #1b7b80, 4px 4px 1px #033c4c,
    6px 4px 1px #1b7b80, 5px 5px 1px #033c4c,
    7px 5px 1px #1b7b80, 6px 6px 1px #033c4c,
    8px 6px 1px #1b7b80, 7px 7px 1px #033c4c,
    9px 7px 1px #1b7b80;
}

.sweet-title span {
  display: block;
  position: relative;
}

.sweet-title span::before {
  content: attr(data-text);
  position: absolute;
  text-shadow:
    2px 2px 1px #1b7b80,
    -1px -1px 1px #033c4c,
    -2px 2px 1px #1b7b80,
    1px -1px 1px #033c4c;
  z-index: 1;
}

.sweet-title span:nth-child(1) {
  padding-right: 2.25rem;
}

.sweet-title span:nth-child(2) {
  padding-left: 2.25rem;
}

/* === WRAPPERS DE TÍTULO Y LOGO === */
.title-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.title-wrapper,
.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* === LOGO PRINCIPAL === */
.logo-img {
  width: clamp(180px, 30vw, 420px);
  height: auto;
  object-fit: contain;
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}

/* ============================================================
   NUEVA SECCIÓN: LOGOS DE LIGAS (debajo del título principal)
   ============================================================ */
.hub-icons-section {
  margin-top: 2rem;
  padding: 1rem 0 2rem;
  text-align: center;
  background: transparent;
}

.hub-icons-section .logos-list {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 900px;
}

.hub-icons-section .logos-list__item img {
  width: clamp(100px, 25vw, 180px);
  height: auto;
  transition: transform 0.3s ease;
}

.hub-icons-section .logos-list__item img:hover {
  transform: scale(1.1);
}

/* ============================================================
   TARJETAS DE LIGAS (bloques grandes con banners)
   ============================================================ */
.logos-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 3rem;
}

.logos-list__item {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 5 / 6;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

.logos-list__item:hover {
  transform: scale(1.03);
}

.logos-list__item.starcup {
  background-image: url("/static/CD/images/starcup_banner.jpg");
}

.logos-list__item.latam {
  background-image: url("/static/CD/images/copa_latam_banner.jpg");
}

.logos-list__item.sf {
  background-image: url("/static/CD/images/copa_sf_banner.jpg");
}

/* === OVERLAY DE LAS TARJETAS === */
.overlay {
  background-color: rgba(0, 0, 0, 0.45);
  color: white;
  height: 100%;
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  transition: background-color 0.3s ease;
}

.overlay:hover {
  background-color: rgba(0, 0, 0, 0.55);
}

.overlay img {
  width: clamp(140px, 30vw, 300px);
  margin: 0 auto 10px;
}

.overlay h2 {
  margin: 10px 0 5px;
}

.overlay p {
  font-size: 1.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .title-logo-wrapper {
    flex-direction: column;
    gap: 0.5rem;
  }

  .sweet-title {
    font-size: clamp(2rem, 8vw, 7rem);
  }

  .logos-list {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .logos-list__item {
    width: 90%;
    max-width: 380px;
  }

  .overlay p {
    font-size: 1.2rem;
  }

  /* Logos de ligas (debajo del título) */
  .hub-icons-section .logos-list {
    gap: 1.2rem;
  }

  .hub-icons-section .logos-list__item img {
    width: 120px;
  }
}

@media (max-width: 600px) {
  .sweet-title {
    font-size: clamp(1.8rem, 10vw, 5rem);
  }

  .logo-img {
    width: 180px;
  }

  .logos-list__item {
    max-width: 320px;
  }

  .overlay img {
    width: 180px;
  }

  .overlay p {
    font-size: 1rem;
  }

  /* Logos debajo del título: fila o dos filas */
  .hub-icons-section .logos-list__item img {
    width: 100px;
  }
}

/* === PRELOADER === */
.preloader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #1a202c;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader-item {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#root {
  opacity: 1;
  transition: opacity 0.5s ease;
}
