/* ── World Cup section — black + gold theme ─────────────────────────── */

:root {
  --wc-bg: #0b0b0e;
  --wc-surface: #17171c;
  --wc-card: #1f1f25;
  --wc-divider: #2a2a33;
  --wc-text: #f5f5f7;
  --wc-text-2: #b8b8c2;
  --wc-text-hint: #7a7a85;
  --wc-gold: #c9a24b;
  --wc-gold-dim: #8c6f2a;
}

.wc-page {
  background: var(--wc-bg);
  color: var(--wc-text);
  min-height: 100vh;
}

/* Nuclear option: the kester theme uses `h1...h6, span, a { color: #111 }`,
   which beats class-based selectors of equal specificity. Force every text
   element inside the WC page to inherit the dark theme. */
.wc-page,
.wc-page h1,
.wc-page h2,
.wc-page h3,
.wc-page h4,
.wc-page h5,
.wc-page h6,
.wc-page p,
.wc-page span,
.wc-page div,
.wc-page a,
.wc-page a:link,
.wc-page a:visited {
  color: var(--wc-text) !important;
  text-decoration: none !important;
}
.wc-page a:hover,
.wc-page a:focus,
.wc-page a:hover span,
.wc-page a:focus span { color: var(--wc-gold) !important; }

/* Re-instate the gold/grey accents for the specific elements that need them.
   These come AFTER the blanket override so they win the cascade. */
.wc-page .wc-hero__title,
.wc-page .wc-hero__lbl,
.wc-page .wc-block-bar ~ * .wc-gold,
.wc-page .wc-tab--active,
.wc-page .wc-group__head,
.wc-page .wc-group-mini__title,
.wc-page .wc-group-mini__pts,
.wc-page .wc-standings__pts,
.wc-page .wc-mini-match__score,
.wc-page .wc-match__center,
.wc-page .wc-match-card__center,
.wc-page .wc-bracket__round,
.wc-page .wc-stat-row__rank,
.wc-page .wc-stat-row__val,
.wc-page .wc-day-head,
.wc-page .wc-block-action { color: var(--wc-gold) !important; }

.wc-page .wc-text-2,
.wc-page .wc-text-secondary,
.wc-page .wc-hero__year,
.wc-page .wc-group__cnt,
.wc-page .wc-group__tableHead span,
.wc-page .wc-standings__num,
.wc-page .wc-match__round,
.wc-page .wc-match-card__round,
.wc-page .wc-mini-match__home,
.wc-page .wc-mini-match__away,
.wc-page .wc-stat-row__team,
.wc-page .wc-news-row__date,
.wc-page .wc-article__date,
.wc-page .wc-bracket__kickoff,
.wc-page .wc-match-card__venue { color: var(--wc-text-2) !important; }

.wc-page .wc-empty,
.wc-page .wc-bracket__team--ph,
.wc-page .wc-bracket__team--ph span,
.wc-page .wc-match__team--placeholder,
.wc-page .wc-match__team--placeholder span,
.wc-page .wc-match-card__team--ph,
.wc-page .wc-match-card__team--ph span { color: var(--wc-text-hint) !important; font-style: italic; }

/* Sections give vertical breathing room; Bootstrap's `.container` (used
   inline in the EJS) controls the horizontal width. */
.wc-section .container { padding-top: 24px; padding-bottom: 24px; }

