/* ════════════════════════════════════════════════════════════════
   La Gallina · Mundial 2026 — Drop-in para static/style.css
   Reemplaza el style.css actual. Conserva todas las clases que usaba
   el style.css original (header, nav, page-shell, tables, flash, etc.)
   pero con la paleta verde cancha + crema + dorado.
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@1,700;1,800;1,900&display=swap');

:root {
  --field:       #0a3d22;
  --field-deep:  #062817;
  --cream:       #f6ecd4;
  --cream-deep:  #ebe0c2;
  --gold:        #cfa544;
  --gold-bright: #e8be5b;
  --ink:         #08130d;
  --line:        rgba(207,165,68,0.3);
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--field-deep);
  color: var(--cream);
}

a { color: inherit; }

/* ── Header / Nav ────────────────────────────────────────────── */
header {
  background: var(--ink);
  color: var(--cream);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

header h1 {
  margin: 0;
  font-family: 'Bebas Neue', Anton, Impact, sans-serif;
  font-size: clamp(36px, 5vw, 50px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-home-link, .header-home-link:hover {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.header-gallina {
  height: 1.5em;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
  margin-bottom: 2px;
}

/* Mobile-first: hamburger visible por defecto */
.nav-toggle {
  display: block;
  background: transparent;
  border: 1px solid rgba(246,236,212,0.4);
  color: var(--cream);
  font-size: 20px;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* Mobile-first: nav colapsado por defecto */
nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
nav.open { display: flex; }

nav a {
  color: var(--cream);
  text-decoration: none;
  padding: 10px 0;
  font-size: 12px;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}
nav a:hover, nav a.active { opacity: 1; color: var(--gold-bright); }
nav a.nav-right { margin-left: 0; }

nav a.btn-login {
  background: var(--gold-bright);
  color: var(--ink);
  padding: 8px 14px;
  letter-spacing: 0.14em;
  opacity: 1;
  border-radius: 2px;
}
nav a.btn-login:hover { background: var(--cream); color: var(--ink); }

/* ── Page shell ─────────────────────────────────────────────── */
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

main.page-shell.home-shell {
  max-width: none;
  padding: 0;
}

/* ── Tipografía utilitaria ─────────────────────────────────── */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   HOME — Hero con mosaico de banderas
   ════════════════════════════════════════════════════════════ */

/* ── Hero compacto ──────────────────────────────────────────── */
.home-hero {
  position: relative;
  height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: var(--cream);
}

/* Fondo: 4 filas de banderas scrolling */
.home-hero__flags {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.home-hero__flags-row {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.home-hero__flags-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  font-size: 150px;
  line-height: 1;
  animation: heroFlagFwd 500s linear infinite;
}
.r1 .home-hero__flags-track { animation-direction: reverse; animation-duration: 600s; }

@keyframes heroFlagFwd {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.home-hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8,19,13,0.20) 0%, rgba(8,19,13,0.72) 65%, var(--field-deep) 100%),
    repeating-linear-gradient(90deg, transparent 0 80px, rgba(255,255,255,0.02) 80px 160px);
}

/* Contenido: logo + texto en fila */
.home-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.home-hero__logo {
  width: clamp(91px, 13vw, 156px);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.7)) drop-shadow(0 0 10px rgba(255,255,255,0.65));
}

.home-hero__text { text-align: left; flex: 0 0 650px; min-width: 0; }

.home-hero__title {
  font-family: 'Bebas Neue', Anton, Impact, sans-serif;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.88;
  margin: 0 0 10px;
  letter-spacing: -0.005em;
  color: var(--cream);
  text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 4px 40px rgba(0,0,0,0.85);
}
.home-hero__title em {
  color: var(--gold-bright);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(30px, 4.5vw, 62px);
  display: inline-block;
}

.home-hero__lead {
  font-size: 30px;
  font-weight: 600;
  max-width: 680px;
  margin: 0;
  line-height: 1.35;
  opacity: 0.92;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.home-hero__cta {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-gold, .btn-ghost {
  padding: 14px 22px;
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid transparent;
  transition: transform 0.12s, background 0.12s;
}
.btn-gold { background: var(--gold-bright); color: var(--ink); }
.btn-gold:hover { background: var(--cream); }
.btn-ghost {
  background: rgba(246,236,212,0.08);
  color: var(--cream);
  border-color: rgba(246,236,212,0.4);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(246,236,212,0.18); }

/* Mobile: apila logo + texto */
@media (max-width: 600px) {
  .home-hero__inner { flex-wrap: wrap; gap: 10px; padding: 0 16px; }
  .home-hero__logo { width: 64px; }
  .home-hero__lead { font-size: 18px; }
  .home-hero__cta { margin-left: 0; width: 100%; justify-content: center; }
}

/* ── Modules ────────────────────────────────────────────────── */
.home-modules {
  background: var(--field-deep);
  padding: 28px 14px 36px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.home-modules__grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.home-modules__col {
  display: grid;
  gap: 24px;
  align-content: start;
}

.module {
  background: var(--cream);
  color: var(--ink);
  padding: 18px;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}
.module--dark {
  background: #00853d57;
  color: var(--cream);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.module__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--field);
}
.module--dark .module__head { color: var(--gold-bright); }
.module__head .meta { color: var(--gold); }
.module__title {
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 26px;
  letter-spacing: 0.02em;
  margin: 4px 0 12px;
}

/* Next match */
.next-match__bg-letter {
  position: absolute;
  top: 12px; right: 18px;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 70px;
  color: var(--gold);
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
}
.next-match__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.next-match__team { text-align: center; }
.next-match__team.left  { text-align: right; }
.next-match__team.right { text-align: left; }
.next-match__flag { font-size: 60px; line-height: 1; }
.next-match__name {
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 26px;
  letter-spacing: 0.02em;
  margin-top: 10px;
  min-width: 0;
}
.next-match__vs {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 30px;
  color: var(--gold);
  line-height: 1;
}
.next-match__time {
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 18px;
  color: var(--field);
  margin-top: 6px;
  letter-spacing: 0.06em;
}
.next-match__foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--cream-deep);
  display: flex;
  justify-content: center;
  font-size: 14px;
  color: var(--field);
  flex-wrap: wrap;
  gap: 8px;
}
.next-match__datetime {
  font-size: 26px;
  font-weight: 700;
  color: var(--field);
  width: 100%;
  text-align: center;
}

/* Last results */
.results-list { list-style: none; padding: 0; margin: 0; }
.results-list li {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--cream-deep);
}
.results-list li:last-child { border-bottom: none; }
.results-list .team {
  font-size: 20px;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: break-word;
}
.results-list .team.left { text-align: right; }
.results-list .team.right { text-align: left; }
.results-list .score {
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 20px;
  color: var(--field);
  padding: 3px 10px;
  background: var(--cream-deep);
  border-radius: 3px;
  min-width: 56px;
  text-align: center;
  letter-spacing: 0.05em;
}
.results-list .score .sep { color: var(--gold); margin: 0 5px; }

/* Ranking */
.ranking-list { list-style: none; padding: 0; margin: 0; position: relative; }
.ranking-list li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(246,236,212,0.1);
}
.ranking-list li.winner-row {
  grid-template-columns: 32px 1fr 1fr 1fr;
}
.ranking-list li.winner-row .pts:not(.prize) {
  text-align: center;
}
.ranking-list li.winner-row .pts.prize {
  text-align: right;
}
.ranking-list li:last-child { border-bottom: none; }
.ranking-list .pos {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: var(--cream);
  opacity: 0.55;
}
.ranking-list li.first .pos,
.ranking-list li.first .pts { color: var(--gold-bright); opacity: 1; }
.ranking-list .name {
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
  min-width: 0;
}
.ranking-list .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  opacity: 0.55;
  letter-spacing: 0.08em;
}
.ranking-list .pts {
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 22px;
  color: var(--cream);
}
.ranking-list .pts .u { font-size: 11px; opacity: 0.5; margin-left: 4px; }
.ranking-list .pts.prize { color: var(--gold-bright); }

