/* @import url('table.css'); */
@import url('minimal-table.css');
@import url('navegador.css');
@import url('index.css');
@import url('estadisticas.css');
@import url('grupos.css');
@import url('equipos.css');
@import url('jugadores.css');
@import url('jugadores_all_data.css');
@import url('panel.css');
@import url('footer.css');
@import url('breadcrumb.css');
@import url('comparador.css');

/* Estilos generales */
body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: -40%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: url('/public/images/logo_fondo.png');
  background-size: contain; /* o 'cover' si prefieres que rellene todo aunque recorte */
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: var(--link-color);
  font-weight: bold;
}

/* Encabezado */
header {
  background-color: var(--header-bg);
  color: var(--text-color);
  padding: 2vh 0;
  text-align: center;
  margin-bottom: 2vh;
  width: 100%;
}

/* Títulos */
.titulo,
.subtitulo {
  font-size: 2.5vw;
}

h1 {
  font-size: 2vw;
  margin-bottom: 1vw;
  margin-top: 0%;
}

.titulo_tres {
  font-size: 1.5vw;
  margin-left: 3%;
}

.linea {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2vw 0 1vw;
}

/* Variables de color */
:root {
  --bg-color: #212121e6;
  --text-color: #f0f0f0;
  --header-bg: #212121e6;
  --footer-bg: #212121e6;
  --link-color: #ffffff;
  --accent-color: #d94f5c;
  --color-green: #00a878;
  --color-red: #ff2600;
  --color-button: #fdffff;
  --color-black: #000;
  --search-hover-color: #f0f0f0;
}

.search-and-alphabet {
    display: flex;
    justify-content: space-between; /* Divide el espacio entre el buscador y las letras */
    align-items: center; /* Alinea verticalmente el buscador y las letras */
}

.search-container {
    width: 100%; /* Ajusta el ancho del buscador */
    height: 100%;
}

.search-container input {
  width: 95%; /* Asegura que el buscador ocupe el 100% del espacio disponible en su contenedor */
  font-size: 1.1vw;
  border-radius: 0.5vw;
  padding: 10px 15px 10px 15px;
  outline: none;
  border: none;
  background-color: var(--footer-bg);
  color: var(--text-color);
  font-weight: 550;
  transition: 0.3s ease-in-out;
  box-shadow: 0 0 0 5px transparent;
}

.search-container input:hover,
.search-container input:focus {
  box-shadow: 0 0 0 2px var(--search-hover-color);
}

.search-container span {
  position: absolute;
  left: 0;
  top: 0;
  padding: 13px 15px;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  text-shadow: -1px -1px 0 #f1f1f1, 1px -1px 0 #f1f1f1, -1px 1px 0 #f1f1f1,
    1px 1px 0 #f1f1f1;
  transition: 0.3s ease-in-out;
  pointer-events: none;
}

.search-container input:focus + span,
.search-container input:valid + span {
  transform: translateY(-12px) translateX(-5px) scale(0.95);
  transition: 0.3s ease-in-out;
}

.alphabet-nav {
    text-align: right; /* Alinea las letras a la derecha */
}

.alphabet-nav a {
    margin: 0 0.5vw; /* Mantiene el espacio entre las letras */
    font-size: 1.5vw;
    cursor: pointer;
}

/* Letra activa en la navegación del abecedario */
.alphabet-nav a.active-letter {
    text-decoration: underline;
    font-weight: bold;
}

/* Tablas */
.team-table,
.player-table {
  font-size: 1vw;
  width: 100%;
}

/* Contenedor */
.container {
  margin: 0 5%;
}

/* Texto justificado */
.justificado {
  text-align: justify;
  font-size: 1.5vw;
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

br{
  margin-bottom: -10px; /* espacio después del salto de línea */
}

ul .justificado {
  margin-bottom: 0.5rem; /* Reduce el espacio entre elementos */
  line-height: 1.4;      /* Compacta el texto un poco más */
}

.lista-propuesta {
  margin-left: 2%;
  padding-left: 1rem;
}

/* Responsividad */
@media (max-width: 768px) {
  .titulo,
  .subtitulo,
  h1,
  .titulo_tres {
    font-size: 5vw;
  }

  footer {
    font-size: 3.5vw;
    padding: 1.5vh 5vw;
  }

  .search-and-alphabet{
    margin-top: -15px;
    margin-bottom: 10px;
  }

  #search-input {
    padding: 0.75vw;
    font-size: 1.5vw;
  }

  .alphabet-nav a {
      margin: 0 0.5vw; /* Mantiene el espacio entre las letras */
      font-size: 1.5vw;
  }

  .lista-propuesta {
    margin-left: 1%;
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  
  /* Ajustes para el texto justificado en pantallas pequeñas */
  .justificado {
    font-size: 2vw;     /* Tamaño de fuente adaptado */
    line-height: 1.5;     /* Un poco menos que en desktop, para mejor lectura */
    margin-top: 0.5rem;   /* Pequeño margen arriba */
    margin-bottom: 1rem;  /* Margen abajo */
  }

  .titulo,
  h1{
    font-size: 4vw;
  }

  .subtitulo,
  .titulo_tres {
    font-size: 2.5vw;
  }

  ul .justificado {
    margin-bottom: 0.2vw; /* Reduce el espacio entre elementos */
    line-height: 1.4;      /* Compacta el texto un poco más */
  }
}

/* Estilo específico para iPad y tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .titulo {
    font-size: 5vw; /* Menor que móvil, mayor que escritorio */
    margin: 1vh 5vw;   /* Espaciado elegante */
  }
}

/* Tema claro: redefine variables */
body.light-mode {
  --bg-color: #ffffff;
  --text-color: #2b2b2b;
  --header-bg: #f0f0f0;
  --footer-bg: #f0f0f0;
  --link-color: #2b2b2b;
  --search-hover-color: #333;
}