/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

/* ===== VARIABLES ===== */
:root {
  --azul-oscuro: #002b5c;
  --azul-claro: #0077ff;
  --blanco: #ffffff;
  --rojo: #e63946;
  --borde-suave: #eef4ff;
  --sombra: rgba(0, 0, 0, 0.15);
}

/* ===== FONDO GENERAL ===== */
body {
  background: linear-gradient(90deg, #eaf1fb 0%, #ffffff 50%, #eaf1fb 100%);
  color: var(--azul-oscuro);
  overflow-x: hidden;
  position: relative;
}

/* ===== BARRAS LATERALES ===== */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  width: 14px;
  height: 100vh;
  z-index: -1;
  background: linear-gradient(to bottom, var(--rojo), #0057b8 90%, var(--azul-oscuro));
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
}

body::before { left: 0; }
body::after  { right: 0; }

/* ===== LEMAS LATERAIS ===== */
html::before,
html::after {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 1rem;
  color: var(--azul-oscuro);
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
  z-index: 0;
  pointer-events: none;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

html::before { content: "UN POBO"; left: 30px; }
html::after  { content: "UN SENTIMENTO"; right: 30px; }

@media (max-width: 1024px) {
  html::before,
  html::after {
    display: none;
  }
}

/* ===== HEADER / NAVBAR ===== */
header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, var(--azul-oscuro), #0057b8, #4da3ff);
  padding: 10px 30px;
  color: var(--blanco);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo img {
  width: 36px;
  height: 36px;
  transition: transform 0.3s ease;
}

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

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

.menu li a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.menu li a:hover,
.menu li a.active {
  background: var(--rojo);
  color: var(--blanco);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--blanco);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 6px 8px;
}

/* ===== MAIN ===== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 80px;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--azul-oscuro);
  margin-bottom: 25px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== FOTO OFICIAL ===== */
.foto-oficial {
  text-align: center;
  margin: 30px 0 50px;
}

.foto-oficial img {
  max-width: 80%;
  border-radius: 14px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
}

.foto-oficial img:hover {
  transform: scale(1.02);
}

/* ===== CONTENEDOR ===== */
.plantel-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== TABLA DE PLANTILLA ===== */
.plantel {
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--blanco);
  box-shadow: 0 6px 20px var(--sombra);
}

.plantel table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: center;
}

/* ===== CABECERAS ===== */
.plantel thead th {
  background: var(--azul-oscuro);
  color: var(--blanco);
  padding: 10px 6px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,0.1);
  white-space: normal;
  line-height: 1.2;
}
.plantel thead th:last-child {
  border-right: none;
}

/* ===== ANCHOS ===== */
.plantel th:nth-child(1),
.plantel td:nth-child(1) { width: 14%; } /* Nombre */
.plantel th:nth-child(2),
.plantel td:nth-child(2) { width: 6%; }  /* Nº */
.plantel th:nth-child(3),
.plantel td:nth-child(3) { width: 6%; }  /* Goles */
.plantel th:nth-child(4),
.plantel td:nth-child(4) { width: 8%; }  /* Asistencias */
.plantel th:nth-child(5),
.plantel td:nth-child(5) { width: 7%; }  /* Amarillas */
.plantel th:nth-child(6),
.plantel td:nth-child(6) { width: 6%; }  /* Rojas */
.plantel th:nth-child(7),
.plantel td:nth-child(7) { width: 9%; }  /* Partidos */
.plantel th:nth-child(8),
.plantel td:nth-child(8) { width: 14%; } /* Goles generados */
.plantel th:nth-child(9),
.plantel td:nth-child(9) { width: 12%; } /* Goles x partido */
.plantel th:nth-child(10),
.plantel td:nth-child(10) { width: 8%; } /* G+A */

/* ===== CUERPO ===== */
.plantel tbody td {
  padding: 10px 6px;
  color: var(--azul-oscuro);
  font-weight: 500;
  border-bottom: 1px solid var(--borde-suave);
  word-wrap: break-word;
}
.plantel tbody tr:nth-child(even) {
  background-color: var(--borde-suave);
}
.plantel tbody tr:hover {
  background: rgba(77,163,255,0.12);
  transition: background 0.2s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Abreviaturas */
  .plantel thead th:nth-child(2)::after { content: "NUM"; }
  .plantel thead th:nth-child(4)::after { content: "ASIST."; }
  .plantel thead th:nth-child(2),
  .plantel thead th:nth-child(4) { font-size: 0; position: relative; }
  .plantel thead th:nth-child(2)::after,
  .plantel thead th:nth-child(4)::after {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--blanco);
  }

  .plantel table { font-size: 0.8rem; }
  .plantel th, .plantel td { padding: 8px 4px; }

  /* Ocultar columnas no esenciales */
  .plantel th:nth-child(5),
  .plantel th:nth-child(6),
  .plantel th:nth-child(7),
  .plantel th:nth-child(8),
  .plantel th:nth-child(9),
  .plantel th:nth-child(10),
  .plantel td:nth-child(5),
  .plantel td:nth-child(6),
  .plantel td:nth-child(7),
  .plantel td:nth-child(8),
  .plantel td:nth-child(9),
  .plantel td:nth-child(10) {
    display: none;
  }
}

