/* =========================================================================
   محافظة حلب — تنسيقات ووردبريس
   امتداد لملف التصميم css/style.css، يستخدم نفس متغيّرات الهوية البصرية.
   يغطي: الصفحات الداخلية، المقالات، الأرشيف، البحث، التعليقات، الودجات.
   ========================================================================= */

/* ---------- 1. عناصر مساعدة نُقلت من سمات style المضمّنة ---------- */

.about-heading {
	color: var(--brand);
	font-size: var(--fs-2xl);
	font-weight: 800;
	line-height: 1.3;
	margin-bottom: var(--space-sm);
}

.regions-heading {
	color: var(--brand);
	font-size: var(--fs-2xl);
	font-weight: 800;
	margin-bottom: var(--space-sm);
}

.regions-text {
	color: var(--text-muted);
	margin-bottom: var(--space-md);
	max-width: 52ch;
}

.eyebrow--center {
	justify-content: center;
}

.section-cta {
	margin-top: var(--space-lg);
	text-align: center;
}

/* فواصل بين الفقرات المتتالية (‎p‎ بلا هامش في ملف التصميم). */
.about-copy p + p,
.rebuild-copy p + p,
.info-panel p + p {
	margin-top: 0.85em;
}

.rebuild-copy .btn {
	margin-top: var(--space-sm);
}

.regions-wrap .link-arrow {
	margin-top: var(--space-md);
}

/* عناوين h2 داخل بطاقات التراث في صفحة الأرشيف. */
.heritage-card h2 {
	font-size: 1rem;
	font-weight: 800;
	margin: 0;
	position: relative;
	z-index: 1;
}

