/*
Theme Name:  حکمت تربیت
Theme URI:   https://mhassani.ir
Author:      Faranex
Description: قالب سبک و راست‌چین برای وب‌سایت شخصی دکتر محمد حسنی. بدون جی‌کوئری، بدون صفحه‌ساز.
Version:     1.0.0
License:     GPL-2.0-or-later
Text Domain: hekmat
*/

/* =========================================================================
   ۱. فونت
   ====================================================================== */

@font-face {
	font-family: 'Vazirmatn';
	src: url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Vazirmatn';
	src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* قلم جایگزین با سنجه‌های هم‌اندازهٔ وزیرمتن.
 *
 * تا وقتی وزیرمتن برسد، متن با قلم سیستم نمایش داده می‌شود. بدون این تنظیم،
 * قلم جایگزین پهن‌تر است، سطرها جور دیگری می‌شکنند و صفحه هنگام رسیدن قلم
 * می‌پرد (CLS ۰٫۲۸). با size-adjust پهنای متن یکسان می‌شود و پرش از بین می‌رود.
 * مقادیر با اندازه‌گیری واقعی در مرورگر به دست آمده‌اند. */

@font-face {
	font-family: 'Vazirmatn Fallback';
	src: local('Tahoma');
	size-adjust: 93.7%;
	ascent-override: 110%;
	descent-override: 57.6%;
	line-gap-override: 0%;
}

@font-face {
	font-family: 'Vazirmatn Fallback Arial';
	src: local('Arial');
	size-adjust: 117%;
	ascent-override: 88%;
	descent-override: 46.2%;
	line-gap-override: 0%;
}

/* =========================================================================
   ۲. متغیرها
   ====================================================================== */

:root {
	--bg:          #fbfaf8;
	--surface:     #ffffff;
	--surface-alt: #f4f2ed;
	--ink:         #17212b;
	--text:        #3a4753;
	--muted:       #6e7c8a;
	--line:        #e4e2db;
	--accent:      #1e5f74;
	--accent-ink:  #14424f;
	--accent-soft: #e9f1f3;

	--radius:    10px;
	--radius-lg: 16px;
	--maxw:      1120px;
	--prose:     40em;

	--shadow:    0 1px 2px rgba(23, 33, 43, .04), 0 8px 24px -12px rgba(23, 33, 43, .12);
	--shadow-lg: 0 2px 4px rgba(23, 33, 43, .05), 0 20px 48px -20px rgba(23, 33, 43, .22);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg:          #11161b;
		--surface:     #171e25;
		--surface-alt: #1c242c;
		--ink:         #eef2f5;
		--text:        #bcc7d2;
		--muted:       #8695a3;
		--line:        #262f39;
		--accent:      #79b8c8;
		--accent-ink:  #a8d4e0;
		--accent-soft: #17282f;

		--shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
		--shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 20px 48px -20px rgba(0, 0, 0, .7);
	}
}

:root[data-theme="dark"] {
	--bg:          #11161b;
	--surface:     #171e25;
	--surface-alt: #1c242c;
	--ink:         #eef2f5;
	--text:        #bcc7d2;
	--muted:       #8695a3;
	--line:        #262f39;
	--accent:      #79b8c8;
	--accent-ink:  #a8d4e0;
	--accent-soft: #17282f;

	--shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
	--shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 20px 48px -20px rgba(0, 0, 0, .7);
}

/* =========================================================================
   ۳. پایه
   ====================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Vazirmatn', 'Vazirmatn Fallback', 'Vazirmatn Fallback Arial',
		Tahoma, 'Segoe UI', system-ui, sans-serif;
	font-size: 17px;
	line-height: 1.85;
	font-feature-settings: 'ss01';
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	color: var(--ink);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: -.01em;
}

h1 { font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.6rem); line-height: 1.35; }
h2 { font-size: clamp(1.35rem, 1.15rem + .9vw, 1.8rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p, ul, ol, blockquote, table, figure, pre { margin: 0 0 1.1em; }

a {
	color: var(--accent);
	text-decoration: none;
	transition: color .15s ease;
}

a:hover { color: var(--accent-ink); }

:where(.prose) a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .28em;
	text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

:where(.prose) a:hover { text-decoration-color: currentColor; }

img { max-width: 100%; height: auto; display: block; }

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.5rem 0;
}

blockquote {
	margin-inline: 0;
	padding: .2em 1.1em;
	border-right: 3px solid var(--accent);
	color: var(--ink);
	background: var(--surface-alt);
	border-radius: 0 var(--radius) var(--radius) 0;
}

code, pre, kbd {
	font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
	font-size: .9em;
	direction: ltr;
}

code {
	background: var(--surface-alt);
	padding: .12em .4em;
	border-radius: 4px;
}

pre {
	background: var(--surface-alt);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem 1.2rem;
	overflow-x: auto;
	text-align: left;
}

pre code { background: none; padding: 0; }

table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95em;
}

th, td {
	padding: .6em .8em;
	border-bottom: 1px solid var(--line);
	text-align: right;
}

th { color: var(--ink); font-weight: 700; background: var(--surface-alt); }

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

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* =========================================================================
   ۴. طرح‌بندی
   ====================================================================== */

