/*
Theme Name: Nashra
Theme URI: https://example.com/nashra
Author: Custom Build
Author URI: https://example.com
Description: قالب إخباري عربي خفيف وسريع، مصمّم على نسق الصحف الخليجية. لون واحد يولّد الوضعين الداكن والفاتح تلقائياً، تاريخ ميلادي وهجري وساعة حيّة، تهيئة كاملة لمحرك البحث وGoogle Discover، وإعداد تلقائي للأقسام والصفحات والقوائم عند التفعيل.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nashra
Tags: news, blog, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, right-sidebar, rtl-language-support, block-styles, wide-blocks
*/

/* ============================================================
   فهرس
   1. الرموز (Design Tokens)
   2. الأساسيات
   3. أدوات مساعدة
   4. الأزرار والنماذج
   5. الشريط العلوي (التاريخ والساعة)
   6. الترويسة والقائمة
   7. شريط الأخبار العاجلة
   8. البطاقات
   9. الواجهة الرئيسية
  10. الأقسام
  11. المحتوى والشريط الجانبي
  12. المقال المفرد
  13. الأرشيف والتنقل
  14. التذييل
  15. الإعلانات
  16. الاستجابة والطباعة
   ============================================================ */

/* =========================================================
   1. الرموز
   ========================================================= */
:root {
  /* هذه القيم يعاد توليدها من المخصّص حسب اللون الأساسي */
  --n-brand:        #165D31;
  --n-brand-2:      #0f4423;
  --n-brand-ink:    #ffffff;
  --n-brand-soft:   rgba(22, 93, 49, .10);
  --n-accent:       #b8933f;
  --n-danger:       #c62828;

  --n-radius:       4px;
  --n-radius-lg:    8px;
  --n-container:    1280px;
  --n-gap:          22px;
  --n-nav-h:        48px;

  --n-font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --n-font-head: var(--n-font);

  --n-fs:           17px;
  --n-lh:           1.9;
  --n-lh-head:      1.62;

  --n-t: .2s ease;
}

/* ---------- الوضع الفاتح ---------- */
:root,
[data-theme="light"] {
  --n-bg:         #ffffff;
  --n-bg-alt:     #f4f6f5;
  --n-surface:    #ffffff;
  --n-surface-2:  #f0f3f1;
  --n-border:     #e0e5e2;
  --n-border-2:   #cdd5d0;
  --n-text:       #1b241f;
  --n-muted:      #5d6b64;
  --n-dim:        #86938c;
  --n-heading:    #0c1712;
  --n-link:       var(--n-brand);
  --n-topbar-bg:  #f0f3f1;
  --n-topbar-ink: #47554d;
  --n-nav-bg:     var(--n-brand);
  --n-nav-ink:    #ffffff;
  --n-overlay:    linear-gradient(to top, rgba(0,0,0,.93) 0%, rgba(0,0,0,.5) 48%, rgba(0,0,0,0) 100%);
  --n-shadow:     0 1px 3px rgba(12,23,18,.07);
  --n-shadow-lg:  0 10px 34px rgba(12,23,18,.13);
  --n-skeleton:   #eaeeeb;
  color-scheme: light;
}

/* ---------- الوضع الداكن ---------- */
[data-theme="dark"] {
  --n-bg:         #0f1418;
  --n-bg-alt:     #151b20;
  --n-surface:    #161d22;
  --n-surface-2:  #1c242a;
  --n-border:     #26313a;
  --n-border-2:   #33414c;
  --n-text:       #e4eaee;
  --n-muted:      #9aa8b2;
  --n-dim:        #71818c;
  --n-heading:    #ffffff;
  --n-link:       var(--n-brand-lift, #3fa863);
  --n-topbar-bg:  #131a1f;
  --n-topbar-ink: #8fa0aa;
  --n-nav-bg:     var(--n-brand-deep, #124a28);
  --n-nav-ink:    #ffffff;
  --n-overlay:    linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.55) 48%, rgba(0,0,0,0) 100%);
  --n-shadow:     0 1px 3px rgba(0,0,0,.4);
  --n-shadow-lg:  0 10px 34px rgba(0,0,0,.5);
  --n-skeleton:   #1c242a;
  color-scheme: dark;
}

