/* ============================================================
   كرة الأغواط | Laghouat Football — نظام التصميم (Design System)
   ============================================================
   Premium Football Website · RTL · Mobile First · Dark Mode
   الألوان مستوحاة من: الأغواط / الجزائر / الصحراء / كرة القدم
   ============================================================ */

/* ============ 1) CSS Variables — الوضع الفاتح ============ */
:root {
  --primary: #0a7d3e;
  --primary-soft: rgba(10, 125, 62, 0.12);
  --primary-dark: #075c2e;
  --secondary: #d1101a;
  --secondary-soft: rgba(209, 16, 26, 0.12);
  --accent: #ffb400;
  --accent-soft: rgba(255, 180, 0, 0.16);

  --background: #f4f7fb;
  --surface: #ffffff;
  --card: #ffffff;
  --surface-2: #eef2f8;
  --border: #e3e9f2;
  --border-strong: #c9d4e2;

  --text: #0e1726;
  --text-2: #45556b;
  --muted: #8494a8;

  --success: #0a7d3e;
  --warning: #e69500;
  --danger: #d1101a;
  --info: #1b6fd1;

  --shadow-sm: 0 1px 3px rgba(14, 23, 38, 0.08);
  --shadow-md: 0 6px 18px rgba(14, 23, 38, 0.09);
  --shadow-lg: 0 14px 40px rgba(14, 23, 38, 0.14);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  --maxw: 1200px;
  --header-h: 68px;

  --grad-brand: linear-gradient(135deg, #0f9d4f 0%, #087a3a 55%, #065a2a 100%);
  --grad-hero: linear-gradient(140deg, #064a26 0%, #0a7d3e 55%, #10b254 100%);
  --grad-gold: linear-gradient(135deg, #ffc63d 0%, #ffb400 50%, #e69500 100%);

  --bg-noise: radial-gradient(circle at 80% -10%, rgba(255, 180, 0, 0.14), transparent 45%),
              radial-gradient(circle at 10% 110%, rgba(16, 178, 84, 0.16), transparent 45%);
}

/* ============ الوضع الليلي ============ */
[data-theme="dark"] {
  --primary: #12b25b;
  --primary-soft: rgba(18, 178, 91, 0.16);
  --primary-dark: #0f9d4f;
  --secondary: #ff4d55;
  --secondary-soft: rgba(255, 77, 85, 0.15);
  --accent: #ffc63d;
  --accent-soft: rgba(255, 198, 61, 0.15);

  --background: #0b1120;
  --surface: #111a2e;
  --card: #141f36;
  --surface-2: #0f1729;
  --border: #22304c;
  --border-strong: #33415f;

  --text: #e8eef8;
  --text-2: #aebbd0;
  --muted: #7c8aa3;

  --success: #21c464;
  --warning: #ffb800;
  --danger: #ff5a62;
  --info: #4d9fff;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.5);

  --bg-noise: radial-gradient(circle at 80% -10%, rgba(255, 198, 61, 0.08), transparent 45%),
              radial-gradient(circle at 10% 110%, rgba(18, 178, 91, 0.1), transparent 45%);
}

/* ============ 2) Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  font-size: 15.5px;
  transition: background .25s ease, color .25s ease;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg-noise);
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.35; font-weight: 800; }
p { margin: 0 0 12px; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }
::selection { background: var(--accent); color: #101820; }

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

.skip-link {
  position: absolute; top: -60px; right: 12px;
  background: var(--primary); color: #fff; padding: 8px 16px;
  border-radius: var(--radius-sm); z-index: 1000; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 18px; }

.muted { color: var(--muted); }
.hidden { display: none !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; }

/* ============ 3) Header & Navigation ============ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; color: var(--text); white-space: nowrap; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand small { display: block; font-size: 9px; font-weight: 700; color: var(--primary); letter-spacing: 1.6px; margin-top: -2px; }

.main-nav { display: flex; gap: 2px; margin-inline-start: 8px; }
.main-nav a {
  padding: 8px 13px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; color: var(--text-2);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.main-nav a.active { color: var(--primary); background: var(--primary-soft); }

.header-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

.burger { display: none; }

/* البحث */
.search-box {
  display: none; position: absolute; inset-inline: 0; top: var(--header-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 14px; box-shadow: var(--shadow-lg); z-index: 190;
}
.search-box.open { display: block; }
.search-box input {
  width: 100%; padding: 12px 44px 12px 44px; border: 1.5px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2); font-size: 15px;
}
.search-box input:focus { outline: none; border-color: var(--primary); }
.search-ic { position: absolute; inset-inline-start: 28px; top: 28px; color: var(--muted); }
.search-ic svg { width: 19px; height: 19px; }
.close-ic { position: absolute; inset-inline-end: 26px; top: 26px; color: var(--muted); }
.close-ic svg { width: 20px; height: 20px; }
.search-results {
  position: absolute; top: 74px; inset-inline: 14px; max-height: 60vh; overflow: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 200;
}
.search-results a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); transition: background .12s; }
.search-results a:hover { background: var(--surface-2); }
.search-results img { width: 38px; height: 38px; border-radius: var(--radius-sm); object-fit: cover; }
.sr-text { font-weight: 700; font-size: 14px; line-height: 1.3; }
.sr-text small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

/* قائمة الهاتف */
.mobile-menu {
  position: fixed; inset: 0; z-index: 300;
  background: var(--surface); display: flex; flex-direction: column;
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.mobile-menu nav { padding: 12px; display: grid; gap: 4px; overflow-y: auto; }
.mobile-menu nav a { padding: 13px 14px; border-radius: var(--radius); font-weight: 800; font-size: 15px; color: var(--text-2); }
.mobile-menu nav a:hover { background: var(--primary-soft); color: var(--primary); }

/* ============ 4) Hero ============ */
.hero {
  position: relative; overflow: hidden;
  margin-top: 22px;
  border-radius: var(--radius-lg);
  background: var(--grad-hero);
  color: #fff;
  min-height: 300px;
  display: flex; align-items: center;
  box-shadow: var(--shadow-lg);
}
.hero-bg { position: absolute; inset: 0; opacity: .16; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 180, 0, .35), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,.12), transparent 40%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; padding: 42px 30px; max-width: 620px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 12.5px; font-weight: 800;
  padding: 6px 14px; border-radius: var(--radius-pill);
  backdrop-filter: blur(4px); margin-bottom: 16px;
}
.hero-title { font-size: clamp(26px, 5vw, 42px); font-weight: 900; margin-bottom: 10px; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero-sub { font-size: clamp(14px, 2.4vw, 17px); opacity: .94; margin-bottom: 22px; line-height: 1.8; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ 5) Sections ============ */
.section { padding: 30px 0 6px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title h2 {
  font-size: clamp(18px, 3vw, 22px);
  display: flex; align-items: center; gap: 10px;
}
.section-title h2::before { content: ''; width: 5px; height: 24px; border-radius: 4px; background: var(--grad-gold); }
.link-more { font-size: 13px; font-weight: 800; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.link-more:hover { color: var(--secondary); }
.link-more::after { content: '←'; transition: transform .15s; }
.link-more:hover::after { transform: translateX(-3px); }

/* ============ 6) Buttons & Badges ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius); font-weight: 800; font-size: 14.5px;
  border: 1.5px solid transparent; transition: all .18s ease; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 14px rgba(10, 125, 62, .35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { filter: brightness(1.08); }
.btn-accent { background: var(--grad-gold); color: #101820; }
.btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 800; padding: 3px 11px;
  border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-2);
}
.badge-green { background: var(--primary-soft); color: var(--primary); }
.badge-red { background: var(--secondary-soft); color: var(--secondary); }
.badge-gold { background: var(--accent-soft); color: var(--warning); }
.badge-live { background: var(--danger); color: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.points-pill { background: var(--grad-brand); color: #fff; font-weight: 900; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 13px; }

/* ============ 7) Match Cards ============ */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.match-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.match-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.match-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.round { color: var(--muted); font-weight: 700; }
.match-status { font-weight: 800; font-size: 11.5px; padding: 2px 10px; border-radius: var(--radius-pill); }
.match-status.finished { background: var(--primary-soft); color: var(--primary); }
.match-status.upcoming { background: var(--accent-soft); color: var(--warning); }
.match-status.live { background: var(--danger); color: #fff; animation: pulse 1.6s infinite; }
.match-status.half_time { background: var(--secondary-soft); color: var(--secondary); }
.match-status.cancelled { background: var(--surface-2); color: var(--muted); }
.match-status.postponed { background: var(--surface-2); color: var(--muted); }

.match-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.match-team { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 34%; }
.match-team img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: var(--surface-2); padding: 5px; }
.t-name { font-size: 12.5px; font-weight: 800; text-align: center; line-height: 1.35; min-height: 34px; }

.match-score { display: flex; align-items: center; gap: 6px; font-weight: 900; }
.match-score .mh { font-size: 21px; color: var(--text); min-width: 30px; text-align: center; }
.match-score .sep { color: var(--muted); }
.match-score .vs { color: var(--muted); font-size: 13px; background: var(--surface-2); padding: 4px 10px; border-radius: var(--radius-pill); }

.match-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 11.5px; color: var(--muted);
}
.match-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.match-foot svg { width: 13px; height: 13px; }
.m-date { min-width: 0; }
.m-date span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }

/* ============ 8) Team Cards ============ */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.team-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 16px 18px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.team-card img { width: 64px; height: 64px; object-fit: contain; }
.team-card h3 { font-size: 15px; }
.team-card p { color: var(--muted); font-size: 12.5px; margin: 0; }
.team-rank { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--grad-gold); color: #101820; font-size: 11px; font-weight: 900; padding: 2px 9px; border-radius: var(--radius-pill); }
.tc-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* ============ 9) News Cards ============ */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.news-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-thumb .ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 40px; }
.news-cat { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--grad-brand); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 11px; border-radius: var(--radius-pill); }
.news-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.news-body h3 { font-size: 15.5px; line-height: 1.5; margin-bottom: 8px; }
.news-body h3 a { transition: color .15s; }
.news-body h3 a:hover { color: var(--primary); }
.news-excerpt { color: var(--text-2); font-size: 13px; flex: 1; margin-bottom: 12px; }
.news-meta { display: flex; gap: 14px; color: var(--muted); font-size: 11.5px; padding-top: 10px; border-top: 1px dashed var(--border); }
.news-meta span { display: inline-flex; align-items: center; gap: 5px; }
.news-meta svg { width: 13px; height: 13px; }

