/* ═══════════════════════════════════════════════════════════════════════════
   هوية ماكينة البصرية — Slate (أساس) · Gold (استشاري/CTA) · Electric Blue (تقني)
   ثنائي الاتجاه (RTL) · جوال أولاً
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --slate-950: #0a0f1a;
  --slate-900: #0f1626;
  --slate-800: #1b2438;
  --slate-700: #2a3550;
  --gold: #d4af37;
  --gold-soft: #e7c873;
  --gold-deep: #b8932b;
  --electric: #2f6bff;
  --electric-soft: #5b8bff;
  --max: 1120px;

  /* رموز دلالية — تتبدّل بين الوضعين (الليلي افتراضي) */
  --bg: #0a0f1a;
  --surface: rgba(15,22,38,.6);
  --surface-solid: #0f1626;
  --border: rgba(255,255,255,.1);
  --hairline: rgba(255,255,255,.06);
  --heading: #ffffff;
  --text: #eef1f8;
  --muted: #9aa6c0;
  --field-bg: rgba(10,15,26,.6);
  --header-bg: rgba(10,15,26,.82);
  --glow: rgba(47,107,255,.12);
  --gold-ink: #d4af37;  /* الذهبي حين يُستخدم كنص (آمن على الداكن) */
  --link: #5b8bff;      /* رابط/تمييز كنص (آمن على الداكن) */
}

/* ── الوضع النهاري ── */
[data-theme="light"] {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --border: rgba(15,22,38,.12);
  --hairline: rgba(15,22,38,.08);
  --heading: #0f1626;
  --text: #18233d;
  --muted: #586079;
  --field-bg: #ffffff;
  --header-bg: rgba(255,255,255,.85);
  --glow: rgba(47,107,255,.07);
  --gold-ink: #8a6c16;  /* ذهبي داكن آمن كنص على الفاتح (AA) */
  --link: #1b4fd6;      /* أزرق رابط آمن كنص على الفاتح (AA) */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Tajawal", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(60% 50% at 50% 0%, var(--glow), transparent 70%);
  background-attachment: fixed;
  transition: background-color .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
@media (min-width: 768px) { .section { padding: 110px 0; } }

/* ── أزرار ── */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 14px; padding: 14px 26px; font-weight: 700; cursor: pointer; border: 0; transition: .2s; font-family: inherit; font-size: 1rem; }
.btn-gold { background: var(--gold); color: var(--slate-950); box-shadow: 0 8px 30px -8px rgba(212,175,55,.45); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost { background: transparent; color: var(--link); border: 1px solid rgba(47,107,255,.4); }
.btn-ghost:hover { background: rgba(47,107,255,.1); }

/* ── بطاقات ── */
.card { border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(6px); border-radius: 18px; padding: 28px; }
.eyebrow { display: inline-block; border: 1px solid rgba(212,175,55,.3); background: rgba(212,175,55,.06); color: var(--gold-ink); padding: 6px 16px; border-radius: 999px; font-size: .9rem; font-weight: 700; margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 1.1rem; }
.center { text-align: center; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── شريط الإعلان العلوي ── */
.mkn-topbar { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); color: var(--slate-950); font-size: .9rem; font-weight: 700; }
.mkn-topbar-inner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 40px; position: relative; text-align: center; }
.mkn-topbar a { color: var(--slate-950); text-decoration: underline; }
.mkn-topbar-close { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--slate-950); font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: .65; padding: 0 6px; }
.mkn-topbar-close:hover { opacity: 1; }

/* ── الهيدر ── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hairline); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 16px; }
.nav-menu { display: none; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--muted); font-size: .95rem; }
.nav-menu a:hover { color: var(--heading); }
@media (min-width: 900px) { .nav-menu { display: flex; } }
.mkn-logo svg { height: 44px; width: auto; }
.mkn-logo-text { font-weight: 800; font-size: 1.5rem; color: var(--gold); }

/* ── مبدّل الوضع ── */
.mkn-theme { background: transparent; border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: .2s; flex: 0 0 auto; }
.mkn-theme:hover { border-color: var(--gold); color: var(--gold-ink); }
.mkn-theme svg { width: 19px; height: 19px; }
.mkn-theme .ico-sun { display: none; }
[data-theme="light"] .mkn-theme .ico-moon { display: none; }
[data-theme="light"] .mkn-theme .ico-sun { display: inline; }

