@charset "UTF-8";
/**
 * قالب الصبح — الأنماط الرئيسية.
 *
 * المتغيّرات الأساسية (--e-primary، --e-font، --e-fs-base ...) تُولّد من
 * لوحة التحكم وتُدرج داخل الصفحة. ما يُعرّف هنا هو المشتقّات وقيم الوضع الليلي.
 *
 * لغة التصميم: كثافة تحريرية لا مساحات بيضاء فضفاضة، تباين حاد بين الخبر
 * الرئيسي والثانوي، وسطر تصنيف (kicker) فوق كل عنوان — وهو النمط الذي
 * تعتمده الصحف الكبرى لأنه يعطي السياق قبل العنوان.
 */

/* =========================================================================
   1. المتغيّرات المشتقّة
   ========================================================================= */

:root {
	--e-surface: #fff;
	--e-surface-2: #f6f7f9;
	--e-surface-3: #eceff3;
	--e-border: #e2e6ea;
	--e-border-soft: #eef1f4;
	--e-border-strong: #c9d1d9;
	--e-muted: #5b6672;
	--e-muted-2: #8b95a1;

	--e-radius: 8px;
	--e-radius-sm: 5px;
	--e-radius-lg: 14px;

	--e-shadow-sm: 0 1px 2px rgba(13, 20, 28, .06);
	--e-shadow: 0 4px 14px rgba(13, 20, 28, .09);
	--e-shadow-lg: 0 14px 40px rgba(13, 20, 28, .16);

	--e-gutter: 20px;
	--e-gap: 24px;

	/* مقياس مسافات موحّد يمنع الإيقاع العشوائي بين الأقسام. */
	--e-s1: 6px;
	--e-s2: 12px;
	--e-s3: 18px;
	--e-s4: 28px;
	--e-s5: 44px;
	--e-s6: 64px;

	--e-scrim: linear-gradient(to top, rgba(6, 11, 17, .95) 0%, rgba(6, 11, 17, .72) 38%, rgba(6, 11, 17, .12) 78%, transparent 100%);
}

/*
 * الوضع الليلي بطبقات متدرّجة لا بلون رمادي واحد — الطبقات هي ما يعطي
 * الإحساس بالعمق ويمنع الشكل «المسطّح».
 */
[data-theme="dark"] {
	--e-text: #e6edf3;
	--e-bg: #0d1117;
	--e-surface: #161b22;
	--e-surface-2: #1c232c;
	--e-surface-3: #262d36;
	--e-border: #2a323c;
	--e-border-soft: #212830;
	--e-border-strong: #3d4752;
	--e-muted: #9aa5b1;
	--e-muted-2: #717d8a;

	--e-shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
	--e-shadow: 0 4px 16px rgba(0, 0, 0, .55);
	--e-shadow-lg: 0 16px 44px rgba(0, 0, 0, .7);
}

@media (prefers-color-scheme: dark) {
	.darkmode-toggle:not([data-theme]),
	.darkmode-auto:not([data-theme]) {
		--e-text: #e6edf3;
		--e-bg: #0d1117;
		--e-surface: #161b22;
		--e-surface-2: #1c232c;
		--e-surface-3: #262d36;
		--e-border: #2a323c;
		--e-border-soft: #212830;
		--e-border-strong: #3d4752;
		--e-muted: #9aa5b1;
		--e-muted-2: #717d8a;
		--e-shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
		--e-shadow: 0 4px 16px rgba(0, 0, 0, .55);
		--e-shadow-lg: 0 16px 44px rgba(0, 0, 0, .7);
	}
}

/* =========================================================================
   2. الأساس
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
}

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

body {
	margin: 0;
	background: var(--e-bg);
	color: var(--e-text);
	font-family: var(--e-font);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img, picture, video, iframe { max-width: 100%; height: auto; }
img { background: var(--e-surface-3); }

a { color: var(--e-primary); text-decoration: none; transition: color .14s ease; }

[data-theme="dark"] a { color: #6cb6ff; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -.015em;
}

p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.4em; }

blockquote {
	margin: 1.7em 0;
	padding: 2px 20px;
	border-inline-start: 4px solid var(--e-accent);
	font-size: 1.06em;
	font-weight: 500;
	color: var(--e-muted);
}

hr { height: 1px; margin: 2em 0; border: 0; background: var(--e-border); }

code, pre, kbd {
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: .9em;
	direction: ltr;
	unicode-bidi: embed;
}

pre {
	padding: 14px 16px;
	overflow-x: auto;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius-sm);
}

table { width: 100%; border-collapse: collapse; }

th, td { padding: 10px 13px; border: 1px solid var(--e-border); text-align: start; }
th { background: var(--e-surface-2); font-weight: 700; }

button { font-family: inherit; font-size: inherit; cursor: pointer; }

:focus-visible {
	outline: 3px solid var(--e-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* =========================================================================
   3. التخطيط
   ========================================================================= */

