/* ============================================================
   Zoon Dark Mode v1.0.12 — أنماط الوضع الليلي
   - المحاكي: عبر متغيّرات --q-* (يستخدمها فعلاً).
   - الهب/لوحة الطالب/الثيم: استهداف أصناف CSS مباشرةً (تستخدم ألواناً ثابتة).
   ============================================================ */

:root { --zdm-anim: 0.25s ease; }

/* الانتقال اللوني يُطبّق فقط لحظة التبديل (عبر إضافة .zdm-animating على <html>)
   بدل تطبيقه دائماً على كل عنصر — هذا يمنع repaint ثقيلاً مع إعادة رسم React
   في المحاكي وبقية الصفحات. */
html.zdm-animating body,
html.zdm-animating body * {
	transition: background-color var(--zdm-anim), border-color var(--zdm-anim), color var(--zdm-anim) !important;
}
html.zdm-animating img,
html.zdm-animating video,
html.zdm-animating iframe,
html.zdm-animating svg { transition: none !important; }

/* ============================================================
   1) زرّ التبديل العائم
   ============================================================ */
#zdm-toggle {
	position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 2147483000;
	width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
	display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1;
	background: #1A5FA8; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
	transition: transform .2s ease, background .25s ease;
}
#zdm-toggle:hover { transform: scale(1.08); }
#zdm-toggle:active { transform: scale(0.96); }
#zdm-toggle.is-dark { background: #F5C242; color: #1a1a1a; }
/* (v1.0.11) إظهار/إخفاء الأيقونتين مرتبط بالسمة لا بالمعرّف — ليعمل أيضاً
   لأي زرّ مدمج تبنيه إضافة أخرى عبر zdm_render_toggle() (Zoon Header). */
[data-zdm-toggle] .zdm-ic-moon { display: none; }
[data-zdm-toggle] .zdm-ic-sun  { display: flex; }
[data-zdm-toggle].is-dark .zdm-ic-moon { display: flex; }
[data-zdm-toggle].is-dark .zdm-ic-sun  { display: none; }

/* (v1.0.12) أيقونتان خطّيتان بدل الإيموجي — الإيموجي يُرسم بألوان النظام
   فلا يرث currentColor، فكان الزرّ يبدو غريباً بين أيقونات الشريط الخطّية. */
