/* ═══════════════════════════════════════════════════════════
   equipo.css — Ficha de equipo FutboLive
   Estilo claro, coherente con styles.css
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --verde:        #00a651;
  --verde-dark:   #007a3c;
  --verde-light:  #e8f7ef;
  --gris-oscuro:  #1a1a2e;
  --texto:        #1a1a2e;
  --texto-suave:  #666;
  --borde:        #e8e8e8;
  --fondo:        #f0f2f5;
  --blanco:       #fff;
  --amarilla:     #f5c518;
  --roja:         #e53935;
  --radius:       8px;
  --font-display: 'Oswald', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--font-body);
  font-size: 15px;
  min-height: 100vh;
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  background: var(--gris-oscuro);
  border-bottom: 3px solid var(--verde-dark);
  padding: 36px 24px 32px;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-escudo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

.hero-info { flex: 1; min-width: 200px; }

.hero-liga {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 4px;
}

.hero-nombre {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #888;
}

.meta-val {
  font-size: 13px;
  font-weight: 500;
  color: #e0e0e0;
}

/* ══════════════════════════════════════════
   MAIN
══════════════════════════════════════════ */
.main {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 12px 60px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── SELECTOR TEMPORADA ── */
.temporada-bar {
  background: var(--blanco);
  border: 0.5px solid var(--borde);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.temporada-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-suave);
}

.temporada-select {
  background: var(--fondo);
  color: var(--texto);
  border: 0.5px solid var(--borde);
  border-radius: var(--radius);
  padding: 7px 32px 7px 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.temporada-select:focus {
  outline: none;
  border-color: var(--verde);
}

/* ── STATS GLOBALES ── */
.stats-globales {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

.stat-card {
  background: var(--blanco);
  border: 0.5px solid var(--borde);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  transition: border-color .2s;
}

.stat-card:hover { border-color: var(--verde); }

.stat-card-valor {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--verde-dark);
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-suave);
}

/* ── SECCIÓN GENÉRICA ── */
.section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  background: var(--gris-oscuro);
  padding: 10px 14px;
}

.clasificacion-section,
.plantilla-section,
.partidos-section {
  background: var(--blanco);
  border: 0.5px solid var(--borde);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── CLASIFICACIÓN ── */
.tabla-wrap {
  overflow-x: auto;
}

.tabla-clasificacion {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tabla-clasificacion thead {
  background: var(--fondo);
}

.tabla-clasificacion th {
  padding: 8px 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--texto-suave);
  white-space: nowrap;
  border-bottom: 0.5px solid var(--borde);
}

.tabla-clasificacion th:nth-child(2) { text-align: left; }

.tabla-clasificacion td {
  padding: 8px 10px;
  border-bottom: 0.5px solid #f2f2f2;
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
}

.tabla-clasificacion td:nth-child(2) { text-align: left; font-weight: 600; }

.tabla-clasificacion tbody tr:last-child td { border-bottom: none; }
.tabla-clasificacion tbody tr { background: var(--blanco); transition: background .12s; }
.tabla-clasificacion tbody tr:hover { background: #fafafa; }

.tabla-clasificacion .equipo-destacado {
  background: var(--verde-light) !important;
  font-weight: 700;
}

.tabla-clasificacion .equipo-destacado td { color: var(--verde-dark); }

.pos-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--texto-suave);
  width: 28px;
  display: inline-block;
  text-align: center;
}

.pos-num.pos-ascenso { color: var(--verde); }
.pos-num.pos-descenso { color: var(--roja); }

/* ── PLANTILLA ── */
.posicion-grupo { border-bottom: 0.5px solid var(--borde); }
.posicion-grupo:last-child { border-bottom: none; }

.posicion-header {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-suave);
  background: var(--fondo);
  padding: 7px 14px;
  border-bottom: 0.5px solid var(--borde);
}

.jugador-fila {
  display: grid;
  grid-template-columns: 36px 1fr auto auto auto auto;
  align-items: center;
  gap: 0 12px;
  padding: 8px 14px;
  border-bottom: 0.5px solid #f2f2f2;
  font-size: 13px;
  transition: background .12s;
}

.jugador-fila:last-child { border-bottom: none; }
.jugador-fila:hover { background: #fafafa; }

.jugador-dorsal {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--texto-suave);
  text-align: center;
}

.jugador-nombre {
  font-weight: 600;
  color: var(--texto);
}

.jugador-meta {
  font-size: 12px;
  color: var(--texto-suave);
  text-align: center;
  white-space: nowrap;
}

.jugador-badge {
  display: inline-block;
  width: 10px; height: 14px;
  border-radius: 2px;
  vertical-align: middle;
}

.badge-am { background: var(--amarilla); }
.badge-ro { background: var(--roja); }

/* ── PARTIDOS ── */
.tabla-partidos {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tabla-partidos thead { background: var(--fondo); }

.tabla-partidos th {
  padding: 9px 14px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-suave);
  white-space: nowrap;
  border-bottom: 0.5px solid var(--borde);
}

.tabla-partidos th:nth-child(2),
.tabla-partidos th:nth-child(3),
.tabla-partidos th:nth-child(4) { text-align: center; }

.tabla-partidos td {
  padding: 9px 14px;
  border-bottom: 0.5px solid #f2f2f2;
  vertical-align: middle;
  white-space: nowrap;
}

.tabla-partidos td:nth-child(2) { text-align: right; font-weight: 600; }
.tabla-partidos td:nth-child(3) { text-align: center; }
.tabla-partidos td:nth-child(4) { text-align: left;  font-weight: 600; }

.tabla-partidos tbody tr:last-child td { border-bottom: none; }
.tabla-partidos tbody tr { background: var(--blanco); transition: background .12s; }
.tabla-partidos tbody tr:hover { background: #fafafa; }

.marcador {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--fondo);
  letter-spacing: 1px;
}

.comp-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--verde-light);
  color: var(--verde-dark);
  white-space: nowrap;
}

.equipo-local  { color: var(--verde-dark); }
.equipo-visita { color: var(--texto-suave); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .hero-inner { gap: 16px; }
  .hero-escudo { width: 70px; height: 70px; }
  .stat-card-valor { font-size: 24px; }

  .jugador-fila {
    grid-template-columns: 28px 1fr auto auto;
  }
  .jugador-meta.hide-mobile { display: none; }
}