.container {
	width: 100%;
	max-width: var(--e-container);
	margin-inline: auto;
	padding-inline: var(--e-gutter);
}

.site-main { padding-block: var(--e-s4) var(--e-s6); }

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 316px;
	gap: var(--e-s5);
	align-items: start;
}

/* بلا شريط جانبي: الأرشيف يبقى بعرض الصفحة، والمقال وحده يُقيَّد للقراءة. */
.layout--no-sidebar { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1040px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
}

.skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	z-index: 999;
	padding: 12px 20px;
	background: var(--e-primary);
	color: #fff;
	border-radius: 0 0 var(--e-radius-sm) var(--e-radius-sm);
}

.skip-link:focus { inset-inline-start: 12px; top: 0; color: #fff; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* =========================================================================
   4. الترويسة
   ========================================================================= */

.topbar {
	background: var(--e-primary-dark);
	color: rgba(255, 255, 255, .72);
	font-size: 12.5px;
}

.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 34px;
}

.topbar a { color: rgba(255, 255, 255, .82); }
.topbar a:hover { color: #fff; }

.topbar__menu {
	display: flex;
	gap: 18px;
	margin: 0; padding: 0;
	list-style: none;
	font-weight: 500;
}

@media (max-width: 720px) { .topbar__date { display: none; } }

.site-header {
	position: relative;
	z-index: 50;
	background: var(--e-surface);
	border-bottom: 1px solid var(--e-border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-block: 16px;
}

.site-branding { margin: 0; font-size: inherit; line-height: 1; }
.site-branding__link { display: inline-flex; align-items: center; }

.site-logo { display: block; width: auto; height: var(--e-logo-h); background: none; }
.site-logo--dark { display: none; }

[data-theme="dark"] .site-logo--light { display: none; }
[data-theme="dark"] .site-logo--dark { display: block; }

.site-title {
	font-size: clamp(24px, 4vw, 32px);
	font-weight: 800;
	color: var(--e-primary);
	letter-spacing: -.03em;
}

[data-theme="dark"] .site-title { color: var(--e-text); }

.header__tools { display: flex; align-items: center; gap: 7px; }

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius-sm);
	color: var(--e-text);
	transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.icon-btn:hover {
	background: var(--e-surface-2);
	border-color: var(--e-border-strong);
	color: var(--e-primary);
}

[data-theme="dark"] .icon-btn:hover { color: var(--e-text); }

.icon-btn svg {
	width: 18px; height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- شريط الأقسام ---------- */

.nav-bar { background: var(--e-primary); }

.nav-bar__inner { display: flex; align-items: center; }

.main-nav ul {
	display: flex;
	flex-wrap: wrap;
	margin: 0; padding: 0;
	list-style: none;
}

.main-nav li { position: relative; }

.main-nav a {
	position: relative;
	display: block;
	padding: 13px 17px;
	color: rgba(255, 255, 255, .88);
	font-size: 14.5px;
	font-weight: 600;
	white-space: nowrap;
	transition: background .14s ease, color .14s ease;
}

.main-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* شريط سفلي بلون التمييز يوضّح القسم الحالي. */
.main-nav .current-menu-item > a,
.main-nav .current-menu-parent > a,
.main-nav .current-menu-ancestor > a {
	background: rgba(255, 255, 255, .12);
	color: #fff;
}

.main-nav .current-menu-item > a::after,
.main-nav .current-menu-parent > a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 3px;
	background: var(--e-accent);
}

.main-nav .has-sub > a::before {
	content: "";
	display: inline-block;
	width: 5px; height: 5px;
	margin-inline-start: 7px;
	border-inline-end: 1.5px solid currentColor;
	border-block-end: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	opacity: .7;
}

.main-nav ul ul {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	z-index: 60;
	min-width: 214px;
	padding: 5px 0;
	background: var(--e-surface);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius-sm);
	box-shadow: var(--e-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.main-nav li:hover > ul,
.main-nav li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.main-nav ul ul a {
	padding: 9px 16px;
	color: var(--e-text);
	font-weight: 500;
	font-size: 14px;
}

.main-nav ul ul a:hover { background: var(--e-surface-2); color: var(--e-primary); }
.main-nav ul ul ul { top: 0; inset-inline-start: 100%; }

@media (max-width: 900px) { .nav-bar { display: none; } }

/* ---------- ترويسة ثابتة ---------- */

.has-sticky-header .site-header.is-stuck {
	position: fixed;
	inset-inline: 0;
	top: 0;
	box-shadow: var(--e-shadow);
	animation: e-slide-down .2s ease;
}

@keyframes e-slide-down {
	from { transform: translateY(-100%); }
	to   { transform: translateY(0); }
}

/* ---------- قائمة الجوال ---------- */

.mobile-panel {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	grid-template-columns: min(86vw, 348px) 1fr;
	visibility: hidden;
	pointer-events: none;
}

.mobile-panel.is-open { visibility: visible; pointer-events: auto; }

.mobile-panel__body {
	position: relative;
	overflow-y: auto;
	padding: 20px;
	background: var(--e-surface);
	box-shadow: var(--e-shadow-lg);
	transform: translateX(-100%);
	transition: transform .24s ease;
}

[dir="rtl"] .mobile-panel__body { transform: translateX(100%); }
.mobile-panel.is-open .mobile-panel__body { transform: translateX(0); }

.mobile-panel__overlay {
	background: rgba(6, 11, 17, .68);
	opacity: 0;
	border: 0; padding: 0;
	transition: opacity .24s ease;
}

.mobile-panel.is-open .mobile-panel__overlay { opacity: 1; }

.mobile-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--e-border);
	font-size: 18px;
}