/* =========================================================
   2. الأساسيات
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--n-bg);
  color: var(--n-text);
  font-family: var(--n-font);
  font-size: var(--n-fs);
  line-height: var(--n-lh);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.n-lock { overflow: hidden; }

img, svg, video, iframe, canvas { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--n-link); text-decoration: none; transition: color var(--n-t); }
a:hover { color: var(--n-brand-2); }
[data-theme="dark"] a:hover { color: #fff; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .55em;
  font-family: var(--n-font-head);
  color: var(--n-heading);
  line-height: var(--n-lh-head);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(1.55rem, 3.2vw, 2.3rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.16rem; }
h4 { font-size: 1.04rem; }

p { margin: 0 0 1.05em; }
ul, ol { padding-inline-start: 1.5em; }
ul:last-child, ol:last-child, p:last-child { margin-bottom: 0; }

blockquote {
  margin: 1.5em 0;
  padding: .9em 1.3em;
  border-inline-start: 4px solid var(--n-brand);
  background: var(--n-surface-2);
  border-radius: var(--n-radius);
  font-size: 1.04em;
}

code, pre, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  direction: ltr; text-align: left;
}
code { background: var(--n-surface-2); padding: .1em .4em; border-radius: 3px; font-size: .88em; }
pre { background: var(--n-surface-2); border: 1px solid var(--n-border); padding: 1em; border-radius: var(--n-radius); overflow-x: auto; }
pre code { background: none; padding: 0; }

hr { border: 0; border-top: 1px solid var(--n-border); margin: 2em 0; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.4em; font-variant-numeric: tabular-nums; }
th, td { border: 1px solid var(--n-border); padding: .6em .75em; text-align: start; }
th { background: var(--n-surface-2); font-weight: 700; }

::selection { background: var(--n-brand); color: var(--n-brand-ink); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--n-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--n-border-2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--n-brand); }

:focus-visible { outline: 2px solid var(--n-brand); outline-offset: 2px; }

/* أرقام عربية-هندية اختيارية */
body.n-num-arab { font-variant-numeric: normal; }
body.n-num-arab time,
body.n-num-arab .n-num { font-feature-settings: "anum"; }

/* =========================================================
   3. أدوات مساعدة
   ========================================================= */
.n-wrap { width: 100%; max-width: var(--n-container); margin-inline: auto; padding-inline: 18px; }
.n-wrap--narrow { max-width: 820px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; inset-block-start: 10px; inset-inline-start: 10px; z-index: 9999;
  width: auto; height: auto; clip: auto; padding: 10px 18px;
  background: var(--n-brand); color: var(--n-brand-ink); border-radius: var(--n-radius);
}

.n-grid { display: grid; gap: var(--n-gap); }
.n-g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.n-g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.n-g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* شارة القسم */
.n-cat {
  display: inline-block; padding: 2px 9px;
  background: var(--n-brand); color: var(--n-brand-ink) !important;
  font-size: .72rem; font-weight: 700; line-height: 1.85;
  border-radius: 2px; white-space: nowrap;
}
.n-cat:hover { background: var(--n-brand-2); }

/* بيانات وصفية */
.n-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  font-size: .78rem; color: var(--n-dim); font-variant-numeric: tabular-nums;
}
.n-meta a { color: inherit; }
.n-meta a:hover { color: var(--n-link); }
.n-meta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; vertical-align: -2px; }
.n-meta > * { display: inline-flex; align-items: center; gap: 5px; }

/* =========================================================
   4. الأزرار والنماذج
   ========================================================= */
.n-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border: 1px solid transparent; border-radius: var(--n-radius);
  background: var(--n-brand); color: var(--n-brand-ink) !important;
  font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
  transition: var(--n-t);
}
.n-btn:hover { background: var(--n-brand-2); }
.n-btn--ghost { background: transparent; border-color: var(--n-border-2); color: var(--n-text) !important; }
.n-btn--ghost:hover { background: var(--n-brand-soft); border-color: var(--n-brand); color: var(--n-link) !important; }
.n-btn--sm { padding: 6px 13px; font-size: .84rem; }
.n-btn--block { width: 100%; }

input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="tel"], input[type="number"], input[type="date"],
textarea, select {
  width: 100%; padding: 10px 13px;
  background: var(--n-surface-2); color: var(--n-text);
  border: 1px solid var(--n-border); border-radius: var(--n-radius);
  font: inherit; font-size: .93rem; transition: var(--n-t);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--n-brand); background: var(--n-surface);
  box-shadow: 0 0 0 3px var(--n-brand-soft);
}
input[type="submit"], button[type="submit"], .wp-block-search__button {
  width: auto; cursor: pointer; border: 0; font-weight: 700;
  background: var(--n-brand); color: var(--n-brand-ink);
  padding: 10px 20px; border-radius: var(--n-radius);
}

