/* infofutbol.es — Estilos
 * Versión: 1.2.0
 * Historial:
 *   1.2.0 (2026-10-05) Bloque y botón «Comprar web» del pie.
 *   1.1.0 (2026-10-05) Logotipo en cabecera y pie, pestañas como enlaces (aria-current), H1 de
 *                      página, migas, resumen en texto, portada con tarjetas por liga y tabla
 *                      mini, bloque de zonas, enlaces a otras ligas, caption de tabla.
 *   1.0.0 (2026-10-05) Versión inicial: cabecera tipo césped, pestañas por liga, tabla con
 *                      zonas y racha, tarjetas de partido, tema claro/oscuro, diseño móvil.
 */

:root {
  --bg: #eef2ee;
  --surface: #ffffff;
  --surface-2: #f6f8f6;
  --ink: #0f1d16;
  --muted: #5f6e66;
  --line: #e1e7e2;
  --win: #16a34a;
  --draw: #a3a3a3;
  --loss: #dc2626;
  --live: #ef4444;
  --pitch-1: #0b3a2a;
  --pitch-2: #0f5a3d;
  --shadow: 0 1px 2px rgba(15, 29, 22, .06), 0 6px 20px -8px rgba(15, 29, 22, .12);
  --radius: 14px;
  --liga: #e8423a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b100d;
    --surface: #131a16;
    --surface-2: #18211c;
    --ink: #e8efe9;
    --muted: #93a39a;
    --line: #243029;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -10px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b100d; --surface: #131a16; --surface-2: #18211c; --ink: #e8efe9;
  --muted: #93a39a; --line: #243029; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; }
h2, h3, h4 { margin: 0; }

/* ------------------------------------------------------------------ Cabecera */
.cab {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 60px, transparent 60px 120px),
    linear-gradient(160deg, var(--pitch-2), var(--pitch-1) 70%);
  color: #fff;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.cab-in {
  max-width: 1240px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.marca img { display: block; height: 46px; width: auto; }
.marca strong {
  display: block; font: 700 28px/1 "Barlow Condensed", sans-serif; letter-spacing: .5px; text-transform: uppercase;
}
.marca small { display: block; font-size: 12.5px; opacity: .75; margin-top: 2px; }

.pestanas { display: flex; gap: 6px; background: rgba(0,0,0,.22); padding: 5px; border-radius: 999px; }
.pestanas a {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
  font: 600 17px/1 "Barlow Condensed", sans-serif; letter-spacing: .4px; text-transform: uppercase;
  color: rgba(255,255,255,.8); transition: background .15s, color .15s;
}
.pestanas a:hover { color: #fff; background: rgba(255,255,255,.08); }
.pestanas a[aria-current="page"] { background: #fff; color: var(--pitch-1); box-shadow: inset 0 -3px 0 var(--liga); }
.gen {
  font: 700 10px/1 Inter, sans-serif; padding: 3px 5px; border-radius: 4px; letter-spacing: 0;
  background: rgba(255,255,255,.18);
}
.pestanas a[aria-current="page"] .gen { background: var(--liga); color: #fff; }

.punto-vivo {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 0 rgba(239,68,68,.7); animation: latido 1.6s infinite;
}
.pestanas .punto-vivo { position: absolute; top: 4px; right: 6px; }
@keyframes latido { 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
@media (prefers-reduced-motion: reduce) { .punto-vivo { animation: none; } }

/* ------------------------------------------------------------------ Liga */
.contenido { max-width: 1240px; margin: 0 auto; padding: 22px 16px 40px; }
.liga-cab {
  display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 4px 2px 16px; margin-bottom: 18px; border-bottom: 3px solid var(--liga);
}
.liga-cab h1, .cabecera-pag h1 { margin: 0; font: 700 40px/1.05 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .3px; }
.temp { color: var(--liga, var(--pitch-2)); }
.liga-gen { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--liga); text-transform: uppercase; letter-spacing: .8px; }
.liga-act { margin: 0; font-size: 13px; color: var(--muted); }
.liga-act.desfasado { color: #b45309; }
.liga-act.desfasado::before { content: "⚠ "; }

.rejilla { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.columna-partidos { display: grid; gap: 20px; }

.tarjeta {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px 14px; border: 1px solid var(--line);
}
.tarjeta h2 {
  display: flex; align-items: center; gap: 8px;
  font: 700 20px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 12px;
}
.tarjeta h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--liga); }
.tarjeta.directo { margin-bottom: 20px; border-color: rgba(239,68,68,.35); }
.tarjeta.directo h2::before { display: none; }
.vacio { color: var(--muted); margin: 6px 0; font-size: 14px; }

/* ------------------------------------------------------------------ Tabla */
.tabla-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th {
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
  text-align: center; padding: 6px 4px 8px; border-bottom: 1px solid var(--line);
}
.tabla td { text-align: center; padding: 7px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover { background: var(--surface-2); }
.tabla .c-eq { text-align: left; width: 100%; }
.tabla .c-pos { width: 36px; }
.pos {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  font-weight: 700; font-size: 13px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--z, transparent);
}
.pos[style] { background: color-mix(in srgb, var(--z) 22%, var(--surface)); }
.eq-tabla { display: flex; align-items: center; gap: 10px; min-width: 0; }
.eq-tabla .nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.c-pts { font: 700 18px/1 "Barlow Condensed", sans-serif; }
.dg { color: var(--muted); }
.pos-dg { color: var(--win); }
.neg-dg { color: var(--loss); }
.racha { display: inline-flex; gap: 3px; }
.racha i {
  font: 700 10px/18px Inter, sans-serif; font-style: normal; width: 18px; height: 18px; border-radius: 4px; color: #fff;
}
.r-G { background: var(--win); } .r-E { background: var(--draw); } .r-P { background: var(--loss); }

.leyenda { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 0 0; margin: 10px 0 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.leyenda li { display: flex; align-items: center; gap: 6px; }
.leyenda span { width: 12px; height: 12px; border-radius: 3px; }

/* ------------------------------------------------------------------ Escudos */
.esc { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.esc-s { width: 24px; height: 24px; }
.esc-ini {
  display: inline-grid; place-items: center; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  font: 700 10px/1 Inter, sans-serif; color: var(--muted);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.esc { filter: drop-shadow(0 0 1px rgba(255,255,255,.35)); }
}

/* ------------------------------------------------------------------ Partidos */
.dia {
  font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px;
  margin: 14px 0 6px;
}
.dia:first-of-type { margin-top: 0; }
.partidos { list-style: none; margin: 0; padding: 0; }
.partido {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 4px 10px; padding: 9px 6px; border-radius: 10px;
}
.partido + .partido { border-top: 1px solid var(--line); }
.partido:hover { background: var(--surface-2); }
.eq { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 500; }
.eq .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-l { justify-content: flex-end; text-align: right; }
.eq.gana { font-weight: 700; }
.eq.pierde { color: var(--muted); }
.marcador {
  min-width: 70px; text-align: center; display: inline-flex; justify-content: center; align-items: center; gap: 6px;
  font: 700 22px/1 "Barlow Condensed", sans-serif;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
}
.marcador i { font-style: normal; color: var(--muted); font-weight: 500; }
.marcador .hora { font-size: 17px; font-weight: 600; color: var(--muted); }
.estado-post .marcador { background: var(--pitch-1); color: #fff; border-color: transparent; }
.estado-post .marcador i { color: rgba(255,255,255,.55); }
.estado-in .marcador { background: var(--live); color: #fff; border-color: transparent; }
.estado-in .marcador i { color: rgba(255,255,255,.7); }
.est { grid-column: 2; text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.est.vivo { color: var(--live); }
.anulado .marcador { background: var(--surface-2); color: inherit; border: 1px dashed var(--line); }
.anulado .marcador .hora { color: #b45309; font-size: 14px; }

/* ------------------------------------------------------------------ Avisos y pie */
.aviso { padding: 14px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.aviso-error { background: #fee2e2; color: #7f1d1d; }
.pie { max-width: 1240px; margin: 0 auto; padding: 8px 16px 30px; color: var(--muted); font-size: 12.5px; text-align: center; }
.pie p { margin: 4px 0; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 980px) {
  .rejilla { grid-template-columns: minmax(0, 1fr); }
  .cab { position: static; }
}
@media (max-width: 640px) {
  .opc2 { display: none; }
  .liga-cab h1, .cabecera-pag h1 { font-size: 30px; }
  .marca img { height: 38px; }
  .cab-in { justify-content: center; }
  .pestanas { width: 100%; justify-content: space-between; }
  .pestanas a { padding: 8px 12px; font-size: 16px; flex: 1; justify-content: center; }
  .tarjeta { padding: 14px 12px 10px; }
  .esc { width: 24px; height: 24px; }
  .marcador { min-width: 58px; font-size: 20px; padding: 4px 8px; }
  .eq { font-size: 14px; gap: 7px; }
}
@media (max-width: 480px) {
  .opc { display: none; }
  .marca small { display: none; }
}

/* ------------------------------------------------------------------ 1.1.0: SEO y portada */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabla .cap { caption-side: top; text-align: left; font-size: 12.5px; color: var(--muted); padding: 0 0 8px; }
.tabla tbody th[scope="row"] {
  font: inherit; font-size: 14px; color: inherit; text-transform: none; letter-spacing: 0;
  text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tabla tbody tr:last-child th { border-bottom: 0; }
.cabecera-pag .temp { color: var(--pitch-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cabecera-pag .temp { color: #5fc792; } }
.tabla abbr { text-decoration: none; cursor: help; }

.migas { font-size: 13px; color: var(--muted); margin: 0 2px 14px; }
.migas a { color: var(--muted); text-decoration: none; }
.migas a:hover { color: var(--ink); text-decoration: underline; }

.cabecera-pag { margin: 4px 2px 22px; padding-bottom: 16px; border-bottom: 3px solid var(--pitch-2); }
.intro { max-width: 860px; margin: 10px 0 0; color: var(--muted); font-size: 15.5px; }
.intro strong { color: var(--ink); font-weight: 600; }

.resumen { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.resumen-grande { max-width: 900px; margin: -4px 2px 20px; font-size: 15.5px; color: var(--ink); }

.rejilla-portada { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; margin-top: 20px; }
.liga-resumen { border-top: 4px solid var(--liga); }
.liga-resumen h2 a { color: inherit; text-decoration: none; }
.liga-resumen h2 a:hover { color: var(--liga); }
.liga-resumen .liga-gen { margin-bottom: 4px; }
.tabla-mini { margin-bottom: 6px; }
.sub { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 14px 0 4px; }
.ver-mas {
  display: block; margin-top: 12px; padding: 10px 12px; border-radius: 10px; text-align: center; text-decoration: none;
  font-weight: 600; font-size: 14px; color: var(--liga); background: color-mix(in srgb, var(--liga) 10%, var(--surface));
}
.ver-mas:hover { background: color-mix(in srgb, var(--liga) 18%, var(--surface)); }

.zonas-txt { margin-top: 20px; }
.zonas-txt ul { margin: 0; padding-left: 18px; color: var(--muted); }
.zonas-txt li { margin: 4px 0; }
.zonas-txt strong { color: var(--ink); }

.otras-ligas { margin-top: 26px; }
.otras-ligas h2 { font: 700 20px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 10px; }
.otras { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.otras a {
  display: inline-flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--liga); font-weight: 600;
}
.otras a small { font-weight: 400; color: var(--muted); font-size: 12px; }
.otras a:hover { border-color: var(--liga); }

.pie-logo { display: block; margin: 0 auto 10px; height: 36px; width: auto; opacity: .85; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pie-logo { content: url("/img/logo-blanco.svg"); }
}

@media (max-width: 1100px) { .rejilla-portada { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .rejilla-portada { grid-template-columns: minmax(0, 1fr); } }
.pestanas a { white-space: nowrap; }
.partido .marcador { justify-self: center; }
@media (max-width: 640px) {
  .pestanas { gap: 2px; }
  .pestanas a { padding: 8px 8px; font-size: 15px; gap: 5px; }
}

/* ------------------------------------------------------------------ 1.2.0: venta del dominio */
.venta {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px;
  max-width: 760px; margin: 0 auto 22px; padding: 14px 18px; border-radius: 14px;
  background: var(--surface); border: 1px dashed var(--line); color: var(--ink);
}
.venta p { margin: 0; font-size: 14px; font-weight: 500; }
.btn-venta {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px;
  background: var(--pitch-2); color: #fff; text-decoration: none; white-space: nowrap;
  font: 700 16px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .5px;
  box-shadow: 0 2px 8px -2px rgba(15, 90, 61, .5); transition: background .15s, transform .15s;
}
.btn-venta:hover { background: var(--pitch-1); transform: translateY(-1px); }
.btn-venta:focus-visible { outline: 3px solid #8fe0b5; outline-offset: 2px; }