.region-list--archive {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* روابط داخل بطاقات التصميم ترث اللون. */
.hero-slide figcaption a,
.news-card h2 a,
.news-card h3 a {
	color: inherit;
	text-decoration: none;
}

.news-card h2 a:hover,
.news-card h3 a:hover {
	color: var(--accent);
}

/* عنصر العنوان في التذييل لا يكون رابطاً دائماً. */
.footer-col li span {
	display: block;
	font-size: 0.86rem;
	line-height: 1.8;
}

/* ---------- 1.5 حالة الصفحة الحالية في القوائم ---------- */

.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current_page_item > a,
.main-nav > ul > li.current-menu-ancestor > a,
.main-nav > ul > li.current-post-ancestor > a,
.main-nav > ul > li.current-menu-ancestor > button.nav-link,
.main-nav > ul > li.current-menu-parent > button.nav-link {
	color: var(--accent);
}

/* الحالة النشطة تستخدم نفس هندسة الشريط في css/style.css — تقلب ‎--bar‎ فقط. */
.main-nav > ul > li.current-menu-item > a::after,
.main-nav > ul > li.current_page_item > a::after,
.main-nav > ul > li.current-menu-ancestor > a::after,
.main-nav > ul > li.current-menu-ancestor > button.nav-link::after,
.main-nav > ul > li.current-menu-parent > button.nav-link::after,
.main-nav > ul > li.current-post-ancestor > a::after {
	--bar: 1;
}

.mega a.current-menu-item,
.mobile-nav a.current-menu-item,
.mobile-nav a.current_page_item {
	color: var(--gold);
	font-weight: 700;
}

/* ---------- 2. لوحة البحث في الترويسة ---------- */

.header-search {
	background: var(--surface);
	border-top: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
	padding-block: var(--space-sm);
}

.header-search[hidden] {
	display: none;
}

.search-form {
	display: flex;
	gap: 0.6em;
	margin-inline: auto;
	max-width: 720px;
}

.search-field {
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	color: var(--text);
	flex: 1;
	font-size: var(--fs-sm);
	min-height: 46px;
	padding-inline: 1.2em;
}

.search-field:focus {
	border-color: var(--brand);
	outline: none;
}

.search-form .search-submit {
	flex-shrink: 0;
}

.search-form-wrap {
	margin-bottom: var(--space-lg);
}

.search-form-wrap .search-form {
	margin-inline: 0;
}

/* ---------- 3. ترويسة الصفحات الداخلية ---------- */

.page-hero {
	background:
		radial-gradient(120% 160% at 12% 0%, rgba(38, 89, 68, 0.5) 0%, transparent 58%),
		linear-gradient(160deg, var(--ghar) 0%, var(--ghar-700) 100%);
	color: var(--text-on-dark);
	overflow: hidden;
	padding-block: var(--section-y);
	position: relative;
}

.page-hero::before {
	background-image: url("../assets/patterns/pattern-green-outline.png");
	background-size: 320px;
	content: "";
	inset: 0;
	mix-blend-mode: overlay;
	opacity: 0.16;
	position: absolute;
}

.page-hero-mark {
	filter: brightness(0) invert(1);
	inset-block-start: -30%;
	inset-inline-end: -6%;
	opacity: 0.12;
	position: absolute;
	width: min(42vw, 460px);
}

.page-hero .container {
	position: relative;
	z-index: 1;
}

.page-hero-title {
	color: #fff;
	font-size: var(--fs-2xl);
	font-weight: 800;
	line-height: 1.25;
	margin-block: 0.35em 0;
}

.page-hero-title .search-term {
	color: var(--gold);
	font-family: var(--font-deco);
	font-weight: 400;
}

.page-hero-sub {
	color: var(--text-on-dark-muted);
	font-size: var(--fs-sm);
	margin-top: 0.6em;
	max-width: 60ch;
}

/* ---------- 4. مسار التصفّح ---------- */

.breadcrumbs ol {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	font-size: var(--fs-xs);
	gap: 0.5em;
	list-style: none;
	margin: 0;
	padding: 0;
}

.breadcrumbs li + li::before {
	color: var(--gold);
	content: "‹";
	margin-inline-end: 0.5em;
}

.breadcrumbs a {
	color: var(--text-on-dark-muted);
	transition: color 0.2s;
}

.breadcrumbs a:hover {
	color: #fff;
}

.breadcrumbs [aria-current="page"] {
	color: var(--gold);
	font-weight: 600;
}

/* ---------- 5. تخطيط الصفحات الداخلية ---------- */

.content-area {
	align-items: start;
	display: grid;
	gap: var(--space-xl);
	grid-template-columns: minmax(0, 1fr) 320px;
	padding-block: var(--section-y);
}

.no-sidebar .content-area,
.content-area--narrow {
	grid-template-columns: minmax(0, 1fr);
	max-width: 940px;
}

.front-extra {
	padding-block: var(--section-y);
}

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

/* ---------- 6. شبكة المقالات ---------- */

.post-grid {
	display: grid;
	gap: var(--space-md);
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.post-grid .news-card {
	--i: 0;
}

/* ---------- 7. محتوى المقالة/الصفحة ---------- */

.entry {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	padding: clamp(1.25rem, 1rem + 2vw, 2.75rem);
}

.entry-meta {
	align-items: center;
	color: var(--text-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--fs-xs);
	gap: var(--space-sm);
	margin-bottom: var(--space-md);
}

.entry-meta .posted-on,
.entry-meta .byline {
	align-items: center;
	display: inline-flex;
	gap: 0.45em;
}

.entry-meta svg {
	color: var(--accent);
	height: 15px;
	width: 15px;
}

.entry-figure {
	border-radius: var(--radius-md);
	margin-bottom: var(--space-md);
	overflow: hidden;
}

.entry-figure img {
	height: auto;
	width: 100%;
}

.entry-figure figcaption {
	color: var(--text-muted);
	font-size: var(--fs-xs);
	padding-top: 0.7em;
	text-align: center;
}

.entry-content {
	color: var(--text);
	font-size: var(--fs-md);
	line-height: 1.95;
}

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

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	color: var(--brand);
	font-weight: 800;
	line-height: 1.35;
	margin-top: 1.6em;
}

.entry-content h2 { font-size: var(--fs-xl); }
.entry-content h3 { font-size: var(--fs-lg); }
.entry-content h4 { font-size: var(--fs-md); }

.entry-content a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content a:hover {
	color: var(--ashouri-600);
}

.entry-content ul,
.entry-content ol {
	list-style: revert;
	padding-inline-start: 1.6em;
}

.entry-content li + li {
	margin-top: 0.4em;
}

.entry-content blockquote {
	border-inline-start: 3px solid var(--gold);
	color: var(--brand);
	font-family: var(--font-deco);
	font-size: var(--fs-lg);
	line-height: 1.9;
	margin: var(--space-md) 0;
	padding-inline-start: var(--space-sm);
}

.entry-content img,
.entry-content iframe,
.entry-content video {
	border-radius: var(--radius-md);
	height: auto;
	max-width: 100%;
}

.entry-content code,
.entry-content kbd {
	background: var(--bg-alt);
	border-radius: 6px;
	direction: ltr;
	display: inline-block;
	font-size: 0.9em;
	padding: 0.15em 0.45em;
}

.entry-content pre {
	background: var(--ghar-700);
	border-radius: var(--radius-md);
	color: #eaf1ee;
	direction: ltr;
	overflow-x: auto;
	padding: var(--space-sm);
	text-align: left;
}

.entry-content table {
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
	width: 100%;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--border);
	padding: 0.7em 1em;
	text-align: start;
}