/* ── البطل ── */
.hero { position: relative; overflow: hidden; text-align: center; }
.hero h1 { font-size: 2.3rem; font-weight: 800; max-width: 18ch; margin-inline: auto; }
@media (min-width: 768px) { .hero h1 { font-size: 3.6rem; } }
.hero .grad { background: linear-gradient(90deg, var(--gold), var(--electric)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 60ch; margin: 22px auto 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }

/* ── الخدمات / القطاعات ── */
.svc-icon { display: inline-flex; padding: 12px; border-radius: 14px; border: 1px solid rgba(47,107,255,.3); background: rgba(47,107,255,.06); color: var(--link); margin-bottom: 16px; }
.svc-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.25rem; }
.tagline { color: var(--gold-ink); font-size: .9rem; margin: -4px 0 10px; }
.feat-list { list-style: none; padding: 0; margin: 16px 0 0; color: var(--muted); font-size: .95rem; }
.feat-list li { display: flex; gap: 8px; margin-bottom: 8px; }
.feat-list li::before { content: "◂"; color: var(--link); }
.check-list { list-style: none; padding: 0; margin: 0 0 24px; }
.check-list li { display: flex; gap: 8px; margin-bottom: 8px; color: var(--text); }
.check-list li::before { content: "✓"; color: var(--gold-ink); font-weight: 700; }

/* ── شريط القطاع المميّز ── */
.sector { border-radius: 22px; padding: 40px; border: 1px solid rgba(255,255,255,.08); background: linear-gradient(135deg, rgba(27,36,56,.7), var(--surface)); }
.sector.legal { border-inline-start: 4px solid var(--gold); }
.sector.acct { border-inline-start: 4px solid var(--electric); }

/* ── الباقات ── */
.plan { display: flex; flex-direction: column; }
.plan.featured { box-shadow: 0 0 0 2px var(--gold), 0 8px 30px -8px rgba(212,175,55,.45); }
.plan .price { font-size: 2rem; font-weight: 800; margin: 16px 0; }
.plan .price small { font-size: .95rem; font-weight: 400; color: var(--muted); }
.badge { align-self: flex-start; background: rgba(212,175,55,.15); color: var(--gold-ink); padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; margin-bottom: 12px; }

/* ── المستشارون ── */
.consultant .avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--electric), var(--gold)); margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { background: var(--hairline); color: var(--muted); padding: 4px 12px; border-radius: 999px; font-size: .8rem; }

/* ── النماذج ── */
.field { width: 100%; border: 1px solid var(--border); background: var(--field-bg); color: var(--text); border-radius: 12px; padding: 13px 16px; font-family: inherit; font-size: 1rem; margin-bottom: 14px; }
.field:focus { outline: none; border-color: var(--electric); }
.form-grid { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.form-note { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 10px; }
.mkn-reply { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(47,107,255,.3); background: rgba(47,107,255,.08); color: var(--text); display: none; }
.mkn-reply.show { display: block; }
.mkn-reply .who { color: var(--link); font-weight: 700; font-size: .85rem; margin-bottom: 4px; }

/* ── التذييل ── */
/* ── ودجات التذييل ── */
.footer-widgets { border-top: 1px solid var(--hairline); padding: 56px 0 16px; }
.footer-cols { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-cols { grid-template-columns: repeat(3, 1fr); } }
.footer-col .widget { background: transparent; border: 0; padding: 0; margin-bottom: 20px; }
.footer-col h4, .footer-widget-title { color: var(--heading); font-size: 1rem; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 5px 0; border: 0; display: block; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--link); }
.footer-col .mkn-logo svg { height: 40px; }

