/* =============================================
   ARAKORA — Premium Arabic Sports Dark Theme
   Designer edition v8.0
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Core palette */
  --clr-bg:       #080a0f;
  --clr-surface:  #0d1017;
  --clr-card:     #121620;
  --clr-card-2:   #171b24;
  --clr-border:   #1d2230;
  --clr-border-2: #252b3a;

  /* Brand */
  --clr-primary:  #e8b84b;
  --clr-primary-dim: rgba(232,184,75,0.12);
  --clr-primary-glow: rgba(232,184,75,0.25);

  /* Semantic */
  --clr-accent:   #ff4d6d;
  --clr-live:     #22d46e;
  --clr-live-dim: rgba(34,212,110,0.12);
  --clr-blue:     #4f8ef7;
  --clr-purple:   #8b5cf6;

  /* Text */
  --clr-text:     #eaedf5;
  --clr-muted:    #c3c7d7;
  --clr-subtle:   #8892a4;
  --clr-white:    #ffffff;

  /* Typography */
  --font-display: 'Almarai', sans-serif;
  --font-body:    'Almarai', sans-serif;

  /* Geometry */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.3);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px rgba(232,184,75,0.15);
  --shadow-live: 0 0 20px rgba(34,212,110,0.2);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition: 0.22s var(--ease);
  --transition-slow: 0.4s var(--ease);
}

/* ── Light mode overrides (data-theme="light" on <html>) ───────────────────── */
[data-theme="light"] {
  --clr-bg:       #f4f6fb;
  --clr-surface:  #eaecf3;
  --clr-card:     #ffffff;
  --clr-card-2:   #f8f9fc;
  --clr-border:   #dde1ee;
  --clr-border-2: #c8cedd;
  --clr-text:     #1a1d2e;
  --clr-muted:    #3d4160;
  --clr-subtle:   #6b7194;
  --clr-white:    #1a1d2e;
  --shadow-card:  0 2px 16px rgba(0,0,0,0.08);
  --shadow-glow:  0 0 24px rgba(232,184,75,0.12);
}
[data-theme="light"] #site-header { background: #ffffff; border-bottom-color: var(--clr-border); }
[data-theme="light"] #site-nav    { background: #f4f6fb; }
/* Dual logo swap */
.logo-dark  { display: block; }
.logo-light { display: none;  }
[data-theme="light"] .logo-dark  { display: none;  }
[data-theme="light"] .logo-light { display: block; }
[data-theme="light"] .standings-table th { background: var(--clr-surface); }
[data-theme="light"] .match-score { background: var(--clr-surface); }
[data-theme="light"] .sidebar-widget-title { background: var(--clr-surface); }
[data-theme="light"] .footer-col ul li a { color: var(--clr-subtle); }
[data-theme="light"] #score-ticker { filter: brightness(0.9); }

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 15px;  /* Almarai renders slightly larger than Cairo — nudge down 1px */
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb { background: var(--clr-border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-primary); }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--clr-white);
}
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.3rem); }
p  { color: var(--clr-muted); font-size: 0.95rem; }
a  { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-white); }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 28px;
  margin-top: 28px;
}
@media (max-width: 900px) { .site-grid { grid-template-columns: 1fr; } }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }

/* ── Ticker ────────────────────────────────────────────────────────────────── */
#score-ticker {
  background: linear-gradient(90deg, #c41230 0%, #e8082a 50%, #c41230 100%);
  padding: 7px 0;
  overflow: hidden;
  position: relative;
}
#score-ticker::before,
#score-ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
#score-ticker::before { right: 0; background: linear-gradient(to right, transparent, #c41230); }
#score-ticker::after  { left: 0;  background: linear-gradient(to left, transparent, #c41230); }

.ticker-inner {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}
#score-ticker:hover .ticker-inner,
#score-ticker:focus-within .ticker-inner {
  animation-play-state: paused;
  cursor: pointer;
}
.ticker-item, a.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  font-size: 0.81rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.ticker-sep { color: rgba(255,255,255,0.35); font-size: 0.55rem; flex-shrink: 0; }
.ticker-live-dot {
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.4; transform:scale(0.7); } }

