/* Global Sport News — Design v2 (2026-05-30) */
/* Stack: Custom CSS + Inter font + CSS custom properties */

/* Google Fonts loaded async via HTML <link> — see TASK-830 */

/* ── Variables ────────────────────────────────────────── */
:root {
  --bg:         #0f172a;
  --bg-card:    #1e293b;
  --bg-nav:     #0d1b2a;
  --border:     #334155;
  --text:       #f1f5f9;
  --text-muted: #b0b9c6; /* was #94a3b8 — raised for WCAG AA on bg-card (#1e293b) ≥4.5:1 */
  --accent:     #f59e0b;
  --accent-dark:#d97706;
  --cta-bg:     #1d7a3a;
  --cta-hover:  #145c2c;
  --link:       #60a5fa;
  --link-hover: #93c5fd;
  --radius:     6px;
  --radius-lg:  10px;
  --shadow:     0 2px 12px rgba(0,0,0,.45);
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --max-w:      1280px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin: 1.25rem 0 .75rem;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1rem; color: var(--text); }
a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-hover); }
strong { font-weight: 600; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }

/* ── Nav / Header ─────────────────────────────────────── */
header { background: var(--bg-nav); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; }

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .6rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  flex-wrap: wrap;
}

.main-menu li a {
  display: block;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.main-menu li a:hover, .main-menu li a.active {
  color: var(--text);
  background: rgba(255,255,255,.07);
}

/* keep span inside <a> transparent */
.main-menu li a span { pointer-events: none; }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  padding: .35rem .65rem;
  font-size: 1.2rem;
  line-height: 1;
  margin-left: auto;
}

