/* ============================================================
   سياق العالم — SIYAQ ALALAM (siyaqalalam.com)
   نظام التصميم: عربي RTL، وضع فاتح/داكن، هوية كحلية وذهبية
   ============================================================ */

/* ---------- المتغيرات ---------- */
:root{
  --brand:      #123356;
  --brand-dark: #0B2440;
  --brand-soft: rgba(18,51,86,.08);
  --gold:       #D9B64E;
  --bg:         #F8F7F4;
  --bg-alt:     #FFFFFF;
  --card:       #FFFFFF;
  --ink:        #1A1C1B;
  --ink-2:      #4E5350;
  --ink-3:      #8B908C;
  --line:       #E6E6E0;
  --line-2:     #D7D7D0;
  --chip:       #F0F0EA;
  --footer-bg:  #0B1826;
  --footer-ink: #C9D4DE;
  --shadow:     0 1px 2px rgba(18,32,27,.05), 0 8px 24px -12px rgba(18,32,27,.12);
  --shadow-lg:  0 2px 6px rgba(18,32,27,.08), 0 18px 44px -16px rgba(18,32,27,.18);
  --header-ink: #FFFFFF;
  --radius:    12px;
  --radius-lg: 18px;
  --container:  1240px;
  --font: 'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
  /* توافق أسماء قديمة داخل لوحة التحكم */
  --red: var(--brand);
  --red-dark: var(--brand-dark);
  --red-soft: var(--brand-soft);
}
html[data-theme="dark"]{
  --bg:        #0F1211;
  --bg-alt:    #161A18;
  --card:      #1A1F1D;
  --ink:       #ECEDEB;
  --ink-2:     #B2B7B4;
  --ink-3:     #7C827E;
  --line:      #282E2B;
  --line-2:    #363D3A;
  --chip:      #222825;
  --brand-soft:rgba(18,51,86,.28);
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.5);
  --shadow-lg:  0 2px 6px rgba(0,0,0,.5), 0 18px 44px -16px rgba(0,0,0,.6);
  --footer-bg:  #081120;
}

/* ---------- الأساسيات ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font);
  background:var(--bg);
  color:var(--ink);
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
::selection{ background:var(--brand); color:#fff; }

.container{ max-width:var(--container); margin-inline:auto; padding-inline:20px; }

.skip-link{
  position:fixed; inset-inline-start:12px; top:-48px; z-index:200;
  background:var(--brand); color:#fff; padding:8px 16px; border-radius:8px;
  font-weight:700; transition:top .2s;
}
.skip-link:focus{ top:12px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline:2px solid var(--brand); outline-offset:2px; border-radius:6px;
}

/* ============================================================
   الترويسة
   ============================================================ */
.site-header{
  position:sticky; top:0; z-index:100;
  background:var(--bg-alt);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.topbar{
  background:linear-gradient(120deg, var(--brand-dark), var(--brand));
  color:var(--header-ink);
  font-size:.82rem; font-weight:600;
}
.topbar-inner{ display:flex; align-items:center; justify-content:space-between; min-height:38px; gap:12px; }
.topbar-date{ opacity:.92; font-variant-numeric:tabular-nums; }
.topbar-actions{ display:flex; align-items:center; gap:6px; }

.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border:0; border-radius:10px;
  background:transparent; color:inherit;
  transition:background .15s, color .15s;
}
.icon-btn svg{ width:20px; height:20px; fill:currentColor; }
.icon-btn:hover{ background:rgba(255,255,255,.14); }
.site-header .icon-btn:hover{ background:var(--brand-soft); color:var(--brand); }
.icon-btn-lg{ width:auto; padding:0 14px; gap:8px; font-weight:800; font-size:.9rem; }