.mobile-panel ul { margin: 0; padding: 0; list-style: none; }
.mobile-panel nav { margin-top: 16px; }
.mobile-panel li { border-bottom: 1px solid var(--e-border-soft); }

.mobile-panel a {
	display: block;
	padding: 12px 4px;
	color: var(--e-text);
	font-size: 15px;
	font-weight: 600;
}

.mobile-panel a:hover { color: var(--e-primary); }

.mobile-panel ul ul a {
	padding-inline-start: 18px;
	font-size: 14px;
	font-weight: 500;
	color: var(--e-muted);
}

/* ---------- البحث ---------- */

.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 210;
	display: none;
	place-items: start center;
	padding-top: 13vh;
	background: rgba(6, 11, 17, .76);
	backdrop-filter: blur(3px);
}

.search-overlay.is-open { display: grid; }

.search-overlay__box {
	width: min(92vw, 640px);
	padding: 24px;
	background: var(--e-surface);
	border-radius: var(--e-radius-lg);
	box-shadow: var(--e-shadow-lg);
}

.search-form { display: flex; gap: 8px; }

.search-form input[type="search"],
.search-form input[type="text"] {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius-sm);
	color: var(--e-text);
	font-family: inherit;
	font-size: 16px;
}

.search-form input:focus { border-color: var(--e-primary); outline: none; }

.search-form button {
	padding: 12px 24px;
	background: var(--e-primary);
	border: 0;
	border-radius: var(--e-radius-sm);
	color: #fff;
	font-weight: 700;
}

.search-form button:hover { background: var(--e-primary-dark); }

/* =========================================================================
   5. شريط الأخبار العاجلة
   ========================================================================= */

.breaking {
	display: flex;
	align-items: stretch;
	overflow: hidden;
	background: var(--e-surface);
	border-bottom: 1px solid var(--e-border);
}

.breaking__label {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 7px;
	padding: 11px 18px;
	background: var(--e-breaking);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .02em;
}

.breaking__dot {
	width: 7px; height: 7px;
	background: #fff;
	border-radius: 50%;
	animation: e-pulse 1.6s ease-in-out infinite;
}

@keyframes e-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%      { opacity: .4; transform: scale(.65); }
}

.breaking__viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.breaking__track { display: flex; align-items: center; height: 100%; }

.breaking__item {
	display: none;
	min-width: 0;
	padding: 11px 18px;
	font-size: 14.5px;
	font-weight: 600;
}

.breaking__item.is-active { display: block; animation: e-fade-in .3s ease; }

.breaking__item a {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--e-text);
}

.breaking__item a:hover { color: var(--e-breaking); }

@keyframes e-fade-in {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.breaking__nav { display: flex; flex: 0 0 auto; border-inline-start: 1px solid var(--e-border); }

.breaking__nav button {
	width: 34px;
	background: none;
	border: 0;
	color: var(--e-muted);
	font-size: 17px;
	line-height: 1;
}

.breaking__nav button:hover { background: var(--e-surface-2); color: var(--e-primary); }

/* =========================================================================
   6. شارة التصنيف (kicker)
   ========================================================================= */

/*
 * سطر التصنيف فوق العنوان لا شارة عائمة على الصورة: يعطي السياق قبل
 * القراءة، ولا يحجب جزءاً من الصورة، وهو ما تفعله الصحف الكبرى.
 */
.cat-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--e-accent-dark);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .01em;
	line-height: 1.4;
}

.cat-badge::before {
	content: "";
	width: 3px; height: 13px;
	background: var(--e-accent);
	border-radius: 2px;
}

.cat-badge:hover { color: var(--e-primary); }
.cat-badge:hover::before { background: var(--e-primary); }

[data-theme="dark"] .cat-badge { color: var(--e-accent); }