.wrap {
	width: min(100% - 2.5rem, var(--maxw));
	margin-inline: auto;
}

.prose { max-width: var(--prose); margin-inline: auto; }

.skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	background: var(--accent);
	color: #fff;
	padding: .6rem 1.2rem;
	z-index: 100;
	border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus { inset-inline-start: 1rem; color: #fff; }

.section { padding-block: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem); }
.section + .section { padding-top: 0; }

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.75rem;
	padding-bottom: .9rem;
	border-bottom: 1px solid var(--line);
}

.section-head h2 { margin: 0; }

.section-head .more {
	font-size: .92rem;
	font-weight: 700;
	white-space: nowrap;
}

/* =========================================================================
   ۵. سربرگ
   ====================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(1.6) blur(12px);
	border-bottom: 1px solid var(--line);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 68px;
}

.brand {
	display: flex;
	align-items: center;
	gap: .7rem;
	color: var(--ink);
	font-weight: 700;
	font-size: 1.06rem;
	letter-spacing: -.015em;
}

.brand:hover { color: var(--accent); }

.brand-mark {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--line);
	flex: none;
}

.brand-text small {
	display: block;
	font-size: .72rem;
	font-weight: 400;
	color: var(--muted);
	line-height: 1.4;
	letter-spacing: 0;
}

.nav ul {
	display: flex;
	align-items: center;
	gap: .3rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav a {
	display: block;
	padding: .45rem .8rem;
	border-radius: 999px;
	color: var(--text);
	font-size: .95rem;
	font-weight: 500;
	transition: background .15s ease, color .15s ease;
}

.nav a:hover { background: var(--surface-alt); color: var(--ink); }

.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-parent > a {
	background: var(--accent-soft);
	color: var(--accent-ink);
	font-weight: 700;
}

.header-tools { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	padding: 0;
	transition: border-color .15s ease, color .15s ease;
}

.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
	.nav-toggle { display: inline-grid; }

	.nav {
		position: absolute;
		inset-inline: 0;
		top: 100%;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
		display: none;
	}

	.nav.open { display: block; }

	.nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: .5rem 1.25rem 1rem;
	}

	.nav a { padding: .7rem .6rem; border-radius: var(--radius); }
}

/* =========================================================================
   ۶. قهرمان صفحهٔ نخست
   ====================================================================== */

.hero {
	padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.75rem);
	border-bottom: 1px solid var(--line);
}

.hero-inner {
	display: grid;
	grid-template-columns: 1fr minmax(260px, 400px);
	gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
	align-items: center;
}

.hero-figure {
	margin: 0;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--surface-alt);
	box-shadow: var(--shadow-lg);
}

.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

.hero h1 { margin-bottom: .25rem; }

.hero-role {
	color: var(--accent);
	font-weight: 700;
	font-size: 1.02rem;
	margin-bottom: .1rem;
}

.hero-org { color: var(--muted); font-size: .95rem; margin-bottom: 1.1rem; }

.hero-bio { max-width: 46em; margin-bottom: 1.4rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; }

.chip {
	display: inline-block;
	padding: .3rem .85rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-ink);
	font-size: .86rem;
	font-weight: 500;
	border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
}

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

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

@media (max-width: 820px) {
	.hero-inner { grid-template-columns: 1fr; }
	.hero-figure { order: -1; max-width: 320px; margin-inline: auto; }
}

/* =========================================================================
   ۷. دکمه‌ها
   ====================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .6rem 1.35rem;
	border-radius: 999px;
	border: 1px solid var(--accent);
	background: var(--accent);
	color: #fff;
	font-size: .95rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-1px); }

.btn svg { width: 17px; height: 17px; }

/* =========================================================================
   ۸. آمار
   ====================================================================== */