/* ============ 10) Standings Table ============ */
.table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.standings { width: 100%; border-collapse: collapse; min-width: 640px; }
table.standings thead th {
  background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800;
  padding: 12px 10px; text-align: center; white-space: nowrap; position: sticky; top: 0;
}
table.standings thead th:first-child, table.standings thead th:nth-child(2) { text-align: right; }
table.standings tbody td { padding: 11px 10px; text-align: center; border-top: 1px solid var(--border); font-size: 13.5px; white-space: nowrap; }
table.standings tbody td:first-child { text-align: right; }
table.standings tbody tr { transition: background .12s; }
table.standings tbody tr:hover { background: var(--surface-2); }
table.standings tbody tr.leader { background: var(--primary-soft); }
table.standings tbody tr.promotion td.pos { color: var(--primary); font-weight: 900; }
.pos { font-weight: 800; color: var(--muted); }
.team-cell { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.team-cell img { width: 26px; height: 26px; object-fit: contain; }
.team-cell a:hover { color: var(--primary); }

/* ============ 11) Stats Row ============ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 14px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-card .num { font-size: 28px; font-weight: 900; color: var(--primary); line-height: 1.2; }
.stat-card .lbl { color: var(--muted); font-size: 12.5px; font-weight: 700; margin-top: 4px; }

/* ============ 12) Footer ============ */
.site-footer { margin-top: 44px; background: var(--surface); border-top: 1px solid var(--border); }
.site-footer .container { padding-block: 40px 22px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 28px; }
.footer-about p { color: var(--muted); font-size: 13px; margin: 12px 0 16px; }
.site-footer h4 { font-size: 14px; margin-bottom: 14px; color: var(--text); }
.site-footer h4::after { content: ''; display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--grad-gold); margin-top: 6px; }
.site-footer .footer-grid > div > a { display: block; color: var(--text-2); font-size: 13px; padding: 5px 0; transition: color .15s; }
.site-footer .footer-grid > div > a:hover { color: var(--primary); }
.social-links { display: flex; gap: 8px; }
.social-links a {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); transition: all .15s;
}
.social-links a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.social-links svg { width: 17px; height: 17px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1; min-width: 0; padding: 10px 13px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px;
}
.newsletter-form input:focus { outline: none; border-color: var(--primary); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding-top: 20px; margin-top: 30px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12.5px;
}

