/* ======================================================
   foresightX — توحيد هوية المدونة مع الرادار والمؤشر
   المظهر ← تخصيص ← CSS إضافي ← الصق الكود كاملاً ← نشر
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@400;700;800&family=IBM+Plex+Sans+Arabic:wght@300;400;500&display=swap');

:root{
  --fx-bg:#FBF6EF;
  --fx-ink:#20211E;
  --fx-ink2:#5E5D57;
  --fx-ink3:#8A897F;
  --fx-card:#FFFFFF;
  --fx-line:#EAE3D9;
  --fx-teal:#1F6F6B;
  --fx-teal-soft:#EFF6F3;
  --fx-amber:#E9B44C;
  --fx-sand:#FDF3E7;
}

/* ---------- الأساس ---------- */
body,
.site,
.site-content,
.elementor-section,
.elementor-column-wrap{
  background-color:var(--fx-bg) !important;
}

body,
p, li, td, th, span, div,
.elementor-widget-text-editor,
.entry-content{
  font-family:"IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif !important;
  color:var(--fx-ink);
  line-height:1.85;
}

body{ font-size:17px; }

h1,h2,h3,h4,h5,h6,
.entry-title,
.elementor-heading-title{
  font-family:"Almarai", system-ui, sans-serif !important;
  font-weight:800 !important;
  color:var(--fx-ink) !important;
  letter-spacing:-.5px;
  line-height:1.45;
}

h1,.entry-title{ font-size:clamp(25px,3.6vw,37px) !important; }
h2{ font-size:clamp(21px,2.8vw,28px) !important; }
h3{ font-size:20px !important; }

/* ---------- الروابط ---------- */
a{ color:var(--fx-teal); text-decoration:none; }
a:hover{ color:#195C58; }

.entry-title a{ color:var(--fx-ink) !important; }
.entry-title a:hover{ color:var(--fx-teal) !important; }

/* ---------- الرأس والقائمة ---------- */
.site-header,
header.elementor-location-header{
  background:rgba(251,246,239,.94) !important;
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--fx-line) !important;
  box-shadow:none !important;
}

.main-navigation a,
.elementor-nav-menu a{
  font-family:"IBM Plex Sans Arabic", sans-serif !important;
  font-size:15px !important;
  color:var(--fx-ink2) !important;
  border-radius:99px;
  padding:9px 16px !important;
}
.main-navigation a:hover,
.elementor-nav-menu a:hover{
  color:var(--fx-ink) !important;
  background:var(--fx-card);
}
.current-menu-item > a{
  color:var(--fx-ink) !important;
  background:var(--fx-card);
  box-shadow:0 1px 3px rgba(32,33,30,.07);
}

/* ---------- بطاقات المقالات ---------- */
article.post,
.elementor-post,
.elementor-posts .elementor-post__card{
  background:var(--fx-card) !important;
  border:0 !important;
  border-radius:18px !important;
  box-shadow:0 1px 3px rgba(32,33,30,.08);
  overflow:hidden;
  transition:box-shadow .2s ease, transform .2s ease;
}
article.post:hover,
.elementor-post:hover{
  box-shadow:0 4px 18px rgba(32,33,30,.09);
  transform:translateY(-1px);
}

.elementor-post__meta-data,
.entry-meta,
.posted-on,
.byline{
  color:var(--fx-ink3) !important;
  font-size:13.5px !important;
}

.elementor-post__excerpt p{
  color:var(--fx-ink2) !important;
  font-size:15.5px !important;
}

/* ---------- الأزرار ---------- */
.wp-block-button__link,
.elementor-button,
button,
input[type="submit"]{
  background-color:var(--fx-teal) !important;
  color:#fff !important;
  border:0 !important;
  border-radius:99px !important;
  font-family:"IBM Plex Sans Arabic", sans-serif !important;
  font-size:16px !important;
  font-weight:500 !important;
  padding:14px 30px !important;
  box-shadow:none !important;
}
.wp-block-button__link:hover,
.elementor-button:hover{
  background-color:#195C58 !important;
  color:#fff !important;
}

.elementor-button.fx-amber,
.wp-block-button.is-style-amber .wp-block-button__link{
  background-color:var(--fx-amber) !important;
  color:var(--fx-ink) !important;
  font-weight:700 !important;
}

/* ---------- الاقتباسات ---------- */
blockquote,
.wp-block-quote{
  background:var(--fx-card);
  border:0 !important;
  border-inline-start:3px solid var(--fx-teal) !important;
  border-radius:16px;
  padding:20px 24px !important;
  margin:26px 0;
  font-family:"Almarai", sans-serif;
  font-size:17px;
}
blockquote cite,
.wp-block-quote cite{
  color:var(--fx-ink3);
  font-size:14px;
  font-style:normal;
  display:block;
  margin-top:8px;
}