[data-zdm-toggle] .zdm-ic { align-items: center; justify-content: center; }
[data-zdm-toggle] .zdm-ic svg { width: 1em; height: 1em; display: block; }
#zdm-toggle .zdm-ic svg { width: 24px; height: 24px; }
@media (max-width: 600px) { #zdm-toggle { width: 46px; height: 46px; font-size: 19px; bottom: 16px; inset-inline-start: 16px; } }

/* ============================================================
   2) المحاكي — تجاوز المتغيّرات (--q-*)
   ============================================================ */
html[data-theme="dark"] {
	/* (v1.0.13) 🔴 خلفية **العنصر الجذر**.
	   خلفية لوحة الرسم (canvas) تأتي من الجذر، ولا تنتقل إليها خلفية `body` إلا
	   إذا كان الجذر شفّافاً. وكانت هذه القاعدة تحمل متغيّرات `--q-*` فقط، والصبغ
	   على `body` وحده (السطر ~165) — فيُرسم الداكن على **صندوق body** لا على
	   الشاشة. وصندوق body بطول محتواه:
	     • صفحة مليئة ⇒ يملأ الشاشة ⇒ العطل مستور
	     • صفحة قصيرة (السلة الفارغة) ⇒ ينتهي في المنتصف ⇒ ما تحته أبيض
	   ولهذا بدا العطل «خاصّاً بالسلة»: هي أقصر صفحة في الموقع، لا أكثر. */
	background-color: #0F141B;

	--q-bg: #0F141B; --q-white: #161D28; --q-card: #161D28; --q-border: #2A3547;
	--q-text: #E6EAF2; --q-muted: #9AA7BD;
	--q-shadow: 0 2px 8px rgba(0,0,0,0.45); --q-shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
	--q-primary: #3B82F6; --q-quant: #22C55E; --q-verbal: #A855F7;
	--q-orange: #FB923C; --q-red: #F87171; --q-gold: #FBBF24;
	/* متغيّرات الهب أيضاً (احتياطاً لأي عنصر يستخدمها) */
	--zth-bg: #0F141B; --zth-card: #161D28; --zth-text: #E6EAF2; --zth-text-2: #9AA7BD;
}
/* لوحات المحاكي الفاتحة الصريحة */
html[data-theme="dark"] .zsim-mistakes-stats { background:#1c2433; border-color:#33405a; }
html[data-theme="dark"] .zsim-mistakes-stat { background:#222c3d; box-shadow:none; }
html[data-theme="dark"] .zsim-mistakes-stat.mastered { background:#15301f; }
html[data-theme="dark"] .zsim-mistakes-banner { background:#2a1720; color:#fda4af; border-color:#4a2230; }
html[data-theme="dark"] .zsim-cat-chip { background:#222c3d; color:var(--q-text); }

/* ============================================================
   3) Teacher Hub — استهداف الأصناف الثابتة مباشرة
   ============================================================ */
/* حاوية القسم + الترويسة */
html[data-theme="dark"] .zth-hub-section { background:#161D28; border-color:#2A3547; }
html[data-theme="dark"] .zth-hub-section-head { background:#161D28; }
html[data-theme="dark"] .zth-hub-section-head:hover { background:#1c2433; }
html[data-theme="dark"] .zth-hub-section-title { color:#E6EAF2; }
html[data-theme="dark"] .zth-hub-section-count { color:#9AA7BD; }

/* البطاقات */
html[data-theme="dark"] .zth-card { background:#1A2230; border-color:#2A3547; }
html[data-theme="dark"] .zth-card-title { color:#E6EAF2; }
html[data-theme="dark"] .zth-card-sub,
html[data-theme="dark"] .zth-card-meta { color:#9AA7BD; }
html[data-theme="dark"] .zth-card-progress { background:#2A3547; }
html[data-theme="dark"] .zth-card-locked .zth-card-icon { background:#475569; }
html[data-theme="dark"] .zth-card-locked-msg { color:#9AA7BD; }
html[data-theme="dark"] .zth-tag-locked { background:#2A3547; color:#9AA7BD; }
html[data-theme="dark"] .zth-tag-done { background:#103021; color:#6ee7b7; }
html[data-theme="dark"] .zth-tag-go { background:#13243a; color:#6EA8FE; }

/* الدرس المفتوح: التدفّق والعناصر */
html[data-theme="dark"] .zth-lesson-flow { background:#161D28; border-color:#2A3547; }
html[data-theme="dark"] .zth-lesson-flow-title { color:#6EA8FE; }
html[data-theme="dark"] .zth-lesson-flow-desc { color:#cbd5e1; }
html[data-theme="dark"] .zth-flow-item { border-color:#2A3547; }
html[data-theme="dark"] .zth-flow-item-head { background:#1c2433; }
html[data-theme="dark"] .zth-flow-item.is-done { border-color:#15803d; }
html[data-theme="dark"] .zth-flow-item.is-active { border-color:#3B82F6; }
html[data-theme="dark"] .zth-flow-asg-meta { color:#cbd5e1; }
html[data-theme="dark"] .zth-flow-btn:disabled,
html[data-theme="dark"] .zth-lesson-finish-btn:disabled { background:#2A3547; color:#6B7A99; }
html[data-theme="dark"] .zth-flow-complete { background:#103021; color:#6ee7b7; }
html[data-theme="dark"] .zth-flow-gate.is-need { background:#3a2e0a; color:#fcd34d; }
html[data-theme="dark"] .zth-flow-gate.is-pass { background:#103021; color:#6ee7b7; }

/* صناديق القفل/الرسائل + المودال */
html[data-theme="dark"] .zth-hub-locked { background:linear-gradient(135deg,#1c1809,#211d0a); border-color:#4a3f12; }
html[data-theme="dark"] .zth-hub-locked h3 { color:#fcd34d; }
html[data-theme="dark"] .zth-hub-locked p { color:#cbd5e1; }
html[data-theme="dark"] .zth-hub-msg { background:#161D28; color:#E6EAF2; border-color:#2A3547; }
html[data-theme="dark"] .zth-modal-box,
html[data-theme="dark"] .zth-modal-content { background:#161D28 !important; color:#E6EAF2; }

/* ============================================================
   4) لوحة الطالب (Zoon Student Dashboard) — استهداف دقيق
   (تُبقى الأرقام الملوّنة .zsd-stat .v والشارات .zsd-pill-* كما هي)
   ============================================================ */
/* النص الجذري (.zsd-wrap{color:#333}) → فاتح */
html[data-theme="dark"] .zsd-wrap { color:#E6EAF2; }

/* الأسطح البيضاء → داكنة */
html[data-theme="dark"] .zsd-card,
html[data-theme="dark"] .zsd-card-flat,
html[data-theme="dark"] .zsd-stat,
html[data-theme="dark"] .zsd-rec-card,
html[data-theme="dark"] .zsd-first-exam,
html[data-theme="dark"] .zsd-course,
html[data-theme="dark"] .zsd-achievement,
html[data-theme="dark"] .zsd-expired-card {
	background:#161D28 !important; border-color:#2A3547 !important;
}
/* لوحة التوصيات الكريمية + صفّ «أنت» المميّز + أيقونات الترحيب */
html[data-theme="dark"] .zsd-recommend { background:#1f1b0c !important; border-color:#4a3f12 !important; }
html[data-theme="dark"] .zsd-rank-row.me { background:#15243a !important; }
html[data-theme="dark"] .zsd-avatar,
html[data-theme="dark"] .zsd-cta-icon,
html[data-theme="dark"] .zsd-course-icon,
html[data-theme="dark"] .zsd-pill-mode-blue { background:#1c2940 !important; }

/* أشرطة التقدّم وخريطة النشاط (الخلفية الأساسية) */
html[data-theme="dark"] .zsd-bar-track,
html[data-theme="dark"] .zsd-heat { background:#222c3d !important; }

/* بطاقة «هدفي»: تدرّج أغمق متناسق مع الوضع الليلي (نص أبيض يبقى واضحاً) */
html[data-theme="dark"] .zsd-goal {
	background:linear-gradient(135deg,#13314f 0%,#0e3a44 100%) !important;
}

/* النصوص الخافتة (#6B7B8E) والروابط الزرقاء الداكنة → أوضح */
html[data-theme="dark"] .zsd-welcome-sub,
html[data-theme="dark"] .zsd-stat .l,
html[data-theme="dark"] .zsd-course-meta,
html[data-theme="dark"] .zsd-meta-small,
html[data-theme="dark"] .zsd-rec-meta,
html[data-theme="dark"] .zsd-lb-divider { color:#9AA7BD !important; }
html[data-theme="dark"] .zsd-chart-legend { color:#9AA7BD !important; }

/* عناوين عامة → فاتحة */
html[data-theme="dark"] .zsd-card-head,
html[data-theme="dark"] .zsd-rank-name,
html[data-theme="dark"] .zsd-rank-score,
html[data-theme="dark"] .zsd-course-title { color:#E6EAF2; }

/* ============================================================
   5) الثيم/الصفحة الرئيسية/Elementor + الصفحات الأخرى (أفضل-جهد)
   ============================================================ */
html[data-theme="dark"] body { background-color:#0F141B !important; color:#E6EAF2; }

/* أقسام/حاويات الثيم وبناة الصفحات → شفافة لتظهر الخلفية الداكنة */
html[data-theme="dark"] #page, html[data-theme="dark"] #content, html[data-theme="dark"] #main,
html[data-theme="dark"] .site, html[data-theme="dark"] .site-content, html[data-theme="dark"] .entry-content,
html[data-theme="dark"] .container, html[data-theme="dark"] section, html[data-theme="dark"] article,
html[data-theme="dark"] .elementor-section, html[data-theme="dark"] .elementor-container,
html[data-theme="dark"] .elementor-column-wrap, html[data-theme="dark"] .elementor-widget-wrap,
html[data-theme="dark"] .wp-block-group, html[data-theme="dark"] .e-con, html[data-theme="dark"] .e-con-inner {
	background-color: transparent !important; color:#E6EAF2;
}

/* أي عنصر بخلفية بيضاء مضمّنة (شائع في Elementor) */
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: #FFF"],
html[data-theme="dark"] [style*="background-color: #ffffff"],
html[data-theme="dark"] [style*="background-color:#ffffff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="rgb(255, 255, 255)"],
html[data-theme="dark"] [style*="rgb(255,255,255)"] {
	background-color:#161D28 !important;
}

/* البطاقات/الصناديق العامة + بطاقات Elementor */
html[data-theme="dark"] .card, html[data-theme="dark"] .widget, html[data-theme="dark"] .panel,
html[data-theme="dark"] .box, html[data-theme="dark"] .wp-block-group.has-background,
html[data-theme="dark"] .elementor-widget-container[class*="background"] {
	background-color:#161D28 !important; color:#E6EAF2; border-color:#2A3547;
}

/* النصوص والروابط */
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6,
html[data-theme="dark"] p, html[data-theme="dark"] li, html[data-theme="dark"] span,
html[data-theme="dark"] label, html[data-theme="dark"] td, html[data-theme="dark"] th,
html[data-theme="dark"] .elementor-heading-title, html[data-theme="dark"] .elementor-widget-text-editor {
	color:#E6EAF2;
}
html[data-theme="dark"] a { color:#6EA8FE; }
html[data-theme="dark"] a:hover { color:#93C5FD; }

/* الحقول والنماذج */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] textarea, html[data-theme="dark"] select {
	background-color:#1A2230 !important; color:#E6EAF2 !important; border-color:#2A3547 !important;
}
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color:#6B7A99; }

/* الجداول */
html[data-theme="dark"] table { border-color:#2A3547; }
html[data-theme="dark"] thead th, html[data-theme="dark"] tr:nth-child(even) td { background-color:#161D28; }

/* الترويسة/التذييل/القوائم */
html[data-theme="dark"] header, html[data-theme="dark"] .site-header, html[data-theme="dark"] footer,
html[data-theme="dark"] .site-footer, html[data-theme="dark"] nav, html[data-theme="dark"] .menu,
html[data-theme="dark"] .sub-menu { background-color:#11171F; color:#E6EAF2; }

/* WooCommerce */
html[data-theme="dark"] .woocommerce ul.products li.product,
html[data-theme="dark"] .woocommerce-page .product,
html[data-theme="dark"] .woocommerce table.shop_table,
html[data-theme="dark"] .woocommerce .cart_totals,
html[data-theme="dark"] .woocommerce-checkout #payment {
	background-color:#161D28 !important; color:#E6EAF2; border-color:#2A3547;
}

/* (v1.0.13) WooCommerce **بالكتل** (Cart/Checkout Blocks)
   القواعد أعلاه تخصّ WooCommerce الكلاسيكية (`table.shop_table` · `.cart_totals`)،
   وصفحتا السلة والدفع في المنصّة مبنيّتان بالكتل (`wp-block-woocommerce-cart`)
   فلم تكن تصلها قاعدة واحدة — تُعرض بألوانها الفاتحة داخل صفحة داكنة. */
html[data-theme="dark"] .wp-block-woocommerce-cart,
html[data-theme="dark"] .wp-block-woocommerce-checkout,
html[data-theme="dark"] .wc-block-cart,
html[data-theme="dark"] .wc-block-checkout,
html[data-theme="dark"] .wc-block-components-main,
html[data-theme="dark"] .wc-block-components-sidebar {
	background-color: transparent; color:#E6EAF2;
}

html[data-theme="dark"] .wc-block-cart__sidebar,
html[data-theme="dark"] .wc-block-components-sidebar .wc-block-components-panel,
html[data-theme="dark"] .wc-block-components-totals-wrapper,
html[data-theme="dark"] .wc-block-components-order-summary {
	background-color:#161D28; border-color:#2A3547; color:#E6EAF2;
}

html[data-theme="dark"] .wc-block-components-product-name,
html[data-theme="dark"] .wc-block-components-title,
html[data-theme="dark"] .wc-block-cart__empty-cart__title,
html[data-theme="dark"] .wc-block-components-totals-item__label,
html[data-theme="dark"] .wc-block-components-totals-item__value,
html[data-theme="dark"] .wc-block-components-product-metadata {
	color:#E6EAF2;
}
html[data-theme="dark"] .wc-block-components-product-price,
html[data-theme="dark"] .wc-block-components-formatted-money-amount {
	color:#F2F7FF;
}
html[data-theme="dark"] .wc-block-components-product-metadata__description,
html[data-theme="dark"] .wc-block-components-totals-footer-item-tax,
html[data-theme="dark"] .wc-block-components-text-input label {
	color:#9AA7BD;
}

html[data-theme="dark"] .wc-block-cart-items,
html[data-theme="dark"] .wc-block-cart-items__row,
html[data-theme="dark"] .wc-block-components-totals-item,
html[data-theme="dark"] .wc-block-components-panel {
	border-color:#2A3547;
}

/* الحقول: القسيمة والكمّية — بلا !important لئلّا تُجمَّد حالات التركيز */
html[data-theme="dark"] .wc-block-components-text-input input,
html[data-theme="dark"] .wc-block-components-quantity-selector,
html[data-theme="dark"] .wc-block-components-quantity-selector input {
	background-color:#1B2432; border-color:#2A3547; color:#E6EAF2;
}

/* الأزرار الثانوية فقط — زرّ المتابعة يحمل لون علامته ولا يُمسّ */
html[data-theme="dark"] .wc-block-components-button:not(.wc-block-cart__submit-button) {
	border-color:#2A3547; color:#E6EAF2;
}

/* أيقونة السلة الفارغة: دائرة فاتحة صارخة على خلفية داكنة */
html[data-theme="dark"] .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
	opacity:.55;
}

/* LearnDash */
html[data-theme="dark"] .learndash-wrapper .ld-item-list-item,
html[data-theme="dark"] .learndash-wrapper .ld-content-action,
html[data-theme="dark"] .learndash-wrapper .ld-tabs-content {
	background-color:#161D28 !important; color:#E6EAF2; border-color:#2A3547;
}

/* لا نقلب الشعارات/الصور */
html[data-theme="dark"] img { opacity:0.96; }

/* ============================================================
   6) شريط الباقات (الأصفر) + بطاقات الباقات — المحاكي والهب
   (ألوان ثابتة عالية الأسبقية تحت #zsim-root / .zth-hub)
   ============================================================ */
/* الشريط الأصفر → داكن بلمسة كهرمانية */
html[data-theme="dark"] #zsim-root .zsim-hub-purchase,
html[data-theme="dark"] .zth-hub .zth-packages {
	background: linear-gradient(135deg, #2a2410, #332b0e) !important;
	border-color: #4a3f12 !important;
}
html[data-theme="dark"] #zsim-root .zsim-hub-price-label,
html[data-theme="dark"] .zth-hub .zth-packages-title { color: #fcd34d !important; }
html[data-theme="dark"] #zsim-root .zsim-hub-price-value { color: #E6EAF2 !important; }
html[data-theme="dark"] #zsim-root .zsim-hub-price-sar { color: #9AA7BD !important; }

/* بطاقات الباقات البيضاء → داكنة */
html[data-theme="dark"] #zsim-root .zsim-hub-pkg,
html[data-theme="dark"] .zth-hub .zth-pkg {
	background: #1A2230 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] #zsim-root .zsim-hub-pkg-name,
html[data-theme="dark"] .zth-hub .zth-pkg-name { color: #E6EAF2 !important; }
html[data-theme="dark"] #zsim-root .zsim-hub-pkg-duration,
html[data-theme="dark"] .zth-hub .zth-pkg-duration,
html[data-theme="dark"] .zth-hub .zth-price-egp { color: #9AA7BD !important; }
/* السعر بالريال والأزرار الخضراء تبقى كما هي (هوية) */

/* ============================================================
   7) رماديّات/خلفيات فاتحة متبقية في المحاكي
   ============================================================ */
html[data-theme="dark"] #zsim-root .zsim-hub-sec-header:hover { background: #1c2433 !important; }
html[data-theme="dark"] #zsim-root .zsim-q-type.verbal { background:#2d1f3d; }
html[data-theme="dark"] #zsim-root .zsim-review-q.correct { background:#0f2417; border-color:#15803d; }
html[data-theme="dark"] #zsim-root .zsim-review-q.unanswered { background:#1a2230; border-color:#2A3547; }
html[data-theme="dark"] #zsim-root .zsim-review-q.wrong { background:#2a1518; border-color:#7f1d1d; }

/* ============================================================
   8) إصلاحات دقيقة: نصوص المحاكي + شريط المتبقّي + توصية اللوحة
   ============================================================ */
/* اسم بطاقة الاختبار (كان #1F2937 ثابتاً) → فاتح */
html[data-theme="dark"] #zsim-root .zsim-hubc-name { color: var(--q-text) !important; }

/* شريط المتبقّي على الاشتراك داخل البانر الأزرق (كان أزرق فاتح) → شفّاف داكن */
html[data-theme="dark"] #zsim-root .zsim-hub-days {
	background: rgba(0,0,0,0.28) !important;
	border-color: rgba(255,255,255,0.28) !important;
	color: #E0F2FE !important;
}

/* لوحة الطالب — نص التوصية وعنوانها (تجاوز اللون الداكن الثابت/المضمّن) */
html[data-theme="dark"] .zsd-rec-message { color: #E6EAF2 !important; }
html[data-theme="dark"] .zsd-rec-message strong { color: #fcd34d !important; }
html[data-theme="dark"] .zsd-recommend .zsd-card-head { color: #fcd34d !important; }
html[data-theme="dark"] .zsd-recommend.zsd-rec-stage-1 { background: #1f1b0c !important; }
html[data-theme="dark"] .zsd-rec-tip { background: #3a2e0a !important; color: #fcd34d !important; }

/* ============================================================
   9) ثيم Astra + بلوكات Spectra/Gutenberg (الصفحة الرئيسية وبقية الصفحات)
   ============================================================ */
/* خلفية الموقع والحاويات الرئيسية → داكنة/شفافة */
html[data-theme="dark"] .site,
html[data-theme="dark"] #page {
	background-color: #0F141B !important;
}
html[data-theme="dark"] #content,
html[data-theme="dark"] #main,
html[data-theme="dark"] .site-content,
html[data-theme="dark"] .ast-container,
html[data-theme="dark"] .entry-content,
html[data-theme="dark"] .ast-page-builder-template,
html[data-theme="dark"] .ast-separate-container {
	background-color: transparent !important;
	color: #E6EAF2;
}

/* صناديق محتوى Astra البيضاء → داكنة */
html[data-theme="dark"] .ast-separate-container .ast-article-single,
html[data-theme="dark"] .ast-separate-container .ast-article-post,
html[data-theme="dark"] .ast-separate-container .comment-respond,
html[data-theme="dark"] .ast-separate-container .ast-comment-list .comment-body,
html[data-theme="dark"] .single .ast-author-box,
html[data-theme="dark"] .widget,
html[data-theme="dark"] .secondary .widget {
	background-color: #161D28 !important;
	color: #E6EAF2;
	border-color: #2A3547;
}

/* ترويسة وتذييل Astra */
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .main-header-bar,
html[data-theme="dark"] .ast-primary-header-bar,
html[data-theme="dark"] .main-header-bar-wrap,
html[data-theme="dark"] .ast-above-header,
html[data-theme="dark"] .ast-below-header,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .footer-adv,
html[data-theme="dark"] .ast-small-footer {
	background-color: #11171F !important;
	color: #E6EAF2;
}
html[data-theme="dark"] .main-header-menu,
html[data-theme="dark"] .ast-menu-toggle,
html[data-theme="dark"] .main-header-menu .sub-menu {
	background-color: #11171F !important;
}

/* روابط/عناوين قائمة Astra */
html[data-theme="dark"] .main-header-menu a,
html[data-theme="dark"] .ast-header-break-point .main-header-menu { color: #E6EAF2 !important; }

/* بلوكات Spectra (UAGB) — حاويات شفافة وبطاقات داكنة */
html[data-theme="dark"] [class*="uagb-"],
html[data-theme="dark"] .wp-block-uagb-container,
html[data-theme="dark"] .uagb-container-inner-blocks-wrap {
	background-color: transparent !important;
	color: #E6EAF2;
}
html[data-theme="dark"] .wp-block-uagb-info-box,
html[data-theme="dark"] .uagb-infobox,
html[data-theme="dark"] .wp-block-uagb-cf,
html[data-theme="dark"] .uagb-content {
	background-color: #161D28 !important;
	border-color: #2A3547;
}

/* بلوكات Gutenberg الأساسية ذات الخلفية */
html[data-theme="dark"] .wp-block-group.has-background,
html[data-theme="dark"] .wp-block-column.has-background,
html[data-theme="dark"] .wp-block-cover .wp-block-cover__inner-container {
	background-color: #161D28 !important;
}
html[data-theme="dark"] .wp-block-group,
html[data-theme="dark"] .wp-block-columns,
html[data-theme="dark"] .wp-block-column { color: #E6EAF2; }

/* ============================================================
   10) الصفحة الرئيسية — خلفيات/نصوص مضمّنة + بلوكات HTML مخصّصة (.za-*)
   ============================================================ */
/* خلفيات فاتحة مضمّنة (#eafbff كريمي أزرق، #f8fcff) → داكنة */
html[data-theme="dark"] [style*="background-color:#eafbff"],
html[data-theme="dark"] [style*="background-color: #eafbff"],
html[data-theme="dark"] [style*="background-color:#f8fcff"],
html[data-theme="dark"] [style*="background-color: #f8fcff"] {
	background-color: #161D28 !important;
	border-color: #2A3547 !important;
}
/* عنوان الهيرو ذو الخلفية الفاتحة → شفّاف ونص فاتح */
html[data-theme="dark"] h1.wp-block-heading[style*="background-color:#eafbff"],
html[data-theme="dark"] h1.wp-block-heading[style*="background-color: #eafbff"] {
	background-color: transparent !important;
}
/* نصوص الفقرات الداكنة المضمّنة (#0b234a navy، #40516b slate) → فاتحة
   (نقصرها على <p>/<h1> فقط حتى لا نلمس نص الأزرار البيضاء <a>) */
html[data-theme="dark"] p[style*="color:#40516b"],
html[data-theme="dark"] p[style*="color: #40516b"],
html[data-theme="dark"] p[style*="color:#0b234a"],
html[data-theme="dark"] p[style*="color: #0b234a"],
html[data-theme="dark"] h1[style*="color:#0b234a"],
html[data-theme="dark"] h1[style*="color: #0b234a"] {
	color: #E6EAF2 !important;
}

/* بلوكات HTML المخصّصة: بطاقة معاينة لوحة الطالب */
html[data-theme="dark"] .za-student-preview,
html[data-theme="dark"] .za-progress-card,
html[data-theme="dark"] .za-question-box {
	background: #161D28 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] .za-preview-header,
html[data-theme="dark"] .za-progress-title,
html[data-theme="dark"] .za-progress-title span,
html[data-theme="dark"] .za-progress-title strong,
html[data-theme="dark"] .za-question-box h3,
html[data-theme="dark"] .za-question-box p { color: #E6EAF2 !important; }
html[data-theme="dark"] .za-progress-track { background: #222c3d !important; }
/* خيارات الإجابة */
html[data-theme="dark"] .za-answer-grid span {
	background: #1A2230 !important; color: #E6EAF2 !important; border-color: #2A3547 !important;
}

/* بطاقات «كيف تبدأ رحلتك» */
html[data-theme="dark"] .za-journey-card {
	background: #161D28 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] .za-journey-card h3,
html[data-theme="dark"] .za-journey-card p { color: #E6EAF2 !important; }
/* رقم الخطوة وأيقونة الصح يبقيان بالهوية */

/* صناديق الأسئلة الشائعة (Spectra FAQ) */
html[data-theme="dark"] .wp-block-uagb-faq-child,
html[data-theme="dark"] .uagb-faq-child__outer-wrap,
html[data-theme="dark"] .uagb-faq-content {
	background: #161D28 !important; border-color: #2A3547 !important; color: #E6EAF2;
}
html[data-theme="dark"] .uagb-question, html[data-theme="dark"] .uagb-faq-questions-button { color: #E6EAF2 !important; }

/* ============================================================
   11) أقسام الصفحة الرئيسية الجديدة (v1.0.8)
   شريط الأرقام · ميزات المنصة · آراء الطلاب · للمدارس
   + تحسينات الهيرو وكاروسيل المنتجات وشركاء Zoon Partners
   ============================================================ */

/* شريط الأرقام */
html[data-theme="dark"] .za-stat {
	background: #161D28 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] .za-stat-num { color: #5cc6e8 !important; }
html[data-theme="dark"] .za-stat-label { color: #9AA7BD !important; }

/* ميزات المنصة */
html[data-theme="dark"] .za-feature-card {
	background: #161D28 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] .za-feature-card:hover { border-color: #19c6dd !important; }
html[data-theme="dark"] .za-feature-card h3 { color: #cfe8ff !important; }
html[data-theme="dark"] .za-feature-card p { color: #b9c8da !important; }

/* آراء الطلاب */
html[data-theme="dark"] .za-testi-card {
	background: #161D28 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] .za-testi-text { color: #b9c8da !important; }
html[data-theme="dark"] .za-testi-who strong { color: #cfe8ff !important; }
html[data-theme="dark"] .za-testi-who small { color: #8aa0b6 !important; }
/* النجوم تبقى ذهبية (هوية) */

/* قسم «للمدارس» متدرّج غامق أصلاً — يبقى كما هو في الوضعين، نضمن وضوح النص فقط */
html[data-theme="dark"] .za-schools-text h2 { color: #ffffff !important; }
html[data-theme="dark"] .za-schools-text p { color: #cfe0f2 !important; }
html[data-theme="dark"] .za-schools-points li { color: #eafbff !important; }

/* ── الهيرو: شارة «منصة تدريب» — التصميم الجديد المتحرّك يضبط ألوانه بنفسه
   في sections-style.css. نُبقي فقط احتياط الإصدار القديم (فقرة بخلفية #0d8fc985). ── */
html[data-theme="dark"] p[style*="#0d8fc985"] {
	background-color: rgba(13,143,201,0.18) !important;
	border-color: rgba(94,198,232,0.5) !important;
}
html[data-theme="dark"] p[style*="#0d8fc985"] mark,
html[data-theme="dark"] p[style*="#0d8fc985"] strong { color: #8ed1fc !important; }

/* ── أزرار الهيرو/الـ CTA: نحافظ على الهوية، ونعالج زر «تسجيل الدخول» الأبيض ──
   الزر الأبيض بنص داكن (#0b234a) يصبح غير مقروء على خلفية داكنة → نقلبه. */
html[data-theme="dark"] .wp-block-button__link.has-white-background-color {
	background-color: #1A2230 !important; color: #E6EAF2 !important;
	border-color: #2A3547 !important;
}
/* زر «ابدأ الآن» السماوي وزر الدورات الذهبي يبقيان بالهوية (واضحان أصلاً) */

/* ── كاروسيل المنتجات (Spectra post-carousel) في قسم المسارات ── */
html[data-theme="dark"] .wp-block-uagb-post-carousel,
html[data-theme="dark"] .uagb-post-grid,
html[data-theme="dark"] article.uagb-post__inner-wrap,
html[data-theme="dark"] .uagb-post__inner-wrap {
	background-color: #161D28 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] .uagb-post__title,
html[data-theme="dark"] .uagb-post__title a,
html[data-theme="dark"] .uagb-post__text,
html[data-theme="dark"] .uagb-post__excerpt { color: #E6EAF2 !important; }
/* أسهم التنقّل */
html[data-theme="dark"] .uagb-post__arrow,
html[data-theme="dark"] .slick-prev, html[data-theme="dark"] .slick-next { color: #9AA7BD !important; }

/* ── شريط الفوتر المخصّص (.za-editor-footer) — متدرّج غامق أصلاً، نضمن النص ── */
html[data-theme="dark"] .za-editor-footer,
html[data-theme="dark"] .za-footer-bottom { color: #cfe0f2 !important; }
html[data-theme="dark"] .za-footer-col a,
html[data-theme="dark"] .za-footer-brand a { color: #9fd3ec !important; }

/* ── الفاصل المتقطّع في CTA (Spectra separator) ── */
html[data-theme="dark"] .uagb-separator { border-color: #2A3547 !important; }

/* ============================================================
   12) Zoon Partners — جدار الشعارات (يتكامل مع إضافة الشركاء)
   (الإضافة لديها تجاوزاتها، ونؤكّدها هنا ضمن ZDM كمصدر موحّد)
   ============================================================ */
html[data-theme="dark"] .zpart-display-title { color: #cfe8ff !important; }
html[data-theme="dark"] .zpart-logo-item {
	background: #161D28 !important; border-color: #2A3547 !important;
}
html[data-theme="dark"] .zpart-logo-item:hover { border-color: #19c6dd !important; }
html[data-theme="dark"] .zpart-grayscale .zpart-logo-img { opacity: 0.85; }
html[data-theme="dark"] .zpart-display-empty {
	background: #161D28 !important; border-color: #2A3547 !important; color: #cfe8ff !important;
}

/* ============================================================
   13) إصلاحات الصفحة الرئيسية (v1.0.9)
   لوحة الطالب النموذجية + كاروسيل المسارات المبسّط
   ============================================================ */
html[data-theme="dark"] .za-student-preview .za-progress-title { color: #cfe8ff !important; }
html[data-theme="dark"] .za-student-preview .za-progress-title strong { color: #5cc6e8 !important; }
html[data-theme="dark"] .za-student-preview .za-answer-grid { color: #b9c8da !important; }
html[data-theme="dark"] .za-student-preview .za-question-box h3 { color: #cfe8ff !important; }
html[data-theme="dark"] .za-student-preview .za-question-box p { color: #b9c8da !important; }
html[data-theme="dark"] .za-paths-carousel .uagb-post__title,
html[data-theme="dark"] .za-paths-carousel .uagb-post__title a { color: #e6eaf2 !important; }
html[data-theme="dark"] .za-paths-carousel article.uagb-post__inner-wrap,
html[data-theme="dark"] .za-paths-carousel .uagb-post__inner-wrap {
	background: #161D28 !important; border-color: #2A3547 !important;
}
/* العنوان الفرعي (فقرة بعد العنوان) في الوضع الليلي */
html[data-theme="dark"] .wp-block-uagb-advanced-heading + .wp-block-paragraph,
html[data-theme="dark"] .wp-block-uagb-advanced-heading + p { color: #9AA7BD !important; }