.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.stat {
	background: var(--surface);
	padding: 1.4rem 1rem;
	text-align: center;
	transition: background .15s ease;
}

a.stat:hover { background: var(--accent-soft); }

.stat b {
	display: block;
	font-size: 1.85rem;
	line-height: 1.25;
	color: var(--ink);
	font-weight: 700;
	letter-spacing: -.02em;
}

a.stat:hover b { color: var(--accent-ink); }

.stat span { font-size: .87rem; color: var(--muted); }

/* =========================================================================
   ۹. کارت‌ها
   ====================================================================== */

.grid {
	display: grid;
	/* auto-fit و نه auto-fill: با یکی دو کارت، ستون‌های خالی جمع می‌شوند
	   به‌جای آنکه کارت گوشهٔ صفحه بماند و بقیهٔ ردیف سفید. */
	grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
	gap: 1.25rem;
}

/* یک کارتِ تنها نباید تمام عرض را بگیرد؛ اندازه‌اش را نگه می‌داریم و وسط می‌چینیم. */
.grid:has(> :first-child:nth-last-child(1)) {
	grid-template-columns: minmax(0, 420px);
	justify-content: center;
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.4rem 1.5rem;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }

.card h3 { font-size: 1.06rem; margin-bottom: .4rem; line-height: 1.6; }
.card h3 a { color: var(--ink); }
.card:hover h3 a { color: var(--accent-ink); }

.card p { color: var(--muted); font-size: .93rem; line-height: 1.85; margin-bottom: 0; }

.card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	font-size: .82rem;
	color: var(--muted);
	margin-bottom: .55rem;
}

.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

.card-foot { margin-top: auto; padding-top: 1rem; }

.tag {
	display: inline-block;
	font-size: .78rem;
	font-weight: 700;
	color: var(--accent);
	background: var(--accent-soft);
	padding: .16rem .6rem;
	border-radius: 999px;
}

/* کارت نوع اثر */

.type-card {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.type-card h3 { margin: 0 0 .15rem; font-size: 1.02rem; }
.type-card p { font-size: .86rem; line-height: 1.7; }
.type-card .count { font-size: 1.6rem; font-weight: 700; color: var(--accent); letter-spacing: -.02em; flex: none; }

/* نوار دسته‌ها */

.cat-nav { margin-bottom: 2rem; }

.cat-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cat-nav a {
	display: inline-block;
	padding: .35rem .95rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--text);
	font-size: .9rem;
	font-weight: 500;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.cat-nav a:hover,
.cat-nav .is-current a {
	border-color: var(--accent);
	background: var(--accent-soft);
	color: var(--accent-ink);
}

.cat-nav .count { color: var(--muted); font-size: .82rem; }

/* حالت خالی */

.empty-state {
	border: 1px dashed var(--line);
	border-radius: var(--radius-lg);
	padding: 2.5rem 1.5rem;
	text-align: center;
	color: var(--muted);
}

.empty-state p { margin-bottom: 0; }

/* =========================================================================
   ۱۰. فهرست آثار
   ====================================================================== */

.year-group { margin-bottom: 2.5rem; }

.year-label {
	position: sticky;
	top: 68px;
	display: inline-block;
	background: var(--bg);
	color: var(--muted);
	font-size: .88rem;
	font-weight: 700;
	letter-spacing: .04em;
	padding: .25rem 0 .6rem;
	margin: 0;
}

.entry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.entry {
	display: grid;
	grid-template-columns: 4.5rem 1fr;
	gap: 1.25rem;
	padding: 1.15rem 0;
	border-bottom: 1px solid var(--line);
}

.entry-year {
	color: var(--muted);
	font-size: .88rem;
	font-variant-numeric: tabular-nums;
	padding-top: .15rem;
}

.entry-title {
	display: block;
	color: var(--ink);
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.7;
	margin-bottom: .2rem;
}

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

.entry-meta { color: var(--muted); font-size: .89rem; line-height: 1.8; }

.entry-meta .role { color: var(--accent); font-weight: 700; }

@media (max-width: 560px) {
	.entry { grid-template-columns: 1fr; gap: .3rem; }
	.entry-year { padding-top: 0; }
}

/* =========================================================================
   ۱۱. نوشته‌ها
   ====================================================================== */

.post-header { padding-block: clamp(1.4rem, 1rem + 1.4vw, 2.1rem) 0; }

/* در نوشته‌ها و آثار، سربرگ هم‌عرض متن بماند تا صفحه به‌هم‌ریخته نشود. */
.single .post-header,
.single .featured,
.page .post-header,
.page .featured { max-width: var(--prose); margin-inline: auto; }

/* سربرگ و متن هر دو padding داشتند و میانشان یک فاصلهٔ دوبرابر می‌افتاد. */
.post-header + .prose.section,
.post-header + .featured + .prose.section { padding-top: clamp(.8rem, .5rem + .8vw, 1.4rem); }

.post-header h1 { margin-bottom: .7rem; }

.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .55rem;
	color: var(--muted);
	font-size: .9rem;
}