/* ============ 13) Forms ============ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 800; font-size: 13.5px; margin-bottom: 7px; color: var(--text-2); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2); transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); background: var(--surface); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-check { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; cursor: pointer; }
.form-check input { width: 17px; height: 17px; accent-color: var(--primary); }

/* ============ 14) Page Header / Breadcrumbs / Filters ============ */
.page-head { padding: 30px 0 6px; }
.page-head .crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.page-head .crumbs a:hover { color: var(--primary); }
.page-head h1 { font-size: clamp(22px, 4vw, 30px); display: flex; align-items: center; gap: 12px; }
.page-head h1::before { content: ''; width: 6px; height: 30px; border-radius: 4px; background: var(--grad-gold); }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.filter-btn {
  padding: 8px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 800;
  border: 1.5px solid var(--border); color: var(--text-2); background: var(--card); transition: all .15s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(10,125,62,.3); }

/* ============ 15) Modal / Toast / Skeleton / Empty ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 400; display: none;
  background: rgba(8, 14, 24, .55); backdrop-filter: blur(3px); padding: 18px;
}
.modal-overlay.open { display: flex; align-items: center; justify-content: center; }
.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 24px; animation: slideIn .2s ease;
}
.modal-sm { max-width: 400px; }
.modal h3 { margin-bottom: 8px; font-size: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.toast-wrap { position: fixed; bottom: 20px; inset-inline: 0; z-index: 500; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-inline-start: 4px solid var(--primary);
  padding: 12px 18px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-weight: 700; font-size: 14px; max-width: 92%;
}
.toast.error { border-inline-start-color: var(--danger); }
.toast.warn { border-inline-start-color: var(--warning); }

.state-empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.state-empty svg { width: 46px; height: 46px; margin: 0 auto 10px; opacity: .5; }
.state-empty h3 { color: var(--text-2); margin-bottom: 4px; font-size: 16px; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============ 16) Match Page ============ */
.match-hero {
  background: var(--grad-hero); color: #fff; border-radius: var(--radius-lg);
  padding: 30px 22px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.match-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 10%, rgba(255,180,0,.3), transparent 45%); pointer-events: none; }
