/*
Theme Name: World Cup 2026
Theme URI: https://yoursite.com
Author: Your Name
Description: A bold, immersive FIFA World Cup 2026 theme with live scores, match updates, and WordPress REST API news integration.
Version: 1.0.0
License: GNU General Public License v2 or later
Tags: sports, world-cup, football, soccer, live-scores
Text Domain: worldcup2026
*/

/* =============================================
   DESIGN TOKENS
   Palette: Deep pitch green, stadium gold, 
   near-black turf, chalk white, live red
============================================= */
:root {
  --pitch:       #0a1f0f;
  --pitch-mid:   #112a16;
  --pitch-light: #1a3d21;
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --chalk:       #f0ede4;
  --white:       #ffffff;
  --live-red:    #e63946;
  --muted:       #8a9e8e;
  --card-bg:     #0f2714;
  --border:      rgba(201,168,76,0.2);

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius: 4px;
  --transition: 0.2s ease;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--pitch);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

/* =============================================
   TYPOGRAPHY
============================================= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--white);
}

h1 { font-size: clamp(2.8rem, 6vw, 6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem); }
h4 { font-size: 1.2rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* =============================================
   LAYOUT
============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 4rem 0; }

/* =============================================
   TICKER BAR (top live score strip)
============================================= */
.ticker-bar {
  background: var(--gold);
  color: var(--pitch);
  padding: 0.55rem 0;
  overflow: hidden;
  position: relative;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}

.ticker-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  background: var(--pitch);
  color: var(--gold);
  padding: 0.2rem 1rem;
  margin-right: 2rem;
  flex-shrink: 0;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 3rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.ticker-item .live-dot {
  width: 7px;
  height: 7px;
  background: var(--live-red);
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.ticker-score { font-size: 1rem; font-weight: 900; }

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* =============================================
   HEADER / NAV
============================================= */
.site-header {
  background: var(--pitch-mid);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-emblem {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--pitch);
  font-weight: 900;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
}

.logo-text span { color: var(--gold); }

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.primary-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}

.primary-nav a:hover,
.primary-nav .current-menu-item a {
  color: var(--gold);
}

.nav-live-badge {
  background: var(--live-red);
  color: white;
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 0.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* =============================================
   HERO
============================================= */
.site-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--pitch);
}

.hero-pitch-lines {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 58px,
      rgba(255,255,255,0.6) 58px,
      rgba(255,255,255,0.6) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 58px,
      rgba(255,255,255,0.3) 58px,
      rgba(255,255,255,0.3) 60px
    );
}

.hero-centre-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(60vw, 500px);
  height: min(60vw, 500px);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--pitch) 0%,
    var(--pitch) 20%,
    rgba(10,31,15,0.5) 60%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-year {
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 18rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(201,168,76,0.2);
  pointer-events: none;
  position: absolute;
  right: -1rem;
  bottom: 1rem;
  z-index: 1;
  letter-spacing: -0.02em;
}

.hero-meta { position: relative; z-index: 3; }

.hero-location {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero-title { margin-bottom: 1.25rem; }

.hero-title em {
  font-style: normal;
  color: var(--gold);
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =============================================
   BUTTONS
============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn--primary {
  background: var(--gold);
  color: var(--pitch);
}
.btn--primary:hover {
  background: var(--gold-light);
  color: var(--pitch);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* =============================================
   LIVE SCORES SECTION
============================================= */
.scores-section {
  background: var(--pitch-mid);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title { color: var(--white); }

.scores-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.scores-tab {
  padding: 0.55rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all var(--transition);
}

.scores-tab.active,
.scores-tab:hover {
  background: var(--gold);
  color: var(--pitch);
}

.scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.match-card {
  background: var(--card-bg);
  padding: 1.25rem 1.5rem;
  transition: background var(--transition);
}

.match-card:hover { background: var(--pitch-light); }

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.match-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.match-status.live {
  color: var(--live-red);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.match-status.live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--live-red);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.2s ease-in-out infinite;
}

.match-status.final { color: var(--muted); }
.match-status.upcoming { color: var(--gold); }

.match-group {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.match-team {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.match-team--home { text-align: right; }
.match-team--away { text-align: left; }

.team-flag {
  font-size: 1.8rem;
  line-height: 1;
  display: block;
}

.team-home .team-flag { text-align: right; }

.team-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--white);
}

.match-score-block {
  text-align: center;
  padding: 0 0.5rem;
}

.match-score {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  line-height: 1;
}

.match-score-divider {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
}

.match-card-time {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.85rem;
  letter-spacing: 0.06em;
}

/* Win probability bar */
.prob-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 2px;
  overflow: hidden;
  gap: 1px;
}

.prob-bar__home { background: var(--gold); }
.prob-bar__draw { background: var(--muted); }
.prob-bar__away { background: var(--pitch-light); border: 1px solid var(--border); }

/* =============================================
   NEWS / BLOG POSTS SECTION
============================================= */
.news-section { background: var(--pitch); }

.posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.post-card--featured {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-card--featured .post-thumb {
  aspect-ratio: 16/9;
  background: var(--pitch-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}

.post-card--featured .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card--featured .post-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.post-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.post-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.post-read-more {
  align-self: flex-start;
}

.posts-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card--mini {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  transition: border-color var(--transition);
}

.post-card--mini:hover { border-color: var(--gold); }

.post-card--mini .post-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2rem;
}

.post-card--mini .post-content { flex: 1; }

.post-card--mini .post-title {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--white);
}

.post-card--mini .post-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

/* Loading / skeleton */
.posts-loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

/* =============================================
   STANDINGS TABLE
============================================= */
.standings-section {
  background: var(--pitch-mid);
  border-top: 1px solid var(--border);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.standings-table th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.6rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.standings-table th:first-child { text-align: left; }

.standings-table td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.standings-table td:first-child { text-align: left; }

.standings-table tr:hover td { background: var(--pitch-light); }

.team-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.team-flag-sm { font-size: 1.1rem; }
.team-name-sm { font-family: var(--font-body); font-size: 0.88rem; color: var(--white); }

.pts-cell {
  font-weight: 900;
  color: var(--gold);
  font-size: 0.95rem;
}

.qualified { background: rgba(201,168,76,0.05); }
.knockout-spot { background: rgba(201,168,76,0.02); }

.form-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 2px;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.form-W { background: #22c55e; color: white; }
.form-D { background: var(--muted); color: white; }
.form-L { background: var(--live-red); color: white; }

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: var(--pitch-mid);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo-text { font-size: 1.6rem; margin-bottom: 0.75rem; display: block; }

.footer-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--chalk); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* =============================================
   WIDGETS
============================================= */
.widget-area { display: flex; flex-direction: column; gap: 1.5rem; }

.widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* =============================================
   SINGLE POST
============================================= */
.single-post { padding: 3rem 0; }

.single-post .entry-header { margin-bottom: 2rem; }

.single-post .entry-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.entry-content {
  max-width: 680px;
}

.entry-content p {
  margin-bottom: 1.25rem;
  color: var(--chalk);
  line-height: 1.8;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
  .primary-nav { display: none; }
  .primary-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--pitch-mid); border-top: 1px solid var(--border); padding: 1rem; }
  .primary-nav.open ul { flex-direction: column; gap: 0; }
  .primary-nav.open a { display: block; padding: 0.75rem 0; }
  .nav-toggle { display: block; }

  .posts-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .hero-year { font-size: 30vw; bottom: 0; right: -2rem; }

  .scores-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