.n-searchform { display: flex; gap: 8px; }

/* =========================================================
   5. الشريط العلوي — التاريخ والساعة
   ========================================================= */
.n-topbar {
  background: var(--n-topbar-bg);
  color: var(--n-topbar-ink);
  border-bottom: 1px solid var(--n-border);
  font-size: .8rem;
}
.n-topbar__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 20px; min-height: 36px; flex-wrap: wrap;
}
.n-datetime { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.n-datetime > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.n-datetime svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; opacity: .75; }
.n-hijri { color: var(--n-brand); font-weight: 600; }
[data-theme="dark"] .n-hijri { color: var(--n-link); }
.n-clock {
  font-variant-numeric: tabular-nums; font-weight: 700;
  letter-spacing: .02em; color: var(--n-text);
}
.n-tz { opacity: .7; font-size: .95em; }
.n-topbar__links { display: flex; gap: 16px; flex-wrap: wrap; }
.n-topbar__links a { color: inherit; }
.n-topbar__links a:hover { color: var(--n-link); }

/* =========================================================
   6. الترويسة والقائمة
   ========================================================= */
.n-masthead { background: var(--n-bg); border-bottom: 1px solid var(--n-border); }
.n-masthead__in {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 20px; padding-block: 16px;
}

.n-brand { display: flex; align-items: center; gap: 11px; }
.n-brand img { max-height: 54px; width: auto; }
.n-brand__mark {
  width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--n-brand); color: var(--n-brand-ink);
  border-radius: var(--n-radius); font-size: 1.3rem; font-weight: 800;
}
.n-brand__name { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.n-brand__name a { color: var(--n-heading); }
.n-brand__name a:hover { color: var(--n-link); }
.n-brand__slogan { margin: 2px 0 0; font-size: .78rem; color: var(--n-muted); line-height: 1.4; }

.n-masthead__ad { justify-self: center; max-width: 728px; overflow: hidden; }
.n-masthead__ad:empty { display: none; }

.n-masthead__tools { display: flex; align-items: center; gap: 7px; justify-self: end; }

.n-ibtn {
  width: 38px; height: 38px; padding: 0; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--n-border-2); border-radius: var(--n-radius);
  color: var(--n-text); cursor: pointer; transition: var(--n-t);
}
.n-ibtn:hover { background: var(--n-brand-soft); border-color: var(--n-brand); color: var(--n-link); }
.n-ibtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.n-theme-toggle .n-i-sun { display: none; }
[data-theme="dark"] .n-theme-toggle .n-i-sun { display: block; }
[data-theme="dark"] .n-theme-toggle .n-i-moon { display: none; }

.n-burger { display: none; }

/* شريط القائمة الملوّن */
.n-navbar {
  background: var(--n-nav-bg); color: var(--n-nav-ink);
  position: sticky; inset-block-start: 0; z-index: 300;
}
body.admin-bar .n-navbar { inset-block-start: 32px; }
@media (max-width: 782px) { body.admin-bar .n-navbar { inset-block-start: 46px; } }

.n-navbar__in { display: flex; align-items: center; gap: 10px; min-height: var(--n-nav-h); }

