/*
Theme Name: Sport Domination
Theme URI: https://sportdomination.com
Author: Sport Domination
Description: A sports magazine theme with a built-in ad slot manager, admin-managed footer link columns, review scores, and membership-aware templates. Built for AdSense/Ad Manager publishers who also sell subscriptions.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sport-domination
Tags: news, blog, magazine, two-columns, custom-menu, featured-images, translation-ready
*/

/* ---------------------------------------------------------------
   1. Tokens
--------------------------------------------------------------- */
:root {
  --ink:      #0F1620;
  --ink-soft: #2B3440;
  --slate:    #5A6675;
  --paper:    #F1F2EF;
  --card:     #FFFFFF;
  --line:     #D5D9D4;
  --cobalt:   #1B44C8;
  --cobalt-d: #12329A;
  --chalk:    #F4C338;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  --wrap: 1180px;
  --gap: 28px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
}

/* ---------------------------------------------------------------
   2. Reset + base
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--cobalt-d); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6, .u-sans {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 var(--s4);
  color: var(--ink);
}
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: clamp(19px, 2.4vw, 24px); }
h4 { font-size: 18px; }
p { margin: 0 0 var(--s5); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--s4); top: var(--s4); z-index: 999; background: var(--ink); color: #fff; padding: var(--s3) var(--s4); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ---------------------------------------------------------------
   3. Header
--------------------------------------------------------------- */
.site-header { background: var(--ink); color: #fff; }
.header-bar { display: flex; align-items: center; gap: var(--s5); padding-block: var(--s4); }
.site-brand { font-family: var(--sans); font-weight: 800; font-size: 26px; letter-spacing: -0.04em; color: #fff; text-decoration: none; flex-shrink: 0; }
.site-brand:hover { color: #fff; }
.site-brand .brand-mark { color: var(--chalk); }
.site-tagline { font-family: var(--sans); font-size: 12px; color: #9AA5B4; margin: 2px 0 0; letter-spacing: 0; }

.nav-toggle {
  margin-left: auto; background: none; border: 1px solid #39424F; color: #fff;
  font-family: var(--sans); font-size: 14px; font-weight: 700; padding: 8px 14px;
  border-radius: 3px; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--chalk); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s5); }
.main-nav a {
  font-family: var(--sans); font-weight: 700; font-size: 15px; color: #E4E8ED;
  text-decoration: none; display: block; padding-block: 6px; border-bottom: 3px solid transparent;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: #fff; border-bottom-color: var(--chalk); }
.main-nav .sub-menu { display: none; }

.header-cta {
  font-family: var(--sans); font-weight: 700; font-size: 14px; background: var(--chalk);
  color: var(--ink); padding: 9px 16px; border-radius: 3px; text-decoration: none; flex-shrink: 0;
}
.header-cta:hover { background: #fff; color: var(--ink); }

@media (max-width: 900px) {
  .header-bar { flex-wrap: wrap; }
  .main-nav { display: none; width: 100%; order: 3; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; border-top: 1px solid #2B3440; }
  .main-nav li { border-bottom: 1px solid #2B3440; }
  .main-nav a { padding-block: 12px; border-bottom: none; }
}
@media (min-width: 901px) { .nav-toggle { display: none; } }

/* ---------------------------------------------------------------
   4. Layout
--------------------------------------------------------------- */
.site-main { padding-block: var(--s7); }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--s8); align-items: start; }
.layout--full { grid-template-columns: minmax(0,1fr); }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0,1fr); gap: var(--s7); } }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  border-bottom: 3px solid var(--cobalt); padding-bottom: var(--s3); margin-bottom: var(--s5);
}
.section-head h2 { margin: 0; font-size: 20px; }
.section-head a { font-family: var(--sans); font-size: 14px; font-weight: 700; text-decoration: none; }

/* ---------------------------------------------------------------
   5. Lead story
--------------------------------------------------------------- */
.lead { display: grid; grid-template-columns: 1.55fr 1fr; gap: var(--gap); margin-bottom: var(--s8); }
@media (max-width: 860px) { .lead { grid-template-columns: 1fr; } }