/* ---------- عناصر المقال ---------- */
.entry-content img,
.wp-block-image img{ border-radius:16px; }

hr,
.wp-block-separator{
  border:0;
  border-top:1px solid var(--fx-line) !important;
  margin:32px 0;
}

.entry-content ul li,
.entry-content ol li{ margin-bottom:9px; }

code, pre{
  background:var(--fx-sand);
  border-radius:10px;
  font-size:14.5px;
}

table{ border-collapse:collapse; width:100%; }
th{
  background:var(--fx-teal-soft) !important;
  color:var(--fx-teal) !important;
  font-family:"Almarai", sans-serif;
  font-size:14px;
  text-align:start;
}
th, td{
  border:1px solid var(--fx-line) !important;
  padding:11px 13px !important;
}

/* ---------- الوسوم والتصنيفات ---------- */
.tags-links a,
.cat-links a,
.elementor-post-info__terms-list-item{
  background:var(--fx-card);
  color:var(--fx-ink2) !important;
  border-radius:99px;
  padding:5px 14px;
  font-size:13px;
  box-shadow:0 1px 3px rgba(32,33,30,.07);
  display:inline-block;
  margin:3px 2px;
}

/* ---------- النماذج ---------- */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select{
  background:var(--fx-card) !important;
  border:1px solid var(--fx-line) !important;
  border-radius:14px !important;
  padding:13px 16px !important;
  font-family:"IBM Plex Sans Arabic", sans-serif !important;
  font-size:16px !important;
  color:var(--fx-ink) !important;
}
input:focus, textarea:focus, select:focus{
  border-color:var(--fx-teal) !important;
  outline:none !important;
  box-shadow:none !important;
}

/* ---------- صندوق الكاتب والتعليقات ---------- */
.author-info,
.comments-area,
.comment-respond{
  background:var(--fx-card);
  border:0;
  border-radius:18px;
  padding:24px;
  box-shadow:0 1px 3px rgba(32,33,30,.08);
}

/* ---------- التذييل ---------- */
.site-footer,
footer.elementor-location-footer{
  background:var(--fx-bg) !important;
  border-top:1px solid var(--fx-line);
  color:var(--fx-ink3);
  font-size:14px;
}

