/* ════════════════════════════════════════════════════════════════
   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(20px, 3vw, 26px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
header h1::before {
  content: '◉';
  color: var(--gold-bright);
}

/* 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
   ════════════════════════════════════════════════════════════ */

.home-hero {
  position: relative;
  background: white;
  padding: 48px 16px 56px;
  overflow: hidden;
  text-align: center;
  color: var(--cream);
}

.home-hero__wall {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
  pointer-events: none;
}
.home-hero__wall .flag {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  line-height: 1;
}
.home-hero__wall .flag:nth-child(odd) { background: rgba(0,0,0,0.05); }

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

.home-hero__inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.home-hero__logo {
  display: block;
  width: clamp(80px, 18vw, 220px);
  height: auto;
  margin: 0 auto 16px;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.6));
}

.home-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.home-hero__pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.home-hero__title {
  font-family: 'Bebas Neue', Anton, Impact, sans-serif;
  font-size: clamp(56px, 12vw, 200px);
  line-height: 0.86;
  margin: 22px 0 8px;
  letter-spacing: -0.005em;
  color: var(--cream);
  text-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.home-hero__title em {
  color: var(--gold-bright);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(44px, 9vw, 150px);
  display: inline-block;
  transform: translateY(-4px);
}

.home-hero__lead {
  font-size: 14px;
  max-width: 320px;
  margin: 22px auto 32px;
  line-height: 1.6;
  opacity: 0.92;
}

.home-hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.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); }

/* ── Marquee ────────────────────────────────────────────────── */
.home-marquee {
  background: var(--ink);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  overflow: hidden;
  padding: 11px 0;
}
.home-marquee__track {
  display: flex;
  gap: 16px;
  white-space: nowrap;
  width: max-content;
  animation: gallinaMarquee 70s linear infinite;
  font-family: 'Bebas Neue', Anton, sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--cream);
}
.home-marquee__track span { display: inline-flex; gap: 6px; align-items: center; }
.home-marquee__track .sep { color: var(--gold); margin: 0 6px; }
.home-marquee__track .flag { font-size: 16px; }
@keyframes gallinaMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Modules ────────────────────────────────────────────────── */
.home-modules {
  background: var(--field-deep);
  padding: 28px 14px 36px;
}
.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: var(--ink);
  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: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; }

.btn-ver-todos {
  display: block;
  margin-top: 16px;
  padding: 9px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background .15s, color .15s;
}
.btn-ver-todos:hover {
  background: var(--gold);
  color: var(--field-deep);
  border-color: var(--gold);
}
.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.nav-right { margin-left: auto; }

  .home-hero { padding: 90px 24px 80px; }
  .home-hero__wall .flag { font-size: 120px; }
  .home-hero__logo { width: 180px; height: 180px; object-fit: contain; }
  .home-hero__title { font-size: clamp(40px, 6vw, 100px); margin: 16px 0 4px; }
  .home-hero__title em { font-size: clamp(30px, 4.5vw, 75px); }
  .home-hero__lead { font-size: 16px; max-width: 600px; }

  .home-marquee__track { font-size: 14px; gap: 24px; animation-duration: 100s; }

  .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: 1.5fr 1fr; }
  .next-match__flag { font-size: 60px; }
  .next-match__name { font-size: 26px; }
  .next-match__vs   { font-size: 50px; }
}