@media (max-width: 480px) {
  .plantel table { font-size: 0.75rem; }
  .plantel th, .plantel td { padding: 6px 2px; }
}



/* ===== CUERPO TÉCNICO ===== */
.cuerpo-tecnico {
  flex: 1;
  background: var(--blanco);
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: 0 4px 12px var(--sombra);
  text-align: center;
  max-width: 300px;
}

.cuerpo-tecnico h2 {
  color: var(--azul-oscuro);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.2rem;
}

.cuerpo-tecnico h3 {
  color: #0057b8;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(90deg, var(--azul-oscuro), #0057b8);
  color: var(--blanco);
  text-align: center;
  padding: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2);
}

footer::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rojo);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .foto-oficial img { max-width: 90%; }
  .plantel th, .plantel td { font-size: 0.9rem; }
}

@media (max-width: 768px) {
  .menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: #06335f;
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  }

  .menu.active { display: flex; }
  .menu-toggle { display: block; }

  .plantel-container {
    flex-direction: column;
    align-items: center;
  }

  /* 🔹 Ocultar columnas no esenciales */
  .plantel th:nth-child(5),
  .plantel th:nth-child(6),
  .plantel th:nth-child(7),
  .plantel th:nth-child(8),
  .plantel th:nth-child(9),
  .plantel th:nth-child(10),
  .plantel td:nth-child(5),
  .plantel td:nth-child(6),
  .plantel td:nth-child(7),
  .plantel td:nth-child(8),
  .plantel td:nth-child(9),
  .plantel td:nth-child(10) {
    display: none;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .foto-oficial img { max-width: 100%; }
  .plantel table { font-size: 0.8rem; }
  .cuerpo-tecnico { width: 100%; margin-top: 1rem; }
}
/* ===== CABECERAS OPTIMIZADAS (ESCRITORIO) ===== */
@media (min-width: 769px) {
  .plantel thead th {
    white-space: nowrap; /* evita saltos de línea */
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Abreviaturas visuales más limpias */
  .plantel thead th:nth-child(2)::before {
    content: "Nº";
  }
  .plantel thead th:nth-child(3)::before {
    content: "GOL";
  }
  .plantel thead th:nth-child(4)::before {
    content: "ASIST.";
  }
  .plantel thead th:nth-child(7)::before {
    content: "PJ";
  }
  .plantel thead th:nth-child(8)::before {
    content: "G. GEN.";
  }
  .plantel thead th:nth-child(9)::before {
    content: "G/P";
  }

  /* Ocultamos texto original y usamos los pseudoelementos */
  .plantel thead th:nth-child(2),
  .plantel thead th:nth-child(3),
  .plantel thead th:nth-child(4),
  .plantel thead th:nth-child(7),
  .plantel thead th:nth-child(8),
  .plantel thead th:nth-child(9) {
    font-size: 0;
    position: relative;
  }

  .plantel thead th:nth-child(2)::before,
  .plantel thead th:nth-child(3)::before,
  .plantel thead th:nth-child(4)::before,
  .plantel thead th:nth-child(7)::before,
  .plantel thead th:nth-child(8)::before,
  .plantel thead th:nth-child(9)::before {
    font-size: 0.85rem;
    color: var(--blanco);
    font-weight: 700;
  }

  /* Tooltip al pasar el ratón */
  .plantel thead th[title] {
    position: relative;
    cursor: help;
  }
  .plantel thead th[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 43, 92, 0.9);
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
  }
}
/* ===== TOOLTIP MODERNO ESTILO LALIGA ===== */
@media (min-width: 769px) {
  .plantel thead th[title] {
    position: relative;
    cursor: help;
  }

  .plantel thead th[title]::after {
    content: attr(title);
    position: absolute;
    bottom: -38px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 43, 92, 0.95);
    color: #fff;
    font-size: 0.78rem;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
  }

  .plantel thead th[title]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* 🔹 Pequeña flecha */
  .plantel thead th[title]::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 43, 92, 0.95) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .plantel thead th[title]:hover::before {
    opacity: 1;
  }
}
