@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0b0e14;
  --surface:    #141922;
  --surface-2:  #1c2333;
  --border:     #2a3040;
  --text:       #e2e6ee;
  --text-muted: #8892a4;
  --accent:     #8b1538;
  --accent-light:#c7244a;
  --gold:       #d4a843;
  --radius:     10px;
  --max-w:      1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: #f0c95e; }

img { max-width: 100%; display: block; }

/* ── Utilities ─────────────────────────────────────────────────── */
.container { width: 92%; max-width: var(--max-w); margin-inline: auto; }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.btn {
  display: inline-block;
  padding: .7rem 1.6rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s, transform .15s;
  cursor: pointer;
  border: none;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary   { background: var(--accent-light); color: #fff; }
.btn-primary:hover { background: #e02a55; color: #fff; }
.btn-outline   { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--bg); }

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Header / Nav ──────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 0;
}
.site-header .logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .03em;
}
.site-header .logo span { color: var(--gold); }

.site-nav { display: flex; gap: 1.5rem; list-style: none; }
.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .9rem;
  transition: color .2s;
}
.site-nav a:hover,
.site-nav a.active { color: #fff; }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(139,21,56,.55) 0%, rgba(11,14,20,.92) 60%),
    url('../assets/hero-bg.jpg') center/cover no-repeat;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .6rem;
}
.hero h1 span { color: var(--gold); }
.hero .subtitle {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.hero .cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Card system ───────────────────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 1.25rem;
}
.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform .2s, border-color .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.card p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
}

/* ── Host cards ────────────────────────────────────────────────── */
.host-card h3 .flag { margin-right: .4rem; }
.host-card .city-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}
.host-card .city-list li {
  font-size: .78rem;
  background: var(--surface-2);
  padding: .25rem .6rem;
  border-radius: 4px;
  color: var(--text-muted);
}

/* ── Format section ────────────────────────────────────────────── */
.format-section {
  padding: 3.5rem 0;
}
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.format-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}
.format-stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}
.format-stat .label {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

/* ── Schedule pills ────────────────────────────────────────────── */
.schedule-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}
.schedule-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .6rem 1rem;
  font-size: .82rem;
}
.schedule-list .round { font-weight: 600; color: var(--gold); }
.schedule-list .dates { color: var(--text-muted); margin-left: .3rem; }

/* ── Group cards ───────────────────────────────────────────────── */
.group-card { padding: 0; overflow: hidden; }
.group-card .group-header {
  background: var(--accent);
  padding: .75rem 1.2rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .03em;
}
.group-card .group-body { padding: 1rem 1.2rem; }
.group-card .team-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.group-card .team-row:last-child { border-bottom: none; }
.group-card .team-row .conf { margin-left: auto; }

.group-card .match-list { margin-top: .8rem; }
.group-card .match-item {
  font-size: .78rem;
  color: var(--text-muted);
  padding: .35rem 0;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.group-card .match-item .match-teams { color: var(--text); font-weight: 600; }

/* ── Team cards ────────────────────────────────────────────────── */
.team-card { display: flex; flex-direction: column; }
.team-card h3 a { color: var(--text); }
.team-card h3 a:hover { color: var(--gold); }
.team-card .highlight {
  margin-top: .4rem;
  font-style: italic;
  color: var(--gold);
  font-size: .82rem;
}
.team-card .players {
  margin-top: auto;
  padding-top: .8rem;
  list-style: none;
}
.team-card .players li {
  font-size: .82rem;
  padding: .2rem 0;
  color: var(--text-muted);
}
.team-card .players li strong { color: var(--text); font-weight: 600; }

/* ── Confederation section headers ─────────────────────────────── */
.conf-section { margin-bottom: 2.5rem; }
.conf-header {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: 1rem;
}
.conf-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
.conf-header .alloc {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ── Team detail ───────────────────────────────────────────────── */
.team-detail-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.team-detail-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
}
.team-detail-header .meta {
  color: var(--text-muted);
  margin-top: .3rem;
  font-size: .95rem;
}

.detail-section { margin-bottom: 2.5rem; }
.detail-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--gold);
}

.player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.player-card h4 { font-size: 1rem; font-weight: 700; }
.player-card .pos { font-size: .82rem; color: var(--gold); margin-bottom: .3rem; }
.player-card .club { font-size: .78rem; color: var(--text-muted); margin-bottom: .4rem; }
.player-card p { font-size: .88rem; color: var(--text-muted); }

.play-style-box {
  background: var(--surface);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.8rem; }

  .site-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem; gap: .8rem; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }

  .card-grid--3,
  .card-grid--4 { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Loading state ─────────────────────────────────────────────── */
.loader {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: .9rem;
}