.cat-badge--breaking { color: var(--e-breaking); }
.cat-badge--breaking::before { background: var(--e-breaking); }
[data-theme="dark"] .cat-badge--breaking { color: #ff6b6e; }

.sponsored-notice {
	margin: var(--e-s3) 0 0;
	padding: 10px 14px;
	background: var(--e-surface-2);
	border-inline-start: 3px solid var(--e-accent);
	border-radius: var(--e-radius-sm);
	color: var(--e-muted);
	font-size: 13px;
}

/* =========================================================================
   7. بطاقات المقالات
   ========================================================================= */

.card {
	display: flex;
	flex-direction: column;
	gap: 11px;
	min-width: 0;
}

.card__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--e-radius);
	aspect-ratio: 16 / 9;
	background: var(--e-surface-3);
}

.card__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.card:hover .card__media img { transform: scale(1.045); }

.card__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.card__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.45;
	letter-spacing: -.01em;
}

.card__title a {
	color: var(--e-text);
	/* قصّ العنوان على ٣ أسطر يحفظ انتظام الشبكة مهما طالت العناوين. */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card__title a:hover { color: var(--e-primary); }
[data-theme="dark"] .card__title a:hover { color: #6cb6ff; }

.card__excerpt {
	margin: 0;
	color: var(--e-muted);
	font-size: 14px;
	line-height: 1.65;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	color: var(--e-muted-2);
	font-size: 12.5px;
}

.card__meta > * + *::before {
	content: "·";
	margin-inline-end: 10px;
	color: var(--e-border-strong);
}

/* ---------- أفقية ---------- */

.card--row { flex-direction: row; gap: 16px; align-items: flex-start; }

.card--row .card__media { flex: 0 0 190px; aspect-ratio: 3 / 2; }
.card--row .card__title { font-size: 18px; }

@media (max-width: 560px) {
	.card--row { gap: 13px; }
	.card--row .card__media { flex: 0 0 118px; }
	.card--row .card__title { font-size: 15.5px; }
	.card--row .card__excerpt { display: none; }
}

/* ---------- مميّزة ---------- */

.card--feature .card__title { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.28; }
.card--feature .card__excerpt { font-size: 16px; -webkit-line-clamp: 3; }

/* ---------- نص فوق الصورة ---------- */

.card--overlay {
	position: relative;
	justify-content: flex-end;
	min-height: 340px;
	overflow: hidden;
	border-radius: var(--e-radius-lg);
	gap: 0;
}

.card--overlay .card__media {
	position: absolute;
	inset: 0;
	border-radius: 0;
	aspect-ratio: auto;
}

.card--overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--e-scrim);
	pointer-events: none;
}

.card--overlay .card__body {
	position: relative;
	z-index: 2;
	padding: 24px;
	gap: 9px;
}

