@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');
/* RESET Y BÁSICOS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', Arial, sans-serif;
}

body {
  background: linear-gradient(to right, #2F4170, #111C4E);
  color: #ffffff;
  font-family: 'Montserrat', Arial, sans-serif;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #FF9E1B;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

/* HEADER */
header {
  padding: 0;
  background: linear-gradient(to right, #2F4170, #111C4E);
  border-bottom: 1px solid #53565A;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 10px 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.header-left nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  height: 100px;
}

.main-nav {
  width: 100%;
  grid-column: 2;
  justify-self: center;
}

.main-nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Manifold', Arial, sans-serif;
  font-weight: normal;
  font-size: 0.9em;
  cursor: pointer;
}

.nav-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #ffffff;
}

/* Iconos no seleccionados a blanco */
.nav-item img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
  transition: filter 0.2s ease-in-out;
}

.nav-item:hover img {
  filter: brightness(1.2) invert(1);
}

/* Icono activo en naranja #FF9E1B */
.nav-item.active img {
  filter: brightness(0) saturate(20%) invert(49%) sepia(100%) saturate(1200%) hue-rotate(358deg) brightness(102%) contrast(101%);
}

.nav-item.active span {
  color: #FF9E1B;
}

.icon {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

.icon:hover {
  filter: brightness(1.2) invert(1);
}

/* COMPETITION SELECTOR */
/* BARRA DE FILTROS HORIZONTAL */
.horizontal-filters {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  margin: 0 auto;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.horizontal-filters-inner {
  display: flex;
  gap: 25px;
  align-items: end;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}

.filter-label {
  color: #fff;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.filter-dropdown {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  outline: none;
  min-height: 48px;
}

.filter-dropdown:hover {
  border-color: rgba(255, 158, 27, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.filter-dropdown:focus {
  border-color: #FF9E1B;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 158, 27, 0.2);
}

.filter-dropdown option {
  background: #2F4170;
  color: #fff;
  padding: 10px;
}

/* Selector de competición en la barra horizontal */
.filter-item .competition-dropdown {
  width: auto;
}

.filter-dropdown-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  outline: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  width: 100%;
}

.filter-dropdown-btn:hover {
  border-color: rgba(255, 158, 27, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.competition-mini-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.filter-dropdown-btn span:not(.dropdown-arrow) {
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
}

.filter-dropdown-btn .dropdown-arrow {
  color: #FF9E1B;
  font-size: 0.8em;
  flex-shrink: 0;
}

/* Ajustes para el menú dropdown en la barra horizontal */
.filter-item .competition-dropdown-menu {
  width: 350px;
}

/* Responsive para barra de filtros horizontal */
@media (max-width: 1200px) {
  .horizontal-filters-inner {
    gap: 18px;
  }
  
  .filter-item {
    min-width: 120px;
  }
  
  .filter-item .competition-dropdown {
    width: auto;
  }
}

@media (max-width: 768px) {
  .horizontal-filters {
    padding: 15px;
  }
  
  .horizontal-filters-inner {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .filter-item {
    min-width: auto;
    width: 100%;
  }
  
  .filter-item .competition-dropdown {
    width: 100%;
  }
  
  .filter-dropdown {
    padding: 10px 14px;
    font-size: 16px; /* Prevenir zoom en iOS */
  }
  
  .filter-dropdown-btn {
    padding: 10px 14px;
    font-size: 16px;
  }
}

/* TÍTULO DINÁMICO DE LA COMPETICIÓN */
.competition-title-section {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(255, 158, 27, 0.1), rgba(47, 65, 112, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.competition-title-section h1 {
  color: #fff;
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: 'Montserrat', Arial, sans-serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.competition-title-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1em;
  font-weight: 500;
  margin: 0;
}

@media (max-width: 768px) {
  .competition-title-section {
    padding: 20px 15px;
  }
  
  .competition-title-section h1 {
    font-size: 1.8em;
  }
  
  .competition-title-section p {
    font-size: 1em;
  }
}

.competition-selector {
  padding: 20px 0;
}

.competition-selector-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.selector-title {
  color: #fff;
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 20px;
  font-family: 'Manifold', Arial, sans-serif;
}

.competition-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.competition-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 20px 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  backdrop-filter: blur(10px);
}

.competition-btn:hover {
  background: rgba(255, 158, 27, 0.2);
  border-color: #FF9E1B;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 158, 27, 0.3);
}

.competition-btn.active {
  background: rgba(255, 158, 27, 0.3);
  border-color: #FF9E1B;
  box-shadow: 0 4px 15px rgba(255, 158, 27, 0.4);
}

.competition-selector-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.competition-btn:hover .competition-selector-logo {
  transform: scale(1.1);
}

.competition-btn span {
  color: #fff;
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
  font-family: 'Manifold', Arial, sans-serif;
}

/* Responsive para el selector de competición */
@media screen and (max-width: 768px) {
  .competition-selector {
    padding: 15px 0;
  }
  
  .selector-title {
    font-size: 1.2em;
    margin-bottom: 15px;
  }
  
  .competition-buttons {
    gap: 20px;
  }
  
  .competition-btn {
    padding: 15px 20px;
    min-width: 160px;
    gap: 8px;
  }
  
  .competition-selector-logo {
    width: 50px;
    height: 50px;
  }
  
  .competition-btn span {
    font-size: 1em;
  }
}

@media screen and (max-width: 480px) {
  .competition-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .competition-btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 16px;
  }
  
  .competition-selector-logo {
    width: 45px;
    height: 45px;
  }
  
  .competition-btn span {
    font-size: 0.95em;
  }
}

/* HEADER DE COMPETICIÓN */
.competition-header {
  background: linear-gradient(to right, #4859AA, #2F4170);
  border-bottom: 2px solid #FF9E1B;
  padding: 20px 0;
}

.competition-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.competition-info {
  flex: 1;
  text-align: center;
}

.competition-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #fff;
  margin: 0 0 8px 0;
  font-family: 'Manifold', Arial, sans-serif;
}

#grupoTitle {
  margin-top: 5px;
}

.competition-subtitle {
  font-size: 1.2em;
  color: #FF9E1B;
  margin: 0;
  font-weight: 600;
  opacity: 0.95;

}

.competition-logo {
  flex-shrink: 0;
}

.competition-logo-img {
  height: 70px;
  width: auto;
  filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.competition-logo-img:hover {
  transform: scale(1.05);
}

/* Responsive para el header de competición */
@media screen and (max-width: 768px) {
  .competition-header {
    padding: 15px 0;
  }
  
  .competition-header-inner {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .competition-title {
    font-size: 2em;
  }
  
  .competition-subtitle {
    font-size: 1.1em;
  }
  
  .competition-logo-img {
    height: 90px;
  }
}

@media screen and (max-width: 480px) {
  .competition-title {
    font-size: 1.8em;
  }
  
  .competition-subtitle {
    font-size: 1em;
  }
  
  .competition-logo-img {
    height: 80px;
  }
}

/* CONTENEDOR PRINCIPAL */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.clasificacion-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* NAVEGACIÓN SECUNDARIA CON TRES BOTONES */
.clasificacion-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  padding: 0 20px;
  flex-wrap: nowrap; /* Fuerza una sola línea */
  flex-direction: row; /* Siempre horizontal */
  overflow-x: auto; /* Permite scroll si no cabe */
}

.clasificacion-tab {
  background-color: transparent;
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 15px 25px;
  white-space: nowrap;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  position: relative;
  border-bottom: 3px solid transparent;
}

.clasificacion-tab:hover {
  background-color: rgba(255, 158, 27, 0.1);
  color: #FF9E1B;
}

.clasificacion-tab.active {
  background-color: transparent;
  color: #FF9E1B;
  font-weight: bold;
  border-bottom: 3px solid #FF9E1B;
}

/* NAVEGACIÓN DE GRUPOS (8 BOTONES) */
.grupos-nav {
  display: none; /* Oculto por defecto */
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 35px 0 5px 0;
  flex-wrap: wrap;
  padding: 0 5px 0 5px;
}

.grupos-nav.active {
  display: flex; /* Se muestra cuando tiene la clase active */
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grupo-tab {
  background-color: #2F4170;
  color: #fff;
  border: 1px solid #53565A;
  border-radius: 8px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  font-weight: bold;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  position: relative;
}

.grupo-tab:hover {
  background-color: #FF9E1B;
  color: #111C4E;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 158, 27, 0.4);
}

.grupo-tab.active {
  background-color: #FF9E1B;
  color: #111C4E;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 158, 27, 0.5);
  transform: scale(1.05);
}

.grupo-tab::before {
  content: 'Grupo ';
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.grupo-tab:hover::before {
  opacity: 1;
}

/* CONTENIDO DE CLASIFICACIÓN */
.clasificacion-content {
  margin-top: 20px;
}

/* FILTROS DE CLASIFICACIÓN */
.clasificacion-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  padding: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  color: #ffffff;
  font-weight: bold;
  font-size: 0.9em;
  text-align: center;
}

.filter-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #53565A;
  background-color: #ffffff;
  color: #111C4E;
  font-size: 0.9em;
  font-weight: 500;
  min-width: 140px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:hover {
  border-color: #FF9E1B;
  box-shadow: 0 2px 6px rgba(255, 158, 27, 0.2);
}

.filter-select:focus {
  outline: none;
  border-color: #FF9E1B;
  box-shadow: 0 0 0 3px rgba(255, 158, 27, 0.2);
}

.apply-filters-btn {
  background-color: #FF9E1B;
  color: #111C4E;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 24px;
}

.apply-filters-btn:hover {
  background-color: #111C4E;
  color: #FF9E1B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 158, 27, 0.3);
}

.content-section {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section h2 {
  color: #fff;
  font-size: 1.8em;
  margin-top: 40px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
}

.content-section p {
  color: #ffffff;
  font-size: 1.1em;
  line-height: 1.6;
  text-align: center;
  opacity: 0.9;
}

/* TABLA DE CLASIFICACIÓN */
.clasificacion-table-container {
  position: relative;
  margin-top: 20px;
  border-radius: 8px;
  max-width: 100%;
  max-height: 80vh;
  overflow: auto;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.clasificacion-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #111C4E;
  background-color: white;
  font-size: 0.95em;
}

/* Encabezado - siempre por encima */
.clasificacion-table thead {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: #f2f2f2;
}

.clasificacion-table thead th {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: #f2f2f2;
  padding: 12px 8px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid #FF9E1B;
  position: relative;
  padding-right: 20px !important;
  font-size: 0.9em;
  color: #111C4E;
  transition: background-color 0.2s ease;
}

.clasificacion-table thead th:hover {
  background-color: #e8e8e8;
}

.clasificacion-table thead th:first-child {
  border-top-left-radius: 8px;
}

.clasificacion-table thead th:last-child {
  border-top-right-radius: 8px;
}

/* Indicadores de ordenación */
.clasificacion-table thead th::before {
  content: '↕';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 12px;
}

.clasificacion-table thead th.sorted-asc::before {
  content: '↑';
  color: #FF9E1B;
}

.clasificacion-table thead th.sorted-desc::before {
  content: '↓';
  color: #FF9E1B;
}

/* Tooltips para los headers */
.clasificacion-table thead th::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background-color: #111C4E;
  color: white;
  font-size: 0.8em;
  border-radius: 6px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 300;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  pointer-events: none;
  min-width: 120px;
  text-align: center;
}

.clasificacion-table thead th:hover::after {
  visibility: visible;
  opacity: 1;
}

/* Ajuste para tooltips que se salen de la pantalla */
.clasificacion-table thead th:first-child::after,
.clasificacion-table thead th:nth-child(2)::after,
.clasificacion-table thead th:nth-child(3)::after {
  left: 0;
  transform: none;
}

.clasificacion-table thead th:last-child::after,
.clasificacion-table thead th:nth-last-child(2)::after,
.clasificacion-table thead th:nth-last-child(3)::after {
  left: auto;
  right: 0;
  transform: none;
}

/* Celdas del cuerpo */
.clasificacion-table tbody td {
  padding: 12px 8px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  background-color: white;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.clasificacion-table tbody td:hover {
  background-color: rgba(255, 158, 27, 0.15) !important;
  color: #111C4E !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clasificacion-table tbody tr:last-child td {
  border-bottom: none;
}

/* Estilo para la columna de posición */
.clasificacion-table tbody td:first-child {
  font-weight: bold;
  font-size: 1.1em;
  background-color: white;
  border-right: 2px solid #e0e0e0;
}

/* Estilo para la columna de equipo */
.clasificacion-table tbody td:nth-child(2) {
  text-align: left;
  font-weight: bold;
  padding-left: 15px;
  color: #111C4E;
  min-width: 180px;
}

/* Colores para posiciones de playoff */

.clasificacion-table tbody tr.playoff-position {
  background-color: rgba(40, 167, 69, 0.05);
}

/* Colores para posiciones eliminadas */
.clasificacion-table tbody tr.elimination-position td:first-child {
  background-color: #f8d7da;
  color: #721c24;
  border-right: 3px solid #dc3545;
}

.clasificacion-table tbody tr.elimination-position {
  background-color: rgba(220, 53, 69, 0.05);
}

/* Estilos para datos numéricos */
.clasificacion-table tbody td[data-type="number"] {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  transition: all 0.2s ease;
}

.clasificacion-table tbody td[data-type="number"]:hover {
  background-color: rgba(17, 28, 78, 0.08) !important;
  color: #111C4E !important;
  font-weight: 600;
}

/* Estilos para diferencias positivas y negativas */
.clasificacion-table tbody td.positive {
  color: #28a745;
  font-weight: bold;
  transition: all 0.2s ease;
}

.clasificacion-table tbody td.positive:hover {
  background-color: rgba(40, 167, 69, 0.15) !important;
  color: #155724 !important;
}

.clasificacion-table tbody td.negative {
  color: #dc3545;
  font-weight: bold;
  transition: all 0.2s ease;
}

.clasificacion-table tbody td.negative:hover {
  background-color: rgba(220, 53, 69, 0.15) !important;
  color: #721c24 !important;
}

.clasificacion-table tbody td.neutral {
  color: #6c757d;
  font-weight: bold;
  transition: all 0.2s ease;
}

.clasificacion-table tbody td.neutral:hover {
  background-color: rgba(108, 117, 125, 0.12) !important;
  color: #495057 !important;
}

/* Estilos para rachas */
.clasificacion-table tbody td.racha {
  font-weight: bold;
  padding: 4px 8px;
  font-size: 0.85em;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
}

.clasificacion-table tbody td.racha:hover {
  background-color: rgba(255, 158, 27, 0.15) !important;
  color: #111C4E !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clasificacion-table tbody td.racha.ganando {
  background-color: #ffffff;
  color: #155724;
}

.clasificacion-table tbody td.racha.ganando:hover {
  background-color: rgba(255, 158, 27, 0.15) !important;
  color: #111C4E !important;
}

.clasificacion-table tbody td.racha.perdiendo {
  background-color: #ffffff;
  color: #721c24;
}

.clasificacion-table tbody td.racha.perdiendo:hover {
  background-color: rgba(255, 158, 27, 0.15) !important;
  color: #111C4E !important;
}

/* Estilos para la nueva columna de últimos 5 partidos */
.clasificacion-table tbody td.ultimos5 {
  padding: 8px 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  background-color: #ffffff;
  text-align: center;
}

.clasificacion-table tbody td.ultimos5:hover {
  background-color: rgba(255, 158, 27, 0.15) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Container para los puntos de racha */
.racha-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  min-height: 20px;
}

/* Estilos para cada punto de racha */
.racha-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.2s ease;
}

/* Punto verde para victorias */
.racha-dot.ganado {
  background-color: #28a745;
  box-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
}

/* Punto rojo para derrotas */
.racha-dot.perdido {
  background-color: #dc3545;
  box-shadow: 0 1px 3px rgba(220, 53, 69, 0.3);
}

/* Efecto hover en los puntos */
.racha-dots:hover .racha-dot {
  transform: scale(1.2);
}

/* Tooltip para mostrar información adicional */
.racha-tooltip {
  position: relative;
  display: inline-block;
}

.racha-tooltip .tooltip-text {
  visibility: hidden;
  width: 80px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 4px 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -40px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75em;
  white-space: nowrap;
}

.racha-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Leyenda de colores */
.clasificacion-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #ffffff;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.legend-color.playoff {
  background-color: #28a745;
}

.legend-color.elimination {
  background-color: #dc3545;
}

/* Responsive para la tabla */
@media screen and (max-width: 768px) {
  .clasificacion-table {
    font-size: 0.8em;
  }
  
  .clasificacion-table thead th,
  .clasificacion-table tbody td {
    padding: 8px 4px;
  }
  
  .clasificacion-table tbody td:nth-child(2) {
    padding-left: 8px;
  }

  .clasificacion-table thead th::after {
    font-size: 0.75em;
    padding: 6px 8px;
  }

  .clasificacion-legend {
    flex-direction: column;
    gap: 10px;
  }

  .clasificacion-filters {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .filter-group {
    width: 100%;
  }

  .filter-select {
    width: 100%;
    min-width: auto;
  }

  .racha-dot {
    width: 6px;
    height: 6px;
  }

  .racha-dots {
    gap: 2px;
  }
}

@media screen and (max-width: 600px) {
  .clasificacion-table-container {
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 0;
  }
  
  .clasificacion-table {
    font-size: 0.75em;
  }
  
  .clasificacion-table thead th,
  .clasificacion-table tbody td {
    padding: 6px 3px;
  }

  .clasificacion-table thead th::after {
    display: none;
  }
}

/* FOOTER */
.feb-footer {
  background: linear-gradient(to right, #2F4170, #111C4E);
  color: #fff;
  padding: 40px 0 0 0;
  font-size: 1em;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-container {
  width: 100%;
}

.footer-logo {
  height: 52px;
}

.header-inner .footer-logo {
  grid-column: 1;
  justify-self: center;
}

.footer-text {
  line-height: 1.5;
  font-size: 1.1em;
}

.footer-link {
  color: #FF9E1B;
  text-decoration: none;
  font-weight: bold;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-right {
  flex: 2 1 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.footer-right h3 {
  color: white;
  margin-bottom: 12px;
  font-size: 1.1em;
  font-weight: bold;
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.partner-logo {
  height: 64px;
  max-width: 140px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: none;
  filter: brightness(0) invert(1); /* blanco puro */
}

.footer-bottom {
  background-color: #0D173A;
  text-align: center;
  padding: 14px 20px 10px 20px;
  margin-top: 32px;
  font-size: 0.95em;
}

.footer-bottom a {
  color: #FF9E1B;
  text-decoration: none;
  margin: 0 6px;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Menú Hamburguesa */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1000;
  grid-column: 3;
  justify-self: end;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* MEDIA QUERIES */
@media screen and (max-width: 900px) {
  .footer-inner {
    flex-direction: column;
    gap: 20px;
  }

  .footer-left, .footer-right {
    flex: 1;
  }

  .partner-logos {
    justify-content: center;
  }

  
  .main-nav ul {
    gap: 15px;
  }

  .clasificacion-nav {
    gap: 10px;
    padding: 0 10px;
  }

  .clasificacion-tab {
    min-width: 100px;
    padding: 8px 16px;
    font-size: 0.9em;
  }

  .grupos-nav {
    justify-content: flex-start;
    align-items: flex-start;
    margin: 20px 0 10px 0;
    padding: 0 10px;
    position: relative;
  }
  .grupos-dropdown-inner {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .grupo-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #FF9E1B;
    color: #222c4e;
    border-radius: 4px;
    padding: 7px 16px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    min-width: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: background 0.15s, color 0.15s;
    position: relative;
    z-index: 2;
  }
  .grupo-dropdown-btn .dropdown-arrow {
    font-size: 0.95em;
    color: #111C4E;
    margin-left: 4px;
    transition: transform 0.15s;
  }
  .grupos-dropdown-inner.open .grupo-dropdown-btn .dropdown-arrow {
    transform: rotate(180deg);
  }
  .grupos-dropdown-menu {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    min-width: 90px;
    background: #2C3967;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 10;
    padding: 0;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-top: none;
    flex-direction: column;
    width: 100%;
  }
  .grupos-dropdown-inner.open .grupos-dropdown-menu {
    display: flex;
  }
  .grupos-dropdown-menu .grupo-tab {
    display: flex;
    width: 100%;
    background: none;
    border: none;
    color: white;
    padding: 8px 14px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 0;
    text-align: left;
    justify-content: flex-start;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
  }
  .grupos-dropdown-menu .grupo-tab.active {
    background: #181D37;
    color: #FF9E1B;
  }
  .grupos-dropdown-menu .grupo-tab:hover {
    background: #fff3e0;
    color: #FF9E1B;
  }
  /* Oculta los botones de grupo fuera del dropdown en móvil */
  .grupos-nav > .grupo-tab {
    display: none !important;
  }
}

@media screen and (max-width: 768px) {
  .header-inner {
    display: flex;
    justify-content: center;
  }
  
  .main-nav {
    grid-column: unset;
    justify-self: unset;
  }
  
  .header-inner .footer-logo {
    grid-column: unset;
    justify-self: unset;
  }
  
  .menu-toggle {
    display: block;
    grid-column: unset;
    justify-self: unset;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: #111C4E;
    padding: 80px 20px 20px;
    transition: 0.3s;
    z-index: 999;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 15px;
  }

  .nav-item img {
    width: 24px;
    height: 24px;
  }

  .nav-item span {
    font-size: 1.1em;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .clasificacion-nav {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto;
    width: 100%;
  }

  .clasificacion-tab {
    width: 100%;
    max-width: 300px;
  }

  .grupos-nav {
    /* Elimina display:grid o display:flex aquí para que solo la clase .active controle la visibilidad */
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    /* NO poner display:grid ni display:flex aquí */
  }
  .grupos-nav.active {
    /* NO poner display:grid ni display:flex aquí */
  }

  .grupo-tab {
    width: 100%;
    height: 40px;
    border-radius: 20px;
  }

  .grupo-tab::before {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  .grupos-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    /* NO poner display:grid ni display:flex aquí */
  }
  .grupos-nav.active {
    /* NO poner display:grid ni display:flex aquí */
  }
}

@media screen and (max-width: 480px) {
  .nav-item {
    font-size: 0.7em;
  }
  
  .nav-item img,
  .icon {
    width: 20px;
    height: 20px;
  }

  .clasificacion-tab {
    padding: 8px 12px;
    font-size: 0.85em;
  }

  .grupo-tab {
    padding: 8px 12px;
    font-size: 0.75em;
  }

  .content-section {
    padding: 15px;
  }

  .content-section h2 {
    font-size: 1.3em;
  }

  .content-section p {
    font-size: 0.9em;
  }
}

/* ESTILOS ESPECÍFICOS PARA LA TABLA DE RESULTADOS */
.clasificacion-table-container h3 {
  color: #FF9E1B;
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  border-bottom: 2px solid rgba(255, 158, 27, 0.3);
  padding-bottom: 10px;
}

/* Estilos para las celdas de equipos */
.clasificacion-table tbody td.equipos {
  font-weight: 600;
  color: #111C4E;
  text-align: left;
  font-size: 1.05em;
  background-color: #ffffff;
  padding: 8px 12px;
}

.clasificacion-table tbody td.equipos:hover {
  background-color: rgba(255, 158, 27, 0.1);
}

/* Estilos base para cada equipo individual */
.clasificacion-table tbody td.equipos .equipo {
  display: block;
  padding: 6px 8px;
  margin: 2px 0;
  font-weight: 600;
  border-radius: 4px;
}

/* Estilo neutro para todos los equipos */
.clasificacion-table tbody td.equipos .equipo {
  color: #333;
  background-color: rgba(0, 0, 0, 0.05);
  border-left: 3px solid #ddd;
}

/* Estilo especial para el equipo ganador */
.clasificacion-table tbody td.equipos .equipo.ganador {
  color: #28a745;
  background-color: rgba(40, 167, 69, 0.15);
  border-left: 5px solid #28a745;
  font-weight: bold;
}

/* Estilos para fecha y hora */
.clasificacion-table tbody td.fecha,
.clasificacion-table tbody td.hora {
  text-align: center;
  font-weight: 500;
  color: #111C4E;
  background-color: #ffffff;
}

.clasificacion-table tbody td.fecha:hover,
.clasificacion-table tbody td.hora:hover {
  color: #FF9E1B;
  background-color: rgba(255, 158, 27, 0.1);
}

/* Estilos para la columna de resultado */
.clasificacion-table tbody td.resultado {
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
  background-color: #ffffff;
  color: #111C4E;
}

.clasificacion-table tbody td.resultado .marcador {
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #FF9E1B;
  color: #ffffff;
  font-weight: bold;
  display: inline-block;
  min-width: 60px;
}

.clasificacion-table tbody td.resultado .marcador.programado {
  background-color: #4CAF50;
  color: #ffffff;
  font-size: 0.95em;
}

.clasificacion-table tbody td.resultado:hover {
  color: #FF9E1B;
  background-color: rgba(255, 158, 27, 0.1);
}

/* Estilos para la columna de estado */
.clasificacion-table tbody td.estado {
  text-align: center;
  font-weight: 600;
  font-size: 0.9em;
  text-transform: uppercase;
}

.clasificacion-table tbody td.estado.finalizado {
  color: #4CAF50;
}

.clasificacion-table tbody td.estado.programado {
  color: #FF9E1B;
}

.clasificacion-table tbody td.estado.en-juego {
  color: #f44336;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Responsividad para la tabla de resultados */
@media screen and (max-width: 768px) {
  .clasificacion-table tbody td.resultado .marcador {
    font-size: 0.9em;
    padding: 3px 6px;
    min-width: 50px;
  }
  
  .clasificacion-table tbody td.equipos {
    font-size: 0.85em;
    padding: 6px 8px;
  }

  .clasificacion-table tbody td.equipos .equipo {
    padding: 4px 6px;
    margin: 1px 0;
  }

  .clasificacion-table tbody td.fecha,
  .clasificacion-table tbody td.hora {
    font-size: 0.85em;
  }
}

@media screen and (max-width: 600px) {
  .clasificacion-table-container h3 {
    font-size: 1.2em;
  }
  
  .clasificacion-table tbody td.resultado .marcador {
    font-size: 0.8em;
    padding: 2px 4px;
    min-width: 45px;
  }

  .clasificacion-table tbody td.equipos {
    font-size: 0.8em;
    padding: 4px 6px;
  }

  .clasificacion-table tbody td.equipos .equipo {
    padding: 3px 4px;
    margin: 1px 0;
    font-size: 0.85em;
  }
}

/* Playoff bracket image responsive */
.playoff-bracket-image {
  max-width: 100%;
  height: auto;
}

/* --- NUEVO: Estilos para logos de equipos pequeños y redondeados --- */
.team-logo-small {
  width: 28px;
  height: 28px;
  object-fit: cover;
  margin-right: 6px;
  vertical-align: middle;
}

.team-logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- NUEVO: Estilos para la tabla de resultados con formato de partido --- */
.partido-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  width: 100%;
}

.equipo-partido {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #111C4E;
  flex: 1;
  min-width: 0; /* Permite que el contenido se ajuste */
}

.equipo-partido.local {
  justify-content: flex-end;
  text-align: right;
}

.equipo-partido.visitante {
  justify-content: flex-start;
  text-align: left;
}

.equipo-partido span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resultado-partido {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1em;
  min-width: 80px;
  max-width: 80px;
  text-align: center;
  flex-shrink: 0; /* No se encoge */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Estilos para puntuaciones ganadoras y perdedoras */
.score-winner {
  color: #FF9E1B;
  font-weight: bold;
  font-size: 1.1em;
}

.score-loser {
  font-weight: normal;
}

.score-tie {
  font-weight: bold;
}

/* Estilos para las flechas */

@keyframes pulse-arrow {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.7; 
    transform: scale(1.1);
  }
}

/* Responsive para la tabla de resultados */
@media screen and (max-width: 768px) {
  .partido-container {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  
  .equipo-partido {
    min-width: auto;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .resultado-partido {
    font-size: 1em;
    padding: 4px 8px;
    order: 2; /* Mantener el resultado en el medio */
  }
  
  .equipo-partido.local {
    order: 1;
  }
  
  .equipo-partido.visitante {
    order: 3;
  }
}

/* --- NUEVO: Estilos para tooltips de equipos --- */
.equipo-partido,
.team-container {
  position: relative;
  cursor: help;
}

.equipo-partido::after,
.team-container::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background-color: #111C4E;
  color: white;
  font-size: 0.85em;
  border-radius: 4px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  pointer-events: none;
  max-width: 200px;
  text-align: center;
  font-weight: normal;
}

.equipo-partido:hover::after,
.team-container:hover::after {
  visibility: visible;
  opacity: 1;
}

/* Ajustes para tooltips que se salen de la pantalla */
.equipo-partido.local::after {
  left: auto;
  right: 0;
  transform: none;
}

.equipo-partido.visitante::after {
  left: 0;
  transform: none;
}

/* Estilos específicos para abreviaciones de equipos */
.equipo-partido span,
.team-name {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 0.5px;
  font-size: 0.95em;
}

/* Estilos para medallas junto a nombres de equipos */
.medalla-equipo {
  margin-left: 8px;
  font-size: 1.2em;
  font-weight: bold;
  vertical-align: middle;
}

/* Responsive para tooltips */
@media screen and (max-width: 768px) {
  .equipo-partido::after,
  .team-container::after {
    font-size: 0.8em;
    padding: 4px 8px;
    max-width: 150px;
  }
  
  .equipo-partido span,
  .team-name {
    font-size: 0.9em;
    letter-spacing: 0.3px;
  }
  
  .medalla-equipo {
    font-size: 1.1em;
    margin-left: 6px;
  }
}

@media screen and (max-width: 480px) {
  .equipo-partido::after,
  .team-container::after {
    display: none; /* Ocultar tooltips en móviles muy pequeños */
  }
}

/* --- NUEVO: Estilos para tabla de clasificación final --- */
.posicion-final {
  font-weight: bold;
  font-size: 1.2em;
  text-align: center;
  background-color: #f8f9fa;
  border-right: 2px solid #e0e0e0;
}

.posicion-final:first-child {
  background-color: #fff3cd;
  color: #856404;
  border-right: 3px solid #ffc107;
}

.posicion-final:nth-child(2) {
  background-color: #e2e3e5;
  color: #6c757d;
  border-right: 3px solid #6c757d;
}

.posicion-final:nth-child(3) {
  background-color: #f8d7da;
  color: #721c24;
  border-right: 3px solid #dc3545;
}

/* Estilos especiales para las primeras posiciones */

/* --- NUEVO: Estilos para enlaces de partidos y equipos --- */
.partido-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 4px;
}

.partido-link:hover {
    background-color: rgba(255, 158, 27, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 158, 27, 0.2);
}

.team-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 4px;
}

.team-link:hover {
    background-color: rgba(255, 158, 27, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 158, 27, 0.2);
}

/* Asegurar que los enlaces mantengan el estilo de las celdas */
.clasificacion-table tbody td.partido .partido-link,
.clasificacion-table tbody td:nth-child(2) .team-link {
    width: 100%;
    height: 100%;
}

/* Efectos hover específicos para los contenedores dentro de los enlaces */
.partido-link:hover .partido-container,
.team-link:hover .team-container {
    transform: scale(1.02);
}

/* Responsive para enlaces */
@media screen and (max-width: 768px) {
    .partido-link,
    .team-link {
        padding: 2px;
    }
    
    .partido-link:hover,
    .team-link:hover {
        transform: none;
        box-shadow: none;
    }
    
    .partido-link:hover .partido-container,
    .team-link:hover .team-container {
        transform: none;
    }
}

/* --- NUEVO: Estilos para indicador de carga --- */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  color: white;
  font-family: 'Manifold', Arial, sans-serif;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #FF9E1B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.loading-indicator p {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  margin: 0;
  color: #FF9E1B;
}

/* --- NUEVO: Estilos para tabla de clasificación final --- */

/* ===========================
   NAVEGACIÓN INFERIOR MÓVIL
   =========================== */
.mobile-bottom-nav {
  display: none; /* Oculta por defecto */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, #2F4170, #111C4E);
  border-top: 1px solid #53565A;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  color: #ffffff;
  padding: 12px 2px;
  min-height: 60px;
}

.bottom-nav-item img,
.bottom-nav-item svg {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  transition: filter 0.2s ease;
}

.bottom-nav-item span {
  display: none; /* Ocultar los nombres de los iconos */
}

/* Estado activo */
.bottom-nav-item.active {
  color: #FF9E1B;
  border-top: 3px solid #FF9E1B;
}

.bottom-nav-item.active img,
.bottom-nav-item.active svg {
  filter: brightness(0) saturate(20%) invert(49%) sepia(100%) saturate(1200%) hue-rotate(358deg) brightness(102%) contrast(101%);
}

/* Hover en móviles (para tablets) */
.bottom-nav-item:hover {
  color: #FF9E1B;
  background-color: rgba(255, 158, 27, 0.1);
}

.bottom-nav-item:hover img,
.bottom-nav-item:hover svg {
  filter: brightness(0) saturate(20%) invert(49%) sepia(100%) saturate(1200%) hue-rotate(358deg) brightness(102%) contrast(101%);
}

/* Efecto de tap/click para feedback táctil */
.bottom-nav-item:active {
  transform: scale(0.95);
  background-color: rgba(255, 158, 27, 0.2);
}

/* Animación de entrada desde abajo */
@keyframes slideUpNav {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* Mostrar solo en dispositivos móviles */
@media (max-width: 900px){
  .mobile-bottom-nav {
    display: flex;
  }
  
  /* Añadir padding inferior al body para evitar solapamiento */
  body {
    padding-bottom: 65px;
  }
  
  /* Ocultar el menú hamburguesa cuando hay barra inferior */
  .menu-toggle {
    display: none;
  }
  
  /* Hacer el main-nav invisible en móviles */
  .main-nav {
    display: none;
  }
}

/* Ajustar para pantallas muy pequeñas */
@media (max-width: 480px) {
  .bottom-nav-item img,
  .bottom-nav-item svg {
    width: 28px;
    height: 28px;
  }
  
  .bottom-nav-item {
    min-height: 55px;
    padding: 10px 1px;
  }
}

.competition-dropdown {
  position: relative;
  display: inline-block;
  width: 420px;
  max-width: 100%;
  z-index: 998;
}

.competition-dropdown-btn {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: #fff;
  font-size: 0.95em;
  transition: all 0.3s;
  position: relative;
  z-index: 999;
  min-height: 48px;
}

.competition-dropdown-btn .dropdown-arrow {
  margin-left: auto;
  font-size: 1.2em;
  color: #FF9E1B;
  transition: transform 0.2s;
}

.competition-dropdown.open .competition-dropdown-btn .dropdown-arrow {
  transform: rotate(180deg);
}

.competition-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #222c4e;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 1000;
  padding: 0;
  margin: 0;
  border: 2px solid rgba(255,255,255,0.2);
  border-top: none;
  animation: fadeIn 0.2s;
  max-height: 400px;
  overflow: hidden;
}

.competition-dropdown.open .competition-dropdown-menu {
  display: block;
}

/* Buscador de competiciones */
.competition-search-container {
  position: relative;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.competition-search-input {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 12px 16px 12px 40px;
  color: #fff;
  font-size: 0.95em;
  font-family: 'Montserrat', Arial, sans-serif;
  outline: none;
  transition: all 0.2s;
}

.competition-search-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.competition-search-input:focus {
  border-color: #FF9E1B;
  background: rgba(255,255,255,0.15);
}

.search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.9em;
  pointer-events: none;
}

/* Container de opciones con scroll */
.competition-options-container {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #FF9E1B rgba(255,255,255,0.1);
}

.competition-options-container::-webkit-scrollbar {
  width: 6px;
}

.competition-options-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
}

.competition-options-container::-webkit-scrollbar-thumb {
  background: #FF9E1B;
  border-radius: 3px;
}

.competition-dropdown-option {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.competition-dropdown-option:hover {
  background: rgba(255,158,27,0.15);
}

.competition-dropdown-option.active {
  background: rgba(255,158,27,0.25);
}

.competition-dropdown-option.active .competition-name {
  color: #FF9E1B;
}

.competition-dropdown-option:last-child {
  border-bottom: none;
}

.competition-dropdown-option img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.competition-option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.competition-name {
  color: #fff;
  font-size: 1em;
  font-weight: bold;
  font-family: 'Montserrat', Arial, sans-serif;
}

.competition-details {
  color: rgba(255,255,255,0.7);
  font-size: 0.85em;
  font-weight: normal;
  font-family: 'Montserrat', Arial, sans-serif;
}

/* Mensaje de no resultados */
.no-results-message {
  padding: 20px 24px;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  font-size: 0.9em;
}

/* Indicador de carga */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,158,27,0.3);
  border-top: 4px solid #FF9E1B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.loading-indicator p {
  color: #fff;
  font-size: 1.1em;
  font-weight: 500;
  text-align: center;
  max-width: 300px;
}

/* Responsive para selector de competiciones */
@media (max-width: 768px) {
  .competition-dropdown {
    width: 100%;
    max-width: none;
  }
  
  .competition-search-input {
    font-size: 16px; /* Prevenir zoom en iOS */
  }
  
  .competition-option-text {
    gap: 2px;
  }
  
  .competition-name {
    font-size: 0.9em;
  }
  
  .competition-details {
    font-size: 0.8em;
  }
  
  .competition-dropdown-option {
    padding: 14px 20px;
  }
  
  .competition-dropdown-option img {
    width: 35px;
    height: 35px;
  }
}

/* --- ESTILOS DROPDOWN DE GRUPOS SOLO EN MÓVIL --- */
.grupo-dropdown-btn,
.grupos-dropdown-menu,
.grupos-dropdown-inner {
  display: none;
}

@media (max-width: 480px) {
  .bottom-nav-item img,
  .bottom-nav-item svg {
    width: 28px;
    height: 28px;
  }
  
  .bottom-nav-item {
    min-height: 55px;
    padding: 10px 1px;
  }
  
}

/* --- ESTILOS GENERALES --- */
.login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5em 1em;
  border-radius: 30px;
  background: #181D37;
  transition: background 0.2s;
  color: #fff;
  border: 1px solid #D7DAE3;
  margin-left: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* --- MEDIA QUERIES AGRUPADAS AL FINAL --- */
@media (max-width: 900px) {
  .login-btn span {
    display: none;
  }
  .login-btn img {
    margin: 0;
  }
  .login-btn {
    padding: 0.5em;
    min-width: 0;
    justify-content: flex-end;
  }
  .header-right {
    display: flex;
    justify-content: flex-end;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .bottom-nav-item img,
  .bottom-nav-item svg {
    width: 28px;
    height: 28px;
  }
  .bottom-nav-item {
    min-height: 55px;
    padding: 10px 1px;
  }
}

/* Estilos del dropdown de usuario */
.login-container {
  position: relative;
  margin-left: auto;
}

.login-btn:hover {
  background: #1e2245;
}

/* Estilos del dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #181D37;
  border: 1px solid #D7DAE3;
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: fadeInDown 0.2s ease-out;
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid #2a3049;
  color: #FF9E1B;
  font-weight: 600;
  font-size: 0.85rem;
}

.dropdown-content {
  padding: 8px 0;
}

.dropdown-item {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
  text-decoration: none;
}

.dropdown-item:hover {
  background-color: #1e2245;
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilo para el nombre del usuario en naranja */
.user-name {
  color: #FF9E1B !important;
  font-weight: 600;
}

/* Estilos responsive para el dropdown */
@media (max-width: 900px) {
  .user-dropdown {
    min-width: 160px;
    right: -5px;
  }
}

@media (max-width: 480px) {
  .user-dropdown {
    min-width: 180px;
    right: -10px;
  }
  
  .dropdown-header,
  .dropdown-item {
    padding: 10px 14px;
    font-size: 0.8rem;
  }
}

/* Estilos para competiciones profesionales */
.professional-competition-only {
  display: none;
}

.club-competition-only {
  display: flex;
}

/* Cuando se selecciona competición profesional */
.professional-mode .professional-competition-only {
  display: flex;
}

.professional-mode .club-competition-only {
  display: none !important;
}

/* Leyenda específica para competiciones profesionales */
.legend-color.playoffs-pro {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: 2px solid #28a745;
}

.legend-color.elimination-pro {
  background: linear-gradient(135deg, #dc3545, #fd7e14);
  border: 2px solid #dc3545;
}

/* Tabla específica para liga regular */
.playoff-bracket-pro {
  min-height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #fff;
}

/* Títulos más pequeños para competiciones profesionales */
.resultados-jornada-h3 {
  font-size: 1.4em;
  color: #FF9E1B;
  margin: 20px 0 15px 0;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
}

/* Responsive para elementos profesionales */
@media (max-width: 768px) {
  .professional-competition-only {
    display: none;
  }
  
  .club-competition-only {
    display: flex;
  }
  
  .professional-mode .professional-competition-only {
    display: flex;
  }
  
  .professional-mode .club-competition-only {
    display: none !important;
  }
}

/* Estilos adicionales para competiciones profesionales */
.points-column {
  font-weight: bold;
  color: #3b82f6;
}

.estado-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 500;
  text-transform: uppercase;
}

.estado-badge.finalizado {
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Estilos para marcadores en línea */
.score-team {
  font-weight: bold;
  font-size: 1.1em;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
}

.score-team.winner {
  color: #f97316;
}

.score-team.loser {
  color: #6b7280;
}

.score-separator {
  font-weight: bold;
  color: #6b7280;
  margin: 0 8px;
  font-size: 1.1em;
}

/* Ajustar la disposición del partido para que esté en línea */
.partido-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.equipo-partido.local {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.equipo-partido.visitante {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-start;
  flex-direction: row;
}

/* Colores para las leyendas profesionales */
.legend-color.playoffs-pro {
  background-color: #22c55e;
}

.legend-color.elimination-pro {
  background-color: #ef4444;
}

/* Estilos para encabezados más pequeños */
.resultados-jornada-h3 {
  font-size: 1.2em;
  margin: 20px 0 15px 0;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

/* Centrar todos los h3 en la sección de clasificación */
.clasificacion-content h3 {
  text-align: center;
}

/* Espacio superior adicional para el h3 de Clasificación Liga Regular */
#content-liga-regular h3:not(.resultados-jornada-h3) {
  margin-top: 30px;
}

/* Centrar datos de la columna Fecha en tablas de resultados */
#resultadosTable tbody tr td:nth-child(2),
#resultadosProTable tbody tr td:nth-child(2) {
  text-align: center;
}

/* Estilos para el contenedor del bracket profesional */
.playoff-bracket-pro {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(248, 250, 252, 0.5);
  border-radius: 12px;
  border: 2px dashed #cbd5e1;
  color: #64748b;
  font-size: 1.1em;
  text-align: center;
  padding: 40px 20px;
}

/* Estilos para clasificación final profesional */
.logros-column {
  text-align: center;
  font-size: 0.9em;
}

.posicion-final {
  font-weight: bold;
  text-align: center;
}

/* Estilos para el selector de jornada profesional */
#jornadaFilterPro {
  /* Heredar estilos del filter-dropdown base */
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  outline: none;
  min-height: 48px;
  width: 100%;
}

#jornadaFilterPro:hover {
  border-color: rgba(255, 158, 27, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

#jornadaFilterPro:focus {
  border-color: #FF9E1B;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 158, 27, 0.2);
}

#jornadaFilterPro option {
  background: #2F4170;
  color: #fff;
  padding: 8px 12px;
  border: none;
}