.lead-main { position: relative; background: var(--ink); border-radius: 4px; overflow: hidden; }
.lead-main img { width: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: 0.62; display: block; }
.lead-main .lead-body { position: absolute; inset: auto 0 0 0; padding: var(--s6); background: linear-gradient(to top, rgba(15,22,32,0.95), rgba(15,22,32,0)); }
.lead-main h2 { font-size: clamp(26px, 3.6vw, 40px); }
.lead-main h2 a { color: #fff; text-decoration: none; }
.lead-main h2 a:hover { text-decoration: underline; }
.lead-main .meta { color: #B9C2CE; }

.lead-side { display: flex; flex-direction: column; gap: var(--s4); }
.lead-side .story { display: grid; grid-template-columns: 84px 1fr; gap: var(--s4); align-items: start; padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.lead-side .story:last-child { border-bottom: none; }
.lead-side .story img { width: 84px; height: 64px; object-fit: cover; border-radius: 3px; }
.lead-side h3 { font-size: 16px; margin: 0 0 6px; }
.lead-side h3 a { color: var(--ink); text-decoration: none; }
.lead-side h3 a:hover { color: var(--cobalt); }

/* ---------------------------------------------------------------
   6. Story cards
--------------------------------------------------------------- */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: var(--gap); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.card-thumb { position: relative; display: block; background: #E3E6E2; }
.card-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.card-body { padding: var(--s4) var(--s4) var(--s5); flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 19px; margin: 0 0 var(--s2); }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--cobalt); }
.card .excerpt { font-size: 16px; color: var(--ink-soft); margin: 0 0 var(--s3); }
.card .meta { margin-top: auto; }

.meta { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--slate); line-height: 1.4; }
.meta a { color: var(--slate); text-decoration: none; }
.meta a:hover { color: var(--cobalt); }
.meta .sep { opacity: 0.45; padding-inline: 6px; }

.kicker {
  display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 800;
  letter-spacing: 0.04em; color: var(--cobalt); text-decoration: none; margin-bottom: var(--s2);
}
.kicker:hover { color: var(--cobalt-d); }

/* Score badge — the one place chalk yellow is allowed */
.score {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--chalk); color: var(--ink);
  font-family: var(--sans); font-weight: 800; font-size: 20px;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
  min-width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 3px;
}
.score--lg { position: static; min-width: 74px; height: 74px; font-size: 34px; }

.verdict {
  border-left: 4px solid var(--chalk); background: #fff;
  padding: var(--s5); margin: var(--s6) 0; display: flex; gap: var(--s5); align-items: center;
}
.verdict p { margin: 0; font-size: 19px; }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin: var(--s6) 0; }
@media (max-width: 600px) { .proscons { grid-template-columns: 1fr; } }
.proscons ul { margin: 0; padding-left: 1.2em; font-size: 17px; }
.proscons h4 { font-size: 14px; margin-bottom: var(--s3); padding-bottom: 6px; border-bottom: 2px solid var(--line); }

/* Ranked list — numbering only where content is genuinely a sequence */
.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.ranked li { counter-increment: rank; display: grid; grid-template-columns: 40px 1fr; gap: var(--s4); padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.ranked li::before {
  content: counter(rank); font-family: var(--sans); font-weight: 800; font-size: 22px;
  font-variant-numeric: tabular-nums; color: var(--chalk); -webkit-text-stroke: 0.7px var(--ink-soft);
}
.ranked a { font-family: var(--sans); font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.ranked a:hover { color: var(--cobalt); }

/* ---------------------------------------------------------------
   7. Single post
--------------------------------------------------------------- */
.entry-header { margin-bottom: var(--s6); }
.entry-header .meta { margin-top: var(--s4); }
.entry-hero img { width: 100%; border-radius: 4px; margin-bottom: var(--s6); }
.entry-content { max-width: 68ch; }
.entry-content h2 { margin-top: var(--s7); }
.entry-content h3 { margin-top: var(--s6); }
.entry-content ul, .entry-content ol { margin: 0 0 var(--s5); padding-left: 1.4em; }
.entry-content li { margin-bottom: var(--s2); }
.entry-content blockquote {
  margin: var(--s6) 0; padding: 0 0 0 var(--s5); border-left: 4px solid var(--cobalt);
  font-size: 21px; font-style: italic; color: var(--ink-soft);
}
.entry-content figure { margin: var(--s6) 0; }
.entry-content figcaption { font-family: var(--sans); font-size: 13px; color: var(--slate); margin-top: var(--s2); }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; margin-bottom: var(--s5); }
.entry-content th, .entry-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.entry-content th { font-weight: 800; background: #fff; }

.entry-footer { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); }
.tag-list a {
  display: inline-block; font-family: var(--sans); font-size: 13px; font-weight: 700;
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 5px 11px; margin: 0 6px 6px 0; text-decoration: none; color: var(--ink-soft);
}
.tag-list a:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* ---------------------------------------------------------------
   8. Sidebar + widgets
--------------------------------------------------------------- */
.sidebar .widget { margin-bottom: var(--s7); }
.sidebar .widget-title { font-size: 17px; border-bottom: 3px solid var(--cobalt); padding-bottom: var(--s3); margin-bottom: var(--s4); }
.sidebar ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 15px; }
.sidebar li { padding-block: var(--s2); border-bottom: 1px solid var(--line); }
.sidebar a { text-decoration: none; color: var(--ink); }
.sidebar a:hover { color: var(--cobalt); }
.sticky-rail { position: sticky; top: var(--s5); }

