/*
Theme Name: Kora Score
Theme URI: https://korascore.net
Author: Kora Score
Description: قالب كورة سكور: نفس شكل التطبيق (داكن وفاتح)، يعرض مباريات اليوم والنتائج المباشرة والأخبار. يعمل مع إضافة «كورة سكور – النتائج المباشرة».
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: korascore
Tags: rtl-language-support, dark-mode, news, sports
*/

:root, :root[data-theme="dark"] {
  --bg: #0A0E17;
  --surface: #121927;
  --surface-2: #1B2335;
  --line: rgba(255, 255, 255, .08);
  --ink: #F3F6FB;
  --muted: #8E99AE;
  --faint: #58637A;
  --live: #FF453A;
  --brand: #4C9BFF;
  --brand-soft: rgba(76, 155, 255, .13);
  --win: #30D158;
  --draw: #8E8E93;
  --r-lg: 14px;
  --top-bg: rgba(10, 14, 23, .86);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F2F5F9;
  --surface: #FFFFFF;
  --surface-2: #E9EEF5;
  --line: #E2E7EF;
  --ink: #0D1220;
  --muted: #667085;
  --faint: #A2AABA;
  --live: #E8384A;
  --brand: #1F6FEB;
  --brand-soft: rgba(31, 111, 235, .10);
  --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: #F2F5F9; --surface: #FFFFFF; --surface-2: #E9EEF5; --line: #E2E7EF; --ink: #0D1220; --muted: #667085; --faint: #A2AABA;
    --live: #E8384A; --brand: #1F6FEB; --brand-soft: rgba(31, 111, 235, .10); --win: #1F9D55; --draw: #9A9AA1; --top-bg: rgba(255, 255, 255, .9);
    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); }
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; }
.kst-skip { position: absolute; top: -40px; right: 12px; background: var(--brand); color: #fff; padding: 6px 12px; border-radius: 8px; z-index: 100; }
.kst-skip:focus { top: 8px; color: #fff; }
.kst-i { flex: none; }

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

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

/* cards */
.kst-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kst-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kst-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; }
.kst-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.kst-card-img { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.kst-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kst-card-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface-2), var(--brand-soft)); }
.kst-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kst-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; }
.kst-card time, .kst-meta time { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: auto; }
.kst-card time .kst-i, .kst-meta .kst-i { width: 14px; height: 14px; }
.kst-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 */
.kst-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.kst-crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.kst-article { min-width: 0; }
.kst-ahead h1 { font-size: clamp(23px, 3.2vw, 32px); margin: 10px 0 8px; }
.kst-meta { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.kst-hero-img { margin: 0 0 18px; border-radius: 18px; overflow: hidden; }
.kst-hero-img img { width: 100%; display: block; }
.kst-content { font-size: 17.5px; line-height: 1.95; }
.kst-content p { margin: 0 0 1.1em; }
.kst-content h2 { font-size: 22px; margin: 1.4em 0 .5em; }
.kst-content h3 { font-size: 19px; margin: 1.3em 0 .5em; }
.kst-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.kst-content img, .kst-content figure { border-radius: 14px; }
.kst-content figure { margin: 1.2em 0; }
.kst-content figcaption { font-size: 13px; color: var(--muted); text-align: center; }
.kst-content blockquote { margin: 1.2em 0; padding: 12px 16px; border-inline-start: 4px solid var(--brand); background: var(--surface); border-radius: 12px; }
.kst-content table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.kst-content th, .kst-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: center; }
.kst-content th { background: var(--surface-2); }
.kst-content ul, .kst-content ol { padding-inline-start: 1.4em; }
.kst-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.kst-tags a { font-size: 13px; padding: 4px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.kst-share { display: flex; align-items: center; gap: 8px; margin: 18px 0 20px; flex-wrap: wrap; }
.kst-share span { font-weight: 600; font-size: 14px; margin-inline-end: 4px; }
.kst-share a, .kst-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; }
.kst-share .is-wa:hover { color: #25D366; }
.kst-share .is-fb:hover { color: #1877F2; }
.kst-share .is-tg:hover { color: #2AABEE; }
.kst-copy.is-done { color: var(--win); border-color: var(--win); }

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

/* pagination, empty, 404 */
.kst-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; }
.kst-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; }
.kst-pages .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.kst-empty { text-align: center; padding: 48px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; }
.kst-empty.is-404 b { display: block; font-size: 72px; line-height: 1; color: var(--brand); }
.kst-empty h1 { color: var(--ink); margin-top: 10px; }
.kst-empty .kst-sform { max-width: 420px; margin: 16px auto; }
.kst-btn { display: inline-block; background: var(--brand); color: #fff !important; padding: 10px 20px; border-radius: 12px; font-weight: 700; }

/* comments */
.kst-comments { margin: 24px 0 0; }
.kst-clist { list-style: none; padding: 0; }
.kst-comments textarea, .kst-comments input[type=text], .kst-comments input[type=email], .kst-comments input[type=url] { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px; font: inherit; }
.kst-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) */
.kst-content input[type=text], .kst-content input[type=email], .kst-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; }
.kst-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 */
.kst-foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 20px; }
.kst-foot-in { max-width: 1180px; margin: 0 auto; padding: 28px 16px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.kst-foot-brand { max-width: 420px; }
.kst-foot-brand p { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.kst-flinks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.kst-flinks a { color: var(--muted); font-size: 14.5px; }
.kst-flinks a:hover { color: var(--brand); }
.kst-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 .kst-card { border-color: var(--brand); }

@media (max-width: 1024px) {
  .kst-cols { grid-template-columns: minmax(0, 1fr); }
  .kst-side { position: static; }
  .alignwide { margin-inline: 0; }
}
@media (max-width: 860px) {
  .kst-burger { display: grid; }
  .kst-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 .kst-nav { top: 110px; }
  .kst-nav-open .kst-nav { display: block; }
  .kst-menu { flex-direction: column; }
  .kst-menu a { font-size: 16px; padding: 11px 12px; }
  .kst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kst-top-in { gap: 10px; }
}
@media (max-width: 560px) {
  .kst-get span { display: none; }
  .kst-get { padding: 0; width: 40px; height: 40px; justify-content: center; }
  .kst-get.is-big { width: auto; padding: 10px 18px; }
  .kst-get.is-big span { display: flex; }
  .kst-name { font-size: 19px; }
  .kst-logo { width: 34px; height: 34px; }
  .kst-grid, .kst-grid.is-2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kst-wrap { padding-top: 14px; }
  .kst-content { font-size: 17px; }
}