.card--overlay .card__title a,
.card--overlay .card__excerpt { color: #fff; }

.card--overlay .card__meta { color: rgba(255, 255, 255, .72); }
.card--overlay .card__meta > * + *::before { color: rgba(255, 255, 255, .4); }

.card--overlay .card__title {
	font-size: clamp(21px, 2.9vw, 29px);
	font-weight: 800;
	line-height: 1.32;
}

.card--overlay .card__title a:hover { color: var(--e-accent); }

.card--overlay .cat-badge { color: #fff; }
.card--overlay .cat-badge::before { background: var(--e-accent); }

/* ---------- الشبكات ---------- */

.grid { display: grid; gap: var(--e-gap); }

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
	.grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
	.grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- قائمة الأرشيف ---------- */

.archive-list { display: grid; gap: 0; }

/* فواصل رفيعة بدل بطاقات منفصلة — أكثف وأقرب لشكل الصحيفة. */
.archive-list > .card {
	padding-block: var(--e-s4);
	border-bottom: 1px solid var(--e-border-soft);
}

.archive-list > .card:first-child { padding-block-start: 0; }
.archive-list > .card:last-child { border-bottom: 0; }

/* ---------- قائمة نصية ---------- */

.post-list { margin: 0; padding: 0; list-style: none; }

.post-list__item {
	display: flex;
	gap: 12px;
	padding: 13px 0;
	border-bottom: 1px solid var(--e-border-soft);
}

.post-list__item:first-child { padding-top: 0; }
.post-list__item:last-child { border-bottom: 0; padding-bottom: 0; }

.post-list__thumb {
	flex: 0 0 88px;
	overflow: hidden;
	border-radius: var(--e-radius-sm);
	aspect-ratio: 3 / 2;
}

.post-list__thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-list__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.post-list__title {
	color: var(--e-text);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-list__title:hover { color: var(--e-primary); }
[data-theme="dark"] .post-list__title:hover { color: #6cb6ff; }

/* =========================================================================
   8. التواريخ
   ========================================================================= */

.post-date,
.post-modified {
	color: var(--e-muted-2);
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.post-list .post-date { display: block; }

/* =========================================================================
   9. الهيرو وأقسام الرئيسية
   ========================================================================= */

.hero { margin-bottom: var(--e-s5); }

.hero--split {
	display: grid;
	grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
	gap: var(--e-gap);
}

/*
 * الخبر الرئيسي يمتد ليطابق ارتفاع العمود الجانبي، وإلا بدا الصفّ مكسور
 * التوازن: صورة قصيرة بجوار قائمة طويلة.
 */
.hero--split .hero__main { display: flex; }

.hero--split .hero__main .card--overlay { flex: 1; min-height: 420px; }

.hero--split .hero__side {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.hero--split .hero__side .card {
	padding-block: 14px;
	border-bottom: 1px solid var(--e-border-soft);
}

.hero--split .hero__side .card:first-child { padding-block-start: 0; }
.hero--split .hero__side .card:last-child { border-bottom: 0; }

@media (max-width: 900px) {
	.hero--split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- ترويسة القسم ---------- */

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: var(--e-s3);
	padding-bottom: 10px;
	border-bottom: 2px solid var(--e-border);
}

.section-head__title {
	position: relative;
	margin: 0;
	padding-inline-start: 13px;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.02em;
}

/* شريط رأسي سميك — أوضح وأقوى بصرياً من خط سفلي رفيع. */
.section-head__title::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: .14em;
	bottom: .14em;
	width: 4px;
	background: var(--e-accent);
	border-radius: 2px;
}

.section-head__more {
	flex: 0 0 auto;
	color: var(--e-muted);
	font-size: 13.5px;
	font-weight: 600;
}

.section-head__more:hover { color: var(--e-primary); }

.home-block { margin-bottom: var(--e-s5); }

.home-block--mixed {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: var(--e-gap);
	align-items: start;
}

@media (max-width: 900px) {
	.home-block--mixed { grid-template-columns: minmax(0, 1fr); }
}

.home-block--mixed .home-block__list { padding-top: 46px; }

@media (max-width: 900px) {
	.home-block--mixed .home-block__list { padding-top: 0; }
}

/* =========================================================================
   10. صفحة المقال
   ========================================================================= */

.breadcrumbs { margin-bottom: var(--e-s3); font-size: 13px; }

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 7px;
	margin: 0; padding: 0;
	list-style: none;
}

.breadcrumbs li { display: flex; align-items: center; gap: 7px; min-width: 0; }

.breadcrumbs li:not(:last-child)::after { content: "‹"; color: var(--e-muted-2); }

.breadcrumbs a { color: var(--e-muted); }
.breadcrumbs a:hover { color: var(--e-primary); }

.breadcrumbs [aria-current="page"] {
	color: var(--e-muted-2);
	/* عنوان الخبر في المسار قد يكون طويلاً — نقصّه بدل أن يلتف سطوراً. */
	max-width: 34ch;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* المقال يُقيَّد لعرض قراءة مريح، ويبقى في وسط عموده. */
.article { max-width: 780px; }

.layout--no-sidebar .article { margin-inline: auto; }

.article__header { margin-bottom: var(--e-s4); }

.article__header .cat-badge { margin-bottom: 10px; }

.article__title {
	margin: 0 0 var(--e-s2);
	font-size: var(--e-fs-h1);
	font-weight: 800;
	line-height: 1.24;
	letter-spacing: -.025em;
	text-wrap: balance;
}

.article__excerpt {
	margin: 0 0 var(--e-s3);
	color: var(--e-muted);
	font-size: 1.14em;
	font-weight: 500;
	line-height: 1.62;
}

/* ---------- البايلاين ---------- */

.byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	padding-block: 14px;
	border-block: 1px solid var(--e-border);
	font-size: 13.5px;
	color: var(--e-muted);
}

.byline__avatar {
	width: 34px; height: 34px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--e-surface-3);
}

.byline__author {
	display: inline-flex;
	flex-direction: column;
	line-height: 1.35;
	margin-inline-end: 2px;
}

.byline__author a { color: var(--e-text); font-weight: 700; font-size: 14px; }
.byline__author a:hover { color: var(--e-primary); }

.byline__job { color: var(--e-muted-2); font-size: 12px; }

.byline__sep { color: var(--e-border-strong); }

.byline__read { color: var(--e-muted-2); font-size: 12.5px; }

.byline--modified {
	padding-block: 9px 0;
	border: 0;
	font-size: 12.5px;
}

.byline--modified .post-modified { color: var(--e-muted-2); }

/* ---------- مكان الحدث والمصدر ---------- */

.dateline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: var(--e-s3) 0 0;
	color: var(--e-muted);
	font-size: 13.5px;
}

.dateline__place { font-weight: 800; color: var(--e-text); }

.dateline__place::after {
	content: "—";
	margin-inline-start: 8px;
	color: var(--e-muted-2);
	font-weight: 400;
}

/* ---------- الصورة البارزة ---------- */

.article__figure { margin: var(--e-s4) 0; }

.article__figure img { width: 100%; border-radius: var(--e-radius); display: block; }

.article__figure figcaption {
	margin-top: 9px;
	padding-inline-start: 11px;
	border-inline-start: 3px solid var(--e-border-strong);
	color: var(--e-muted);
	font-size: 13px;
	line-height: 1.6;
}

/* ---------- نص المقال ---------- */

.article__body {
	font-size: var(--e-fs-base);
	line-height: 1.92;
}

.article__body > * + * { margin-top: 1.1em; }

.article__body h2 {
	margin-top: 1.85em;
	font-size: 1.4em;
	line-height: 1.35;
}

.article__body h3 { margin-top: 1.5em; font-size: 1.18em; }

.article__body a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.article__body a:hover { text-decoration-color: currentColor; }

.article__body img { border-radius: var(--e-radius); }
.article__body figure { margin: 1.8em 0; }

.article__body figcaption {
	margin-top: 8px;
	color: var(--e-muted);
	font-size: .76em;
	text-align: center;
}

.article__body ul, .article__body ol { padding-inline-start: 1.5em; }
.article__body li + li { margin-top: .45em; }

/* ---------- شريط تقدم القراءة ---------- */

.read-progress {
	position: fixed;
	inset-inline: 0;
	top: 0;
	z-index: 300;
	height: 3px;
	pointer-events: none;
}

.read-progress__bar {
	height: 100%;
	width: 0;
	background: var(--e-accent);
	transition: width .1s linear;
}

/* ---------- فهرس المحتويات ---------- */

.toc {
	margin: var(--e-s4) 0;
	padding: 16px 20px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius);
}

.toc__title { margin: 0 0 9px; font-size: 15px; font-weight: 800; }

.toc ol { margin: 0; padding-inline-start: 1.3em; }
.toc li + li { margin-top: 5px; }
.toc a { color: var(--e-muted); font-size: 14.5px; }
.toc a:hover { color: var(--e-primary); }

/* ---------- الوسوم ---------- */

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: var(--e-s4) 0 0;
	padding: 0;
	list-style: none;
}