.match-vs { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 2; }
.match-vs-team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.match-vs-team img { width: 70px; height: 70px; object-fit: contain; background: rgba(255,255,255,.16); border-radius: 16px; padding: 8px; }
.match-vs-team b { font-size: 15.5px; }
.match-vs-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 110px; }
.match-big-score { font-size: 40px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.match-big-score span { color: #fff; text-shadow: 0 3px 16px rgba(0,0,0,.3); }
.match-vs-center .vs-tag { background: rgba(255,255,255,.18); padding: 3px 14px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 800; }
.match-meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; position: relative; z-index: 2; }
.match-meta .meta-chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); padding: 6px 14px; border-radius: var(--radius-pill); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.match-meta svg { width: 14px; height: 14px; }

.layout-side { display: grid; grid-template-columns: 1fr 320px; gap: 22px; margin-top: 22px; }
.timeline { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.timeline h3 { margin-bottom: 16px; font-size: 16px; }
.ev-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.ev-item:last-child { border-bottom: 0; }
.ev-minute { background: var(--surface-2); color: var(--text-2); font-weight: 900; font-size: 12px; padding: 3px 9px; border-radius: var(--radius-sm); min-width: 44px; text-align: center; }
.ev-icon { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.ev-icon.goal, .ev-icon.penalty, .ev-icon.own_goal { background: var(--primary-soft); }
.ev-icon.yellow_card { background: var(--accent-soft); color: #b98a00; }
.ev-icon.red_card { background: var(--secondary-soft); color: var(--danger); }
.ev-icon.substitution, .ev-icon.var { background: var(--surface-2); color: var(--text-2); }
.ev-text { flex: 1; min-width: 0; }
.ev-text b { display: block; font-size: 13px; }
.ev-text small { color: var(--muted); font-size: 11.5px; }

.stat-bars { display: grid; gap: 14px; }
.stat-bar-row { display: grid; grid-template-columns: 46px 1fr 46px; gap: 10px; align-items: center; font-size: 13px; font-weight: 800; }
.stat-bar-row .team-stat-name { color: var(--text-2); font-size: 12.5px; text-align: center; }
.bar-track { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar-track > span { height: 100%; }
.bar-home { background: var(--primary); border-start-start-radius: 8px; border-end-start-radius: 8px; }
.bar-away { background: var(--secondary); border-start-end-radius: 8px; border-end-end-radius: 8px; }

.side-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.side-card h3 { font-size: 15px; margin-bottom: 12px; }
.side-card h3::after { content: ''; display: block; width: 24px; height: 3px; border-radius: 3px; background: var(--grad-gold); margin-top: 6px; }
.side-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.side-list li:last-child { border-bottom: 0; }
.side-list a:hover { color: var(--primary); }
.side-list .li-main { display: block; font-weight: 800; }
.side-list .li-sub { color: var(--muted); font-size: 11.5px; }

/* ============ 17) Rounds / Scorers / Teams pages ============ */
.rounds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.round-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s; }
.round-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.round-card.current { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.round-card .rc-num { font-size: 24px; font-weight: 900; color: var(--primary); }
.round-card.current .rc-num { color: var(--warning); }
.round-card h3 { font-size: 15px; margin: 6px 0 4px; }
.round-card p { color: var(--muted); font-size: 12.5px; margin: 0; }

.scorers-list { display: grid; gap: 10px; }
.scorer-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow-sm);
}
.scorer-rank { font-size: 16px; font-weight: 900; color: var(--accent); min-width: 30px; }
.scorer-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--primary); overflow: hidden; }
.scorer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.scorer-info { flex: 1; min-width: 0; }
.scorer-info b { display: block; }
.scorer-info small { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.scorer-info small img { width: 16px; height: 16px; object-fit: contain; }
.scorer-stats { display: flex; gap: 8px; }
.scorer-stats .pill { background: var(--primary-soft); color: var(--primary); font-weight: 900; padding: 4px 13px; border-radius: var(--radius-pill); font-size: 13.5px; }

/* ============ 18) Single News ============ */
.article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.article-hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.article-body { padding: 26px 24px; }
.article-body h1 { font-size: clamp(21px, 4vw, 30px); margin-bottom: 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12.5px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); margin-bottom: 18px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 14px; height: 14px; }
.article-content { font-size: 16px; line-height: 2; color: var(--text-2); }
.article-content p { margin-bottom: 16px; }
.article-content img { border-radius: var(--radius); margin: 14px 0; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border); }

