/*
Theme Name: RMxtra
Theme URI: https://rmxtra.com
Author: Beta Web Analysis Limited
Description: RMxtra premium editorial theme — converted from client-supplied HTML/CSS design.
Version: 5.1.5
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rmxtra
*/

/* =========================================================
   RMXtra — Design tokens
   Palette: black, navy blue, creamy — no red.
   Fixed brand tones stay constant across themes;
   surface tones switch with data-theme.
   ========================================================= */
:root {
  /* fixed brand tones (header underline, hero bands, footer, buttons) */
  --brand-navy: #17274F;
  --brand-navy-2: #223A72;
  --brand-navy-deep: #0A1122;
  --brand-cream: #EEE4C8;

  /* theme-adaptive tones — light defaults (neutral, cream reserved for small accents only) */
  --bg: #F5F5F3;
  --surface: #FFFFFF;
  --surface-2: #ECEAE4;
  --text: #14161B;
  --text-muted: #5B5D66;
  --line: rgba(20, 22, 27, .12);
  --accent: #1B2C57;
  --accent-soft: rgba(27, 44, 87, .08);
  --shadow: rgba(23, 39, 79, .13);

  /* match bar — off-white/white in light mode, navy in dark mode */
  --matchbar-bg: var(--surface-2);
  --matchbar-card: var(--surface);
  --matchbar-border: var(--line);
  --matchbar-text: var(--text);
  --matchbar-text-muted: var(--text-muted);
  --matchbar-accent: var(--accent);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;

  --container: 1240px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --bg: #0D0E12;
  --surface: #17191F;
  --surface-2: #1E212A;
  --text: #F1ECDC;
  --text-muted: #A8ABB7;
  --line: rgba(241, 236, 220, .14);
  --accent: #93A6D9;
  --accent-soft: rgba(147, 166, 217, .12);
  --shadow: rgba(2, 5, 14, .55);

  --matchbar-bg: var(--brand-navy-deep);
  --matchbar-card: var(--brand-navy);
  --matchbar-border: rgba(238, 228, 200, .12);
  --matchbar-text: var(--brand-cream);
  --matchbar-text-muted: rgba(238, 228, 200, .65);
  --matchbar-accent: var(--brand-cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--brand-cream); color: var(--brand-navy-deep);
  padding: 10px 16px; z-index: 300; font-family: var(--font-display); font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); margin: 0; line-height: 1.15; }

/* =========================================================
   Orchestrated entrance animation (hero + match bar only)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-up .7s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * .09s + .05s);
}
@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Shared components
   ========================================================= */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 10px;
}
.tag--sm { font-size: 10.5px; padding: 4px 10px; margin-right: 8px; margin-bottom: 8px; }

.byline { font-family: var(--font-body); font-style: italic; color: var(--text-muted); font-size: 14px; margin: 6px 0 0; }

.chip {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
  display: inline-block;
}
.chip:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-1px); }

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px var(--shadow); }
.btn--primary { background: var(--brand-cream); color: var(--brand-navy-deep); }
.btn--primary:hover { background: #F6EED7; }
.btn--outline-light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); }
.btn--sm { padding: 9px 16px; font-size: 13px; }

.text-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.text-link:hover { color: var(--accent); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }

/* =========================================================
   Ticker
   ========================================================= */