.tag-list a {
	display: inline-block;
	padding: 5px 12px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: 999px;
	color: var(--e-muted);
	font-size: 12.5px;
	font-weight: 600;
	transition: background .14s ease, color .14s ease, border-color .14s ease;
}

.tag-list a:hover {
	background: var(--e-primary);
	border-color: var(--e-primary);
	color: #fff;
}

/* ---------- المشاركة ---------- */

.share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: var(--e-s4) 0;
	padding-block: 15px;
	border-block: 1px solid var(--e-border);
}

.share__label {
	margin-inline-end: 4px;
	color: var(--e-muted);
	font-size: 13.5px;
	font-weight: 800;
}

.share__btn {
	padding: 7px 15px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: 999px;
	color: var(--e-text);
	font-size: 13px;
	font-weight: 600;
	transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease;
}

.share__btn:hover { color: #fff; transform: translateY(-1px); }

.share__btn--whatsapp:hover { background: #25d366; border-color: #25d366; }
.share__btn--facebook:hover { background: #1877f2; border-color: #1877f2; }
.share__btn--x:hover        { background: #000;    border-color: #000; }
.share__btn--telegram:hover { background: #229ed9; border-color: #229ed9; }
.share__btn--linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.share__btn--email:hover,
.share__btn--copy:hover     { background: var(--e-primary); border-color: var(--e-primary); }

.share__btn.is-copied { background: #17914a; border-color: #17914a; color: #fff; }

/* ---------- صندوق الكاتب ---------- */

.author-box {
	display: flex;
	gap: 18px;
	margin: var(--e-s5) 0;
	padding: 22px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius);
}

.author-box__avatar img {
	display: block;
	width: 72px; height: 72px;
	border-radius: 50%;
	object-fit: cover;
}

.author-box__body { min-width: 0; }

.author-box__eyebrow {
	margin: 0 0 2px;
	color: var(--e-muted-2);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .05em;
}

.author-box__name { margin: 0 0 3px; font-size: 18px; }
.author-box__name a { color: var(--e-text); }
.author-box__name a:hover { color: var(--e-primary); }

.author-box__job {
	margin: 0 0 9px;
	color: var(--e-accent-dark);
	font-size: 13px;
	font-weight: 700;
}

[data-theme="dark"] .author-box__job { color: var(--e-accent); }

.author-box__bio { margin: 0 0 10px; color: var(--e-muted); font-size: 14px; line-height: 1.7; }

.author-box__expertise { margin: 0 0 10px; color: var(--e-muted-2); font-size: 12.5px; }
.author-box__expertise span { font-weight: 700; }

.author-box__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--e-muted-2);
}

@media (max-width: 560px) {
	.author-box { flex-direction: column; gap: 14px; }
	.author-box__avatar img { width: 60px; height: 60px; }
}

/* ---------- ذات صلة والتنقل ---------- */

.related { margin: var(--e-s5) 0; }

.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: var(--e-s5) 0;
}

.post-nav__link {
	padding: 15px 18px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius);
	transition: border-color .14s ease, background .14s ease;
}

.post-nav__link:hover { border-color: var(--e-primary); background: var(--e-surface-3); }

.post-nav__label {
	display: block;
	margin-bottom: 5px;
	color: var(--e-muted-2);
	font-size: 11.5px;
	font-weight: 700;
}

.post-nav__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--e-text);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.5;
}