.entry-content th {
	background: var(--bg-alt);
	font-weight: 700;
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin-block: var(--space-md);
}

.entry-footer {
	align-items: center;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--fs-xs);
	gap: var(--space-sm);
	margin-top: var(--space-lg);
	padding-top: var(--space-sm);
}

.entry-footer .cat-links,
.entry-footer .tags-links {
	align-items: center;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.entry-footer svg {
	color: var(--accent);
	height: 15px;
	width: 15px;
}

.entry-footer a {
	background: var(--bg-alt);
	border-radius: var(--radius-pill);
	padding: 0.35em 0.9em;
	transition: background-color 0.2s, color 0.2s;
}

.entry-footer a:hover {
	background: var(--accent);
	color: #fff;
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin-top: var(--space-md);
}

/* ---------- 8. نتائج البحث ---------- */

.search-results {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.search-result {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	display: grid;
	gap: var(--space-sm);
	grid-template-columns: 200px minmax(0, 1fr);
	overflow: hidden;
	transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.search-result:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-3px);
}

.search-result:not(:has(.search-result-thumb)) {
	grid-template-columns: minmax(0, 1fr);
}

.search-result-thumb img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.search-result-body {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
	padding: var(--space-sm);
}

.search-result-body .entry-title {
	color: var(--ink);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.5;
}

.search-result-body .entry-title a:hover {
	color: var(--accent);
}

.search-result-body p {
	color: var(--text-muted);
	font-size: 0.88rem;
}

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

/* ---------- 9. لا نتائج / خطأ 404 ---------- */

.no-results,
.error-404 {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: clamp(1.5rem, 1rem + 3vw, 3rem);
	text-align: center;
}

.no-results h2,
.error-404 h2 {
	color: var(--brand);
	font-size: var(--fs-xl);
	font-weight: 800;
	margin-bottom: 0.5em;
}

.no-results p,
.error-404 p {
	color: var(--text-muted);
	margin-bottom: var(--space-md);
}

.error-404 .search-form {
	margin-inline: auto;
}

.quick-grid--404 {
	margin-block: var(--space-lg);
	text-align: start;
}

/* ---------- 10. التنقل بين الصفحات ---------- */

.navigation.pagination {
	margin-top: var(--space-lg);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	justify-content: center;
}

.pagination .page-numbers {
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	display: inline-flex;
	font-weight: 700;
	justify-content: center;
	min-height: 42px;
	min-width: 42px;
	padding-inline: 0.6em;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background: var(--brand);
	border-color: var(--brand);
	color: #fff;
}

.pagination .page-numbers svg {
	height: 16px;
	width: 16px;
}

.post-navigation {
	display: grid;
	gap: var(--space-sm);
	margin-top: var(--space-lg);
}

.post-navigation .nav-links {
	display: grid;
	gap: var(--space-sm);
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.post-navigation a {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	display: block;
	padding: var(--space-sm);
	transition: border-color 0.2s, transform 0.2s;
}

.post-navigation a:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
}

.post-navigation .nav-label {
	color: var(--accent);
	display: block;
	font-size: var(--fs-xs);
	font-weight: 700;
	margin-bottom: 0.3em;
}

.post-navigation .nav-title {
	color: var(--ink);
	font-weight: 700;
	line-height: 1.6;
}

/* ---------- 11. التعليقات ---------- */

.comments-area {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	margin-top: var(--space-lg);
	padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
}

.comments-title,
.comment-reply-title {
	color: var(--brand);
	font-size: var(--fs-lg);
	font-weight: 800;
	margin-bottom: var(--space-md);
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	border-inline-start: 2px solid var(--border);
	margin-top: var(--space-sm);
	padding-inline-start: var(--space-sm);
}

.comment-body {
	border-bottom: 1px solid var(--border);
	padding-block: var(--space-sm);
}

.comment-meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.7em;
	margin-bottom: 0.6em;
}