.winners-empty {
  font-size: 14px;
  color: var(--cream);
  opacity: 0.5;
  text-align: center;
  line-height: 1.6;
  padding: 16px 0 8px;
  margin: 0;
}

.btn-ver-todos {
  display: block;
  margin-top: 16px;
  padding: 9px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  background: #cfa544;
  color: #003717;
  border: 1px solid #cfa544;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-ver-todos:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(207,165,68,.45);
  filter: brightness(1.1);
}
.module--dark::after {
  content: '★';
  position: absolute;
  top: -20px; right: -20px;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 200px;
  color: var(--gold);
  opacity: 0.1;
  line-height: 1;
  pointer-events: none;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
footer .page-shell {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 24px;
}

/* ── Tablas y otros componentes (heredados) ─────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: var(--cream);
  color: var(--ink);
  border-radius: 4px;
  overflow: clip; /* clip en lugar de hidden: recorta sin crear scroll container (no rompe sticky) */
}
th, td { border: 1px solid var(--cream-deep); padding: 10px 12px; text-align: left; }
th { background: var(--cream-deep); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

input[type='number'], input[type='text'], input[type='password'] {
  font-size: max(16px, 1rem);
  padding: 8px 10px;
  border: 1px solid var(--cream-deep);
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
  font-family: inherit;
}

button, .btn-primary {
  background: var(--gold-bright);
  color: var(--ink);
  border: none;
  padding: 12px 18px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Bebas Neue', Anton, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn-primary:hover { background: var(--cream); }

.flash-grid { display: grid; gap: 12px; margin: 24px auto; max-width: 1280px; padding: 0 24px; }
.flash { padding: 12px 16px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.06em; }
.flash.success { background: #2a5d3a; color: var(--cream); }
.flash.warning { background: #5d4d1a; color: var(--cream); }
.flash.danger  { background: #5d2222; color: var(--cream); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — mobile-first (min-width)
   ════════════════════════════════════════════════════════════ */

/* ── Tablet y desktop: 641px+ ───────────────────────────────── */
@media (min-width: 641px) {
  .page-shell { padding: 24px; }

  .nav-toggle { display: none; }
  nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
  }
  nav a { padding: 6px 2px; font-size: 11px; }
  nav a::after { content: '|'; margin-left: 18px; pointer-events: none; }
  nav a:last-child::after, nav a.nav-right::after { content: none; }
  nav a.nav-right { margin-left: auto; }

.home-modules { padding: 56px 24px; }
  .home-modules__grid { gap: 24px; }
  .module { padding: 28px; }
  .module__title { font-size: 38px; margin-bottom: 18px; }

  .next-match__bg-letter { font-size: 110px; }
  .next-match__teams { gap: 16px; }
  .next-match__flag { font-size: 60px; }
  .next-match__name { font-size: 26px; }
  .next-match__vs   { font-size: 38px; }
  .next-match__time { font-size: 26px; }

  .results-list .team  { font-size: 20px; }
  .results-list .score { font-size: 20px; min-width: 70px; padding: 4px 14px; }

  .ranking-list .name { font-size: 22px; }
  .ranking-list .pts  { font-size: 28px; }
  .ranking-list .pos  { font-size: 26px; }

  footer { font-size: 11px; }
}

/* ── Desktop: 901px+ ────────────────────────────────────────── */
@media (min-width: 901px) {
  .home-modules__grid { grid-template-columns: 1fr 1.5fr; }
  .next-match__flag { font-size: 60px; }
  .next-match__name { font-size: 26px; }
  .next-match__vs   { font-size: 50px; }
}