/* ============ 19) Pagination ============ */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0 8px; flex-wrap: wrap; }
.page-btn { min-width: 40px; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--card); font-weight: 800; font-size: 13.5px; color: var(--text-2); transition: all .15s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--grad-brand); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============ 20) Responsive ============ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .layout-side { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .hero { min-height: 250px; border-radius: var(--radius); }
  .hero-content { padding: 30px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .match-vs-team img { width: 56px; height: 56px; }
  .match-big-score { font-size: 32px; }
  .match-vs-center { min-width: 92px; }
  .brand small { display: none; }
}
@media (max-width: 400px) {
  .match-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .news-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .header-tools { gap: 2px; }
  .hero-actions .btn { width: 100%; }
}

/* ============ 22) مكوّنات إضافية (Pages) ============ */
.featured-news {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: 20px;
}
.fn-thumb { position: relative; display: block; min-height: 220px; background: var(--surface-2); }
.fn-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fn-thumb .ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 56px; }
.fn-thumb .badge { position: absolute; top: 12px; inset-inline-start: 12px; }
.fn-body { padding: 22px; display: flex; flex-direction: column; }
.fn-body .news-cat { align-self: flex-start; margin-bottom: 12px; }
.fn-body h2 { font-size: clamp(17px, 3vw, 23px); line-height: 1.5; margin-bottom: 10px; }
.fn-body h2 a:hover { color: var(--primary); }
.fn-body .news-excerpt { font-size: 14px; }
.fn-body .news-meta { margin-top: auto; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; color: var(--text-2);
}
.chip svg { width: 14px; height: 14px; }