.ticker {
  background: var(--brand-navy);
  color: var(--brand-cream);
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 13px;
  height: 38px;
}
.ticker__label {
  background: var(--brand-navy-deep);
  font-weight: 800;
  letter-spacing: .04em;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  z-index: 2;
}
.ticker__label::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-cream);
  animation: pulse-dot 1.7s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.65); }
}
.ticker__track {
  display: flex;
  gap: 48px;
  padding-left: 24px;
  animation: ticker-scroll 32s linear infinite;
}
.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__track a { color: var(--brand-cream); opacity: .92; font-weight: 500; }
.ticker__track a:hover { opacity: 1; text-decoration: underline; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-cream) 50%, var(--brand-navy) 100%) 1;
  transition: background-color .35s var(--ease);
}
.site-header__bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: padding .2s var(--ease);
}
.site-header.is-scrolled .site-header__bar { padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand__word em {
  font-style: normal;
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  padding: 2px 9px 3px;
  margin-right: 3px;
  border-radius: 7px;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

.primary-nav { flex: 1; min-width: 0; }
.primary-nav__head { display: none; }
.primary-nav > ul { display: flex; gap: 4px; flex-wrap: wrap; }
.primary-nav > ul > li { position: relative; }
.primary-nav > ul > li > a {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.primary-nav > ul > li > a:hover { background: var(--accent-soft); color: var(--accent); }
.sub-toggle { display: none; }

.has-sub > .sub-nav {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  min-width: 210px;
  box-shadow: 0 16px 28px var(--shadow);
  padding: 6px 0;
  z-index: 50;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.has-sub:hover > .sub-nav,
.has-sub:focus-within > .sub-nav { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-nav li a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}
.sub-nav li a:hover { background: var(--accent-soft); color: var(--accent); }

.site-header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  background: none; border: none; color: var(--text); padding: 9px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

#themeToggle .icon-sun { display: none; }
html[data-theme="dark"] #themeToggle .icon-sun { display: block; }
html[data-theme="dark"] #themeToggle .icon-moon { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none; border: none;
  border-radius: 50%;
  transition: background .15s var(--ease);
}
.hamburger:hover { background: var(--accent-soft); }
.hamburger span { display: block; width: 20px; height: 2.5px; background: var(--text); border-radius: 2px; margin: 0 auto; transition: transform .2s var(--ease), opacity .2s var(--ease); }

.search-bar {
  max-height: 0;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  transition: max-height .25s var(--ease);
}
.search-bar.is-open { max-height: 70px; }
.search-bar form { max-width: var(--container); margin: 0 auto; padding: 14px 24px; display: flex; gap: 10px; }
.search-bar input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 15px; background: var(--surface); color: var(--text);
}
.search-bar button {
  font-family: var(--font-display); font-weight: 700; background: var(--brand-navy); color: var(--brand-cream);
  border: none; padding: 10px 18px; border-radius: var(--radius-sm);
}

/* =========================================================
   Mobile nav: backdrop + close
   ========================================================= */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(10, 11, 16, .5);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
  z-index: 89; backdrop-filter: blur(2px);
}
.nav-backdrop.is-visible { opacity: 1; visibility: visible; }

.primary-nav__head {
  align-items: center; justify-content: space-between; padding-bottom: 18px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
}
.primary-nav__title { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .06em; color: var(--text-muted); text-transform: uppercase; }
.nav-close {
  background: var(--accent-soft); border: none; color: var(--text); width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-close:hover { background: var(--accent); color: var(--surface); }

/* =========================================================
   Match bar — last result + next fixture
   ========================================================= */
.matchbar {
  background: var(--matchbar-bg);
  padding: 20px 24px;
  border-bottom: 1px solid var(--matchbar-border);
  transition: background-color .35s var(--ease);
}
.matchbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.match-card {
  background: var(--matchbar-card);
  border: 1px solid var(--matchbar-border);
  border-radius: var(--radius-md);
  padding: 22px;
  color: var(--matchbar-text);
  box-shadow: 0 3px 14px var(--shadow);
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.match-card__label {
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px; letter-spacing: .05em;
  color: var(--matchbar-text-muted); text-transform: uppercase; display: block; margin-bottom: 12px;
}
.match-card__teams { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.match-card__team { display: flex; align-items: center; justify-content: space-between; }
.match-card__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.match-card__score { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--matchbar-accent); }
.match-card__teams--vs { flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.match-card__vs { font-size: 12px; opacity: .6; font-weight: 600; }
.match-card__meta { font-size: 13px; color: var(--matchbar-text-muted); margin: 0 0 14px; }
.match-card .text-link { color: var(--matchbar-text); border-bottom-color: var(--matchbar-accent); }
.match-card .text-link:hover { color: var(--matchbar-accent); }

.countdown { display: flex; gap: 8px; margin-bottom: 14px; }
.countdown > div { flex: 1; background: var(--matchbar-bg); border-radius: var(--radius-sm); text-align: center; padding: 8px 4px; transition: background-color .35s var(--ease); }
.countdown span { display: block; font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--matchbar-accent); }
.countdown small { font-size: 9.5px; color: var(--matchbar-text-muted); letter-spacing: .04em; }

/* =========================================================
   Hero
   ========================================================= */
.hero { max-width: var(--container); margin: 0 auto; padding: 40px 24px 8px; position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  top: -30px; left: 0; right: 0;
  width: min(920px, 100%);
  height: 380px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 72%);
  pointer-events: none;
  z-index: -1;
}
.hero__kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 18px;
}
.hero__kicker--light { color: var(--brand-cream); }

/* Lead story spans full width on top; secondary stories sit in a row
   below it instead of a side column — avoids any leftover empty space
   next to a shorter/taller lead card. */
.hero__grid { display: block; }
.hero__lead { display: block; margin-bottom: 36px; }

.hero__secondary {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}
.hero__sec-item {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	padding-bottom: 0;
	border-bottom: none;
}
.hero__sec-media { width: 100%; }
.hero__sec-item h3 { font-size: 18px; font-weight: 700; line-height: 1.3; transition: color .15s var(--ease); }
.hero__sec-item:hover h3 { color: var(--accent); }

@media (max-width: 900px) {
	.hero__secondary { grid-template-columns: 1fr; gap: 20px; }
}

.hero__lead-media { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; aspect-ratio: 16/9; background: var(--surface-2); }
.hero__lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.hero__lead:hover .hero__lead-media img { transform: scale(1.03); }
.hero__lead h1 {
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  transition: color .15s var(--ease);
}
.hero__lead:hover h1 { color: var(--accent); }
.hero__lead .deck { color: var(--text-muted); font-size: 17px; max-width: 80ch; }

.hero__cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 8px; }