/* ── CTA Button ───────────────────────────────────────── */
.section-button.btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cta-bg);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: .875rem;
  padding: .65rem 1.25rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .15s, transform .1s;
  /* contrast: #1d7a3a on #fff ≈ 8:1 — WCAG AA PASS */
}
.section-button.btn:hover, .btn:hover {
  background: var(--cta-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Main content wrapper ─────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

section {
  padding: 0;
  overflow: visible;
}

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

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.news-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.news-card h3 {
  font-size: .95rem;
  margin: .75rem 1rem .5rem;
  color: var(--text);
}
.news-card p {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0 1rem 1rem;
}
.news-card a { color: var(--text); text-decoration: none; }
.news-card a:hover { color: var(--accent); }

/* ── Wrap / generic flex column ─────────────────────────── */
.wrap {
  display: flex;
  flex-direction: column;
}

/* ── Grid helper ──────────────────────────────────────── */
.grid {
  display: grid;
  gap: 1.5rem;
}

/* ── Article page ─────────────────────────────────────── */
.article-byline {
  font-size: .875rem;
  color: var(--text-muted);
  margin: .5rem 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

/* Image container (featured image in articles) */
.image-container {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  aspect-ratio: 1200/630;
}
.image-container img { width: 100%; height: auto; display: block; aspect-ratio: 1200/630; }

/* ── Tables ───────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin: 1rem 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
th {
  background: #0d1b2a;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: .875rem;
  letter-spacing: .04em;
  padding: .75rem 1rem;
  text-align: left;
}
td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.03); }

/* scrollable table wrapper */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { height: 5px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Pagination ───────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  gap: 1rem;
}
.pagination a {
  display: inline-block;
  padding: .5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: .88rem;
  transition: background .15s;
}
.pagination a:hover { background: var(--border); color: #fff; }

/* ── TradingView ──────────────────────────────────────── */
.tradingview-widget-container { height: 60vh !important; }

/* ── Footer ───────────────────────────────────────────── */
footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: auto 5fr 1fr;
  grid-template-rows: auto auto;
  gap: 2rem;
}

.footer-col:last-child {
  grid-row-start: 2;
  grid-column-start: 1;
  grid-column-end: 4;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.footer-col img {
  border-radius: 50%;
  max-width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .35rem;
}
.footer-col ul li { font-size: .82rem; }
.footer-col a { color: var(--text-muted); transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer-col p { font-size: .82rem; color: var(--text-muted); margin: 0; }

.footer-legal { font-size: .78rem; color: var(--text-muted); }
.footer-legal ul { margin-top: .5rem; }

.footer-menu { display: flex !important; gap: 1.5rem !important; flex-wrap: wrap; }
.footer-menu li ul { display: grid; list-style: none; padding: 0; margin: 0; gap: .3rem; margin-top: .5rem; }

/* ── Dropdown (nav) ───────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem 0;
  min-width: 160px;
  display: none;
  box-shadow: var(--shadow);
  z-index: 999;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: .4rem 1rem; font-size: .85rem; color: var(--text-muted); }
.dropdown-menu a:hover { color: var(--text); background: rgba(255,255,255,.05); }

/* ── Utility ──────────────────────────────────────────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Dark-mode override guards ────────────────────────── */
/* Inline styles from pre-v2 templates set light-mode colors; override with high specificity */
body .article-byline { color: var(--text-muted) !important; }

/* Affiliate notice (in-article) — dark bg card */
.affiliate-notice {
  background: #1e293b !important;
  border-left: 3px solid var(--accent) !important;
  color: var(--text-muted) !important;
}

/* Middleware-injected affiliate disclosure — dark theme, matches footer */
.affiliate-disclosure {
  background: #1e293b !important;
  border-top: 1px solid #334155 !important;
  border-radius: 0 !important;
  padding: .75rem 1.5rem !important;
  text-align: center !important;
}
.affiliate-disclosure,
.affiliate-disclosure p {
  color: #94a3b8 !important;
  font-size: .8rem !important;
}
.affiliate-disclosure strong { color: #cbd5e1 !important; }
.affiliate-disclosure a { color: #60a5fa !important; }

/* Category page footer disclosure — inherits dark footer but needs legible muted color */
.footer-disclosure {
  color: #94a3b8;
  font-size: .8rem;
  text-align: center;
  padding: .5rem 1rem;
  border-top: 1px solid #334155;
  margin: .5rem 0 0;
}

/* Homepage featured cards: white bg inline — override h3/p colour for light-bg cards */
.news-card[style*="background:#fff"] h3,
.news-card[style*="background:#fff"] h3 a,
.news-card[style*="background: #fff"] h3 {
  color: #111827 !important;
}
.news-card[style*="background:#fff"] p { color: #4b5563 !important; }

/* Inline article section padding for readability */
main > section { padding: 1rem 0; }
main > section:first-child { padding-top: 0; }

/* ── Hero micro-bullets ───────────────────────────────── */
.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.25rem;
  margin: .75rem 0 1.5rem;
}
.hero-bullet {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.hero-bullet::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Offer Showcase ───────────────────────────────────── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: .5rem 1rem;
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .2);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.trust-bar__item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.trust-bar__icon {
  width: 16px;
  height: 16px;
  fill: var(--accent);
  flex-shrink: 0;
}

.showcase__heading {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .75rem;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: .75rem;
}

.offer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.offer-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.offer-card--featured { border-color: var(--accent); }
.offer-card--featured::before {
  content: "Editor's Pick";
  position: absolute;
  top: -10px;
  left: 1rem;
  background: var(--accent);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .6rem;
  border-radius: 20px;
  letter-spacing: .04em;
}

.offer-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.offer-card__logo {
  background: #fff;
  border-radius: var(--radius);
  padding: .35rem .75rem;
  font-weight: 700;
  font-size: .9rem;
  color: #1a1a1a;
  white-space: nowrap;
}
.offer-card__rating {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.stars {
  color: var(--accent);
  font-size: .85rem;
  letter-spacing: .05em;
}
.rating-score {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.offer-card__bonus {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}
.offer-card__bonus-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .1rem;
}
.offer-card__tag {
  display: inline-flex;
  align-items: center;
  background: rgba(96, 165, 250, .1);
  border: 1px solid rgba(96, 165, 250, .25);
  color: #60a5fa;
  font-size: .72rem;
  font-weight: 500;
  padding: .2rem .6rem;
  border-radius: 20px;
  width: fit-content;
}
.offer-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--cta-bg);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: .9rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .15s;
  padding: .65rem 1.25rem;
}
.offer-card__cta:hover { background: var(--cta-hover); color: #fff; }
.offer-card__disclaimer {
  font-size: .68rem;
  color: var(--text-muted);
  line-height: 1.4;
  opacity: .75;
}
.showcase__footer {
  text-align: center;
  margin-top: .75rem;
  font-size: .85rem;
}
.showcase__footer a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}
.showcase__footer a:hover { color: var(--link-hover); }

/* Inline CTA link (in-content) */
.inline-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: color .15s;
}
.inline-cta:hover { color: var(--accent-dark); }

/* CTA banner before footer */
.cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}
.cta-banner__text {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Responsive — mobile ─────────────────────────────── */
@media (max-width: 480px) {
  .nav-brand { display: none; }
}

@media (max-width: 768px) {
  /* Nav */
  nav { padding: .5rem 1rem; gap: .75rem; flex-wrap: wrap; }

  .burger { display: block; }

  .main-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: .75rem 1rem;
    gap: .25rem;
    z-index: 9999;
  }
  .main-menu.open { display: flex; }

  .main-menu li a { padding: .5rem .75rem; }

  .dropdown-menu {
    position: relative;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,.04);
    display: grid;
  }

  /* Main */
  main { padding: 1.25rem 1rem 2rem; }

  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.2rem; }

  main > section { padding: .75rem 0; overflow: auto; }

  /* Tables */
  th, td { padding: .5rem .65rem; }
  table { margin: .75rem 0; }
  table::-webkit-scrollbar { height: 5px; }
  table::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

  /* Footer */
  footer { padding: 2rem 0 1.5rem; margin-top: 2rem; }

  .footer-grid {
    padding: 0 1rem;
    grid-template-columns: auto 5fr;
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
  }

  .footer-legal {
    grid-row-start: 2;
    grid-column-start: 1;
    grid-column-end: 3;
  }

  .footer-col:last-child {
    grid-row-start: 3;
    grid-column-start: 1;
    grid-column-end: 3;
  }

  /* Cards */
  .news-grid { grid-template-columns: 1fr; }

  /* Showcase */
  .trust-bar { gap: .75rem; }
  .trust-bar__item { font-size: .72rem; }
  .showcase-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }

  /* Article hero */
  main > section:first-of-type { grid-template-columns: 1fr !important; }
  .image-container { grid-row-start: auto; }

  /* Article TOC */
  .article-toc { margin: .75rem 0 1rem; padding: .6rem .85rem; }

  /* Article showcase */
  .showcase-row { grid-template-columns: 70px 1fr; grid-template-rows: auto auto; }
  .showcase-row__cta { grid-column: 1 / -1; min-width: unset; width: 100%; }
  .showcase-row__logo { width: 60px; font-size: .7rem; }
}

/* ── Article TOC ──────────────────────────────────────── */
.article-toc {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin: 1rem 0 1.5rem;
  font-size: .88rem;
}
.article-toc__heading {
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 .5rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.article-toc__list { margin: 0; padding-left: 1.25rem; color: var(--link); }
.article-toc__list li { margin-bottom: .25rem; }
.article-toc__list a { color: var(--link); font-size: .85rem; text-decoration: none; display: block; padding: .35rem 0; min-height: 44px; display: flex; align-items: center; }
.article-toc__list a:hover { color: #93c5fd; }

/* ── Article Showcase ─────────────────────────────────── */
.article-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.article-showcase__title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.article-showcase__title::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.article-showcase__list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.showcase-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.showcase-row:hover { border-color: rgba(245,158,11,.3); }
.showcase-row__logo {
  background: #fff;
  border-radius: 4px;
  padding: .3rem .5rem;
  font-weight: 700;
  font-size: .78rem;
  color: #1a1a1a;
  text-align: center;
  width: 80px;
}
.showcase-row__info { min-width: 0; }
.showcase-row__bonus { font-weight: 700; font-size: .88rem; color: var(--accent); margin-bottom: .15rem; }
.showcase-row__detail { font-size: .72rem; color: var(--text-muted); }
.showcase-row__stars { font-size: .75rem; color: var(--accent); letter-spacing: .05em; }
.showcase-row__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 110px;
  background: #1d7a3a;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  border-radius: var(--radius);
  text-decoration: none;
  padding: .5rem .9rem;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.showcase-row__cta:hover { background: #145c2c; color: #fff; }
.article-showcase__disclaimer {
  margin-top: .75rem;
  font-size: .68rem;
  color: var(--text-muted);
  opacity: .7;
  line-height: 1.4;
}

/* ── Mobile section spacing (TASK-516) ────────────────── */
@media (max-width: 640px) {
  .wrap + .wrap {
    margin-top: 2.5rem;
  }
}
