/*
Theme Name: Sport News
Author: Sport News
Description: قالب إخباري رياضي داكن وفاتح: آخر الأخبار وأهداف وملخصات المباريات، مع مكان لجدول المباريات أعلى الرئيسية. اسم الموقع يُكتب من الإعدادات العامة.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sportnews
Tags: rtl-language-support, dark-mode, news, sports
*/

:root, :root[data-theme="dark"] {
  --bg: #111214;
  --surface: #1A1C20;
  --surface-2: #22252A;
  --line: rgba(255, 255, 255, .07);
  --ink: #F2F2F0;
  --muted: #9A9C9F;
  --faint: #63666B;
  --live: #FF4A3D;
  --brand: #E0313F;
  --brand-ink: #FF5A66;
  --brand-soft: rgba(224, 49, 63, .12);
  --win: #2FBF71;
  --draw: #8E8E93;
  --r-lg: 14px;
  --top-bg: rgba(17, 18, 20, .92);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F4F1;
  --surface: #FFFFFF;
  --surface-2: #EDECE8;
  --line: #E3E1DC;
  --ink: #16171A;
  --muted: #6A6C70;
  --faint: #A4A6AA;
  --live: #D7263D;
  --brand: #D42A38;
  --brand-ink: #C0202E;
  --brand-soft: rgba(212, 42, 56, .09);
  --win: #1F9D55;
  --draw: #9A9AA1;
  --top-bg: rgba(255, 255, 255, .9);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F5F4F1; --surface: #FFFFFF; --surface-2: #EDECE8; --line: #E3E1DC; --ink: #16171A; --muted: #6A6C70; --faint: #A4A6AA;
    --live: #D7263D; --brand: #D42A38; --brand-ink: #C0202E; --brand-soft: rgba(212, 42, 56, .09); --win: #1F9D55; --draw: #9A9AA1; --top-bg: rgba(255, 255, 255, .92);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-ink); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.snt-skip { position: absolute; top: -40px; right: 12px; background: var(--brand); color: #fff; padding: 6px 12px; border-radius: 8px; z-index: 100; }
.snt-skip:focus { top: 8px; color: #fff; }
.snt-i { flex: none; }

/* header */
.snt-top { position: sticky; top: 0; z-index: 50; background: var(--top-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 2px solid var(--brand); }
.admin-bar .snt-top { top: 32px; }
@media (max-width: 782px) { .admin-bar .snt-top { top: 0; } }
.snt-top-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 18px; }
.snt-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.snt-brand:hover { color: inherit; }
.snt-logo { width: 38px; height: 38px; border-radius: 11px; }
.snt-name { font-weight: 800; font-size: 22px; letter-spacing: -.2px; }
.snt-name em { font-style: normal; color: var(--brand); }
.snt-nav { flex: 1; min-width: 0; }
.snt-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.snt-menu a { display: block; padding: 7px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; }
.snt-menu a:hover, .snt-menu .current-menu-item > a, .snt-menu .current_page_item > a { color: var(--ink); background: var(--surface-2); }
.snt-menu .sub-menu { display: none; }
.snt-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.snt-ib { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.snt-ib:hover { color: var(--brand); }
.snt-burger { display: none; }
.snt-theme-btn .is-light { display: none; }
:root[data-theme="light"] .snt-theme-btn .is-light { display: block; }
:root[data-theme="light"] .snt-theme-btn .is-dark { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .snt-theme-btn .is-light { display: block; }
  :root:not([data-theme="dark"]) .snt-theme-btn .is-dark { display: none; }
}
.snt-get { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff !important; font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 12px; white-space: nowrap; }
.snt-get .snt-i { width: 16px; height: 16px; }
.snt-get:hover { filter: brightness(1.08); }
.snt-get.is-big { padding: 10px 18px; font-size: 17px; }
.snt-get.is-big span { display: flex; flex-direction: column; line-height: 1.25; }
.snt-get.is-big small { font-size: 11.5px; font-weight: 500; opacity: .9; }
.snt-searchbar { border-top: 1px solid var(--line); }
.snt-searchbar .snt-top-in { height: auto; padding-top: 10px; padding-bottom: 10px; }
.snt-sform { display: flex; gap: 8px; width: 100%; }
.snt-sform input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px; font: inherit; }
.snt-sform button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* layout */
.snt-main { min-height: 60vh; }
.snt-wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 32px; }
.snt-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.snt-side { position: sticky; top: 84px; }
.snt-sec { margin: 0 0 28px; }
.snt-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.snt-sec-head h2 { font-size: 20px; margin: 0; padding-inline-start: 12px; border-inline-start: 4px solid var(--brand); line-height: 1.2; }
.snt-sec-head a { font-size: 14px; font-weight: 600; color: var(--brand-ink); }
.snt-phead { margin: 0 0 16px; }
.snt-phead h1 { font-size: clamp(22px, 3vw, 30px); }
.snt-desc { color: var(--muted); }

/* cards */
.snt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.snt-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.snt-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.snt-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.snt-card-img { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.snt-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snt-card-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface-2), var(--brand-soft)); }
.snt-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.snt-card h3 { font-size: 15.5px; line-height: 1.55; margin: 0; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.snt-card time, .snt-meta time { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: auto; }
.snt-card time .snt-i, .snt-meta .snt-i { width: 14px; height: 14px; }
.snt-chip { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 2px 10px; border-radius: 99px; }

/* article */
.snt-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.snt-crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.snt-article { min-width: 0; }
.snt-ahead h1 { font-size: clamp(23px, 3.2vw, 32px); margin: 10px 0 8px; }
.snt-meta { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.snt-hero-img { margin: 0 0 18px; border-radius: 18px; overflow: hidden; }
.snt-hero-img img { width: 100%; display: block; }
.snt-content { font-size: 17.5px; line-height: 1.95; }
.snt-content p { margin: 0 0 1.1em; }
.snt-content h2 { font-size: 22px; margin: 1.4em 0 .5em; }
.snt-content h3 { font-size: 19px; margin: 1.3em 0 .5em; }
.snt-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.snt-content img, .snt-content figure { border-radius: 14px; }
.snt-content figure { margin: 1.2em 0; }
.snt-content figcaption { font-size: 13px; color: var(--muted); text-align: center; }
.snt-content blockquote { margin: 1.2em 0; padding: 12px 16px; border-inline-start: 4px solid var(--brand); background: var(--surface); border-radius: 12px; }
.snt-content table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.snt-content th, .snt-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: center; }
.snt-content th { background: var(--surface-2); }
.snt-content ul, .snt-content ol { padding-inline-start: 1.4em; }
.snt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.snt-tags a { font-size: 13px; padding: 4px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.snt-share { display: flex; align-items: center; gap: 8px; margin: 18px 0 20px; flex-wrap: wrap; }
.snt-share span { font-weight: 600; font-size: 14px; margin-inline-end: 4px; }
.snt-share a, .snt-share button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.snt-share .is-wa:hover { color: #25D366; }
.snt-share .is-fb:hover { color: #1877F2; }
.snt-share .is-tg:hover { color: #2AABEE; }
.snt-copy.is-done { color: var(--win); border-color: var(--win); }

/* sidebar */
.snt-widget { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 16px; }
.snt-widget-title { font-size: 16px; margin: 0 0 12px; }
.snt-widget .scp-lgrid { grid-template-columns: 1fr; gap: 6px; }
.snt-widget .scp-lgc { padding: 7px 10px; border-radius: 12px; background: var(--bg); font-size: 14px; }
.snt-widget .scp-lgc img { width: 26px; height: 26px !important; }
.snt-wmore { display: block; text-align: center; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--brand); }
.snt-widget ul { margin: 0; padding: 0; list-style: none; }
.snt-mini li { border-top: 1px solid var(--line); }
.snt-mini li:first-child { border-top: 0; }
.snt-mini a { display: flex; gap: 10px; padding: 9px 0; align-items: flex-start; }
.snt-mini img { width: 84px; height: 54px; object-fit: cover; border-radius: 10px; flex: none; }
.snt-mini span { font-size: 14px; font-weight: 600; line-height: 1.55; display: flex; flex-direction: column; gap: 3px; }
.snt-mini small { font-weight: 400; color: var(--muted); font-size: 12px; }

/* pagination, empty, 404 */
.snt-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; }
.snt-pages .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.snt-pages .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.snt-empty { text-align: center; padding: 48px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; }
.snt-empty.is-404 b { display: block; font-size: 72px; line-height: 1; color: var(--brand); }
.snt-empty h1 { color: var(--ink); margin-top: 10px; }
.snt-empty .snt-sform { max-width: 420px; margin: 16px auto; }
.snt-btn { display: inline-block; background: var(--brand); color: #fff !important; padding: 10px 20px; border-radius: 12px; font-weight: 700; }

/* comments */
.snt-comments { margin: 24px 0 0; }
.snt-clist { list-style: none; padding: 0; }
.snt-comments textarea, .snt-comments input[type=text], .snt-comments input[type=email], .snt-comments input[type=url] { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px; font: inherit; }
.snt-comments input[type=submit] { background: var(--brand); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; }

/* forms of pages (contact form 7) */
.snt-content input[type=text], .snt-content input[type=email], .snt-content textarea { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 12px; font: inherit; margin-top: 4px; }
.snt-content input[type=submit] { background: var(--brand); color: #fff; border: 0; border-radius: 12px; padding: 10px 22px; font: inherit; font-weight: 700; cursor: pointer; }

/* footer */
.snt-foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 20px; }
.snt-foot-in { max-width: 1180px; margin: 0 auto; padding: 28px 16px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.snt-foot-brand { max-width: 420px; }
.snt-foot-brand p { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.snt-flinks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.snt-flinks a { color: var(--muted); font-size: 14.5px; }
.snt-flinks a:hover { color: var(--brand-ink); }
.snt-fcols { display: grid; grid-template-columns: repeat(4, auto); gap: 18px 36px; }
@media (min-width: 901px) { .snt-foot-in { flex-wrap: nowrap; } .snt-foot-brand { max-width: 320px; } }
.snt-fcol h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--brand); }
.snt-fcol ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.snt-fcol a { color: var(--muted); font-size: 14px; }
.snt-fcol a:hover { color: var(--ink); }
.snt-fcol .snt-flinks { flex-direction: column; gap: 10px; }
@media (max-width: 900px) { .snt-foot-in { flex-direction: column; } .snt-fcols { grid-template-columns: 1fr 1fr; gap: 22px 18px; } }
.snt-copy-line { text-align: center; color: var(--muted); font-size: 13px; padding: 14px 16px; border-top: 1px solid var(--line); }

/* WordPress bits */
.alignwide { margin-inline: -40px; }
.wp-caption-text { font-size: 13px; color: var(--muted); }
.sticky .snt-card { border-color: var(--brand); }

@media (max-width: 1024px) {
  .snt-cols { grid-template-columns: minmax(0, 1fr); }
  .snt-side { position: static; }
  .alignwide { margin-inline: 0; }
}
@media (max-width: 860px) {
  .snt-burger { display: grid; }
  .snt-nav { position: fixed; inset: 64px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; max-height: calc(100vh - 64px); overflow: auto; }
  .admin-bar .snt-nav { top: 110px; }
  .snt-nav-open .snt-nav { display: block; }
  .snt-menu { flex-direction: column; }
  .snt-menu a { font-size: 16px; padding: 11px 12px; }
  .snt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snt-top-in { gap: 10px; }
}
@media (max-width: 560px) {
  .snt-get span { display: none; }
  .snt-get { padding: 0; width: 40px; height: 40px; justify-content: center; }
  .snt-get.is-big { width: auto; padding: 10px 18px; }
  .snt-get.is-big span { display: flex; }
  .snt-name { font-size: 19px; }
  .snt-logo { width: 34px; height: 34px; }
  .snt-grid, .snt-grid.is-2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .snt-wrap { padding-top: 14px; }
  .snt-content { font-size: 17px; }
}


/* 1.0.6: smoother mobile — nothing wider than the screen, an app-like bottom bar, softer cards */
html, body { overflow-x: clip; }
body { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
.snt-bnav { display: none; }
@media (max-width: 860px) {
  .snt-bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 60;
    background: var(--top-bg); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .snt-bnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
  .snt-bnav a .snt-i { width: 23px; height: 23px; }
  .snt-bnav a.is-on { color: var(--brand); }
  .snt-bnav a:active { transform: scale(.94); }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .snt-top .snt-get { display: none; }
  .snt-top-in { height: 58px; gap: 10px; }
  .snt-nav { inset: 58px 0 auto 0; }
  .snt-ib { width: 38px; height: 38px; border-radius: 11px; border: 0; background: var(--surface-2); }
  .snt-wrap { padding: 14px 12px 24px; }
  .snt-name { font-size: 19px; }
  .snt-logo { width: 34px; height: 34px; }
}

/* the "فانتازي الدوري المصري" page (page-fantasy.php): the plugin's block, plus any text written in the editor */
.snt-fz-page > p, .snt-fz-page > h2, .snt-fz-page > h3, .snt-fz-page > ul { max-width: 860px; }
.snt-fz-page > p { font-size: 16.5px; line-height: 1.9; margin: 0 0 1em; }
.snt-fz-page > h2 { font-size: 22px; margin: 1.2em 0 .5em; }

/* ---------- home: the table slot (any widget / shortcode, e.g. a matches-table plugin) */
.snt-hometop { margin-bottom: 22px; }
.snt-hometop .snt-widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin: 0 0 14px; }
.snt-hometop .snt-widget-title { font-size: 18px; margin: 0 0 10px; padding-inline-start: 10px; border-inline-start: 3px solid var(--brand); }