.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--accent); }

.featured {
	margin-block: 2rem;
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--surface-alt);
}

/* جلد کتاب و پوستر معمولاً بلندتر از عرض‌اند؛ ارتفاع مهار می‌شود. */
.featured img {
	width: 100%;
	max-height: 460px;
	object-fit: contain;
}

.tg-source {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
	font-size: .9rem;
	color: var(--muted);
}

.tg-source a { color: var(--muted); }
.tg-source a:hover { color: var(--accent); }

.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose img, .prose figure { border-radius: var(--radius); }
.prose figcaption { font-size: .87rem; color: var(--muted); text-align: center; margin-top: .6rem; }

.post-footer {
	margin-top: 3rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--line);
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.post-nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1rem;
	margin-top: 2.5rem;
}

.post-nav a {
	display: block;
	padding: 1.1rem 1.3rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: var(--surface);
	transition: border-color .18s ease, box-shadow .18s ease;
}

.post-nav a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.post-nav small { display: block; color: var(--muted); font-size: .82rem; margin-bottom: .2rem; }
.post-nav b { color: var(--ink); font-weight: 700; font-size: .98rem; line-height: 1.6; }

/* =========================================================================
   ۱۲. صفحه‌بندی و جست‌وجو
   ====================================================================== */

.pagination { margin-top: 2.5rem; }

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

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 .7rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	font-size: .93rem;
	font-weight: 500;
}

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

.pagination .page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	font-weight: 700;
}

.search-form { display: flex; gap: .5rem; }

.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: .6rem 1rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: .95rem;
}

.search-form input[type="search"]:focus { border-color: var(--accent); outline: none; }

/* =========================================================================
   ۱۳. جعبهٔ اطلاعات و فهرست تعریفی
   ====================================================================== */

.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.5rem 1.75rem;
}

.panel h2, .panel h3 { margin-top: 0; }

.deflist { margin: 0; }
.deflist > div {
	display: grid;
	grid-template-columns: 9rem 1fr;
	gap: 1rem;
	padding: .7rem 0;
	border-bottom: 1px solid var(--line);
}
.deflist > div:last-child { border-bottom: 0; padding-bottom: 0; }
.deflist dt { color: var(--muted); font-size: .9rem; }
.deflist dd { margin: 0; color: var(--ink); }

@media (max-width: 560px) {
	.deflist > div { grid-template-columns: 1fr; gap: .1rem; }
}

/* =========================================================================
   ۱۴. پابرگ
   ====================================================================== */

.site-footer {
	margin-top: clamp(3rem, 2rem + 4vw, 5rem);
	border-top: 1px solid var(--line);
	background: var(--surface-alt);
	padding-block: 2.75rem 2rem;
	font-size: .93rem;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-grid h3 { font-size: .95rem; margin-bottom: .7rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .35rem; }
.footer-grid a { color: var(--text); }
.footer-grid a:hover { color: var(--accent); }
.footer-grid p { color: var(--muted); margin-bottom: .5rem; }

.footer-bottom {
	border-top: 1px solid var(--line);
	padding-top: 1.4rem;
	color: var(--muted);
	font-size: .87rem;
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	justify-content: space-between;
	align-items: center;
}

/* =========================================================================
   ۱۵. کمکی
   ====================================================================== */

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

.lead { font-size: 1.08rem; color: var(--ink); }
.muted { color: var(--muted); }
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }

.notice {
	background: var(--accent-soft);
	border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	color: var(--accent-ink);
	font-size: .93rem;
}

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

/* =========================================================================
   ۱۶. کارت‌های تصویردار
   ====================================================================== */

.card { padding: 0; overflow: hidden; }

.card-media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--surface-alt);
	border-bottom: 1px solid var(--line);
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	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;
	flex: 1;
	padding: 1.35rem 1.5rem 1.5rem;
}