/* ── Header ────────────────────────────────────────────────────────────────── */
#site-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--clr-primary);
  letter-spacing: -0.5px;
  line-height: 1;
  text-shadow: 0 0 30px rgba(232,184,75,0.3);
}
.site-logo span { color: var(--clr-white); }

.custom-logo-link, .custom-logo-link img {
  display: block; max-width: 160px; min-width: 80px; width: 140px; height: auto; object-fit: contain;
}

/* Search in header */
.header-search {
  flex: 1;
  max-width: 520px;  /* wider now that subscribe is hidden */
  position: relative;
}
.header-search input {
  width: 100%;
  background: var(--clr-card);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text);
  padding: 9px 16px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  direction: rtl;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.header-search input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-dim);
}
.header-search input::placeholder { color: var(--clr-subtle); }

/* ── Navigation ────────────────────────────────────────────────────────────── */
#site-nav {
  background: var(--clr-card);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 65px;
  z-index: 90;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  padding: 13px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--clr-subtle);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
}
.nav-inner a:hover { color: var(--clr-text); }
.nav-inner a.active {
  color: var(--clr-primary);
  border-bottom-color: var(--clr-primary);
}

/* ── Section Headings ──────────────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--clr-border);
}
.section-head h2 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head h2::before {
  content: '';
  display: inline-block;
  width: 3px; height: 18px;
  background: linear-gradient(180deg, var(--clr-primary), rgba(232,184,75,0.3));
  border-radius: 2px;
}
.section-head a { font-size: 0.78rem; color: var(--clr-subtle); transition: color var(--transition); }
.section-head a:hover { color: var(--clr-primary); }

/* ── News Cards ────────────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.news-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.news-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--clr-primary-dim) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 0;
}
.news-card:hover { transform: translateY(-4px); border-color: rgba(232,184,75,0.4); box-shadow: var(--shadow-glow); }
.news-card:hover::before { opacity: 1; }
.news-card .news-card-body a:first-of-type::after { content:''; position:absolute; inset:0; z-index:1; }
.news-card .news-card-body a + a, .news-card .news-card-badge { position:relative; z-index:2; }

.news-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--clr-border);
  transition: transform var(--transition-slow);
}
.news-card:hover .news-card-img { transform: scale(1.03); }

.news-card-body { padding: 14px; position: relative; z-index: 1; }
.news-card-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--clr-primary-dim);
  color: var(--clr-primary);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.news-card-badge.live { background: var(--clr-live-dim); color: var(--clr-live); }
.news-card h3 { font-size: 0.93rem; color: var(--clr-white); margin-bottom: 6px; line-height: 1.45; }
.news-card-meta { font-size: 0.73rem; color: var(--clr-subtle); display: flex; gap: 10px; margin-top: 6px; }

/* ── Featured Article ──────────────────────────────────────────────────────── */
.featured-article {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 300px;
  position: relative;
}
.featured-article::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--clr-primary-dim));
  pointer-events: none;
}
@media (max-width: 640px) { .featured-article { grid-template-columns: 1fr; } }
.featured-article-img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }
.featured-article-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.featured-article-body h2 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); line-height: 1.4; }

/* ── Matches Widget ────────────────────────────────────────────────────────── */
.matches-widget {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.matches-widget:hover { border-color: var(--clr-border-2); }
.matches-widget-header {
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--clr-surface), var(--clr-card));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--clr-border);
}
.matches-widget-header .league-name {
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--clr-text);
}
.match-row {
  padding: 11px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition);
  gap: 6px;
}
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: rgba(255,255,255,0.025); }
.team-name { font-size: 0.83rem; font-weight: 600; color: var(--clr-text); }
.team-name.home { text-align: right; }
.team-name.away { text-align: left; }
.match-score {
  text-align: center;
  padding: 5px 10px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.92rem;
  min-width: 60px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-display);
  transition: all var(--transition);
}
.match-score.live {
  background: var(--clr-live-dim);
  border-color: rgba(34,212,110,0.3);
  color: var(--clr-live);
  box-shadow: var(--shadow-live);
  animation: live-pulse 2s ease-in-out infinite;
}
.match-score.upcoming { font-size: 0.8rem; color: var(--clr-subtle); }
.match-score.finished { color: var(--clr-muted); border-color: var(--clr-border); }