/* ── HERO ─────────────────────────────────────────────────────────── */
.wc-hero {
  background: linear-gradient(180deg, #000 0%, var(--wc-bg) 100%);
  border-bottom: 1px solid var(--wc-divider);
  padding: 36px 0 24px;
}
.wc-hero__inner {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.wc-hero__logo {
  width: 120px; height: 120px; object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(201, 162, 75, 0.35));
}
.wc-hero__logo--fallback { filter: none; }
.wc-hero__title {
  color: var(--wc-gold);
  font-weight: 800;
  font-size: 32px;
  margin: 12px 0 0;
  letter-spacing: -0.5px;
}
.wc-hero__year { color: var(--wc-text-2); font-size: 14px; margin-top: 4px; }
.wc-hero__countdown {
  margin-top: 18px;
  display: flex; align-items: flex-end; gap: 8px;
}
.wc-hero__unit { display: flex; align-items: flex-end; gap: 4px; }
.wc-hero__num {
  font-weight: 800; font-size: 28px; color: var(--wc-text);
  font-variant-numeric: tabular-nums;
}
.wc-hero__lbl {
  color: var(--wc-gold); font-weight: 700; font-size: 12px; padding-bottom: 4px;
}
.wc-hero__sep {
  color: var(--wc-gold); opacity: 0.5; font-weight: 700; font-size: 24px; padding-bottom: 2px;
}

/* ── TABS ─────────────────────────────────────────────────────────── */
.wc-tabs {
  position: sticky; top: 0; z-index: 10;
  background: var(--wc-bg);
  border-bottom: 1px solid var(--wc-divider);
}
.wc-tabs__inner {
  display: flex; gap: 4px; overflow-x: auto;
}
.wc-tab {
  display: inline-block; padding: 14px 16px;
  color: var(--wc-text-2); font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}
.wc-tab:hover { color: var(--wc-text); }
.wc-tab--active {
  color: var(--wc-gold);
  border-bottom-color: var(--wc-gold);
}

/* ── SECTIONS ─────────────────────────────────────────────────────── */
.wc-section { display: none; }
.wc-section--active { display: block; }

.wc-block-title {
  display: flex; align-items: center; gap: 8px;
  margin: 24px 0 12px;
  font-size: 18px; font-weight: 700; color: var(--wc-text);
}
.wc-block-bar {
  display: inline-block; width: 4px; height: 18px;
  background: var(--wc-gold); border-radius: 2px;
}
.wc-block-action {
  margin-left: auto; font-size: 13px; color: var(--wc-gold);
}
.wc-empty {
  padding: 40px 16px; text-align: center; color: var(--wc-text-2);
}

/* ── FEATURED NEWS ────────────────────────────────────────────────── */
.wc-featured-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.wc-featured {
  display: block; border-radius: 12px; overflow: hidden;
  background: var(--wc-surface);
}
.wc-featured__img {
  height: 180px; background-size: cover; background-position: center;
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px;
}
.wc-featured__img::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
}
.wc-featured__badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--wc-gold); color: #000;
  font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 4px;
}
.wc-featured__title {
  position: relative; color: #fff; font-weight: 700; font-size: 15px;
  line-height: 1.3;
}