.card-body h3 { font-size: 1.08rem; line-height: 1.65; margin-bottom: .5rem; }
.card-body p { flex: 1; }

/* نوشتهٔ شاخص: بزرگ‌تر، دوستونه */

.lead-post {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 0;
	margin-bottom: 1.25rem;
	overflow: hidden;
}

.lead-post .card-media { aspect-ratio: auto; height: 100%; min-height: 320px; border-bottom: 0; border-inline-start: 1px solid var(--line); }
.lead-post .card-body { padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); justify-content: center; }
.lead-post h2 { font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.9rem); line-height: 1.55; margin-bottom: .7rem; }
.lead-post h2 a { color: var(--ink); }
.lead-post:hover h2 a { color: var(--accent-ink); }
.lead-post p { font-size: 1rem; color: var(--muted); line-height: 1.9; }

.lead-badge {
	display: inline-block;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--accent);
	margin-bottom: .7rem;
}

@media (max-width: 800px) {
	.lead-post { grid-template-columns: 1fr; }
	.lead-post .card-media { min-height: 0; aspect-ratio: 16 / 9; border-inline-start: 0; border-bottom: 1px solid var(--line); }
}

/* =========================================================================
   ۱۷. نمای نوشته
   ====================================================================== */

.reading-bar {
	position: fixed;
	top: 0;
	inset-inline-start: 0;
	height: 3px;
	width: 0;
	background: var(--accent);
	z-index: 60;
	transition: width .1s linear;
}

/* قهرمانِ تمام‌عرض */

.post-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(300px, 22vw + 180px, 440px);
	padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
	background: #10171d;
	overflow: hidden;
	margin-bottom: clamp(1.75rem, 1rem + 2.5vw, 3rem);
}

.post-hero-bg {
	position: absolute;
	inset: 0;
}

/* تصویر پس‌زمینه محو می‌شود تا متنِ روی آن خوانا بماند
   و نوشتهٔ احتمالیِ روی پوستر با عنوان رقابت نکند. */
.post-hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.08);
	filter: blur(7px) saturate(.85) brightness(.75);
}

.post-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(9, 14, 19, .93), rgba(9, 14, 19, .74));
}

.post-hero.no-image { background: linear-gradient(160deg, #16303a, #101a22); }

.post-hero-inner {
	position: relative;
	z-index: 1;
	text-align: center;
	color: #fff;
}

.post-hero-inner h1 {
	color: #fff;
	max-width: 22ch;
	margin-inline: auto;
	margin-bottom: 1rem;
	text-shadow: 0 2px 30px rgba(0, 0, 0, .45);
}

.post-hero-inner .post-meta { justify-content: center; color: rgba(255, 255, 255, .8); }
.post-hero-inner .post-meta a { color: rgba(255, 255, 255, .8); }

.hero-cat {
	display: inline-block;
	padding: .3rem .95rem;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: .84rem;
	font-weight: 700;
	margin-bottom: 1.1rem;
}

.hero-cat:hover { background: #fff; color: var(--accent-ink); }

/* دو ستون: متن و ستون کناری */

.post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 310px;
	gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	align-items: start;
}

.post-main {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(1.5rem, 1rem + 2.2vw, 3rem);
}

.post-main .prose { max-width: none; }

@media (max-width: 1000px) {
	.post-layout { grid-template-columns: 1fr; }
}

/* ستون کناری */

.post-side {
	position: sticky;
	top: 88px;
	display: grid;
	gap: 1.25rem;
}

@media (max-width: 1000px) { .post-side { position: static; } }

.side-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.35rem 1.5rem;
}

.side-title {
	font-size: 1rem;
	margin-bottom: 1rem;
	padding-bottom: .7rem;
	border-bottom: 1px solid var(--line);
}

.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }

.side-list a { display: flex; gap: .8rem; align-items: flex-start; }

.side-thumb {
	flex: none;
	width: 62px;
	height: 62px;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface-alt);
	border: 1px solid var(--line);
}

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

.side-text b {
	display: block;
	color: var(--ink);
	font-size: .93rem;
	font-weight: 700;
	line-height: 1.65;
	margin-bottom: .2rem;
}

.side-list a:hover b { color: var(--accent); }
.side-text small { color: var(--muted); font-size: .8rem; }

.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats li + li { margin-top: .3rem; }