@keyframes live-pulse { 0%,100% { box-shadow: 0 0 8px rgba(34,212,110,0.2); } 50% { box-shadow: 0 0 20px rgba(34,212,110,0.4); } }

/* ── Standings Table ───────────────────────────────────────────────────────── */
.standings-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; table-layout: auto; }
.standings-table th {
  padding: 9px 10px;
  background: var(--clr-surface);
  color: var(--clr-subtle);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--clr-border);
}
.standings-table th:first-child { text-align: right; }
.standings-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--clr-border);
  text-align: center;
  white-space: nowrap;
  transition: background var(--transition);
}
.standings-table td:first-child { text-align: right; font-weight: 600; color: var(--clr-white); }
/* td:nth-child(2) styling moved to entity-cell section above */

/* ── Fixtures match-row: horizontal scroll on mobile ─── */
.matches-widget { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* match-row min-width removed — let content wrap instead of overflow */
/* Homepage today widget: contain within viewport */
.standings-table tr:hover td { background: rgba(232,184,75,0.03); }
.standings-table tr:last-child td { border-bottom: none; }

.standings-pos {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.standings-pos.ucl { background: rgba(79,142,247,0.2); color: var(--clr-blue); border: 1px solid rgba(79,142,247,0.3); }
.standings-pos.rel { background: rgba(255,77,109,0.2); color: var(--clr-accent); border: 1px solid rgba(255,77,109,0.3); }
.standings-pos.normal { background: var(--clr-surface); color: var(--clr-subtle); }

/* ── Homepage: League tab buttons ───────────────────────────────────────────── */
.ls-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--clr-border-2);
  background: transparent;
  color: var(--clr-muted);
  white-space: nowrap;
  transition: all var(--transition);
}
.ls-tab-btn:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: var(--clr-primary-dim);
}
.ls-tab-btn.ls-tab-active {
  background: linear-gradient(135deg, var(--clr-primary), #f5cc6a);
  border-color: var(--clr-primary);
  color: #000;
}
/* Hide all panels, show only active */
.ls-panel { display: none; }
.ls-panel.ls-panel-active { display: block; max-width: 100%; overflow-x: hidden; }
/* Tab row: scroll horizontally, stay within viewport */
/* Live scores — tabs scroll, section never expands beyond column width */
/* ═══ Live Scores Section — authoritative rules ═══════════════════════════ */
#live-scores-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#live-scores-container {
  width: 100%;
  max-width: 820px;
  box-sizing: border-box;
  /* NO overflow:hidden here — that blocks tab scrolling */
}
#ls-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: scroll !important;
  overflow-y: hidden !important;
  box-sizing: border-box !important;
  gap: 6px;
  padding-bottom: 4px;
  margin-bottom: 0;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  scroll-behavior: smooth;
}
#ls-tabs::-webkit-scrollbar { display: none !important; }
.ls-tab-btn {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  min-width: max-content !important;
}
#live-scores-container .matches-widget {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#live-scores-container .match-row {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  #live-scores-section { max-width: 100vw; overflow-x: hidden; }
  #live-scores-container { max-width: calc(100vw - 32px); }
  #ls-tabs { max-width: calc(100vw - 32px) !important; }
}
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ── Bilingual entity cells (team + player names with Arabic sub-line) ───── */
.entity-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  vertical-align: middle;
}
a.entity-cell:hover .bi-name-en { color: var(--clr-primary); }

.bi-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.bi-name-en {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--clr-white);
  white-space: nowrap;
  transition: color var(--transition);
  /* overflow and text-overflow removed — parent scrolls instead of truncating */
}
/* Upcoming sidebar widget: smaller team name font */
#sidebar .sidebar-widget .bi-name-en { font-size: 0.66rem; }