.comment-author img {
	border-radius: 50%;
}

.comment-author .fn {
	color: var(--brand);
	font-style: normal;
	font-weight: 800;
}

.comment-metadata {
	color: var(--text-muted);
	font-size: var(--fs-xs);
}

.comment-content {
	color: var(--text);
	font-size: var(--fs-sm);
	line-height: 1.9;
}

.comment-content > * + * {
	margin-top: 0.8em;
}

.reply {
	margin-top: 0.6em;
}

.reply a {
	color: var(--accent);
	font-size: var(--fs-xs);
	font-weight: 700;
}

.comment-form {
	display: grid;
	gap: var(--space-sm);
	margin-top: var(--space-md);
}

.comment-form p {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	margin: 0;
}

.comment-form label {
	font-size: var(--fs-sm);
	font-weight: 700;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: inherit;
	min-height: 46px;
	padding: 0.7em 1em;
	width: 100%;
}

.comment-form textarea {
	line-height: 1.8;
	resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--brand);
	outline: none;
}

.comment-form .comment-notes,
.comment-form .comment-form-cookies-consent {
	color: var(--text-muted);
	flex-direction: row;
	font-size: var(--fs-xs);
	gap: 0.5em;
}

.comment-form .form-submit {
	margin-top: 0.4em;
}

.comment-form .submit {
	cursor: pointer;
}

.no-comments {
	color: var(--text-muted);
	font-size: var(--fs-sm);
}

/* ---------- 12. الشريط الجانبي والودجات ---------- */

.widget-area {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	position: sticky;
	top: calc(var(--header-h) + 1rem);
}

.widget {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: var(--space-sm);
}

.widget-title {
	color: var(--brand);
	font-size: 0.95rem;
	font-weight: 800;
	margin-bottom: var(--space-xs);
	padding-bottom: 0.6em;
	position: relative;
}

.widget-title::after {
	background: var(--gold);
	block-size: 2px;
	content: "";
	inline-size: 34px;
	inset-block-end: 0;
	inset-inline-start: 0;
	position: absolute;
}

.widget ul {
	display: flex;
	flex-direction: column;
	gap: 0.55em;
}

.widget li a {
	color: var(--text-muted);
	font-size: 0.88rem;
	transition: color 0.2s, padding-inline-start 0.2s;
}

.widget li a:hover {
	color: var(--accent);
	padding-inline-start: 0.35em;
}

.widget .children,
.widget .sub-menu {
	margin-top: 0.5em;
	padding-inline-start: 0.8em;
}

.widget select,
.widget input[type="search"],
.widget input[type="text"] {
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	min-height: 42px;
	padding: 0.5em 0.8em;
	width: 100%;
}

.widget_search .search-form {
	flex-direction: column;
}

.widget_search .search-submit {
	justify-content: center;
	width: 100%;
}

@media (max-width: 1080px) {
	.widget-area {
		position: static;
	}
}

/* ---------- 13. تنسيقات الكتل (Gutenberg) ---------- */

.entry-content .wp-block-image figcaption,
.entry-content .wp-block-embed figcaption {
	color: var(--text-muted);
	font-size: var(--fs-xs);
	text-align: center;
}