/* ---------- صندوق دعوة يُلصق في نهاية المقالات ---------- */
/* الاستخدام: كتلة HTML في نهاية كل مقال
   <div class="fx-cta">
     <b>أين تقف منظمتكم من إشارات القطاع؟</b>
     <p>عشرة أسئلة تكشف فجواتكم النظامية والاستراتيجية في ثلاث دقائق.</p>
     <a href="RADAR_URL/readiness.html">ابدأوا مؤشر الجاهزية</a>
   </div>
*/
.fx-cta{
  background:var(--fx-ink);
  color:#F1EDE6;
  border-radius:22px;
  padding:30px 32px;
  margin:36px 0;
}
.fx-cta b{
  font-family:"Almarai", sans-serif;
  font-weight:800;
  font-size:20px;
  color:#fff;
  display:block;
  line-height:1.5;
}
.fx-cta p{
  color:#A9A79E !important;
  font-size:15.5px;
  margin:10px 0 20px;
}
.fx-cta a{
  background:var(--fx-amber);
  color:var(--fx-ink) !important;
  padding:14px 28px;
  border-radius:99px;
  font-weight:700;
  display:inline-block;
  text-decoration:none;
}
.fx-cta a:hover{ background:#DCA63F; }

/* ---------- صندوق تنبيه فاتح ---------- */
.fx-note{
  background:var(--fx-sand);
  border-radius:16px;
  padding:18px 22px;
  font-size:15px;
  color:var(--fx-ink2);
  margin:26px 0;
}

/* ---------- تنظيف ---------- */
.elementor-widget-container{ box-shadow:none !important; }
::selection{ background:var(--fx-teal); color:#fff; }

/* ======================================================
   إصلاحات قالب Applied — الإضافة الثانية
   ====================================================== */

/* ١) إزالة الخلفيات البيضاء العالقة خلف الشعار والعناوين */
.site-title, .site-title a,
.site-branding, .site-branding *,
.custom-logo-link,
.page-title, .page-header,
.widget-title, .widgettitle,
.entry-header, .entry-header *,
.author-title, .related-title,
h1, h2, h3, h4, h5, h6,
h1 span, h2 span, h3 span,
.section-title, .section-title *{
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
}

/* ٢) توحيد خلفية كل الأقسام مع المدونة */
.site-main, .content-area, .site-content,
#content, #primary, #main,
.entry-content, .post-inner,
.hentry, .page, .archive, .blog,
section, .container, .row,
.elementor-widget-wrap,
.elementor-element-populated{
  background-color:transparent !important;
}

/* ٣) تصغير العناوين — كانت كبيرة جداً */
h1, .entry-title, .page-title{
  font-size:clamp(22px,2.8vw,31px) !important;
  line-height:1.5 !important;
}
.entry-title, .post-title{
  font-size:clamp(19px,2.2vw,25px) !important;
}
h2{ font-size:clamp(19px,2.4vw,25px) !important; }
h3{ font-size:18px !important; }
.site-title{ font-size:22px !important; }

/* ٤) توحيد كل الأزرار على الفيروزي */
.wp-block-button__link,
.elementor-button, .elementor-button-link,
button, input[type="submit"], input[type="button"],
.btn, .button,
a.more-link, .more-link,
.read-more, .read-more-button,
.continue-reading, .continue-reading a,
.nav-links a, .page-numbers,
.post-navigation a, .pagination a{
  background-color:var(--fx-teal) !important;
  background-image:none !important;
  color:#fff !important;
  border:0 !important;
  border-radius:99px !important;
  font-family:"IBM Plex Sans Arabic",sans-serif !important;
  font-weight:500 !important;
  box-shadow:none !important;
}
.wp-block-button__link:hover,
.elementor-button:hover,
button:hover, .more-link:hover,
.continue-reading:hover,
.page-numbers:hover{
  background-color:#195C58 !important;
  color:#fff !important;
}

/* ٥) ترقيم الصفحات — الرقم الحالي فاتح والبقية هادئة */
.page-numbers:not(.current):not(:hover){
  background-color:var(--fx-card) !important;
  color:var(--fx-ink2) !important;
  box-shadow:0 1px 3px rgba(32,33,30,.07) !important;
}
.page-numbers.current{
  background-color:var(--fx-teal) !important;
  color:#fff !important;
}

/* ٦) إلغاء أي لون مرجاني أو أحمر من القالب */
[style*="#F26B5B"], [style*="#f26b5b"],
[style*="#E8604C"], [style*="#e8604c"]{
  background-color:var(--fx-teal) !important;
  color:#fff !important;
}

/* ٧) تجاوز متغيرات القالب اللونية من جذرها */
:root{
  --primary:#1F6F6B !important;
  --secondary:#E9B44C !important;
  --accent:#1F6F6B !important;
  --color-primary:#1F6F6B !important;
  --color-accent:#1F6F6B !important;
  --e-global-color-primary:#1F6F6B !important;
  --e-global-color-secondary:#20211E !important;
  --e-global-color-accent:#1F6F6B !important;
  --e-global-color-text:#20211E !important;
}

/* ٨) صندوق الكاتب والمقالات ذات الصلة */
.author-info, .author-box, .about-author,
.related-posts, .more-reading{
  background:var(--fx-card) !important;
  border-radius:18px !important;
  border:0 !important;
  padding:24px !important;
  box-shadow:0 1px 3px rgba(32,33,30,.08) !important;
}

/* ٩) النصوص الإنجليزية في القالب */
.written-by, .more-reading, .continue-reading,
.posted-on, .byline{
  font-family:"IBM Plex Sans Arabic",sans-serif !important;
  letter-spacing:0 !important;
}

/* ======================================================
   الإضافة الثالثة — تصحيحات دقيقة
   ====================================================== */

/* ١) روابط التنقل بين المقالات ليست أزراراً */
.post-navigation a,
.nav-links a,
.nav-previous a, .nav-next a,
.post-nav a, .previous-post a, .next-post a{
  background-color:transparent !important;
  background-image:none !important;
  color:var(--fx-ink) !important;
  border-radius:0 !important;
  padding:0 !important;
  font-weight:800 !important;
  box-shadow:none !important;
  display:inline !important;
}
.post-navigation a:hover,
.nav-links a:hover{
  background-color:transparent !important;
  color:var(--fx-teal) !important;
}
.post-navigation .post-title,
.nav-links .post-title,
.post-navigation h3,
.nav-links h3{
  font-size:17px !important;
  line-height:1.6 !important;
  background:transparent !important;
  color:var(--fx-ink) !important;
}
.nav-subtitle,
.post-navigation .meta-nav{
  color:var(--fx-ink3) !important;
  font-size:13px !important;
  font-weight:400 !important;
}

/* استثناء: ترقيم الصفحات يبقى أزراراً */
.pagination a, .page-numbers{
  background-color:var(--fx-card) !important;
  border-radius:99px !important;
  padding:10px 20px !important;
  display:inline-block !important;
}
.page-numbers.current{
  background-color:var(--fx-teal) !important;
  color:#fff !important;
}

/* ٢) حذف زر الوضع الليلي */
.dark-mode-toggle, .night-mode-toggle,
.theme-toggle, .mode-switch, .darkmode,
[class*="dark-mode"], [class*="night-mode"],
[id*="dark-mode"], [id*="darkmode"],
[aria-label*="Dark"], [aria-label*="dark"],
[title*="Dark Mode"], [title*="dark mode"]{
  display:none !important;
}

/* ٣) تصغير عناوين المقالات ذات الصلة */
.related-posts .entry-title,
.related-posts h3,
.more-reading .entry-title,
.more-reading h3,
.elementor-post__title,
.elementor-post__title a{
  font-size:17px !important;
  line-height:1.6 !important;
  background:transparent !important;
  color:var(--fx-ink) !important;
  font-weight:800 !important;
}
.elementor-post__title a:hover{ color:var(--fx-teal) !important; }

/* ======================================================
   الإضافة الرابعة — إبطال الوضع الليلي وتعريب الأزرار
   ====================================================== */

/* ١) إبطال الوضع الليلي نهائياً — يعمل حتى لو كان مفعّلاً */
html[data-theme="dark"], html[data-theme="dark"] body,
body.dark, body.dark-mode, body.night-mode,
body.dark *, body.dark-mode *, html[data-theme="dark"] *{
  background-color:var(--fx-bg) !important;
  color:var(--fx-ink) !important;
}
html[data-theme="dark"] .site-header,
body.dark-mode .site-header,
html[data-theme="dark"] header,
body.dark-mode header{ background:var(--fx-bg) !important; }

html[data-theme="dark"] article,
html[data-theme="dark"] .elementor-post,
html[data-theme="dark"] .author-info,
body.dark-mode article,
body.dark-mode .elementor-post{ background:var(--fx-card) !important; }

html[data-theme="dark"] a, body.dark-mode a{ color:var(--fx-teal) !important; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3{ color:var(--fx-ink) !important; }

/* إخفاء مبدّل الوضع الليلي */
.dark-mode-toggle, .night-mode-toggle, .theme-toggle,
.mode-switch, .darkmode, .color-scheme-toggle,
[class*="dark-mode"], [class*="night-mode"], [class*="darkmode"],
[id*="dark-mode"], [id*="darkmode"],
[aria-label*="Dark"], [aria-label*="dark"],
[title*="Dark Mode"], [title*="dark mode"],
header [class*="switch"], label[class*="switch"],
input[type="checkbox"][class*="mode"]{
  display:none !important;
}

/* ٢) تعريب زر متابعة القراءة — كتابة بيضاء على فيروزي */
.more-link, a.more-link,
.continue-reading, .continue-reading a,
.elementor-post__read-more{
  font-size:0 !important;
  display:inline-block !important;
  background-color:var(--fx-teal) !important;
  background-image:none !important;
  color:#fff !important;
  border:0 !important;
  border-radius:99px !important;
  padding:12px 26px !important;
  box-shadow:none !important;
}
.more-link::after, a.more-link::after,
.continue-reading::after, .continue-reading a::after,
.elementor-post__read-more::after{
  content:"متابعة القراءة ←";
  font-size:15.5px;
  font-family:"IBM Plex Sans Arabic",sans-serif;
  font-weight:500;
  color:#fff;
}
.more-link:hover, .continue-reading:hover,
.elementor-post__read-more:hover{
  background-color:#195C58 !important;
}
/* إخفاء الأيقونة القديمة داخل الزر */
.more-link svg, .more-link i,
.continue-reading svg, .continue-reading i,
.elementor-post__read-more svg,
.elementor-post__read-more i{ display:none !important; }

/* ٣) تعريب ترقيم الصفحات */
.nav-previous a, .older-posts, a.older-posts{ font-size:0 !important; }
.nav-previous a::after, .older-posts::after{
  content:"المواضيع القديمة ←";
  font-size:15px;
  font-family:"IBM Plex Sans Arabic",sans-serif;
  color:#fff;
}
.nav-next a, .newer-posts{ font-size:0 !important; }
.nav-next a::after, .newer-posts::after{
  content:"→ المواضيع الأحدث";
  font-size:15px;
  font-family:"IBM Plex Sans Arabic",sans-serif;
  color:#fff;
}

/* ٤) تعريب عناوين أقسام القالب */
.related-title, .more-reading > h3,
.author-title, .written-by{ font-size:0 !important; }
.related-title::after, .more-reading > h3::after{
  content:"اقرأوا أيضاً";
  font-size:19px;
  font-family:"Almarai",sans-serif;
  font-weight:800;
  color:var(--fx-ink);
}
.author-title::after, .written-by::after{
  content:"كتبه";
  font-size:14px;
  font-family:"IBM Plex Sans Arabic",sans-serif;
  color:var(--fx-ink3);
}