/* ===== v2.12 — خط مريح للقراءة: Cairo للعناوين + Almarai للنص ===== */
body, p, li, input, textarea, button, .site-main { font-family: var(--font-body); }
h1, h2, h3, h4, h5, .slide-title, .section-header h2, .video-title, .live-feed-title { font-family: var(--font-display); }
body { line-height: 1.8; }

/* ===== قسم «بلجيكا»: الأخبار الأربعة بشبكة 2×2 داخل مربعات بظل أصفر ===== */
.block-feature:has(.section-header a[href$="cat=1"]) .feature-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-content: start;
}
.block-feature:has(.section-header a[href$="cat=1"]) .side-story {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  padding: 10px !important;
  background: #fff;
  border: 1px solid rgba(255, 204, 0, 0.55) !important;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(255, 204, 0, 0.40);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.block-feature:has(.section-header a[href$="cat=1"]) .side-story:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(255, 204, 0, 0.45);
}
.block-feature:has(.section-header a[href$="cat=1"]) .side-story-img {
  width: 100% !important;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
}
.block-feature:has(.section-header a[href$="cat=1"]) .side-story-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.block-feature:has(.section-header a[href$="cat=1"]) .side-story-body h3 {
  font-size: 0.95rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
[data-theme='dark'] .block-feature:has(.section-header a[href$="cat=1"]) .side-story { background: rgba(255, 255, 255, 0.04); }
@media (max-width: 480px) {
  .block-feature:has(.section-header a[href$="cat=1"]) .feature-list { gap: 12px; }
}


/* ===== «لوكسمبورغ» و«العالم العربي»: الأخبار الصغيرة بمربعات مع ظل أسود + أصفر (مثل بلجيكا) ===== */
.column-block:has(.section-header a[href$="cat=3"]) .headline-list,
.column-block:has(.section-header a[href$="cat=5"]) .headline-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.column-block:has(.section-header a[href$="cat=3"]) .headline-list li,
.column-block:has(.section-header a[href$="cat=5"]) .headline-list li {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;
  padding: 8px !important;
  background: #fff;
  border: 1px solid rgba(255, 204, 0, 0.6) !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(255, 204, 0, 0.38);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.column-block:has(.section-header a[href$="cat=3"]) .headline-list li:hover,
.column-block:has(.section-header a[href$="cat=5"]) .headline-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16), 0 12px 28px rgba(255, 204, 0, 0.5);
}
.column-block:has(.section-header a[href$="cat=3"]) .headline-thumb,
.column-block:has(.section-header a[href$="cat=5"]) .headline-thumb {
  width: 100% !important;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
}
.column-block:has(.section-header a[href$="cat=3"]) .headline-thumb img,
.column-block:has(.section-header a[href$="cat=5"]) .headline-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.column-block:has(.section-header a[href$="cat=3"]) .headline-body a,
.column-block:has(.section-header a[href$="cat=5"]) .headline-body a {
  font-size: 0.88rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
[data-theme='dark'] .column-block:has(.section-header a[href$="cat=3"]) .headline-list li,
[data-theme='dark'] .column-block:has(.section-header a[href$="cat=5"]) .headline-list li { background: rgba(255, 255, 255, 0.04); }

/* موبايل: كل خبر بسطر (الصورة جنب العنوان) */
@media (max-width: 600px) {
  .column-block:has(.section-header a[href$="cat=3"]) .headline-list,
  .column-block:has(.section-header a[href$="cat=5"]) .headline-list { grid-template-columns: minmax(0, 1fr); }
  .column-block:has(.section-header a[href$="cat=3"]) .headline-list li,
  .column-block:has(.section-header a[href$="cat=5"]) .headline-list li { flex-direction: row; align-items: center !important; }
  .column-block:has(.section-header a[href$="cat=3"]) .headline-thumb,
  .column-block:has(.section-header a[href$="cat=5"]) .headline-thumb { width: 96px !important; flex: 0 0 96px; }
}


/* ===== «علوم وتكنولوجيا» و«ثقافة»: نفس مربعات لوكسمبورغ والعالم العربي (ظل أسود + أصفر) =====
   القسمان يُعرَفان من أيقونتهما (الذرّة / الكتاب) لأن رقم تصنيفهما غير معروف */
.column-block:has(.section-header .sec-icon ellipse) .headline-list,
.column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.column-block:has(.section-header .sec-icon ellipse) .headline-list li,
.column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-list li {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;
  padding: 8px !important;
  background: #fff;
  border: 1px solid rgba(255, 204, 0, 0.6) !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(255, 204, 0, 0.38);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.column-block:has(.section-header .sec-icon ellipse) .headline-list li:hover,
.column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16), 0 12px 28px rgba(255, 204, 0, 0.5);
}
.column-block:has(.section-header .sec-icon ellipse) .headline-thumb,
.column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-thumb {
  width: 100% !important;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
}
.column-block:has(.section-header .sec-icon ellipse) .headline-thumb img,
.column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.column-block:has(.section-header .sec-icon ellipse) .headline-body a,
.column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-body a {
  font-size: 0.88rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
[data-theme='dark'] .column-block:has(.section-header .sec-icon ellipse) .headline-list li,
[data-theme='dark'] .column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-list li { background: rgba(255, 255, 255, 0.04); }

/* موبايل: كل خبر بسطر (الصورة جنب العنوان) */
@media (max-width: 600px) {
  .column-block:has(.section-header .sec-icon ellipse) .headline-list,
  .column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-list { grid-template-columns: minmax(0, 1fr); }
  .column-block:has(.section-header .sec-icon ellipse) .headline-list li,
  .column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-list li { flex-direction: row; align-items: center !important; }
  .column-block:has(.section-header .sec-icon ellipse) .headline-thumb,
  .column-block:has(.section-header .sec-icon path[d^="M4 5.5A2.5"]) .headline-thumb { width: 96px !important; flex: 0 0 96px; }
}


/* ===== «اسيا» و«دراسات المدار»: نفس مربعات علوم وتكنولوجيا وثقافة + إطار للصور ===== */
.column-block:has(.section-header a[href$="cat=7"]) .headline-list,
.column-block:has(.section-header a[href$="cat=16"]) .headline-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.column-block:has(.section-header a[href$="cat=7"]) .headline-list li,
.column-block:has(.section-header a[href$="cat=16"]) .headline-list li {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;
  padding: 8px !important;
  background: #fff;
  border: 1px solid rgba(255, 204, 0, 0.6) !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(255, 204, 0, 0.38);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.column-block:has(.section-header a[href$="cat=7"]) .headline-list li:hover,
.column-block:has(.section-header a[href$="cat=16"]) .headline-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16), 0 12px 28px rgba(255, 204, 0, 0.5);
}
.column-block:has(.section-header a[href$="cat=7"]) .headline-thumb,
.column-block:has(.section-header a[href$="cat=16"]) .headline-thumb {
  width: 100% !important;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #fff;
  outline: 1px solid rgba(227, 169, 10, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.column-block:has(.section-header a[href$="cat=7"]) .headline-thumb img,
.column-block:has(.section-header a[href$="cat=16"]) .headline-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.column-block:has(.section-header a[href$="cat=7"]) .headline-body a,
.column-block:has(.section-header a[href$="cat=16"]) .headline-body a {
  font-size: 0.88rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
[data-theme='dark'] .column-block:has(.section-header a[href$="cat=7"]) .headline-list li,
[data-theme='dark'] .column-block:has(.section-header a[href$="cat=16"]) .headline-list li { background: rgba(255, 255, 255, 0.04); }

/* موبايل: كل خبر بسطر (الصورة جنب العنوان) */
@media (max-width: 600px) {
  .column-block:has(.section-header a[href$="cat=7"]) .headline-list,
  .column-block:has(.section-header a[href$="cat=16"]) .headline-list { grid-template-columns: minmax(0, 1fr); }
  .column-block:has(.section-header a[href$="cat=7"]) .headline-list li,
  .column-block:has(.section-header a[href$="cat=16"]) .headline-list li { flex-direction: row; align-items: center !important; }
  .column-block:has(.section-header a[href$="cat=7"]) .headline-thumb,
  .column-block:has(.section-header a[href$="cat=16"]) .headline-thumb { width: 96px !important; flex: 0 0 96px; }
}

/* خلفية ذهبية خفيفة جداً جداً (تحلّ محلّ الخلفية الذهبية السابقة) */
.block-columns:has(.section-header a[href$="cat=7"]),
.block-columns:has(.section-header a[href$="cat=16"]) {
  background: linear-gradient(180deg, #fffdf8 0%, #fdf9ee 100%) !important;
  border-block: 1px solid rgba(227, 169, 10, 0.15) !important;
}
[data-theme='dark'] .block-columns:has(.section-header a[href$="cat=7"]),
[data-theme='dark'] .block-columns:has(.section-header a[href$="cat=16"]) {
  background: rgba(227, 169, 10, 0.05) !important;
}

/* إطار للصورة الرئيسية في القسمين */
.block-columns:has(.section-header a[href$="cat=7"]) .column-top-img,
.block-columns:has(.section-header a[href$="cat=16"]) .column-top-img {
  border: 3px solid #fff !important;
  outline: 1px solid rgba(227, 169, 10, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(255, 204, 0, 0.25) !important;
}

/* ===== إطار أصفر موحّد لكل صور الأخبار في الموقع ===== */
.feature-main-img,
.side-story-img,
.column-top-img,
.headline-thumb,
.card-img,
.stacked-story-img,
.sub-lead-img,
.feed-thumb,
.video-thumb,
.cat-band .video-thumb,
.more-news-grid .card-img,
.archive .card-img,
.search .card-img {
  display: block;
  overflow: hidden !important;
  border: 3px solid #FFCC00 !important;
  outline: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(227, 169, 10, 0.35) !important;
  transition: box-shadow 250ms ease, transform 250ms ease;
}
/* الصور الصغيرة: إطار أنحف */
.headline-thumb,
.feed-thumb,
.side-video-list .video-thumb {
  border-width: 2px !important;
  border-radius: 8px !important;
}
/* لمسة عند المرور */
.feature-main:hover .feature-main-img,
.side-story:hover .side-story-img,
.column-top:hover .column-top-img,
.card:hover .card-img,
.stacked-story:hover .stacked-story-img,
.headline-list li:hover .headline-thumb,
.video-main:hover .video-thumb,
.video-item:hover .video-thumb {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(227, 169, 10, 0.5), 0 8px 24px rgba(255, 204, 0, 0.35) !important;
}
.feature-main-img img, .side-story-img img, .column-top-img img, .headline-thumb img,
.card-img img, .stacked-story-img img, .sub-lead-img img, .feed-thumb img, .video-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* اسيا ودراسات المدار: الصورة الرئيسية بإطار أصفر كمان */
.block-columns:has(.section-header a[href$="cat=7"]) .column-top-img,
.block-columns:has(.section-header a[href$="cat=16"]) .column-top-img {
  border: 3px solid #FFCC00 !important;
  outline: none !important;
}

/* ===== v3.0 — إطار أصفر مُحكم لكل الأقسام (أقوى أولوية، يتجاوز أي تنسيق آخر) ===== */
html body .home-block .card-img,
html body .block-grid .card-img,
html body .card-grid .card-img,
html body .home-block .feature-main-img,
html body .home-block .side-story-img,
html body .home-block .column-top-img,
html body .home-block .headline-thumb,
html body .home-block .stacked-story-img,
html body .more-news-grid .card-img,
html body .cat-band .video-thumb,
html body .news-tabs .feed-thumb,
html body .archive .card-img,
html body .search .card-img,
html body .single .featured-media {
  display: block !important;
  overflow: hidden !important;
  border: 3px solid #FFCC00 !important;
  outline: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(227, 169, 10, 0.35) !important;
}
html body .home-block .headline-thumb,
html body .news-tabs .feed-thumb { border-width: 2px !important; border-radius: 8px !important; }
html body .single .featured-media img { display: block; width: 100%; height: auto; border-radius: 9px; }

/* ===== «الفن»: أربعة مقالات (كل اثنين جنب بعض) + إطار أصفر لكل الصور =====
   يعمل أياً كان التصميم الذي يظهر فيه القسم في الصفحة الرئيسية */

/* (أ) إذا ظهر «الفن» بتصميم خبر كبير + 4 أخبار: الأربعة بشبكة 2×2 */
.block-feature:has(.section-header a[href$="cat=13"]) .feature-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-content: start;
}
.block-feature:has(.section-header a[href$="cat=13"]) .side-story {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  padding: 10px !important;
  background: #fff;
  border: 1px solid rgba(255, 204, 0, 0.55) !important;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(255, 204, 0, 0.40);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.block-feature:has(.section-header a[href$="cat=13"]) .side-story:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(255, 204, 0, 0.45);
}
.block-feature:has(.section-header a[href$="cat=13"]) .side-story-img {
  width: 100% !important;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
}
.block-feature:has(.section-header a[href$="cat=13"]) .side-story-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.block-feature:has(.section-header a[href$="cat=13"]) .side-story-body h3 {
  font-size: 0.95rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
[data-theme='dark'] .block-feature:has(.section-header a[href$="cat=13"]) .side-story { background: rgba(255, 255, 255, 0.04); }
@media (max-width: 480px) {
  .block-feature:has(.section-header a[href$="cat=13"]) .feature-list { gap: 12px; }
}

/* (ب) إذا ظهر «الفن» بأربع بطاقات: كل اثنتين جنب بعض (2×2) */
.block-grid:has(.section-header a[href$="cat=13"]) .card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 22px !important;
}
.block-grid:has(.section-header a[href$="cat=13"]) .card {
  display: grid !important;
  grid-template-columns: 44% minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(255, 204, 0, 0.55);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10), 0 8px 22px rgba(255, 204, 0, 0.30);
}
.block-grid:has(.section-header a[href$="cat=13"]) .card-img { aspect-ratio: 4 / 3; }
.block-grid:has(.section-header a[href$="cat=13"]) .card-body h3 { font-size: 1rem; line-height: 1.5; }
.block-grid:has(.section-header a[href$="cat=13"]) .card-body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.9rem; }
[data-theme='dark'] .block-grid:has(.section-header a[href$="cat=13"]) .card { background: rgba(255, 255, 255, 0.04); }
@media (max-width: 700px) {
  .block-grid:has(.section-header a[href$="cat=13"]) .card-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* (ج) إذا ظهر «الفن» بعمودين (مثل علوم وتكنولوجيا): نفس مربعاتها */
.column-block:has(.section-header a[href$="cat=13"]) .headline-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.column-block:has(.section-header a[href$="cat=13"]) .headline-list li {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;
  padding: 8px !important;
  background: #fff;
  border: 1px solid rgba(255, 204, 0, 0.6) !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(255, 204, 0, 0.38);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.column-block:has(.section-header a[href$="cat=13"]) .headline-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16), 0 12px 28px rgba(255, 204, 0, 0.5);
}
.column-block:has(.section-header a[href$="cat=13"]) .headline-thumb {
  width: 100% !important;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
}
.column-block:has(.section-header a[href$="cat=13"]) .headline-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.column-block:has(.section-header a[href$="cat=13"]) .headline-body a {
  font-size: 0.88rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
[data-theme='dark'] .column-block:has(.section-header a[href$="cat=13"]) .headline-list li,
[data-theme='dark'] .column-block:has(.section-header a[href$="cat=13"]) .headline-list li { background: rgba(255, 255, 255, 0.04); }

/* موبايل: كل خبر بسطر (الصورة جنب العنوان) */
@media (max-width: 600px) {
  .column-block:has(.section-header a[href$="cat=13"]) .headline-list { grid-template-columns: minmax(0, 1fr); }
  .column-block:has(.section-header a[href$="cat=13"]) .headline-list li { flex-direction: row; align-items: center !important; }
  .column-block:has(.section-header a[href$="cat=13"]) .headline-thumb { width: 96px !important; flex: 0 0 96px; }
}