/* ── MATCH LIST (compact) ─────────────────────────────────────────── */
.wc-match-list { display: flex; flex-direction: column; }
.wc-match {
  display: block; padding: 12px 14px;
  border-bottom: 1px solid var(--wc-divider);
}
.wc-match__round { font-size: 11px; color: var(--wc-text-hint); margin-bottom: 4px; }
.wc-match__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.wc-match__team { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.wc-match__team--right { justify-content: flex-end; }
.wc-match__team img { width: 22px; height: 22px; }
.wc-match__team--placeholder { color: var(--wc-text-2); font-style: italic; }
.wc-match__center {
  font-weight: 700; font-size: 14px; color: var(--wc-gold);
  background: rgba(201, 162, 75, 0.12);
  padding: 4px 10px; border-radius: 4px;
}

/* ── GROUPS COMPACT (Overview) ────────────────────────────────────── */
.wc-groups-compact {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.wc-group-mini {
  background: var(--wc-card); border: 1px solid var(--wc-divider);
  border-radius: 12px; padding: 12px;
}
.wc-group-mini__title { color: var(--wc-gold); font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.wc-group-mini__row { display: flex; gap: 8px; padding: 2px 0; font-size: 13px; }
.wc-group-mini__pos { width: 16px; color: var(--wc-text-2); font-weight: 600; }
.wc-group-mini__name { flex: 1; }
.wc-group-mini__pts { color: var(--wc-gold); font-weight: 700; }

/* ── GROUPS FULL ──────────────────────────────────────────────────── */
.wc-group {
  background: var(--wc-card); border: 1px solid var(--wc-divider);
  border-radius: 12px; padding: 14px; margin-bottom: 16px;
}
.wc-group__head {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--wc-gold); font-weight: 700; font-size: 16px; margin-bottom: 8px;
}
.wc-group__cnt { color: var(--wc-text-hint); font-weight: 500; font-size: 12px; }
.wc-group__tableHead {
  display: grid; grid-template-columns: 28px 1fr 32px 36px 40px;
  gap: 8px; padding: 6px 4px;
  font-size: 11px; color: var(--wc-text-2); font-weight: 600;
  border-top: 1px solid var(--wc-divider);
}
.wc-standings {
  display: grid; grid-template-columns: 28px 1fr 32px 36px 40px;
  gap: 8px; padding: 8px 4px; align-items: center;
  border-top: 1px solid var(--wc-divider);
  font-size: 13px;
}
.wc-standings__pos { color: var(--wc-text); font-weight: 600; text-align: center; }
.wc-standings__team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wc-standings__team img { width: 20px; height: 20px; }
.wc-standings--top2 .wc-standings__pos { color: #4ade80; border-left: 3px solid #4ade80; padding-left: 4px; }
.wc-standings__num { text-align: center; color: var(--wc-text-2); font-size: 12px; }
.wc-standings__pts { text-align: right; color: var(--wc-gold); font-weight: 700; }
.wc-group__matches summary {
  color: var(--wc-gold); padding: 10px 0; font-size: 13px; font-weight: 600; cursor: pointer;
}
.wc-mini-match {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; padding: 6px 4px;
  font-size: 13px;
}
.wc-mini-match__score {
  background: rgba(201, 162, 75, 0.12); padding: 2px 8px; border-radius: 4px;
  color: var(--wc-gold); font-weight: 700; min-width: 64px; text-align: center;
}
.wc-mini-match__home { text-align: right; }

/* ── BRACKET ──────────────────────────────────────────────────────── */
.wc-bracket-wrap { overflow-x: auto; padding-bottom: 24px; }
.wc-bracket { display: flex; gap: 16px; min-width: max-content; }
.wc-bracket__col { display: flex; flex-direction: column; gap: 12px; min-width: 200px; }
.wc-bracket__round {
  color: var(--wc-gold); font-weight: 700; font-size: 14px; margin: 0 0 4px;
}
.wc-bracket__block {
  display: block; background: var(--wc-card);
  border: 1px solid var(--wc-divider); border-radius: 8px;
  padding: 8px 10px; min-height: 70px;
}
.wc-bracket__team {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500;
  padding: 2px 0;
}
.wc-bracket__team img { width: 18px; height: 18px; }
.wc-bracket__team--ph { color: var(--wc-text-2); font-style: italic; }
.wc-bracket__kickoff { font-size: 10px; color: var(--wc-text-hint); margin-top: 4px; }

/* ── MATCHES TAB (filterable) ─────────────────────────────────────── */
.wc-filter {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px;
  border-bottom: 1px solid var(--wc-divider);
}
.wc-chip {
  background: rgba(201, 162, 75, 0.08); color: var(--wc-gold);
  border: 0; padding: 6px 12px; border-radius: 18px;
  font-weight: 600; font-size: 12px; cursor: pointer;
  white-space: nowrap; transition: background 120ms ease, color 120ms ease;
}
.wc-chip:hover { background: rgba(201, 162, 75, 0.18); }
.wc-chip--active { background: var(--wc-gold); color: #000; }

.wc-day-head {
  color: var(--wc-gold); font-weight: 700; font-size: 14px;
  margin: 18px 0 8px;
}
.wc-match-card {
  display: block; padding: 10px 14px; border-bottom: 1px solid var(--wc-divider);
}
.wc-match-card__round { font-size: 11px; color: var(--wc-text-hint); margin-bottom: 4px; }
.wc-match-card__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.wc-match-card__team { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.wc-match-card__team--right { justify-content: flex-end; }
.wc-match-card__team img { width: 22px; height: 22px; }
.wc-match-card__team--ph { color: var(--wc-text-2); font-style: italic; }
.wc-match-card__center {
  font-weight: 700; font-size: 14px; color: var(--wc-gold);
  background: rgba(201, 162, 75, 0.12); padding: 4px 10px; border-radius: 4px;
}
.wc-match-card__venue { font-size: 11px; color: var(--wc-text-hint); margin-top: 4px; }

/* ── NEWS & ARTICLES ──────────────────────────────────────────────── */
.wc-news-list, .wc-article {
  display: flex; flex-direction: column;
}
.wc-news-row, .wc-article {
  display: grid; grid-template-columns: 80px 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--wc-divider);
}
.wc-news-row img, .wc-article img,
.wc-news-row__ph, .wc-article__ph {
  width: 80px; height: 80px; object-fit: cover; border-radius: 8px;
  background: var(--wc-surface);
}
.wc-news-row__title, .wc-article__title { font-weight: 600; color: var(--wc-text); }
.wc-news-row__date, .wc-article__date { font-size: 12px; color: var(--wc-text-hint); margin-top: 4px; }

/* ── STATS ────────────────────────────────────────────────────────── */
.wc-stat-row {
  display: grid; grid-template-columns: 32px 1fr 1fr auto; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--wc-divider);
  align-items: center;
}
.wc-stat-row__rank { color: var(--wc-gold); font-weight: 700; text-align: center; }
.wc-stat-row__team { color: var(--wc-text-2); font-size: 13px; }
.wc-stat-row__val {
  background: rgba(201, 162, 75, 0.12); color: var(--wc-gold);
  padding: 4px 10px; border-radius: 4px; font-weight: 700; font-size: 13px;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .wc-hero__title { font-size: 24px; }
  .wc-hero__num { font-size: 22px; }
  .wc-hero__logo { width: 88px; height: 88px; }
  .wc-tabs__inner { padding: 0 8px; }
}