.bi-name-ar {
  font-size: 0.72rem;
  color: var(--clr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
}

/* Standings table: widen team column to fit bilingual name */
.standings-table td:nth-child(2) {
  text-align: right;
  min-width: 140px;
  max-width: 200px;
}
/* On mobile: allow team column to be a bit narrower */
@media (max-width: 480px) {
  /* Arabic sub-line: smaller font on tiny screens but still visible */
  .bi-name-en { font-size: 0.78rem; }
  .bi-name-ar { font-size: 0.66rem; }
  /* Match score: compact on tiny screens, prevent badge overflow */
  .match-score { min-width: 44px; padding: 3px 6px; font-size: 0.78rem; }
  .badge-live { font-size: 0.58rem; padding: 2px 5px; }
  .standings-table td:nth-child(2) { min-width: 100px; }

  /* Related posts: 1 column on tiny phones */
  .news-grid[style*="repeat(2"] { grid-template-columns: 1fr !important; }
  /* Force 1-column news grid on very small screens */
  .news-grid { grid-template-columns: 1fr !important; }

  /* Container padding tighter */
  .container { padding: 0 12px; }

  /* Reduce heading size */
  .section-head h2 { font-size: 1rem; }

  /* Match score pill: compact */
  .match-score { font-size: 0.8rem; min-width: 48px; padding: 3px 8px; }

  /* League tab buttons: smaller */
  .league-tab { padding: 6px 12px; font-size: 0.75rem; }

  /* Ensure nothing exceeds viewport */
  .main-col, .site-grid,
  .bi-name-en { white-space: normal; word-break: break-word; }
}

/* ── Sidebar / Widget ──────────────────────────────────────────────────────── */
.sidebar-widget {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}
.sidebar-widget:hover { border-color: var(--clr-border-2); }

/* Mobile scroll for tables inside widgets */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
  .sidebar-widget { max-width: calc(100vw - 40px); overflow: hidden; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 4px; box-sizing: border-box; }
}

.sidebar-widget-title {
  padding: 12px 16px;
  background: linear-gradient(90deg, var(--clr-surface), var(--clr-card));
  font-weight: 700;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--clr-text);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;  /* prevent button text wrapping to new line */
}
.btn-primary {
  background: linear-gradient(135deg, var(--clr-primary), #f5cc6a);
  color: #000;
  box-shadow: 0 4px 16px rgba(232,184,75,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(232,184,75,0.5); color: #000; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--clr-border-2);
  color: var(--clr-muted);
}
.btn-outline:hover { border-color: var(--clr-primary); color: var(--clr-primary); background: var(--clr-primary-dim); }

/* ── Pagination ────────────────────────────────────────────────────────────── */
.arakora-pagination a.page-numbers,
.arakora-pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  cursor: pointer;
  line-height: 1;
  box-sizing: border-box;
}
.arakora-pagination a.page-numbers:hover {
  background: var(--clr-primary-dim);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}
.arakora-pagination span.page-numbers.current {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #000;
  cursor: default;
}
.arakora-pagination span.page-numbers.dots {
  background: transparent;
  border-color: transparent;
  color: var(--clr-subtle);
  cursor: default;
  min-width: 20px;
  padding: 0 4px;
}

/* ── Badges & Labels ───────────────────────────────────────────────────────── */
.badge-live {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--clr-live-dim);
  color: var(--clr-live);
  border: 1px solid rgba(34,212,110,0.2);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
}

/* ── Ad Zones ──────────────────────────────────────────────────────────────── */
.ad-zone {
  border-radius: var(--radius-md);
  background: var(--clr-surface);
  border: 1px dashed var(--clr-border-2);
  min-height: 90px;
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
  margin-bottom: 20px;
  /* NO overflow:hidden — collapses ins width to 0 */
  /* NO padding — reduces measured width */
  /* NO text-align — interferes with ins sizing */
}
.ad-zone ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-width: 300px;
  min-height: 90px;
}
.ad-zone.leaderboard    { min-height: 90px; }
.ad-zone.in-article-ad  { min-height: 90px; }
.ad-zone.sidebar-ad     { min-height: 250px; }
.ad-zone.footer-ad      { min-height: 90px; }
.ad-zone.leaderboard { height: 90px; }
.ad-zone.rectangle { height: 250px; }
.ad-zone.sidebar-ad { height: 280px; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
#site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  margin-top: 60px;
  padding: 48px 0 24px;
  position: relative;
}
#site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--clr-primary), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 36px;
  margin-bottom: 36px;
}
.footer-col h4 {
  color: var(--clr-primary);
  font-size: 0.88rem;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.footer-col p { font-size: 0.82rem; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--clr-subtle); font-size: 0.82rem; transition: color var(--transition), padding-right var(--transition); display: inline-block; }