/* ── نافذة منبثقة (الاشتراك البريدي) ── */
.mkn-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.mkn-modal[hidden] { display: none; }
.mkn-modal-backdrop { position: absolute; inset: 0; background: rgba(5,8,15,.72); backdrop-filter: blur(3px); }
.mkn-modal-card { position: relative; z-index: 1; width: 100%; max-width: 440px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 18px; padding: 34px 30px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.65); animation: mkn-pop .25s ease; }
@keyframes mkn-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.mkn-modal-card h3 { font-size: 1.4rem; margin: 0 0 8px; }
.mkn-modal-close { position: absolute; inset-inline-end: 14px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.mkn-modal-close:hover { color: var(--heading); }
.mkn-nl-form { margin-top: 16px; }
.mkn-nl-form .field { margin-bottom: 12px; }
.mkn-nl-msg { text-align: center; margin: 12px 0 0; min-height: 1.2em; }
@media (prefers-reduced-motion: reduce) { .mkn-modal-card { animation: none; } }

/* ── زر واتساب العائم ── */
.mkn-wa {
  position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #25d366; color: #fff;
  box-shadow: 0 8px 26px -6px rgba(37,211,102,.6);
  transition: transform .2s; animation: mkn-wa-pulse 2.4s infinite;
}
.mkn-wa:hover { transform: scale(1.08); color: #fff; }
.mkn-wa svg { width: 32px; height: 32px; }
@keyframes mkn-wa-pulse {
  0% { box-shadow: 0 8px 26px -6px rgba(37,211,102,.6), 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 8px 26px -6px rgba(37,211,102,.6), 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 26px -6px rgba(37,211,102,.6), 0 0 0 0 rgba(37,211,102,0); }
}
@media (prefers-reduced-motion: reduce) { .mkn-wa { animation: none; } }

/* ── روابط التواصل الاجتماعي ── */
.social-list { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social-list a {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.social-list a:hover { color: var(--slate-950); background: var(--gold); border-color: var(--gold); }
.social-list .ico { width: 19px; height: 19px; }

.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0; color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: space-between; }
@media (min-width: 768px) { .footer-row { flex-direction: row; } }

/* ── نموذج بحث المدوّنة ── */
.mkn-search { display: flex; gap: 8px; }
.mkn-search input[type="search"] {
  flex: 1; border: 1px solid var(--border); background: var(--field-bg);
  color: var(--text); border-radius: 12px; padding: 12px 16px; font-family: inherit; font-size: 1rem;
}
.mkn-search input[type="search"]:focus { outline: none; border-color: var(--electric); }
.mkn-search .btn { padding: 12px 22px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── شريط تصنيفات المدوّنة ── */
.cat-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 36px; }
.cat-pill {
  border: 1px solid var(--border); background: var(--hairline);
  color: var(--muted); padding: 7px 16px; border-radius: 999px; font-size: .9rem; transition: .2s;
}
.cat-pill:hover { border-color: var(--electric); color: var(--heading); }
.cat-pill.active { background: var(--gold); color: var(--slate-950); border-color: var(--gold); font-weight: 700; }
.cat-pill .cnt { opacity: .6; font-size: .8em; }
a.chip { transition: .2s; }
a.chip:hover { background: rgba(47,107,255,.15); color: var(--link); }

/* ── تخطيط المقال + الشريط الجانبي ── */
.post-layout { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 920px) { .post-layout { grid-template-columns: 1fr 300px; } }
.post-aside { align-self: start; }
@media (min-width: 920px) { .post-aside { position: sticky; top: 88px; } }

.widget { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 22px; }
.widget h3 { font-size: 1.05rem; margin: 0 0 14px; color: var(--heading); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hairline); }
.widget li:last-child { border-bottom: 0; }
.widget li a { color: var(--text); font-size: .95rem; }
.widget li a:hover { color: var(--link); }
.widget-cats .cnt { color: var(--muted); font-size: .8rem; background: var(--hairline); padding: 1px 9px; border-radius: 999px; }
.widget-recent .date { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.widget-recent li { flex-direction: column; gap: 2px; align-items: flex-start; }
.widget-cta { background: linear-gradient(135deg, rgba(212,175,55,.12), rgba(47,107,255,.1)); }

/* ── محتوى المقال ── */
.post-content { line-height: 1.95; font-size: 1.05rem; color: var(--text); }
.post-content h2 { font-size: 1.4rem; margin: 1.6em 0 .5em; color: var(--heading); }
.post-content h3 { font-size: 1.15rem; margin: 1.3em 0 .4em; color: var(--heading); }
.post-content p { margin: 0 0 1.1em; }
.post-content ul, .post-content ol { margin: 0 0 1.1em; padding-inline-start: 1.4em; }
.post-content li { margin-bottom: .5em; }
.post-content a { color: var(--gold-ink); text-decoration: underline; }
.post-content blockquote { border-inline-start: 3px solid var(--gold); margin: 1.2em 0; padding: .2em 1em; color: var(--muted); }
.post-content img { border-radius: 12px; margin: 1em 0; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 1.9rem; }
@media (min-width: 768px) { .section-head h2 { font-size: 2.4rem; } }