.entry-content .wp-block-quote {
	border-inline-start: 3px solid var(--gold);
	padding-inline-start: var(--space-sm);
}

.entry-content .wp-block-button__link {
	background: var(--accent);
	border-radius: var(--radius-pill);
	color: #fff;
	font-weight: 700;
	padding: 0.85em 1.8em;
	text-decoration: none;
}

.entry-content .wp-block-separator {
	border-top: 1px solid var(--border);
}

.entry-content .wp-block-table td,
.entry-content .wp-block-table th {
	border-color: var(--border);
}

.has-ghar-color { color: #1c4737; }
.has-ghar-dark-color { color: #102a21; }
.has-ashouri-color { color: #5b1d37; }
.has-aaji-color { color: #ccbaa8; }
.has-ashhab-color { color: #f1f2f2; }
.has-ink-color { color: #17221d; }

.has-ghar-background-color { background-color: #1c4737; }
.has-ghar-dark-background-color { background-color: #102a21; }
.has-ashouri-background-color { background-color: #5b1d37; }
.has-aaji-background-color { background-color: #ccbaa8; }
.has-ashhab-background-color { background-color: #f1f2f2; }
.has-ink-background-color { background-color: #17221d; }

/* ---------- 14. الدوائر والمديريات ---------- */

.departments {
	padding-block: var(--section-y);
}

.dept-group + .dept-group {
	margin-top: var(--space-xl);
}

.dept-group .section-head {
	margin-bottom: var(--space-md);
}

.dept-grid {
	display: grid;
	gap: var(--space-sm);
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.dept-item {
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	display: flex;
	gap: var(--space-xs);
	padding: var(--space-sm);
	transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.dept-item:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow-md);
	transform: translateY(-3px);
}

.dept-item-icon {
	align-items: center;
	background: var(--ashouri-tint);
	border-radius: 12px;
	color: var(--accent);
	display: flex;
	flex-shrink: 0;
	height: 44px;
	justify-content: center;
	transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
	width: 44px;
}

.dept-item:hover .dept-item-icon {
	background: var(--accent);
	color: #fff;
}

.dept-item-icon svg {
	height: 20px;
	width: 20px;
}

.dept-item-body {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	min-width: 0;
}

.dept-item-body strong {
	color: var(--ink);
	font-size: 0.93rem;
	font-weight: 700;
	line-height: 1.5;
}

.dept-item-body span {
	color: var(--text-muted);
	font-size: 0.78rem;
}

.dept-item-phone {
	font-variant-numeric: tabular-nums;
}

/* بطاقة بيانات التواصل في صفحة الجهة المفردة. */
.dept-meta {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
}

.dept-meta li {
	align-items: flex-start;
	display: flex;
	gap: 0.6em;
}

.dept-meta svg {
	color: var(--accent);
	flex-shrink: 0;
	height: 16px;
	margin-top: 0.25em;
	width: 16px;
}

.dept-meta span {
	display: flex;
	flex-direction: column;
	font-size: 0.86rem;
	gap: 0.1em;
	min-width: 0;
	word-break: break-word;
}

.dept-meta strong {
	color: var(--text-muted);
	font-size: 0.72rem;
	font-weight: 700;
}

.dept-card .btn {
	margin-top: var(--space-sm);
	width: 100%;
}

/* ---------- 15. أقسام «مرتبط» في الصفحات المفردة ---------- */

.related-news {
	margin-top: var(--space-lg);
}

.related-news-title {
	color: var(--brand);
	font-size: var(--fs-lg);
	font-weight: 800;
	margin-bottom: var(--space-sm);
	padding-bottom: 0.5em;
	position: relative;
}

.related-news-title::after {
	background: var(--gold);
	block-size: 2px;
	content: "";
	inline-size: 40px;
	inset-block-end: 0;
	inset-inline-start: 0;
	position: absolute;
}

.related-news .heritage-grid {
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.heritage-single-badge {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: var(--shadow-sm);
	margin-bottom: var(--space-md);
	padding: 0.9rem;
	width: 88px;
}

.heritage-single-badge img {
	height: auto;
	width: 100%;
}