.n-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; }
.n-nav li { position: relative; }
.n-nav > ul > li > a {
  display: flex; align-items: center; height: var(--n-nav-h); padding-inline: 14px;
  color: var(--n-nav-ink); font-size: .95rem; font-weight: 600; white-space: nowrap;
  border-block-end: 3px solid transparent;
}
.n-nav > ul > li > a:hover,
.n-nav > ul > li.current-menu-item > a,
.n-nav > ul > li.current-menu-ancestor > a,
.n-nav > ul > li.current-menu-parent > a {
  background: rgba(255,255,255,.13); color: #fff; border-block-end-color: rgba(255,255,255,.85);
}
.n-nav .menu-item-has-children > a::after {
  content: ""; width: 5px; height: 5px; margin-inline-start: 7px; opacity: .8;
  border-inline-end: 1.7px solid currentColor; border-block-end: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.n-nav ul ul {
  position: absolute; inset-block-start: 100%; inset-inline-start: 0; z-index: 60;
  min-width: 208px; list-style: none; margin: 0; padding: 5px;
  background: var(--n-surface); border: 1px solid var(--n-border);
  border-radius: 0 0 var(--n-radius) var(--n-radius); box-shadow: var(--n-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: var(--n-t);
}
.n-nav ul ul ul { inset-block-start: -5px; inset-inline-start: 100%; }
[dir="rtl"] .n-nav ul ul ul { inset-inline-start: auto; inset-inline-end: 100%; }
.n-nav li:hover > ul, .n-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.n-nav ul ul a { display: block; padding: 8px 11px; color: var(--n-text); font-size: .9rem; border-radius: 3px; }
.n-nav ul ul a:hover { background: var(--n-brand-soft); color: var(--n-link); }

.n-navbar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.n-navbar__end .n-ibtn { border-color: rgba(255,255,255,.3); color: var(--n-nav-ink); width: 34px; height: 34px; }
.n-navbar__end .n-ibtn:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.55); color: #fff; }

/* البحث المنسدل */
.n-search { display: grid; grid-template-rows: 0fr; background: var(--n-bg-alt); transition: grid-template-rows var(--n-t); }
.n-search.is-open { grid-template-rows: 1fr; border-block-end: 1px solid var(--n-border); }
.n-search__in { overflow: hidden; }
.n-search form { padding: 14px 18px; max-width: var(--n-container); margin-inline: auto; }

/* قائمة الجوال */
.n-mobile {
  position: fixed; inset: 0; z-index: 900; padding: 18px;
  background: var(--n-bg); overflow-y: auto;
  transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s;
}
[dir="ltr"] .n-mobile { transform: translateX(-100%); }
.n-mobile.is-open { transform: translateX(0); visibility: visible; }
.n-mobile__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-block-end: 14px; margin-block-end: 12px; border-block-end: 1px solid var(--n-border);
}
.n-mobile ul { list-style: none; margin: 0; padding: 0; }
.n-mobile ul ul { padding-inline-start: 14px; border-inline-start: 2px solid var(--n-border); }
.n-mobile a { display: block; padding: 11px 6px; color: var(--n-text); font-weight: 600; }
.n-mobile a:hover { color: var(--n-link); }
.n-mobile li + li { border-block-start: 1px solid var(--n-border); }

/* =========================================================
   7. شريط الأخبار العاجلة
   ========================================================= */
.n-breaking { background: var(--n-surface); border-block-end: 1px solid var(--n-border); }
.n-breaking__in { display: flex; align-items: center; gap: 14px; min-height: 42px; }
.n-breaking__label {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  background: var(--n-danger); color: #fff; font-size: .76rem; font-weight: 700;
  padding: 4px 12px; border-radius: 2px;
}
.n-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: n-pulse 1.5s infinite; }
@keyframes n-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.n-breaking__vp { flex: 1; overflow: hidden; height: 24px; }
.n-breaking__track { transition: transform .5s ease; }
.n-breaking__item { height: 24px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-breaking__item a { color: var(--n-text); font-size: .9rem; font-weight: 600; }
.n-breaking__item a:hover { color: var(--n-link); }

/* =========================================================
   8. البطاقات
   ========================================================= */
.n-card { display: flex; flex-direction: column; gap: 9px; height: 100%; }
.n-card__thumb {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--n-skeleton); border-radius: var(--n-radius);
}
.n-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.n-card:hover .n-card__thumb img { transform: scale(1.045); }
.n-card__thumb .n-cat { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; z-index: 2; }
.n-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.n-card__title { margin: 0; font-size: 1.06rem; font-weight: 700; line-height: 1.65; }
.n-card__title a { color: var(--n-heading); }
.n-card__title a:hover { color: var(--n-link); }
.n-card__excerpt { margin: 0; color: var(--n-muted); font-size: .89rem; line-height: 1.8; }
.n-card .n-meta { margin-block-start: auto; }

/* بطاقة نصية (بلا صورة) */
.n-card--text {
  padding: 15px 16px; background: var(--n-surface);
  border: 1px solid var(--n-border); border-inline-start: 3px solid var(--n-brand);
  border-radius: var(--n-radius);
}
.n-card--text .n-card__title { font-size: 1.12rem; }

/* بطاقة أفقية */
.n-card--row { flex-direction: row; gap: 14px; align-items: flex-start; }
.n-card--row .n-card__thumb { flex: 0 0 190px; aspect-ratio: 4 / 3; }
.n-card--row .n-card__body { flex: 1; display: flex; flex-direction: column; gap: 7px; }