/* =========================================================
   About strip
   ========================================================= */
.about-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px var(--shadow);
  max-width: var(--container);
  margin: 48px auto 0;
  transition: background-color .35s var(--ease);
}
.about-strip__text { padding: 44px 32px 20px; max-width: 900px; }
.about-strip__text h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 16px; }
.about-strip__text p { color: var(--text-muted); margin: 0 0 14px; max-width: 72ch; }

.about-strip__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 32px 40px;
}
.about-strip__tags li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
}

/* =========================================================
   Latest news grid
   ========================================================= */
.latest { max-width: var(--container); margin: 0 auto; padding: 56px 24px 8px; }

.filter-tabs { position: relative; display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

@media (max-width: 640px) {
	/* Scroll horizontally instead of wrapping to a second line — wrapping
	   breaks the sliding indicator, which assumes a single row (its
	   height:100% would otherwise stretch across both rows). */
	.filter-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
		scrollbar-width: none;
	}
	.filter-tabs::-webkit-scrollbar { display: none; }
	.filter-tabs__btn { flex-shrink: 0; }
}
.filter-tabs__indicator {
  position: absolute; top: 0; left: 0; height: 100%; border-radius: 999px;
  background: var(--accent); z-index: 0;
  transition: transform .28s var(--ease), width .28s var(--ease);
}
.filter-tabs__btn {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.filter-tabs__btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-tabs__btn.is-active { color: var(--surface); border-color: transparent; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 3px 12px var(--shadow);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.news-card:hover { box-shadow: 0 16px 32px var(--shadow); transform: translateY(-4px); border-color: transparent; }
.news-card__media { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 14px; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.news-card:hover .news-card__media img { transform: scale(1.05); }
.news-card__body h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.news-card__body h3 a { transition: color .15s var(--ease); }
.news-card__body h3 a:hover { color: var(--accent); }
.news-card.is-hidden { display: none; }

/* =========================================================
   Promo band (Transfer Hub)
   ========================================================= */
.promo-band {
  background: linear-gradient(120deg, var(--brand-navy-deep) 0%, var(--brand-navy-2) 100%);
  margin-top: 64px;
  color: var(--brand-cream);
}
.promo-band__text { max-width: var(--container); margin: 0 auto; padding: 56px 24px; max-width: 720px; }
.promo-band h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.promo-band p { color: rgba(238, 228, 200, .78); margin: 0 0 24px; font-size: 17px; }

/* =========================================================
   Content split (main + sidebar)
   ========================================================= */
.content-split {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.story-list { display: flex; flex-direction: column; gap: 16px; }
.story-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 12px var(--shadow);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.story-row:hover { box-shadow: 0 14px 28px var(--shadow); transform: translateY(-3px); border-color: transparent; }
.story-row__media { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.story-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.story-row:hover .story-row__media img { transform: scale(1.05); }
.story-row__body h3 { font-size: 18px; font-weight: 700; margin-top: 4px; line-height: 1.3; }
.story-row__body h3 a { transition: color .15s var(--ease); }
.story-row__body h3 a:hover { color: var(--accent); }

.sidebar { display: flex; flex-direction: column; gap: 32px; position: sticky; top: 90px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; box-shadow: 0 3px 14px var(--shadow); transition: background-color .35s var(--ease); }
.widget h3 { font-size: 15px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--accent); }

.mini-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.mini-table th {
  text-align: left; font-family: var(--font-display); font-size: 10.5px; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.mini-table th:nth-child(1) { width: 22px; }
.mini-table th:nth-child(3), .mini-table th:nth-child(4),
.mini-table td:nth-child(3), .mini-table td:nth-child(4) { text-align: center; }
.mini-table td {
  padding: 8px 4px; font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--text); border-bottom: 1px solid var(--line); transition: background-color .2s var(--ease);
}
.mini-table tr:last-child td { border-bottom: none; }
.mini-table tr.is-rm td { color: var(--accent); background: var(--accent-soft); font-weight: 800; }
.mini-table tr.is-rm td:first-child { border-radius: 8px 0 0 8px; }
.mini-table tr.is-rm td:last-child { border-radius: 0 8px 8px 0; }

.ranked-list { display: flex; flex-direction: column; gap: 12px; counter-reset: rank; }
.ranked-list li { counter-increment: rank; display: flex; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ranked-list li:last-child { border-bottom: none; padding-bottom: 0; }
.ranked-list li::before {
  content: counter(rank);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.ranked-list li a { font-size: 14.5px; font-weight: 600; line-height: 1.35; transition: color .15s var(--ease); }
.ranked-list li a:hover { color: var(--accent); }

.widget--editor p { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; }
.editor-card { display: flex; align-items: center; gap: 12px; }
.editor-card__initial {
  width: 42px; height: 42px; border-radius: 50%; background: var(--brand-navy); color: var(--brand-cream);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.editor-card strong { display: block; font-size: 14.5px; }
.editor-card small { color: var(--text-muted); font-size: 12.5px; }

/* =========================================================
   Newsletter
   ========================================================= */
.newsletter { background: var(--brand-navy-deep); color: var(--brand-cream); margin-top: 8px; }
.newsletter__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.newsletter__copy h2 { color: #fff; font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 16px; }
.newsletter__copy p { color: rgba(238, 228, 200, .75); margin: 0 0 26px; font-size: 17px; max-width: 52ch; }
.newsletter__cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.newsletter__form { background: rgba(238, 228, 200, .06); border: 1px solid rgba(238, 228, 200, .18); border-radius: var(--radius-lg); padding: 28px; }
.newsletter__form h3 { color: #fff; font-size: 18px; margin-bottom: 10px; }
.newsletter__form p { color: rgba(238, 228, 200, .65); font-size: 14px; margin: 0 0 18px; }
.newsletter__field { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter__field input {
  flex: 1; min-width: 180px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(238, 228, 200, .3);
  background: rgba(255,255,255,.95); font-family: var(--font-body); font-size: 15px; color: var(--brand-navy-deep);
}
.newsletter__field button {
  font-family: var(--font-display); font-weight: 700; background: var(--brand-cream); color: var(--brand-navy-deep);
  border: none; padding: 12px 20px; border-radius: var(--radius-sm); transition: background .15s var(--ease);
}
.newsletter__field button:hover { background: #fff; }
.newsletter__status { margin: 12px 0 0; font-size: 13.5px; color: var(--brand-cream); min-height: 18px; }

/* =========================================================
   Closing editorial block
   ========================================================= */
.closing { max-width: 880px; margin: 0 auto; padding: 64px 24px 40px; }
.closing h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 18px; }
.closing p { color: var(--text-muted); margin: 0 0 16px; }
.closing em { color: var(--accent); font-style: italic; }

.disclaimer { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.disclaimer p { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.disclaimer a { color: var(--accent); border-bottom: 1px solid var(--accent); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--brand-navy-deep); color: rgba(238, 228, 200, .8); margin-top: 24px; }
.site-footer__top { max-width: var(--container); margin: 0 auto; padding: 56px 24px 40px; border-bottom: 1px solid rgba(238, 228, 200, .12); }
.brand--footer .brand__word { color: #fff; }
.brand--footer .brand__word em { background: var(--brand-cream); color: var(--brand-navy-deep); }
.site-footer__tagline { max-width: 52ch; color: rgba(238, 228, 200, .58); margin: 16px 0 20px; font-size: 15px; }

.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(238, 228, 200, .22);
  display: flex; align-items: center; justify-content: center; color: rgba(238, 228, 200, .8);
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.social-row a:hover { border-color: var(--brand-cream); color: var(--brand-cream); }

.site-footer__grid {
  max-width: var(--container); margin: 0 auto; padding: 44px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.site-footer__grid h4 { color: #fff; font-size: 13px; letter-spacing: .04em; margin-bottom: 16px; }
.site-footer__grid ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer__grid a { font-size: 14.5px; color: rgba(238, 228, 200, .65); transition: color .15s var(--ease); }
.site-footer__grid a:hover { color: var(--brand-cream); }

.site-footer__bottom {
  max-width: var(--container); margin: 0 auto; padding: 22px 24px;
  border-top: 1px solid rgba(238, 228, 200, .12);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer__bottom p { font-size: 13px; color: rgba(238, 228, 200, .5); margin: 0; }
.back-to-top {
  background: none; border: 1px solid rgba(238, 228, 200, .25); color: rgba(238, 228, 200, .8);
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.back-to-top:hover { border-color: var(--brand-cream); color: var(--brand-cream); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .content-split { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .matchbar__inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .newsletter__inner { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Mobile + tablet header: off-canvas nav ---- */
@media (max-width: 1080px) {
  .site-header__bar { padding: 12px 16px; gap: 10px; }
  .brand__word { font-size: 18px; }

  .hamburger { display: flex; }
  .site-header__actions { gap: 2px; margin-left: auto; }
  .site-header__actions .btn--sm { display: none; }
  .icon-btn { padding: 7px; }

  .primary-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); height: 100vh;
    background: var(--surface); padding: 20px 22px 24px; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s var(--ease); z-index: 90;
    box-shadow: -18px 0 40px var(--shadow);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    display: flex; flex-direction: column;
  }
  .primary-nav.is-open { transform: translateX(0); }
  .primary-nav__head { display: flex; }
  .primary-nav > ul { flex-direction: column; gap: 0; }
  .primary-nav > ul > li { border-bottom: 1px solid var(--line); }
  .primary-nav > ul > li > a { padding: 14px 4px; }

  .has-sub { display: flex; flex-direction: column; }
  .has-sub > a { flex: 1; }
  .sub-toggle {
    display: flex; align-items: center; justify-content: center;
    position: absolute; right: 0; top: 4px; width: 40px; height: 40px;
    background: none; border: none; color: var(--text-muted);
    transition: transform .2s var(--ease);
  }
  .has-sub.is-open > .sub-toggle { transform: rotate(180deg); color: var(--accent); }

  .has-sub > .sub-nav {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none;
    max-height: 0; overflow: hidden; padding: 0 0 0 14px; transition: max-height .3s var(--ease);
  }
  .has-sub.is-open > .sub-nav { max-height: 260px; padding-bottom: 8px; }
}

@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .story-row { grid-template-columns: 100px 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .newsletter__field { flex-direction: column; }
  .newsletter__field button { width: 100%; }
  .matchbar { padding: 16px; }
  .match-card { padding: 16px 18px; }
}


/* =========================================================
   ADDED: single article / archive / search / 404 / page
   templates — the supplied design only covered the homepage,
   so these extend the same tokens/components to the rest of
   the site.
   ========================================================= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.breadcrumbs { padding: 18px 0 0; }
.breadcrumb-list { display: flex; gap: 6px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; font-family: var(--font-display); }
.breadcrumb-list li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--line); }
.breadcrumb-list a { color: var(--text-muted); }
.breadcrumb-list a:hover { color: var(--accent); }

.article-header { max-width: 800px; margin: 22px auto 0; }
.article-header h1 { font-size: clamp(28px, 4vw, 46px); margin: 14px 0 12px; }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--text-muted); padding-bottom: 22px; border-bottom: 1px solid var(--line); font-family: var(--font-display); }

.article-hero { max-width: 960px; margin: 26px auto; }
.article-hero img { border-radius: var(--radius-lg); width: 100%; }

.article-body { max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.75; }
.article-body p { margin: 0 0 1.3em; }
.article-body h2 { font-size: 26px; margin: 1.4em 0 0.5em; font-family: var(--font-display); }
.article-body a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--accent); }

.article-tags { max-width: 720px; margin: 30px auto 0; display: flex; gap: 8px; flex-wrap: wrap; }
.article-tags a { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-muted); }
.article-tags a:hover { border-color: var(--accent); color: var(--accent); }

.related-posts { margin: 56px 0; }

.page-header { padding: 34px 0 6px; }
.page-header h1 { font-size: 32px; }

.archive-layout { display: grid; grid-template-columns: 1fr 300px; gap: 44px; margin: 28px 0 56px; }
@media (max-width: 900px) { .archive-layout { grid-template-columns: 1fr; } }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 40px 0; font-family: var(--font-display); }
.pagination a, .pagination span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 10px;
	border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px;
}
.pagination .active { background: var(--accent); color: var(--surface); border-color: var(--accent); }

.error-404 { text-align: center; padding: 90px 0; }
.error-404 h1 { font-size: 96px; color: var(--line); margin: 0; font-family: var(--font-display); }

.search-form-standalone { display: flex; gap: 8px; max-width: 480px; margin: 20px 0 32px; }
.search-form-standalone input { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: var(--font-body); }
.search-form-standalone button { padding: 12px 20px; background: var(--accent); color: var(--surface); border-radius: var(--radius-sm); font-weight: 700; font-family: var(--font-display); }

/* Full LaLiga table (10 columns). On phones, secondary columns
   (W/D/L/GF/GA) hide so the remaining columns (#, Club, P, GD, Pts)
   fit and stay fully readable — no horizontal scrolling needed. */
.full-table { width: 100%; }
.full-table-block { max-width: none; }

@media (max-width: 640px) {
	.full-table th:nth-child(4), .full-table td:nth-child(4),
	.full-table th:nth-child(5), .full-table td:nth-child(5),
	.full-table th:nth-child(6), .full-table td:nth-child(6),
	.full-table th:nth-child(7), .full-table td:nth-child(7),
	.full-table th:nth-child(8), .full-table td:nth-child(8) {
		display: none;
	}
	.full-table th, .full-table td { padding: 8px 4px; font-size: 12.5px; }
	.full-table td:nth-child(2) { font-size: 13px; }
}

/* Hero secondary items now include a thumbnail */
.hero__sec-media { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface-2); }
.hero__sec-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.hero__sec-item:hover .hero__sec-media img { transform: scale(1.05); }