/* أعمدة اللاعبين */
.players-list { display: grid; gap: 10px; }
.player-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 16px; box-shadow: var(--shadow-sm);
}
.pl-num {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 900; font-size: 15px; border-radius: var(--radius-sm);
}
.pl-name { font-weight: 800; }
.pl-pos { color: var(--muted); font-size: 12px; }
.pl-goals { margin-inline-start: auto; text-align: center; }
.pl-goals strong { display: block; color: var(--primary); font-size: 18px; }
.pl-goals small { font-size: 11px; }

/* وسيلة إيضاح الترتيب */
.legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 16px 4px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* مقال الخبر */
.article-cat { align-self: flex-start; }
.post-cover { aspect-ratio: 21/9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin-bottom: 20px; display: flex; align-items: center; justify-content: center; font-size: 60px; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12.5px; margin-bottom: 18px; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta svg { width: 14px; height: 14px; }
.content-area { font-size: 16px; line-height: 2.05; color: var(--text-2); }
.content-area p { margin-bottom: 16px; }
.content-area img { border-radius: var(--radius); margin: 12px 0; }
.share-row { display: flex; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--border); }
.share-row a { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); transition: all .15s; }
.share-row a:hover { background: var(--primary); color: #fff; }
.share-row svg { width: 17px; height: 17px; }

/* حقول التصفية */
.news-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.news-toolbar .search-input { position: relative; flex: 1; min-width: 220px; }
.news-toolbar .search-input input { width: 100%; padding: 10px 40px 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--card); }
.news-toolbar .search-input input:focus { outline: none; border-color: var(--primary); }
.news-toolbar .search-input svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }

.club-head { display: flex; align-items: center; gap: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.club-head img { width: 92px; height: 92px; object-fit: contain; background: var(--surface-2); border-radius: 20px; padding: 10px; }
.club-head h1 { font-size: clamp(20px, 4vw, 28px); margin-bottom: 4px; }
.club-head .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 640px) {
  .featured-news { grid-template-columns: 1fr; }
  .fn-thumb { min-height: 180px; }
  .club-head { flex-direction: column; text-align: center; }
  .club-head .chips { justify-content: center; }
}

/* ============ 23) Reduced motion / accessibility ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