.brand-row{ background:var(--bg-alt); }
.brand-inner{ display:flex; align-items:center; gap:14px; min-height:74px; }
.brand{ display:flex; align-items:center; gap:13px; margin-inline-start:2px; }
.brand-mark{ width:48px; height:48px; flex:none; }
.mk-bg{ fill:var(--brand); }
.mk-base, .mk-deck, .mk-cres{ fill:var(--gold); }
.mk-col, .mk-dome{ fill:#F4EFE6; }
/* خطوط الكرة الأرضية في الشعار */
.mk-globe-line{ fill:none; stroke:var(--gold); stroke-width:1.7; }
.mk-globe-line-thin{ fill:none; stroke:var(--gold); stroke-width:1.2; opacity:.55; }
.mk-globe-half{ fill:none; stroke:#F1EEE5; stroke-width:1.9; }
.mk-arc{ fill:none; stroke:#F1EEE5; stroke-width:1.7; }
.mk-dot{ fill:var(--gold); }
.brand-text{ display:flex; flex-direction:column; line-height:1.25; }
.brand-text strong{ font-size:1.62rem; font-weight:900; letter-spacing:-.5px; color:var(--ink); }
.brand-text small{ font-size:.74rem; font-weight:700; color:var(--ink-3); }

.search-btn-desktop{ margin-inline-start:auto; border:1.5px solid var(--line-2); color:var(--ink-2); }
.search-btn-desktop:hover{ border-color:var(--brand); color:var(--brand); background:var(--brand-soft); }

/* زر قائمة الجوال */
.nav-toggle{ display:none; flex-direction:column; gap:4.5px; }
.nav-toggle span{ display:block; width:20px; height:2.2px; border-radius:2px; background:currentColor; transition:transform .2s, opacity .2s; }

/* ---------- التنقل ---------- */
.main-nav{ background:var(--bg-alt); border-top:1px solid var(--line); }
.nav-list{
  display:flex; align-items:stretch; gap:2px; list-style:none;
  margin:0; padding:0; overflow-x:auto; scrollbar-width:none;
}
.nav-list::-webkit-scrollbar{ display:none; }
.nav-list > li{ display:flex; }
.nav-list a{
  display:flex; align-items:center; gap:5px;
  padding:12px 15px; font-size:.94rem; font-weight:800; color:var(--ink-2);
  border-bottom:3px solid transparent; white-space:nowrap;
  transition:color .15s, border-color .15s;
}
.nav-list a:hover{ color:var(--brand); }
.nav-list a.is-active{ color:var(--brand); border-bottom-color:var(--brand); }

/* ---------- شريط عاجل ---------- */
.ticker{
  background:var(--ink); color:#fff; overflow:hidden;
  border-bottom:1px solid var(--line);
}
html[data-theme="dark"] .ticker{ background:#000; }
.ticker-inner{ display:flex; align-items:center; gap:14px; min-height:40px; }
.ticker-label{
  flex:none; background:var(--gold); color:#1A1400;
  font-size:.75rem; font-weight:900; padding:3px 12px; border-radius:8px;
}
.ticker-viewport{ flex:1; overflow:hidden; mask-image:linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track{
  display:inline-flex; align-items:center; gap:26px; white-space:nowrap;
  animation:tick 70s linear infinite; padding-inline:10px;
  will-change:transform;
}
.ticker:hover .ticker-track{ animation-play-state:paused; }
.ticker-track a{ font-size:.86rem; font-weight:700; opacity:.94; }
.ticker-track a:hover{ color:var(--gold); text-decoration:underline; }
.ticker-sep{ color:var(--gold); font-size:.6rem; }
@keyframes tick{ from{ transform:translateX(-50%);} to{ transform:translateX(0);} }
html[dir="rtl"] .ticker-track{ animation-name:tick-rtl; }
@keyframes tick-rtl{ from{ transform:translateX(0);} to{ transform:translateX(-50%);} }

/* ============================================================
   المحتوى العام
   ============================================================ */
.site-main{ padding:28px 0 60px; min-height:60vh; }

.page-head{ margin-bottom:22px; }
.crumbs{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  font-size:.8rem; font-weight:700; color:var(--ink-3); margin-bottom:8px;
}
.crumbs a:hover{ color:var(--brand); }
.crumbs .sep{ opacity:.5; }
.page-title{
  margin:0 0 6px; font-size:2rem; font-weight:900; letter-spacing:-.5px;
  position:relative; padding-inline-start:14px;
}
.page-title::before{
  content:""; position:absolute; inset-inline-start:0; top:6px; bottom:6px;
  width:5px; border-radius:4px; background:linear-gradient(180deg, var(--brand), var(--gold));
}
.page-sub{ margin:0; color:var(--ink-2); font-size:.98rem; max-width:70ch; }

.widget-title{
  display:flex; align-items:center; gap:10px;
  margin:0 0 14px; font-size:1.14rem; font-weight:900;
}
.widget-title::before{
  content:""; width:9px; height:9px; border-radius:3px; transform:rotate(45deg);
  background:var(--brand); flex:none;
}

.section-grid{ display:grid; grid-template-columns:minmax(0,1fr) 336px; gap:32px; align-items:start; }
.layout-center{ max-width:860px; margin-inline:auto; }

/* ---------- بطل الرئيسية ---------- */
.home-hero{ margin-bottom:26px; }

/* ---------- نظام البطاقات ---------- */
.card{
  display:block; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius-lg); overflow:hidden; position:relative;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  text-align:start; width:100%; padding:0; font:inherit; color:inherit;
}
.card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:var(--line-2); }
.card-media{ position:relative; background:var(--chip); overflow:hidden; }
.card-media img{ width:100%; height:100%; object-fit:cover; aspect-ratio:16/9; transition:transform .35s ease; }
.card:hover .card-media img{ transform:scale(1.035); }
.card-body{ padding:14px 16px 15px; }
.card-title{
  margin:0; font-size:1.02rem; font-weight:800; line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.card-tag{
  display:inline-block; font-size:.7rem; font-weight:900; color:var(--brand);
  background:var(--brand-soft); padding:2px 10px; border-radius:99px; margin-bottom:8px;
}
.card-excerpt{
  margin:7px 0 0; font-size:.86rem; color:var(--ink-2);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.card-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:5px 10px;
  margin-top:9px; font-size:.76rem; font-weight:700; color:var(--ink-3);
}
.card-meta .dot{ opacity:.5; }

/* بطاقة البطل */
.card-lead .card-media img{ aspect-ratio:16/8.2; }
.card-lead .card-title{ font-size:1.5rem; -webkit-line-clamp:3; }
.card-lead .card-body{ padding:18px 20px 20px; }

/* بطاقة صف */
.rows-list{ display:flex; flex-direction:column; gap:14px; }
.card-row{ display:grid; grid-template-columns:132px minmax(0,1fr); }
.card-row .card-media img{ aspect-ratio:4/3; height:100%; }
.card-row .card-body{ padding:10px 14px; display:flex; flex-direction:column; justify-content:center; }
.card-row .card-title{ font-size:.95rem; -webkit-line-clamp:3; }

/* بطاقة مصغرة */
.grid-2{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; }
.grid-4{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; }
.card-mini .card-title{ font-size:.92rem; -webkit-line-clamp:3; }

/* بطاقة فيديو/بودكاست */
.video-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; }
.card-video .card-media img, .card-pod .card-media img{ aspect-ratio:16/10; }
.card-pod .card-media img{ aspect-ratio:1/1; }
.play-badge{
  position:absolute; inset-inline-end:10px; inset-block-start:10px;
  width:38px; height:38px; border-radius:12px;
  background:rgba(18,51,86,.92); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 14px rgba(0,0,0,.25);
}
.play-badge svg{ width:20px; height:20px; fill:#fff; }
.card:hover .play-badge{ background:var(--brand-dark); transform:scale(1.06); }
.card-video, .card-pod{ transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }

/* ---------- الشريط الجانبي ---------- */
.side-box{
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:16px 18px 12px;
  position:sticky; top:150px;
}
.side-title{
  margin:0 0 10px; font-size:1rem; font-weight:900;
  padding-bottom:9px; border-bottom:2px solid var(--brand);
  display:inline-block;
}
.side-list{ display:flex; flex-direction:column; }
.side-item{
  display:grid; grid-template-columns:26px minmax(0,1fr); gap:10px; align-items:start;
  padding:10px 2px; border-bottom:1px dashed var(--line);
  font-size:.87rem; font-weight:700; line-height:1.55; color:var(--ink-2);
}
.side-item:last-child{ border-bottom:0; }
.side-item:hover{ color:var(--brand); }
.side-item .side-num{
  font-size:.78rem; font-weight:900; color:var(--brand);
  background:var(--brand-soft); border-radius:8px;
  width:24px; height:24px; display:flex; align-items:center; justify-content:center;
}
.side-group{ padding-top:12px; }
.side-group + .side-group{ border-top:1px solid var(--line); margin-top:12px; }
.side-sub{ margin:0 0 6px; font-size:.85rem; font-weight:900; color:var(--brand); }
.side-group .side-item{ grid-template-columns:minmax(0,1fr); }

/* ---------- مجموعات الرئيسية ---------- */
.home-group{ margin-top:34px; }
.group-head{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; }
.group-head .widget-title{ margin:0; }
.see-all{
  flex:none; font-size:.8rem; font-weight:800; color:var(--brand);
  padding:5px 12px; border:1.5px solid var(--line-2); border-radius:99px;
  transition:all .15s;
}
.see-all:hover{ background:var(--brand); border-color:var(--brand); color:#fff; }

/* ---------- المزيد ---------- */
.more-zone{ display:flex; justify-content:center; margin-top:22px; }
.btn-more{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--card); color:var(--brand);
  border:1.5px solid var(--brand); border-radius:99px;
  padding:9px 26px; font-size:.9rem; font-weight:800;
  transition:all .15s;
}
.btn-more:hover{ background:var(--brand); color:#fff; }
.more-list[hidden]{ display:none; }

/* ---------- هياكل التحميل والخطأ ---------- */
.skeleton{
  border-radius:8px;
  background:linear-gradient(100deg, var(--chip) 40%, var(--line) 50%, var(--chip) 60%);
  background-size:200% 100%;
  animation:shine 1.4s infinite linear;
}
@keyframes shine{ to{ background-position:-200% 0; } }

.error-box{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:38px 26px; text-align:center; margin:14px 0;
}
.error-box h2{ margin:0 0 8px; font-size:1.25rem; font-weight:900; }
.error-box p{ margin:0 auto 16px; color:var(--ink-2); max-width:52ch; }

.notfound .nf-code{
  font-size:4.4rem; font-weight:900; line-height:1;
  background:linear-gradient(120deg, var(--brand), var(--gold));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.nf-actions{ display:flex; justify-content:center; gap:12px; flex-wrap:wrap; }

/* ---------- حالة البحث ---------- */
.search-status{ padding:4px 2px 14px; font-size:.82rem; font-weight:800; color:var(--ink-3); }

/* ============================================================
   صفحة المقال
   ============================================================ */
.article-full{ max-width:820px; margin-inline:auto; }
.article-title{
  margin:6px 0 10px; font-size:1.78rem; font-weight:900; line-height:1.45; letter-spacing:-.4px;
}
.article-subtitle{ margin:0 0 14px; font-size:1.05rem; color:var(--ink-2); font-weight:600; }
.article-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px;
  padding:12px 0; border-block:1px solid var(--line);
  font-size:.83rem; font-weight:700; color:var(--ink-3); margin-bottom:14px;
}
.a-author{ color:var(--brand); }
.a-upd{ opacity:.85; }

.share-row{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.share-btn{
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 15px; border-radius:99px; border:1.5px solid var(--line-2);
  background:var(--card); color:var(--ink-2);
  font-size:.8rem; font-weight:800; transition:all .15s;
}
.share-btn:hover{ border-color:var(--brand); color:var(--brand); background:var(--brand-soft); }

.article-figure{ margin:0 0 20px; }
.article-figure img{ width:100%; border-radius:var(--radius-lg); box-shadow:var(--shadow); }
.article-figure figcaption{
  padding:8px 4px 0; font-size:.78rem; color:var(--ink-3); font-weight:600;
}

.article-body{ font-size:1.06rem; line-height:2.05; }
.article-body p{ margin:0 0 1.15em; }
.article-body h2, .article-body h3{ margin:1.5em 0 .5em; font-weight:900; }
.article-body img{ border-radius:var(--radius); margin:1.2em auto; }
.article-body blockquote{
  margin:1.4em 0; padding:10px 18px; border-inline-start:4px solid var(--gold);
  background:var(--chip); border-radius:10px; font-weight:600;
}
.article-body ul, .article-body ol{ padding-inline-start:1.4em; }
.article-body li{ margin-bottom:.45em; }

.article-gallery{
  display:grid; grid-template-columns:repeat(2, 1fr); gap:14px; margin:22px 0;
}
.article-gallery figure{ margin:0; }
.article-gallery img{ border-radius:var(--radius); }
.article-gallery figcaption{ font-size:.76rem; color:var(--ink-3); padding-top:6px; }

.article-box{
  margin-top:26px; padding:16px 18px; border-radius:var(--radius-lg);
  background:var(--chip); border:1px dashed var(--line-2);
}
.a-author-row{ display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.a-avatar{ width:46px; height:46px; border-radius:50%; object-fit:cover; border:2px solid var(--brand); }
.a-label{ display:block; font-size:.72rem; font-weight:800; color:var(--ink-3); }
.a-note{ margin:0; font-size:.8rem; color:var(--ink-3); line-height:1.8; }

/* ============================================================
   نافذة الفيديو
   ============================================================ */
.video-modal{
  position:fixed; inset:0; z-index:300;
  background:rgba(8,12,10,.86);
  display:flex; align-items:center; justify-content:center;
  padding:20px; backdrop-filter:blur(4px);
}
.video-modal-panel{
  width:min(940px, 100%); background:#0D100F; border-radius:16px;
  overflow:hidden; box-shadow:var(--shadow-lg);
  border:1px solid rgba(255,255,255,.08);
}
.video-modal-head{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:12px 16px; color:#fff; font-size:.95rem; font-weight:800;
}
.video-modal-head .icon-btn{ color:#fff; }
.video-modal-head .icon-btn:hover{ background:rgba(255,255,255,.14); }
.yt-frame{ display:block; width:100%; aspect-ratio:16/9; border:0; }

/* ============================================================
   مشغل البودكاست السفلي
   ============================================================ */
.audio-dock{
  position:fixed; inset-inline:0; bottom:0; z-index:250;
  background:var(--bg-alt); border-top:1px solid var(--line);
  box-shadow:0 -8px 30px rgba(0,0,0,.14);
  display:flex; align-items:center; gap:16px;
  padding:12px 20px; flex-wrap:wrap;
}
.dock-info{ display:flex; flex-direction:column; min-width:180px; flex:1; }
.dock-info strong{ font-size:.92rem; font-weight:900; }
.dock-info span{ font-size:.76rem; color:var(--ink-3); font-weight:700; }
.dock-close{
  width:34px; height:34px; border-radius:10px; border:1px solid var(--line-2);
  background:var(--card); color:var(--ink-2); font-size:.95rem;
}
.dock-close:hover{ color:var(--brand); border-color:var(--brand); }
#audio-dock audio{ flex:2; min-width:260px; height:40px; }

/* ============================================================
   صفحات السياسات
   ============================================================ */
.policy-page{ max-width:820px; margin-inline:auto; }
.policy-body h2{
  font-size:1.22rem; font-weight:900; margin:26px 0 10px;
  padding-inline-start:12px; border-inline-start:4px solid var(--gold);
}
.policy-body p{ color:var(--ink-2); margin:0 0 12px; }
.policy-body ul{ margin:0 0 14px; padding-inline-start:0; list-style:none; }
.policy-body li{
  position:relative; padding-inline-start:26px; margin-bottom:9px; color:var(--ink-2);
}
.policy-body li::before{
  content:"◆"; position:absolute; inset-inline-start:2px; top:2px;
  color:var(--brand); font-size:.7rem;
}
.policy-links{ margin-top:34px; }
.policy-links h2{ font-size:1.15rem; font-weight:900; margin-bottom:14px; }
.policy-links-grid{ display:flex; flex-wrap:wrap; gap:9px; }
.tag{
  display:inline-flex; padding:6px 15px; border-radius:99px;
  background:var(--chip); border:1px solid var(--line);
  font-size:.8rem; font-weight:800; color:var(--ink-2);
  transition:all .15s;
}
.tag:hover{ background:var(--brand); border-color:var(--brand); color:#fff; }

/* ---------- نموذج الاتصال ---------- */
.contact-form-box{
  margin-top:30px; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:22px 24px;
}
.contact-form-box h2{ margin:0 0 16px; font-size:1.2rem; font-weight:900; }
.form-row{ margin-bottom:14px; }
.form-row label{ display:block; font-size:.85rem; font-weight:800; margin-bottom:6px; color:var(--ink-2); }
.form-row input, .form-row textarea{
  width:100%; padding:11px 14px; border-radius:12px;
  border:1.5px solid var(--line-2); background:var(--bg-alt);
  font:inherit; color:var(--ink); resize:vertical;
  transition:border-color .15s;
}
.form-row input:focus, .form-row textarea:focus{ border-color:var(--brand); outline:none; }
.form-status{ margin-top:10px; font-size:.85rem; font-weight:700; }
.form-status.ok{ color:var(--brand); }
.form-status.err{ color:#C0392B; }

/* ============================================================
   نافذة البحث
   ============================================================ */
.search-overlay{
  position:fixed; inset:0; z-index:400;
  background:rgba(10,16,13,.6); backdrop-filter:blur(5px);
  display:flex; justify-content:center; align-items:flex-start;
  padding:8vh 18px 18px;
}
.search-panel{
  width:min(720px, 100%); background:var(--bg-alt);
  border-radius:20px; box-shadow:var(--shadow-lg);
  overflow:hidden; border:1px solid var(--line);
}
.search-head{
  display:flex; align-items:center; gap:12px;
  padding:14px 18px; border-bottom:1px solid var(--line);
}
.search-ico{ width:22px; height:22px; fill:var(--ink-3); flex:none; }
#search-input{
  flex:1; border:0; background:transparent; font:inherit;
  font-size:1.04rem; font-weight:700; color:var(--ink);
}
#search-input:focus{ outline:none; }
.search-body{ max-height:56vh; overflow-y:auto; padding:10px 12px 14px; }
.search-hint{ padding:16px 10px; color:var(--ink-3); font-size:.88rem; }
.sr-row{
  display:grid; grid-template-columns:74px minmax(0,1fr); gap:12px; align-items:center;
  padding:10px; border-radius:14px; transition:background .12s;
}
.sr-row:hover{ background:var(--chip); }
.sr-row img{ width:74px; height:54px; object-fit:cover; border-radius:10px; }
.sr-info{ display:flex; flex-direction:column; gap:3px; }
.sr-info strong{ font-size:.92rem; font-weight:800; line-height:1.5; }
.sr-info span{ font-size:.74rem; font-weight:700; color:var(--ink-3); }
.sr-empty{ padding:22px 10px; text-align:center; color:var(--ink-3); font-weight:700; }

/* ============================================================
   التذييل
   ============================================================ */
.site-footer{ background:var(--footer-bg); color:var(--footer-ink); margin-top:30px; }
.footer-grid{ display:grid; gap:34px; padding:44px 0 34px; }
.footer-grid-4{ grid-template-columns:1.5fr 1fr 1fr 1.2fr; }
.footer-brand{
  display:flex; align-items:center; gap:10px;
  font-size:1.3rem; font-weight:900; color:#fff; margin-bottom:12px;
}
.footer-about p{ font-size:.85rem; opacity:.75; margin:0 0 10px; line-height:1.9; }
.footer-src{ font-size:.76rem !important; opacity:.55 !important; }
.footer-col{ display:flex; flex-direction:column; gap:9px; }
.footer-col h3{
  margin:0 0 6px; font-size:.95rem; font-weight:900; color:var(--gold);
}
.footer-col a{ font-size:.85rem; opacity:.82; transition:opacity .12s, color .12s; }
.footer-col a:hover{ opacity:1; color:var(--gold); }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.09);
  padding:16px 0 20px; font-size:.78rem; opacity:.6; text-align:center;
}

/* ============================================================
   استجابة الشاشات
   ============================================================ */
@media (max-width: 1080px){
  .grid-4, .video-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); }
  .footer-grid-4{ grid-template-columns:1fr 1fr; }
}
@media (max-width: 900px){
  .section-grid{ grid-template-columns:minmax(0,1fr); gap:24px; }
  .side-box{ position:static; }
  .grid-4, .video-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .card-lead .card-title{ font-size:1.22rem; }
  .article-title{ font-size:1.45rem; }
}
@media (max-width: 640px){
  .nav-toggle{ display:flex; }
  .search-btn-desktop span{ display:none; }
  .brand-text strong{ font-size:1.34rem; }
  .brand-text small{ display:none; }
  .brand-mark{ width:40px; height:40px; }
  .main-nav{ position:fixed; inset-inline:0; top:0; bottom:0; z-index:150; display:none; background:var(--bg-alt); overflow-y:auto; padding-top:70px; }
  .main-nav.open{ display:block; }
  .main-nav.open ~ * { }
  .nav-list{ flex-direction:column; padding:10px 14px 40px; }
  .nav-list a{ padding:13px 8px; border-bottom:1px solid var(--line); font-size:1.02rem; }
  .grid-2, .grid-4, .video-grid, .article-gallery{ grid-template-columns:minmax(0,1fr); }
  .card-row{ grid-template-columns:104px minmax(0,1fr); }
  .page-title{ font-size:1.5rem; }
  .home-hero .card-lead .card-title{ font-size:1.18rem; }
  .footer-grid-4{ grid-template-columns:1fr; gap:26px; }
  .article-figure img{ border-radius:14px; }
  .sr-row img{ width:60px; height:46px; }
  #audio-dock audio{ min-width:200px; }
}


/* إخفاء صريح لعناصر hidden (لأن display:flex يتجاوز الخاصية) */
.search-overlay[hidden]{ display:none; }
.audio-dock[hidden]{ display:none; }
#pod-eps[hidden]{ display:none; }

/* الطباعة */
@media print{
  .site-header, .main-nav, .site-footer, .share-row, .ticker, .audio-dock, .more-zone{ display:none !important; }
  body{ background:#fff; color:#000; }
  .article-body{ font-size:12pt; }
}


/* ============================================================

/* ============================================================
   لوحة التحكم
   ============================================================ */
.admin-wrap{ max-width:1080px; margin-inline:auto; }
.admin-head{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  flex-wrap:wrap; margin-bottom:18px;
}
.admin-title{ font-size:1.5rem; font-weight:900; display:flex; align-items:center; gap:10px; }
.admin-dot{ width:14px; height:14px; border-radius:5px; background:var(--red); display:inline-block; transform:rotate(45deg); }
.admin-sub{ color:var(--ink-3); font-size:.9rem; margin-top:4px; }
.admin-actions{ display:flex; align-items:center; gap:12px; }
.admin-live{
  display:inline-flex; align-items:center; gap:7px; font-size:.85rem; font-weight:700;
  color:#166534; background:rgba(22,101,52,.09); padding:7px 13px; border-radius:99px;
}
.admin-live .dot{ width:8px; height:8px; border-radius:50%; background:#16a34a; animation:pulse 1.6s infinite; }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.35} }

.admin-tabs{
  display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px;
  border-bottom:2px solid var(--line); padding-bottom:0;
}
.atab{
  font:inherit; font-weight:700; font-size:.95rem; cursor:pointer;
  padding:11px 18px; border:0; border-bottom:3px solid transparent;
  background:transparent; color:var(--ink-2); margin-bottom:-2px;
  border-radius:10px 10px 0 0; transition:color .15s, background .15s;
}
.atab:hover{ background:rgba(18,51,86,.06); color:var(--ink-1); }
.atab.on{ color:var(--red); border-bottom-color:var(--red); background:rgba(18,51,86,.07); }

/* بطاقات لوحة التحكم */
.admin-card{
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:20px 22px; margin-bottom:18px;
}
.ac-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.admin-card h3{ font-size:1.05rem; font-weight:800; }
.admin-warn{
  background:rgba(18,51,86,.08); border:1px solid rgba(18,51,86,.3);
  padding:12px 16px; border-radius:12px; margin-bottom:16px; font-size:.92rem; color:var(--ink-1);
}

/* مؤشرات KPI */
.kpi-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(158px, 1fr)); gap:14px; margin-bottom:18px; }
.kpi{
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:18px 18px 16px; position:relative; overflow:hidden;
}
.kpi::after{
  content:""; position:absolute; inset-block-start:0; inset-inline-start:0;
  width:100%; height:4px; background:linear-gradient(90deg, var(--red), transparent 70%);
}
.kpi-v{ font-size:1.6rem; font-weight:900; color:var(--ink-1); line-height:1.2; }
.kpi-l{ font-size:.86rem; font-weight:700; color:var(--ink-2); margin-top:4px; }
.kpi-s{ font-size:.76rem; color:var(--ink-3); margin-top:3px; }

/* أزرار */
.abtn{
  font:inherit; font-size:.86rem; font-weight:700; cursor:pointer;
  padding:8px 15px; border-radius:9px; border:1px solid var(--line);
  background:var(--bg); color:var(--ink-1); text-decoration:none;
  display:inline-block; transition:all .15s;
}
.abtn:hover{ border-color:var(--red); color:var(--red); }
.abtn:disabled{ opacity:.45; cursor:not-allowed; }
.abtn-red{ background:var(--red); border-color:var(--red); color:#fff; }
.abtn-red:hover{ filter:brightness(1.08); color:#fff; }

/* الجداول */
.table-scroll{ overflow-x:auto; border-radius:12px; border:1px solid var(--line); }
.atable{ width:100%; border-collapse:collapse; font-size:.86rem; min-width:720px; }
.atable th{
  background:rgba(18,51,86,.07); color:var(--ink-1); font-weight:800;
  padding:11px 12px; text-align:right; white-space:nowrap; border-bottom:1px solid var(--line);
}
.atable td{ padding:10px 12px; border-bottom:1px solid var(--line); color:var(--ink-2); vertical-align:top; }
.atable tr:last-child td{ border-bottom:0; }
.atable tr:hover td{ background:rgba(18,51,86,.04); }
.td-path{ font-family:ui-monospace, monospace; font-size:.78rem; max-width:230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.td-fp{ font-family:ui-monospace, monospace; font-size:.78rem; }
.td-actions{ white-space:nowrap; }

/* الفلاتر */
.vf-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:12px; }
.vf-grid label{ display:grid; gap:5px; font-size:.8rem; font-weight:700; color:var(--ink-2); }
.vf-grid input, .vf-grid select, .admin-card textarea, .admin-card input[type="url"], .admin-card input[type="text"], .admin-card input[type="password"], .admin-card select{
  font:inherit; font-size:.88rem; padding:9px 12px; border-radius:9px;
  border:1px solid var(--line); background:var(--bg); color:var(--ink-1); width:100%;
  box-sizing:border-box;
}
.vf-grid input:focus, .vf-grid select:focus, .admin-card textarea:focus{ outline:none; border-color:var(--red); }
.vf-bar{ display:flex; gap:10px; align-items:center; margin-top:14px; flex-wrap:wrap; }
.pager{ display:flex; align-items:center; justify-content:center; gap:14px; margin-top:14px; font-size:.9rem; font-weight:700; color:var(--ink-2); }

/* بوابة كلمة المرور */
.admin-gate{
  max-width:430px; margin:40px auto; text-align:center;
  background:var(--card); border:1px solid var(--line); border-radius:20px; padding:36px 30px;
}
.gate-mark{ color:var(--red); margin-bottom:10px; }
.admin-gate h2{ font-size:1.3rem; font-weight:900; margin-bottom:6px; }
.admin-gate p{ color:var(--ink-3); font-size:.9rem; line-height:1.9; }
.gate-form{ display:flex; gap:10px; margin:18px 0 8px; }
.gate-form input{ flex:1; font:inherit; padding:11px 14px; border-radius:10px; border:1px solid var(--line); background:var(--bg); color:var(--ink-1); }
.gate-form input:focus{ outline:none; border-color:var(--red); }
.gate-note{ font-size:.85rem; color:var(--ink-3); min-height:1.4em; }
.gate-err{ color:var(--red); font-weight:700; }
.gate-ok{ color:#166534; font-weight:700; }
.gate-hint{ font-size:.76rem; color:var(--ink-3); margin-top:10px; }
.gate-hint code{ background:rgba(18,51,86,.08); padding:2px 7px; border-radius:6px; direction:ltr; display:inline-block; }

/* الرسوم البيانية */
.charts-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:16px; }
.ch-wide{ grid-column:1 / -1; }
.admin-card canvas{ max-width:100%; }

/* نموذج المواضيع */
.post-form{ display:grid; gap:14px; }
.post-form label{ display:grid; gap:6px; font-weight:700; font-size:.9rem; color:var(--ink-1); }
.post-form .req{ color:var(--red); }
.post-form textarea{ font:inherit; font-size:.92rem; padding:11px 14px; border-radius:10px; border:1px solid var(--line); background:var(--bg); color:var(--ink-1); resize:vertical; line-height:1.9; }
.post-form input[type="text"], .post-form input[type="url"]{ font:inherit; font-size:.92rem; padding:11px 14px; border-radius:10px; border:1px solid var(--line); background:var(--bg); color:var(--ink-1); }
.pf-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.pf-preview{ margin-top:6px; }
.pf-preview img{ max-width:100%; max-height:150px; border-radius:10px; border:1px solid var(--line); }
.pf-check{ display:flex !important; flex-direction:row !important; align-items:center; gap:9px !important; font-size:.9rem; }
.pf-check input{ width:auto; }
@media (max-width: 620px){ .pf-grid{ grid-template-columns:1fr; } }

/* الرسائل */
.msg-list{ display:grid; gap:12px; }
.msg-item{ border:1px solid var(--line); border-radius:12px; padding:14px 16px; }
.msg-head{ display:flex; gap:12px; flex-wrap:wrap; align-items:baseline; font-size:.85rem; color:var(--ink-3); }
.msg-head strong{ color:var(--ink-1); font-size:.95rem; }
.msg-mail{ direction:ltr; font-family:ui-monospace, monospace; }
.msg-subject{ font-weight:800; color:var(--ink-1); margin-top:6px; }
.msg-body{ color:var(--ink-2); line-height:1.95; margin:8px 0 10px; white-space:pre-wrap; }
.msg-item .abtn{ margin-top:4px; }

/* حالات فارغة */
.empty{
  text-align:center; color:var(--ink-3); padding:34px 18px; font-size:.92rem;
  border:2px dashed var(--line); border-radius:14px; line-height:2;
}

/* شاشات صغيرة للوحة */
@media (max-width: 620px){
  .admin-head{ flex-direction:column; align-items:flex-start; }
  .kpi-grid{ grid-template-columns:repeat(2, 1fr); }
  .admin-card{ padding:16px; }
  .gate-form{ flex-direction:column; }
}


/* حقل التاريخ اليدوي في نموذج المواد */
.pf-date-label .pf-date-hint{ display:block; font-size:.74rem; font-weight:600; color:var(--ink-3); line-height:1.7; margin-top:4px; }
.post-form input[type="datetime-local"]{ font:inherit; font-size:.92rem; padding:11px 14px; border-radius:10px; border:1px solid var(--line); background:var(--bg); color:var(--ink-1); }
.post-form input[type="password"]{ font:inherit; font-size:.92rem; padding:11px 14px; border-radius:10px; border:1px solid var(--line); background:var(--bg); color:var(--ink-1); }
