/* .justificado_dos is now handled globally in styles.css */

.contenido_tabla {
  font-size: 1vw;
}

.titulo_tabla {
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 800;
  text-transform: uppercase;
}

.equipos_tabla:hover {
  color: #ff6600;
}

.equipos_tabla {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.equipos_tabla td {
  padding-left: 1vw;
}

.logo-equipo-tabla {
  height: 30px;
  width: 30px;
  object-fit: contain;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px;
  box-sizing: border-box;
  vertical-align: middle;
  margin-right: 6px;
}

.mobile-only-cell {
  display: none;
}

.carousel-container {
  overflow-x: auto;
  max-width: 100%;
}

.carousel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.carousel-nav button {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 2.5rem;
  cursor: pointer;
}

.jornada {
  display: none;
}

.jornada.active {
  display: block;
}

.mini-nav {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
  width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
  background: none;
  color: var(--text-color);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 4px;
}

.mini-nav-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  gap: 15px;
  background-color: #007ACC;
  outline: 3px #007ACC solid;
  outline-offset: -3px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: 400ms;
}

.mini-nav-btn.active {
  background-color: white;
  outline-color: white;
}

.mini-nav-btn.active .text {
  color: #007ACC;
}

.mini-nav-btn .text {
  color: white;
  font-weight: 700;
  font-size: 1em;
  transition: 400ms;
  margin: 0.01vw 0.01vw;
}

.mini-nav-btn:hover {
  background-color: white;
}

.mini-nav-btn:hover .text {
  color: #007ACC;
}

.jornada-title {
  /* Aligns with global h3 */
  font-size: clamp(1.2rem, 2.5vw, 1.8rem) !important;
  font-weight: 800;
  color: #ff8a00;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
}

.jornadas-table th {
  font-size: 1.5vw !important;
  padding: 15px 10px !important;
}

.jornadas-table td {
  color: var(--text-color) !important;
}

.contenido_tabla td {
  font-size: 1vw !important;
  padding: 15px 10px !important;
}

.top-jornada-tabla-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2%;
  /* Espacio horizontal entre tablas */
  margin-bottom: 1.5em;
  margin-top: 10px;
}

.top-jornada-tabla .top-table {
  min-width: 49%;
  max-width: 49%;
  margin: 0;
  box-sizing: border-box;
  font-size: 1vw;
}

.top-table caption {
  /* Aligns with global h4 */
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ff8a00;
  text-transform: uppercase;
  text-align: left;
}

/* Efecto hover solo en filas de datos de la tabla TOP 5, no en encabezados */
.top-table tbody tr:hover td {
  background-color: #989898;
}

/* Fotos de jugador en TOP 5 (estilo redondo similar a logos) */
.top-player-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-player-photo {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.top-player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsividad para tablets */
@media (max-width: 1024px) {
  .contenido_tabla {
    font-size: 1.5vw;
  }

  .titulo_tabla {
    font-size: 1.5vw;
  }

  .equipos_tabla td,
  .equipos_tabla th {
    padding-left: 2vw;
  }
}

/* Letra más pequeña y tabla a ancho completo solo en móviles */
@media (max-width: 600px) {
  .mobile-only-cell {
    display: table-cell !important;
  }

  /* TOP 5: en móvil una tabla por línea y con márgenes */
  #top-jornadas-tablas {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .top-jornada-tabla-row {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
  }

  .top-jornada-tabla .top-table {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  /* Justified text handled by global styles */

  .contenido_tabla td {
    font-size: 2vw !important;
    padding: 7px 10px !important;
    height: 0px !important;
  }

  .titulo_tabla {
    font-size: 1rem;
  }

  .equipos-list {
    margin-bottom: 5vw;
  }

  .equipos-list table {
    margin-top: 0;
  }

  .equipos_tabla td,
  .equipos_tabla th {
    text-align: center !important;
  }

  .mini-nav-btn .text {
    margin: 1vw 1vw;
  }

  .jornada-title {
    font-size: 1.3rem !important;
    text-align: center;
  }

  .jornadas-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Cabecera más grande solo para la tabla de jornadas */
  .jornadas-table thead tr.titulo_tabla th {
    font-size: 2em !important;
  }

  .jornadas-table th,
  .jornadas-table td {
    font-size: 2vw !important;
    padding-bottom: 2vw !important;
    padding-top: 2vw !important;
    height: 0px !important;
    padding-left: 1vw !important;
    padding-right: 1vw !important;
  }

  .jornadas-table td:nth-child(1),
  .jornadas-table td:nth-child(2),
  .jornadas-table th:nth-child(1),
  .jornadas-table th:nth-child(2) {
    width: 50%;
    white-space: normal !important;
    text-align: center;
  }

  .jornadas-table td:nth-child(3),
  .jornadas-table th:nth-child(3) {
    white-space: normal !important;
    text-align: center;
  }

  .jornadas-table td:nth-child(4),
  .jornadas-table th:nth-child(4) {
    width: 30%;
    white-space: normal !important;
    text-align: center;
  }

  .logo-equipo-tabla {
    height: 16px;
    width: 16px;
    object-fit: contain;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px;
    box-sizing: border-box;
    margin-right: 4px;
    margin-bottom: 3px;
  }

  .carousel-container {
    margin-top: 0px;
    margin-bottom: 5vw;
  }

  .mini-nav {
    gap: 0.2rem !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
    padding: 0 2vw;
    justify-content: flex-start !important;
  }

  .mini-nav-btn {
    font-size: 2vw !important;
    padding: 0.1rem 0.4rem !important;
    display: inline-block !important;
    min-width: unset !important;
  }

  .equipos-list table .titulo_tabla th:nth-child(1),
  .equipos-list table .titulo_tabla th:nth-child(2),
  .equipos-list table .titulo_tabla th:nth-child(3),
  .equipos-list table .titulo_tabla th:nth-child(4),
  .equipos-list table .titulo_tabla th:nth-child(5),
  .equipos-list table .titulo_tabla th:nth-child(6),
  .equipos-list table .contenido_tabla td:nth-child(1),
  .equipos-list table .contenido_tabla td:nth-child(2),
  .equipos-list table .contenido_tabla td:nth-child(3),
  .equipos-list table .contenido_tabla td:nth-child(4),
  .equipos-list table .contenido_tabla td:nth-child(5),
  .equipos-list table .contenido_tabla td:nth-child(6) {
    font-size: 1.5em;
  }

  nav.breadcrumbs,
  nav.breadcrumbs ul,
  nav.breadcrumbs ul li,
  nav.breadcrumbs ul li a,
  nav.breadcrumbs ul li span {
    font-size: 0.9em !important;
  }

  .top-jornada-tabla .top-table {
    font-size: 2vw;
  }

  .top-jornada-tabla-row {
    margin-top: 2vw;
  }

  .top-table caption {
    font-size: 1.2rem;
    margin-bottom: 5px;
    text-align: center;
  }

  .top-jornada-tabla .top-table th,
  .top-jornada-tabla .top-table td {
    height: 0px !important;
  }

  .top-player-photo {
    width: 22px;
    height: 22px;
    padding: 2px;
  }
}