/* عنوان مختصر (قوائم) */
.n-head { display: flex; gap: 11px; align-items: flex-start; }
.n-head + .n-head { margin-block-start: 12px; padding-block-start: 12px; border-block-start: 1px solid var(--n-border); }
.n-head__thumb { flex: 0 0 78px; aspect-ratio: 1; border-radius: var(--n-radius); overflow: hidden; background: var(--n-skeleton); }
.n-head__thumb img { width: 100%; height: 100%; object-fit: cover; }
.n-head__num {
  flex: 0 0 26px; height: 26px; display: grid; place-items: center;
  background: var(--n-brand-soft); color: var(--n-link);
  border-radius: 3px; font-size: .84rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.n-head__title { margin: 0 0 4px; font-size: .93rem; font-weight: 600; line-height: 1.72; }
.n-head__title a { color: var(--n-heading); }
.n-head__title a:hover { color: var(--n-link); }
.n-head__time { font-size: .74rem; color: var(--n-dim); }

/* =========================================================
   9. الواجهة الرئيسية
   ========================================================= */
.n-hero { padding-block: 22px; }
.n-hero__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; }

.n-lead__thumb {
  position: relative; display: block; overflow: hidden; margin-block-end: 14px;
  aspect-ratio: 16 / 9; background: var(--n-skeleton); border-radius: var(--n-radius-lg);
}
.n-lead__thumb img { width: 100%; height: 100%; object-fit: cover; }
.n-lead__title { margin: 10px 0 10px; font-size: clamp(1.5rem, 2.9vw, 2.15rem); font-weight: 800; line-height: 1.5; }
.n-lead__title a { color: var(--n-heading); }
.n-lead__title a:hover { color: var(--n-link); }
.n-lead__excerpt { margin: 0 0 12px; color: var(--n-muted); font-size: 1.02rem; line-height: 1.85; }

/* عمود آخر الأخبار */
.n-latest {
  background: var(--n-surface); border: 1px solid var(--n-border);
  border-radius: var(--n-radius); overflow: hidden; height: fit-content;
}
.n-latest__head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 15px; background: var(--n-brand); color: var(--n-brand-ink);
  font-size: .95rem; font-weight: 700;
}
.n-latest__head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.n-latest__list { list-style: none; margin: 0; padding: 0; }
.n-latest__list li { padding: 11px 15px; border-block-start: 1px solid var(--n-border); }
.n-latest__list li:first-child { border-block-start: 0; }
.n-latest__list a { display: block; color: var(--n-heading); font-size: .93rem; font-weight: 600; line-height: 1.7; }
.n-latest__list a:hover { color: var(--n-link); }
.n-latest__list time { display: block; margin-block-start: 3px; font-size: .74rem; color: var(--n-dim); font-variant-numeric: tabular-nums; }
.n-latest__more { display: block; padding: 10px; text-align: center; background: var(--n-surface-2); font-size: .85rem; font-weight: 700; border-block-start: 1px solid var(--n-border); }

/* الشريط الثانوي تحت المقدمة */
.n-subhero { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--n-gap); padding-block-end: 22px; }

/* =========================================================
   10. الأقسام
   ========================================================= */
.n-section { padding-block: 30px; border-block-start: 1px solid var(--n-border); }
.n-section--alt { background: var(--n-bg-alt); }
.n-section--flat { border-block-start: 0; }

.n-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-block-end: 20px; padding-block-end: 10px;
  border-block-end: 2px solid var(--n-border);
  position: relative;
}
.n-section__head::after {
  content: ""; position: absolute; inset-block-end: -2px; inset-inline-start: 0;
  width: 96px; height: 2px; background: var(--n-brand);
}
.n-section__title { margin: 0; font-size: 1.22rem; font-weight: 800; }
.n-section__title a { color: inherit; }
.n-section__more { font-size: .85rem; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.n-section__more svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
[dir="rtl"] .n-section__more svg { transform: scaleX(-1); }

/* =========================================================
   11. المحتوى والشريط الجانبي
   ========================================================= */
.n-main { padding-block: 26px; min-height: 45vh; }
.n-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 32px; align-items: start; }
.n-layout--start { grid-template-columns: 320px minmax(0,1fr); }
.n-layout--start .n-content { order: 2; }
.n-layout--start .n-side { order: 1; }
.n-layout--full { grid-template-columns: minmax(0,1fr); }