.side-cats a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .5rem;
	padding: .5rem .7rem;
	border-radius: var(--radius);
	color: var(--text);
	font-size: .93rem;
	transition: background .15s ease, color .15s ease;
}

.side-cats a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.side-cats em { font-style: normal; color: var(--muted); font-size: .84rem; }

/* اشتراک‌گذاری */

.share {
	display: flex;
	align-items: center;
	gap: .5rem;
	flex-wrap: wrap;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.share span { color: var(--muted); font-size: .9rem; margin-inline-end: .3rem; }

.share a, .share button {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--surface);
	color: var(--muted);
	cursor: pointer;
	padding: 0;
	transition: color .15s ease, border-color .15s ease;
}

.share a:hover, .share button:hover { color: var(--accent); border-color: var(--accent); }
.share svg { width: 17px; height: 17px; }

/* نوشته‌های مرتبط */

.related { margin-top: 3.5rem; }

/* =========================================================================
   ۱۸. دیدگاه‌ها
   ====================================================================== */

.comments {
	margin-top: 3.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--line);
}

.comments h2 { font-size: 1.3rem; margin-bottom: 1.5rem; }

.comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.comment-list ol.children { list-style: none; margin: 1rem 0 0; padding-inline-start: 1.5rem; border-inline-start: 2px solid var(--line); }

.comment-body {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.25rem 1.5rem;
	margin-bottom: 1rem;
}

.comment-head {
	display: flex;
	align-items: center;
	gap: .7rem;
	margin-bottom: .6rem;
}

.comment-head img { border-radius: 50%; flex: none; }
.comment-author { font-weight: 700; color: var(--ink); font-size: .96rem; }
.comment-date { color: var(--muted); font-size: .84rem; }

.comment-badge {
	font-size: .74rem;
	font-weight: 700;
	color: #fff;
	background: var(--accent);
	padding: .1rem .55rem;
	border-radius: 999px;
}

.comment-body p { margin-bottom: .7rem; line-height: 1.9; }
.comment-body p:last-child { margin-bottom: 0; }

.comment-awaiting-moderation {
	display: inline-block;
	font-size: .85rem;
	color: var(--accent-ink);
	background: var(--accent-soft);
	padding: .3rem .8rem;
	border-radius: var(--radius);
	margin-bottom: .6rem;
}

.comment-reply-link, .comment-edit-link {
	font-size: .86rem;
	font-weight: 700;
}

/* نوشتهٔ نویسندهٔ سایت متمایز باشد */
.comment-list .bypostauthor > .comment-body {
	border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
	background: var(--accent-soft);
}

/* فرم */

.comment-respond {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
}

.comment-reply-title { font-size: 1.1rem; margin-bottom: .4rem; }
.comment-notes, .logged-in-as { color: var(--muted); font-size: .89rem; margin-bottom: 1.25rem; }

.comment-form-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}

@media (max-width: 560px) { .comment-form-fields { grid-template-columns: 1fr; } }

.comment-form label {
	display: block;
	font-size: .88rem;
	font-weight: 700;
	color: var(--ink);
	margin-bottom: .35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: .65rem .9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--text);
	font: inherit;
	font-size: .95rem;
}

.comment-form textarea { min-height: 150px; resize: vertical; line-height: 1.85; }

.comment-form input:focus, .comment-form textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.comment-form .form-submit { margin: 1.25rem 0 0; }
.comment-form .submit { font: inherit; }

.comments-closed { color: var(--muted); font-size: .93rem; }

/* =========================================================================
   رویدادها
   ====================================================================== */

/* نشان «پیش‌رو» — روی کارت و در سربرگ رویداد. */
.event-flag {
	display: inline-block;
	padding: .1rem .5rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-ink);
	font-size: .74rem;
	font-weight: 600;
	line-height: 1.7;
	white-space: nowrap;
}

/* در سربرگ تیره، رنگ‌های نرمِ روشن خوانا نیستند. */
.post-hero .event-flag {
	background: rgba(255, 255, 255, .16);
	color: #fff;
}

.event-card .card-meta { flex-wrap: wrap; }

.event-line {
	margin: 0 0 .45rem;
	color: var(--muted);
	font-size: .86rem;
	line-height: 1.7;
}

.event-facts {
	margin: 0;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .45rem .8rem;
	font-size: .9rem;
}

.event-facts dt {
	color: var(--muted);
	font-weight: 500;
	white-space: nowrap;
}

.event-facts dd {
	margin: 0;
	color: var(--ink);
}

.event-link { margin: 2rem 0 0; }