.footer-col ul li a:hover { color: var(--clr-primary); padding-right: 4px; }
.footer-bottom {
  border-top: 1px solid var(--clr-border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--clr-subtle);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Single Article ────────────────────────────────────────────────────────── */
.article-header { margin-bottom: 28px; }
.article-header h1 { margin-bottom: 14px; }
.article-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--clr-muted); flex-wrap: wrap; align-items: center; }
.article-body { font-size: 1rem; line-height: 1.9; color: var(--clr-text); }
.article-body p { margin-bottom: 1.3em; }
.article-body h2 { margin: 2em 0 0.9em; border-right: 3px solid var(--clr-primary); padding-right: 14px; font-size: 1.3rem; }
.article-body img { border-radius: var(--radius-md); margin: 1.5em 0; box-shadow: var(--shadow-card); }

/* ── Player / Team profile hero ────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--clr-card) 0%, var(--clr-surface) 100%);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.profile-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: var(--clr-primary-dim);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

/* ── Breadcrumb ────────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--clr-subtle);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--clr-subtle); }
.breadcrumb a:hover { color: var(--clr-primary); }

/* ── Utility ───────────────────────────────────────────────────────────────── */
.text-live   { color: var(--clr-live); }
.text-gold   { color: var(--clr-primary); }
.text-muted  { color: var(--clr-muted); }
.text-subtle { color: var(--clr-subtle); }

/* ── Mobile ────────────────────────────────────────────────────────────────── */
.team-page-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
}
@media (max-width: 768px) {
  .team-page-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  /* Logo + search on ONE line, no wrap */
  .header-inner { flex-wrap: nowrap; gap: 10px; align-items: center; }
  .header-search { flex: 1; max-width: none; min-width: 0; }
  .header-search input { font-size: 0.8rem; padding: 8px 12px; }
  .site-logo { font-size: 1.4rem; flex-shrink: 0; }
  .news-grid { grid-template-columns: 1fr; gap: 12px; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-article-img { max-height: 200px; }
  .featured-article-body { padding: 18px 16px; }
  #site-nav { top: 58px; }

  /* Competitions page: narrower min so cards fit on phone */
  .competitions-grid { grid-template-columns: 1fr !important; }

  /* Player-of-week stats bar: stack on mobile */
  .potw-stats-bar { grid-template-columns: 1fr !important; }

  /* Fixtures: ensure match containers don't overflow page */
  #fixtures-container,

  /* Search autocomplete: stay within viewport */
  #search-autocomplete { left: 0; right: 0; max-width: 100vw; }

  /* Sidebar: full width when stacked */
  #sidebar { padding: 0; }
}
@media (max-width: 480px) {
  .btn { padding: 8px 14px; font-size: 0.8rem; }
  .match-score { min-width: 52px; padding: 4px 10px; font-size: 0.85rem; }
  .team-name { font-size: 0.78rem; }
}

/* ── Fade-in animation on scroll (progressive enhancement) ─────────────────── */
.news-card, .matches-widget, .sidebar-widget {
  animation: fadeUp 0.4s var(--ease) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Archive Pages ──────────────────────────────────────────────────────── */

.archive-page-header {
  padding: 32px 0 20px;
}
.archive-page-header h1 {
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0 0 6px;
}
.archive-page-header p {
  color: var(--clr-muted);
  font-size: 0.88rem;
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0 40px;
}
.archive-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--clr-white);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition), background var(--transition);
}
.archive-card:hover {
  border-color: var(--clr-primary);
  background: var(--clr-surface);
}
.archive-card-title {
  font-weight: 700;
  font-size: 0.9rem;
}
.archive-card-sub {
  font-size: 0.74rem;
  color: var(--clr-muted);
}
.archive-card-badge {
  font-size: 0.7rem;
  color: var(--clr-primary);
  font-weight: 700;
  margin-top: 2px;
}
.archive-league-section {
  margin-bottom: 32px;
}
.archive-league-title {
  font-size: 1rem;
  font-weight: 800;
  padding: 8px 0 12px;
  border-bottom: 2px solid var(--clr-border);
  margin-bottom: 14px;
  color: var(--clr-primary);
}
@media (max-width: 640px) {
  .archive-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .archive-card { padding: 10px 12px; }
  .archive-card-title { font-size: 0.82rem; }
}

#sidebar { display: flex; flex-direction: column; }