.n-side { display: grid; gap: 20px; position: sticky; inset-block-start: calc(var(--n-nav-h) + 16px); }
.n-widget {
  background: var(--n-surface); border: 1px solid var(--n-border);
  border-radius: var(--n-radius); padding: 16px;
}
.n-widget .widget-title, .n-widget .wp-block-heading, .n-widget__title {
  margin: 0 0 13px; padding-block-end: 9px; position: relative;
  border-block-end: 2px solid var(--n-border);
  font-size: 1rem; font-weight: 800;
}
.n-widget .widget-title::after, .n-widget .wp-block-heading::after, .n-widget__title::after {
  content: ""; position: absolute; inset-block-end: -2px; inset-inline-start: 0;
  width: 48px; height: 2px; background: var(--n-brand);
}
.n-widget ul { list-style: none; margin: 0; padding: 0; }
.n-widget > ul > li,
.n-widget .wp-block-categories-list li,
.n-widget .wp-block-archives-list li,
.n-widget .wp-block-latest-posts__list li,
.n-widget .wp-block-page-list li {
  padding: 8px 0; border-block-end: 1px solid var(--n-border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.n-widget li:last-child { border-block-end: 0; }
.n-widget a { color: var(--n-text); font-size: .93rem; }
.n-widget a:hover { color: var(--n-link); }
.n-widget__count {
  font-size: .74rem; font-weight: 700; color: var(--n-dim);
  background: var(--n-surface-2); border-radius: 20px; padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}

/* سحابة الوسوم */
.tagcloud, .wp-block-tag-cloud, .n-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tagcloud a, .wp-block-tag-cloud a, .n-tags a {
  display: inline-block; padding: 4px 11px; font-size: .82rem !important;
  background: var(--n-surface-2); border: 1px solid var(--n-border);
  border-radius: 20px; color: var(--n-muted);
}
.tagcloud a:hover, .wp-block-tag-cloud a:hover, .n-tags a:hover {
  background: var(--n-brand); border-color: var(--n-brand); color: var(--n-brand-ink);
}

/* =========================================================
   12. المقال المفرد
   ========================================================= */
.n-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-block-end: 12px; font-size: .8rem; color: var(--n-dim);
}
.n-crumbs a { color: var(--n-muted); }
.n-crumbs a:hover { color: var(--n-link); }
.n-crumbs__sep { opacity: .5; }

.n-single__title { margin: 8px 0 12px; font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 800; line-height: 1.5; }
.n-single__lead { margin: 0 0 14px; font-size: 1.1rem; line-height: 1.95; color: var(--n-muted); font-weight: 500; }
.n-single__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  padding-block: 12px; border-block: 1px solid var(--n-border);
  font-size: .84rem; color: var(--n-muted);
}
.n-single__meta > * { display: inline-flex; align-items: center; gap: 6px; }
.n-single__meta a { color: inherit; font-weight: 600; }
.n-single__meta a:hover { color: var(--n-link); }
.n-single__meta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.n-single__figure { margin: 18px 0; }
.n-single__figure img { width: 100%; border-radius: var(--n-radius-lg); }
.n-single__figure figcaption {
  margin-block-start: 8px; padding-inline-start: 10px;
  border-inline-start: 3px solid var(--n-border-2);
  font-size: .82rem; color: var(--n-muted);
}

/* شريط تقدم القراءة */
.n-progress { position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px; z-index: 999; pointer-events: none; }
.n-progress__bar { height: 100%; width: 0; background: var(--n-brand); }

/* نص المقال */
.n-entry { font-size: 1.06rem; line-height: 2.05; }
.n-entry > * { margin-block-end: 1.2em; }
.n-entry > *:last-child { margin-block-end: 0; }
.n-entry h2 { font-size: 1.42rem; margin-block: 1.5em .6em; }
.n-entry h3 { font-size: 1.22rem; margin-block: 1.4em .5em; }
.n-entry a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.n-entry img, .n-entry figure img { border-radius: var(--n-radius); }
.n-entry figcaption { margin-block-start: 7px; font-size: .83rem; color: var(--n-muted); text-align: center; }
.n-entry li { margin-block-end: .45em; }
.n-entry ul, .n-entry ol { padding-inline-start: 1.6em; }

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { max-width: min(1060px, 100vw - 36px); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); border-radius: 0 !important; }
.wp-caption { max-width: 100%; }
.sticky .n-card__title::before { content: "★ "; color: var(--n-brand); }

/* الوسوم أسفل المقال */
.n-posttags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 22px; }
.n-posttags__label { font-size: .86rem; font-weight: 700; color: var(--n-muted); }