/* ---------------------------------------------------------------
   9. Footer
--------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #C3CBD6; font-family: var(--sans); font-size: 15px; margin-top: var(--s8); }
.site-footer a { color: #C3CBD6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: var(--s6); padding-block: var(--s7); }
.footer-col h3 { font-size: 14px; color: #fff; margin-bottom: var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid #2B3440; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; line-height: 1.4; }
.footer-bottom { border-top: 1px solid #2B3440; padding-block: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; font-size: 14px; color: #8B95A3; }

/* ---------------------------------------------------------------
   10. Ad slots — reserved height prevents layout shift (CLS)
--------------------------------------------------------------- */
.ad-slot {
  display: block; margin-inline: auto; margin-block: var(--s6);
  text-align: center; overflow: hidden; position: relative;
  min-height: var(--h-desk, 0px);
}
@media (max-width: 900px) { .ad-slot { min-height: var(--h-mob, 0px); } }
.ad-slot::before {
  content: attr(data-label); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  font-family: var(--sans); font-size: 10px; color: #9AA5B4; letter-spacing: 0.08em;
}
.ad-slot > .ad-inner { padding-top: 14px; }
.ad-slot--desktop-only { display: block; }
.ad-slot--mobile-only  { display: none; }
@media (max-width: 900px) {
  .ad-slot--desktop-only { display: none; }
  .ad-slot--mobile-only  { display: block; }
}
.ad-slot--anchor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  margin: 0; background: rgba(241,242,239,0.97); border-top: 1px solid var(--line);
}
.ad-slot--anchor .ad-close {
  position: absolute; right: 6px; top: 4px; background: none; border: none;
  font-size: 18px; line-height: 1; color: var(--slate); cursor: pointer; padding: 4px 8px;
}
body.has-anchor-ad { padding-bottom: 66px; }

/* ---------------------------------------------------------------
   11. Member / pricing
--------------------------------------------------------------- */
.member-bar {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--cobalt);
  border-radius: 4px; padding: var(--s5); margin-bottom: var(--s6);
  font-family: var(--sans); font-size: 15px;
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; align-items: center;
}
.member-bar strong { font-variant-numeric: tabular-nums; }
.member-bar--warn { border-left-color: #C4341F; }

.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 15px;
  background: var(--cobalt); color: #fff; padding: 11px 20px; border-radius: 3px;
  text-decoration: none; border: none; cursor: pointer;
}
.btn:hover { background: var(--cobalt-d); color: #fff; }
.btn--ghost { background: transparent; color: var(--cobalt); border: 2px solid var(--cobalt); padding: 9px 18px; }
.btn--ghost:hover { background: var(--cobalt); color: #fff; }

/* ---------------------------------------------------------------
   12. Pagination, comments, 404
--------------------------------------------------------------- */
.pagination { margin-top: var(--s7); font-family: var(--sans); font-weight: 700; }
.pagination .page-numbers {
  display: inline-block; padding: 9px 14px; margin-right: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; color: var(--ink);
}
.pagination .current, .pagination .page-numbers:hover { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding-block: var(--s5); }
.comment-list .children { list-style: none; padding-left: var(--s5); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 3px; font-family: var(--sans); font-size: 16px;
}
.search-form { display: flex; gap: var(--s2); }
.search-form input[type=search] { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; font-size: 16px; font-family: var(--sans); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