@media (max-width: 580px) {
	.post-nav { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================================
   11. الشريط الجانبي والودجات
   ========================================================================= */

.sidebar {
	display: grid;
	gap: var(--e-s4);
	align-content: start;
	position: sticky;
	top: 18px;
}

.widget {
	padding: 18px;
	background: var(--e-surface);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius);
}

.widget__title {
	position: relative;
	margin: 0 0 13px;
	padding: 0 13px 10px 0;
	border-bottom: 2px solid var(--e-border);
	font-size: 16px;
	font-weight: 800;
}

.widget__title::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: .1em;
	height: 1.05em;
	width: 4px;
	background: var(--e-accent);
	border-radius: 2px;
}

.widget ul { margin: 0; padding: 0; list-style: none; }

.widget > ul > li {
	padding: 9px 0;
	border-bottom: 1px solid var(--e-border-soft);
}

.widget > ul > li:first-child { padding-top: 0; }
.widget > ul > li:last-child { border-bottom: 0; padding-bottom: 0; }

.widget a { color: var(--e-text); font-size: 14.5px; }
.widget a:hover { color: var(--e-primary); }

.social-list { display: flex; flex-wrap: wrap; gap: 7px; }

.social-list__link {
	display: inline-block;
	padding: 7px 14px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.social-list__link:hover {
	background: var(--e-primary);
	border-color: var(--e-primary);
	color: #fff;
}

/* =========================================================================
   12. الإعلانات
   ========================================================================= */

.ad-slot { display: block; margin: var(--e-s4) 0; text-align: center; }

.ad-slot__label {
	display: block;
	margin-bottom: 6px;
	color: var(--e-muted-2);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .08em;
}

/* حجز المساحة يمنع اهتزاز الصفحة (CLS) عند تحميل الإعلان. */
.ad-slot--reserved > *:not(.ad-slot__label) { min-height: 90px; }
.ad-slot--reserved.ad-slot--sidebar > *:not(.ad-slot__label) { min-height: 250px; }

.ad-slot--in_content {
	margin: var(--e-s5) 0;
	padding-block: 16px;
	border-block: 1px solid var(--e-border);
}

/* =========================================================================
   13. الأرشيف والبحث و404
   ========================================================================= */

.page-head {
	margin-bottom: var(--e-s4);
	padding-bottom: var(--e-s3);
	border-bottom: 2px solid var(--e-border);
}

.page-head__title {
	position: relative;
	margin: 0;
	padding-inline-start: 16px;
	font-size: clamp(24px, 4vw, 34px);
	font-weight: 800;
	letter-spacing: -.025em;
}

.page-head__title::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: .12em;
	bottom: .12em;
	width: 5px;
	background: var(--e-accent);
	border-radius: 3px;
}

.page-head__desc {
	margin: 10px 0 0;
	max-width: 70ch;
	color: var(--e-muted);
	font-size: 15px;
	line-height: 1.7;
}

.page-head__count { margin: 7px 0 0; color: var(--e-muted-2); font-size: 13px; }

.no-results {
	padding: var(--e-s6) var(--e-s4);
	text-align: center;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius-lg);
}

.no-results__title { margin: 0 0 10px; font-size: 22px; }
.no-results p { max-width: 54ch; margin-inline: auto; color: var(--e-muted); }

.error-404 { padding: var(--e-s6) var(--e-s4); text-align: center; }

.error-404__code {
	margin: 0;
	font-size: clamp(72px, 15vw, 140px);
	font-weight: 800;
	line-height: 1;
	color: var(--e-primary);
	opacity: .14;
	letter-spacing: -.04em;
}

.error-404__title { margin: -.22em 0 12px; font-size: clamp(22px, 4vw, 32px); }

/* =========================================================================
   14. الترقيم
   ========================================================================= */

.pagination { margin-top: var(--e-s5); }

.pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin: 0; padding: 0;
	list-style: none;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px; height: 40px;
	padding-inline: 13px;
	background: var(--e-surface);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius-sm);
	color: var(--e-text);
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.pagination a.page-numbers:hover { border-color: var(--e-primary); color: var(--e-primary); }

.pagination .page-numbers.current {
	background: var(--e-primary);
	border-color: var(--e-primary);
	color: #fff;
}

.pagination .dots { border: 0; background: none; }

/* =========================================================================
   15. التعليقات
   ========================================================================= */

.comments {
	margin-top: var(--e-s5);
	padding-top: var(--e-s4);
	border-top: 2px solid var(--e-border);
}

.comments__title { margin: 0 0 var(--e-s4); font-size: 20px; }

.comment-list { margin: 0 0 var(--e-s5); padding: 0; list-style: none; }
.comment-list ol { padding-inline-start: 26px; list-style: none; }

.comment-body { padding: 16px 0; border-bottom: 1px solid var(--e-border-soft); }

.comment-author { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.comment-author img { width: 36px; height: 36px; border-radius: 50%; }
.comment-author .fn { font-weight: 700; font-style: normal; }

.comment-metadata { color: var(--e-muted-2); font-size: 12.5px; }

.comment-form label { display: block; margin-bottom: 5px; font-size: 13.5px; font-weight: 600; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 11px 13px;
	background: var(--e-surface-2);
	border: 1px solid var(--e-border);
	border-radius: var(--e-radius-sm);
	color: var(--e-text);
	font-family: inherit;
	font-size: 15px;
}

.comment-form textarea { resize: vertical; }

.comment-form .submit {
	padding: 12px 28px;
	background: var(--e-primary);
	border: 0;
	border-radius: var(--e-radius-sm);
	color: #fff;
	font-weight: 700;
}

.comment-form .submit:hover { background: var(--e-primary-dark); }

/* =========================================================================
   16. الفوتر
   ========================================================================= */

.site-footer {
	margin-top: var(--e-s6);
	background: var(--e-primary-dark);
	color: rgba(255, 255, 255, .72);
	font-size: 14px;
}

[data-theme="dark"] .site-footer {
	background: var(--e-surface);
	border-top: 1px solid var(--e-border);
}

.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: #fff; }

[data-theme="dark"] .site-footer a { color: var(--e-muted); }
[data-theme="dark"] .site-footer a:hover { color: var(--e-text); }

.footer__top { display: grid; gap: var(--e-s5); padding-block: var(--e-s5); }

.footer__cols--1 { grid-template-columns: minmax(0, 1fr); }
.footer__cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer__cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer__cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
	.footer__cols--3, .footer__cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
	.footer__top { grid-template-columns: minmax(0, 1fr) !important; gap: var(--e-s4); }
}

.site-footer .widget { padding: 0; background: none; border: 0; }

.site-footer .widget__title,
.footer__col > .widget__title {
	border-color: rgba(255, 255, 255, .16);
	color: #fff;
	font-size: 15px;
}

[data-theme="dark"] .site-footer .widget__title { border-color: var(--e-border); color: var(--e-text); }

.site-footer .widget > ul > li { border-color: rgba(255, 255, 255, .1); }
[data-theme="dark"] .site-footer .widget > ul > li { border-color: var(--e-border-soft); }

.site-footer .widget a { font-size: 14px; }

.footer__about { max-width: 46ch; line-height: 1.8; margin: 0; }

.footer__transparency {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	padding-block: var(--e-s3);
	border-top: 1px solid rgba(255, 255, 255, .14);
	font-size: 13.5px;
	font-weight: 600;
}

[data-theme="dark"] .footer__transparency { border-color: var(--e-border); }

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding-block: var(--e-s3);
	border-top: 1px solid rgba(255, 255, 255, .14);
	color: rgba(255, 255, 255, .5);
	font-size: 13px;
}

[data-theme="dark"] .footer__bottom { border-color: var(--e-border); color: var(--e-muted-2); }

.back-to-top {
	position: fixed;
	inset-inline-end: 20px;
	bottom: 20px;
	z-index: 90;
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	background: var(--e-primary);
	border: 0;
	border-radius: 50%;
	color: #fff;
	box-shadow: var(--e-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s, background .14s ease;
}

.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--e-accent); }

/* =========================================================================
   17. الطباعة
   ========================================================================= */

@media print {
	.site-header, .nav-bar, .topbar, .breaking, .sidebar, .site-footer,
	.share, .related, .post-nav, .ad-slot, .back-to-top, .read-progress,
	.comments, .toc, .breadcrumbs, .mobile-panel, .search-overlay {
		display: none !important;
	}

	body { background: #fff; color: #000; font-size: 12pt; }

	.layout { display: block; }
	.article { max-width: none; }

	.article__body a::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #555;
	}
}