/* صندوق الكاتب */
.n-author {
  display: flex; gap: 15px; padding: 18px; margin-block: 24px;
  background: var(--n-surface); border: 1px solid var(--n-border); border-radius: var(--n-radius);
}
.n-author img { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.n-author h4 { margin: 0 0 5px; font-size: 1.02rem; }
.n-author p { margin: 0; font-size: .9rem; color: var(--n-muted); }

/* تنقّل المقالات */
.n-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-block: 24px; }
.n-postnav__item {
  padding: 14px 16px; background: var(--n-surface);
  border: 1px solid var(--n-border); border-radius: var(--n-radius); transition: var(--n-t);
}
.n-postnav__item:hover { border-color: var(--n-brand); }
.n-postnav__label { display: block; margin-block-end: 5px; font-size: .74rem; font-weight: 700; color: var(--n-dim); }
.n-postnav__title { font-size: .94rem; font-weight: 600; color: var(--n-heading); line-height: 1.65; }
.n-postnav__item--next { text-align: end; }

/* التعليقات */
.n-comments { margin-block-start: 32px; }
.n-comments__title { font-size: 1.15rem; margin-block-end: 18px; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list ol.children { list-style: none; padding-inline-start: 24px; margin-block-start: 12px; }
.comment-body { padding: 15px; margin-block-end: 12px; background: var(--n-surface); border: 1px solid var(--n-border); border-radius: var(--n-radius); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block-end: 9px; }
.comment-author { display: flex; align-items: center; gap: 9px; }
.comment-author img { width: 38px; height: 38px; border-radius: 50%; }
.comment-author .fn { font-style: normal; font-weight: 700; color: var(--n-heading); }
.comment-metadata { font-size: .76rem; color: var(--n-dim); }
.comment-metadata a { color: inherit; }
.reply a { font-size: .82rem; font-weight: 700; }
.comment-respond { padding: 18px; background: var(--n-surface); border: 1px solid var(--n-border); border-radius: var(--n-radius); }
.comment-reply-title { font-size: 1.05rem; margin-block-end: 12px; }
.comment-form p { margin-block-end: 12px; }
.comment-form label { display: block; margin-block-end: 5px; font-size: .86rem; font-weight: 600; }
.comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form-cookies-consent input { width: auto; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* =========================================================
   13. الأرشيف والتنقل
   ========================================================= */
.n-archive-head { padding-block: 22px; background: var(--n-bg-alt); border-block-end: 1px solid var(--n-border); }
.n-archive-head h1 { margin: 0 0 5px; }
.n-archive-head p { margin: 0; color: var(--n-muted); font-size: .92rem; }

.n-pagination { margin-block-start: 30px; }
.n-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.n-pagination .page-numbers {
  display: grid; place-items: center; min-width: 38px; height: 38px; padding-inline: 11px;
  background: var(--n-surface); border: 1px solid var(--n-border); border-radius: var(--n-radius);
  color: var(--n-text); font-size: .89rem; font-weight: 700; transition: var(--n-t);
  font-variant-numeric: tabular-nums;
}
.n-pagination a.page-numbers:hover { border-color: var(--n-brand); color: var(--n-link); background: var(--n-brand-soft); }
.n-pagination .page-numbers.current { background: var(--n-brand); border-color: var(--n-brand); color: var(--n-brand-ink); }

.n-empty { padding: 52px 18px; text-align: center; }
.n-empty__code { font-size: clamp(3.6rem, 13vw, 7rem); font-weight: 900; line-height: 1; color: var(--n-brand); }
.n-empty h1, .n-empty h2 { margin-block: 12px 8px; }
.n-empty p { max-width: 460px; margin-inline: auto; color: var(--n-muted); }
.n-empty form { max-width: 400px; margin: 20px auto 0; }

/* =========================================================
   14. التذييل
   ========================================================= */
.n-footer { margin-block-start: 36px; background: var(--n-bg-alt); border-block-start: 3px solid var(--n-brand); }

.n-footer__cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px;
  padding-block: 40px 30px;
}
.n-footer__col h3 {
  margin: 0 0 14px; padding-block-end: 9px; position: relative;
  font-size: 1.02rem; font-weight: 800;
}
.n-footer__col h3::after {
  content: ""; position: absolute; inset-block-end: 0; inset-inline-start: 0;
  width: 36px; height: 3px; background: var(--n-brand); border-radius: 2px;
}
.n-footer__col h4 {
  margin: 22px 0 10px; font-size: .88rem; font-weight: 700;
  color: var(--n-muted); text-transform: none; letter-spacing: .01em;
}
.n-footer__col p { color: var(--n-muted); font-size: .92rem; line-height: 1.95; }
.n-footer__col ul { list-style: none; margin: 0; padding: 0; }
.n-footer__col li { padding-block: 5px; }
.n-footer__col a { color: var(--n-muted); font-size: .92rem; }
.n-footer__col a:hover { color: var(--n-link); }

.n-footer__logo { display: flex; align-items: center; gap: 10px; margin-block-end: 14px; }
.n-footer__logo img { max-height: 46px; width: auto; }

/* عمود الأقسام: شبكة مضغوطة */
.n-footer__cats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px 14px; }
.n-footer__cats a { display: inline-flex; align-items: center; gap: 6px; }
.n-footer__cats a::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--n-brand); flex-shrink: 0; }

.n-footer__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.n-footer__tags a {
  padding: 3px 10px; font-size: .8rem;
  background: var(--n-surface); border: 1px solid var(--n-border); border-radius: 20px;
}
.n-footer__tags a:hover { background: var(--n-brand); border-color: var(--n-brand); color: var(--n-brand-ink); }

/* عمود التواصل */
.n-footer__contact li a {
  display: flex; align-items: center; gap: 9px; padding: 7px 0;
  border-block-end: 1px solid var(--n-border);
}
.n-footer__contact li:last-child a { border-block-end: 0; }
.n-footer__contact svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; opacity: .7; }
.n-footer__note { margin-block-start: 16px; font-size: .86rem; color: var(--n-dim); }

.n-footer__bottom { border-block-start: 1px solid var(--n-border); padding-block: 16px; }
.n-footer__bottom-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--n-muted);
}
.n-footer__bottom p { margin: 0; }
.n-footer__menu { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.n-footer__menu a { color: var(--n-muted); }
.n-footer__menu a:hover { color: var(--n-link); }

/* زر العودة للأعلى */
.n-top {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 400;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--n-brand); color: var(--n-brand-ink);
  border: 0; border-radius: var(--n-radius); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--n-t);
  box-shadow: var(--n-shadow-lg);
}
.n-top.is-on { opacity: 1; visibility: visible; transform: translateY(0); }
.n-top:hover { background: var(--n-brand-2); }
.n-top svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================
   15. الإعلانات
   ========================================================= */
.n-ad { margin-block: 22px; text-align: center; }
.n-ad:empty { display: none; }
.n-ad > * { margin-inline: auto; }
.n-ad--inline { margin-block: 26px; padding-block: 14px; border-block: 1px solid var(--n-border); }

/* =========================================================
   16. الاستجابة والطباعة
   ========================================================= */
@media (max-width: 1080px) {
  .n-layout, .n-layout--start { grid-template-columns: minmax(0,1fr); }
  .n-layout--start .n-content, .n-layout--start .n-side { order: initial; }
  .n-side { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .n-subhero { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .n-g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .n-masthead__in { grid-template-columns: auto auto; row-gap: 12px; }
  .n-masthead__ad { grid-column: 1 / -1; order: 3; }
  .n-nav { display: none; }
  .n-burger { display: grid; }
  .n-navbar__in { justify-content: space-between; }
  .n-navbar__end { margin-inline-start: 0; }
  .n-hero__grid { grid-template-columns: minmax(0,1fr); }
  .n-footer__cols { grid-template-columns: 1fr 1fr; }
  .n-footer__col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --n-fs: 16px; --n-gap: 16px; }
  .n-g2, .n-g3, .n-g4, .n-subhero { grid-template-columns: minmax(0,1fr); }
  .n-side { grid-template-columns: minmax(0,1fr); }
  .n-brand__name { font-size: 1.2rem; }
  .n-brand__slogan { display: none; }
  .n-brand img { max-height: 42px; }
  .n-card--row { flex-direction: column; }
  .n-card--row .n-card__thumb { flex: none; width: 100%; aspect-ratio: 16/9; }
  .n-postnav { grid-template-columns: 1fr; }
  .n-footer__cols { grid-template-columns: 1fr; gap: 26px; }
  .n-footer__col:first-child { grid-column: auto; }
  .n-footer__bottom-in { flex-direction: column; text-align: center; }
  .comment-list ol.children { padding-inline-start: 12px; }
  .n-topbar__in { justify-content: center; }
  .n-topbar__links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .n-topbar, .n-masthead__tools, .n-navbar, .n-breaking, .n-side,
  .n-footer, .n-top, .n-comments, .n-ad, .n-postnav { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .n-layout { grid-template-columns: 1fr; }
  a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
