/*
Theme Name: SeoPlus Lite
Theme URI: https://seoplus.ir
Author: SeoPlus
Description: قالب فوق‌سبک، سریع و سئوشده وردپرس برای سایت‌های آموزشی و فنی فارسی. بدون jQuery، بدون وابستگی خارجی.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: seoplus-lite
Tags: rtl-language-support, blog, seo, translation-ready, custom-logo, threaded-comments
*/

/* ============ 1. توکن‌های طراحی ============ */
:root {
	--ink: #0d1220;
	--ink-2: #38415a;
	--ink-3: #6b7591;
	--line: #e6e9f2;
	--line-soft: #f0f2f8;
	--bg: #ffffff;
	--bg-soft: #f7f8fc;
	--brand: #4f46e5;
	--brand-dark: #3b32c4;
	--brand-soft: #eef0ff;
	--accent: #0ea5e9;
	--ok: #059669;
	--radius: 14px;
	--radius-sm: 9px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05);
	--shadow-md: 0 8px 24px -12px rgba(16, 24, 40, .18);
	--maxw: 1180px;
	--font: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ============ 2. پایه ============ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.9;
	color: var(--ink-2);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.55; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.15rem + 2vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.7rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1.1em; }

a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
	border-radius: 4px;
}

img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
ul, ol { padding-inline-start: 1.3em; }
figure { margin: 1.6em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 18px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 200;
	background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { inset-inline-start: 12px; color: #fff; }

/* ============ 3. دکمه‌ها ============ */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: inherit; font-weight: 700; font-size: .92rem;
	padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
	cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease;
	min-height: 42px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-ghost:hover { background: #e3e6ff; color: var(--brand-dark); }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ============ 4. هدر و منو ============ */
.reading-progress {
	position: fixed; inset-block-start: 0; inset-inline-start: 0; height: 3px; width: 0;
	background: linear-gradient(90deg, var(--brand), var(--accent)); z-index: 120;
}

.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(180%) blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	min-height: 66px;
}

.site-branding { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.brand-mark { flex-shrink: 0; border-radius: 11px; }
.branding-text { display: flex; flex-direction: column; min-width: 0; }
.site-title { font-weight: 800; font-size: 1rem; color: var(--ink); line-height: 1.4; }
.site-description {
	font-size: .72rem; color: var(--ink-3); line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.menu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
	background: #fff; cursor: pointer;
}
.menu-toggle .bars { display: grid; gap: 4px; }
.menu-toggle .bars i { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .18s ease, opacity .18s ease; }
.menu-toggle[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.primary-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.primary-menu li { position: relative; }
.primary-menu > li > a {
	display: block; padding: 9px 13px; border-radius: 9px;
	font-size: .92rem; font-weight: 600; color: var(--ink-2);
}
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a { background: var(--brand-soft); color: var(--brand); }

.primary-menu .sub-menu {
	list-style: none; margin: 0; padding: 6px; position: absolute; top: 100%; inset-inline-end: 0;
	min-width: 190px; background: #fff; border: 1px solid var(--line);
	border-radius: var(--radius); box-shadow: var(--shadow-md);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s ease;
}
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-menu .sub-menu a { display: block; padding: 8px 12px; border-radius: 8px; font-size: .88rem; color: var(--ink-2); }
.primary-menu .sub-menu a:hover { background: var(--bg-soft); color: var(--brand); }

.nav-extra { display: flex; align-items: center; gap: 8px; }

@media (min-width: 961px) {
	.menu-toggle { display: none; }
	.primary-navigation { display: flex; align-items: center; gap: 12px; }
}

@media (max-width: 960px) {
	.header-inner { grid-template-columns: minmax(0, 1fr) auto; }
	.primary-navigation {
		grid-column: 1 / -1;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
		padding: 8px 0 16px;
		border-top: 1px solid var(--line);
	}
	.primary-navigation.is-open { display: flex; }
	.primary-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.primary-menu > li > a { padding: 12px 14px; font-size: .98rem; }
	.primary-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; border-inline-start: 2px solid var(--line);
		border-radius: 0; margin-inline-start: 12px; padding: 0;
	}
	.nav-extra { padding: 8px 0 0; }
	.nav-extra .btn { width: 100%; }
}

/* ============ 5. هیرو و بندهای صفحه ============ */
.hero {
	background: linear-gradient(160deg, #f4f5ff 0%, #eef7ff 100%);
	border-bottom: 1px solid var(--line);
	padding: clamp(38px, 6vw, 70px) 0;
	text-align: center;
}
.hero h1 { margin-bottom: .35em; }
.hero .tagline { color: var(--ink-2); font-size: 1.02rem; max-width: 620px; margin-inline: auto; }

.hero-search { display: flex; gap: 8px; max-width: 540px; margin: 26px auto 0; }
.hero-search input {
	flex: 1; min-width: 0; padding: 12px 16px; font: inherit; font-size: .95rem;
	border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink);
}
.hero-search input::placeholder { color: var(--ink-3); }
.hero-search button {
	font: inherit; font-weight: 700; padding: 12px 22px; border: 0; border-radius: 11px;
	background: var(--brand); color: #fff; cursor: pointer;
}
.hero-search button:hover { background: var(--brand-dark); }

.cat-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.cat-pills a {
	padding: 7px 14px; border-radius: 999px; font-size: .84rem; font-weight: 600;
	background: #fff; border: 1px solid var(--line); color: var(--ink-2);
}
.cat-pills a:hover, .cat-pills a.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.page-header-band {
	background: linear-gradient(160deg, #f4f5ff 0%, #eef7ff 100%);
	border-bottom: 1px solid var(--line);
	padding: clamp(30px, 5vw, 52px) 0 clamp(24px, 4vw, 38px);
}
.page-header-band h1 { margin-bottom: .3em; }
.page-header-band p { color: var(--ink-2); margin: 0; }

.breadcrumbs { font-size: .82rem; color: var(--ink-3); margin-top: 12px; }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs span[aria-current] { color: var(--ink-3); }

/* ============ 6. چیدمان محتوا ============ */
.content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 30px;
	padding: 34px 0 56px;
	align-items: start;
}
@media (min-width: 1000px) {
	.content-layout { grid-template-columns: minmax(0, 1fr) 310px; }
	.content-sidebar { position: sticky; top: 84px; }
}

.section { margin-bottom: 42px; }
.section-head {
	display: grid; grid-template-columns: minmax(0, 1fr) auto;
	align-items: end; gap: 14px; margin-bottom: 20px;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; font-size: .9rem; color: var(--ink-3); }
.see-all { font-size: .88rem; font-weight: 700; white-space: nowrap; }

/* ============ 7. کارت مقاله ============ */
.post-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

.post-card {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d9def0; }
.post-card .thumb { display: block; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb.is-placeholder {
	display: grid; place-items: center;
	background: linear-gradient(135deg, #eef0ff, #e6f4ff); color: var(--brand);
	font-weight: 800; font-size: 1.6rem;
}
.post-card .body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 14px; }
.post-card .cat {
	align-self: flex-start; font-size: .72rem; font-weight: 700; color: var(--brand);
	background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.post-card h3 { font-size: 1.02rem; line-height: 1.7; margin: 0 0 8px; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand); }
.post-card .excerpt {
	font-size: .875rem; color: var(--ink-3); margin: 0 0 14px;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .card-meta {
	margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
	padding-top: 12px; border-top: 1px solid var(--line-soft);
	font-size: .76rem; color: var(--ink-3);
}
.post-card .card-meta span { display: inline-flex; align-items: center; gap: 4px; }

.empty-state {
	text-align: center; padding: 48px 20px; border: 1px dashed var(--line);
	border-radius: var(--radius); color: var(--ink-3); background: var(--bg-soft);
}
.empty-state .ic { font-size: 1.8rem; margin-bottom: 8px; }

/* ============ 8. سایدبار ============ */
.sidebar-block {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.sidebar-block > h3, .sidebar-title {
	font-size: .98rem; margin: 0 0 14px; padding-bottom: 10px;
	border-bottom: 1px solid var(--line-soft);
}
.sidebar-block ul { list-style: none; margin: 0; padding: 0; }

.popular-post { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.popular-post:last-child { border-bottom: 0; padding-bottom: 0; }
.popular-post .num {
	flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center;
	border-radius: 8px; background: var(--brand-soft); color: var(--brand);
	font-size: .78rem; font-weight: 800;
}
.popular-post .thumb { flex-shrink: 0; width: 56px; height: 42px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.popular-post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-post .info { min-width: 0; }
.popular-post h4 { font-size: .85rem; line-height: 1.7; margin: 0 0 3px; font-weight: 600; }
.popular-post h4 a { color: var(--ink); }
.popular-post h4 a:hover { color: var(--brand); }
.popular-post .meta { font-size: .72rem; color: var(--ink-3); }

.cat-list li { border-bottom: 1px solid var(--line-soft); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; font-size: .88rem; color: var(--ink-2); }
.cat-list a:hover { color: var(--brand); }
.cat-list .count { color: var(--ink-3); font-size: .78rem; }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; padding: 10px 12px; font: inherit; font-size: .88rem;
	border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.search-form button {
	font: inherit; font-weight: 700; font-size: .85rem; padding: 10px 16px;
	border: 0; border-radius: 10px; background: var(--brand); color: #fff; cursor: pointer;
}

/* فهرست مطالب */
.toc-list { font-size: .85rem; line-height: 1.9; }
.toc-list li { margin-bottom: 4px; }
.toc-list li.lvl-3 { padding-inline-start: 14px; font-size: .82rem; }
.toc-list a { color: var(--ink-2); display: block; padding: 3px 8px; border-radius: 7px; border-inline-start: 2px solid transparent; }
.toc-list a:hover { background: var(--bg-soft); color: var(--brand); }
.toc-list a.is-active { color: var(--brand); font-weight: 700; border-inline-start-color: var(--brand); background: var(--brand-soft); }

/* ============ 9. تک مقاله ============ */
.single-article { min-width: 0; }
.single-header { margin-bottom: 22px; }
.single-cat-badge {
	display: inline-block; font-size: .76rem; font-weight: 700; color: var(--brand);
	background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.single-header h1 { margin-bottom: 16px; }

.single-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
	font-size: .82rem; color: var(--ink-3);
	padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.single-meta > * { display: inline-flex; align-items: center; gap: 6px; }
.single-meta .author-link { font-weight: 700; color: var(--ink-2); }
.single-meta .author-link:hover { color: var(--brand); }

.avatar-initial {
	display: inline-grid; place-items: center; border-radius: 50%; flex-shrink: 0;
	background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-weight: 800;
}
.author-avatar { border-radius: 50%; object-fit: cover; }

.single-thumb { margin: 22px 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.single-thumb img { width: 100%; }

/* محتوای مقاله */
.entry-content { font-size: 1.02rem; line-height: 2.1; color: #2b3348; }
.entry-content h2 { margin-top: 1.9em; scroll-margin-top: 90px; }
.entry-content h3 { margin-top: 1.5em; scroll-margin-top: 90px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content ul, .entry-content ol { margin: 0 0 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content img { border-radius: var(--radius); margin-inline: auto; }
.entry-content blockquote {
	margin: 1.8em 0; padding: 14px 18px;
	border-inline-start: 3px solid var(--brand); background: var(--brand-soft);
	border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-2);
}
.entry-content blockquote p:last-child { margin: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .92rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; }
.entry-content th { background: var(--bg-soft); color: var(--ink); font-weight: 700; }

/* کد درون‌خطی */
.entry-content :not(pre) > code {
	font-family: var(--mono); font-size: .86em; direction: ltr; unicode-bidi: embed;
	background: #f2f4fa; color: #b4335c; padding: 2px 6px; border-radius: 6px;
	border: 1px solid var(--line);
}

/* ============ 10. بلوک کد حرفه‌ای ============ */
.code-card {
	margin: 1.8em 0; border-radius: var(--radius); overflow: hidden;
	background: #0e1525; border: 1px solid #1d2740; box-shadow: var(--shadow-md);
}
.code-card-bar {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 12px; background: #131c30; border-bottom: 1px solid #1d2740;
}
.code-dots { display: inline-flex; gap: 5px; }
.code-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; display: block; }
.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }
.code-lang {
	margin-inline-end: auto; font-family: var(--mono); font-size: .68rem;
	letter-spacing: .08em; color: #7d8bab; text-transform: uppercase;
}
.code-copy {
	font: inherit; font-family: var(--font); font-size: .74rem; font-weight: 700;
	padding: 4px 12px; border-radius: 7px; cursor: pointer;
	background: rgba(255, 255, 255, .07); color: #c6d0e6; border: 1px solid rgba(255, 255, 255, .12);
	transition: background .15s ease, color .15s ease;
}
.code-copy:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.code-copy.is-done { background: rgba(5, 150, 105, .2); color: #4ade80; border-color: rgba(74, 222, 128, .35); }

.code-card pre {
	margin: 0; padding: 16px 18px; overflow-x: auto; direction: ltr; text-align: left;
	font-family: var(--mono); font-size: .84rem; line-height: 1.8; color: #d5deee;
	background: transparent; tab-size: 2;
	scrollbar-width: thin; scrollbar-color: #2b3550 transparent;
}
.code-card pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.code-card pre::-webkit-scrollbar { height: 8px; }
.code-card pre::-webkit-scrollbar-thumb { background: #2b3550; border-radius: 8px; }

/* pre خارج از code-card (fallback) */
.entry-content > pre {
	background: #0e1525; color: #d5deee; padding: 16px 18px; border-radius: var(--radius);
	overflow-x: auto; direction: ltr; text-align: left; font-family: var(--mono); font-size: .84rem;
}

/* ============ 11. کنش‌های زیر مقاله ============ */
.post-actions {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px; margin: 32px 0; padding: 16px 18px;
	background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.like-btn {
	display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: .88rem;
	padding: 9px 16px; border-radius: 999px; cursor: pointer;
	background: #fff; border: 1px solid var(--line); color: var(--ink-2);
	transition: border-color .15s ease, color .15s ease;
}
.like-btn:hover { border-color: #f43f5e; color: #f43f5e; }
.like-btn.is-liked { border-color: #f43f5e; color: #f43f5e; background: #fff1f3; }
.like-btn .heart { font-size: 1rem; line-height: 1; }
.like-btn .like-count { font-variant-numeric: tabular-nums; }

.share-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-buttons .lbl { font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.share-buttons a, .share-buttons button {
	display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
	border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
	cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.share-buttons a:hover, .share-buttons button:hover { color: #fff; border-color: transparent; }
.share-buttons .s-telegram:hover { background: #229ED9; }
.share-buttons .s-whatsapp:hover { background: #25D366; }
.share-buttons .s-x:hover { background: #000; }
.share-buttons .s-linkedin:hover { background: #0A66C2; }
.share-buttons .s-link:hover { background: var(--brand); }
.share-buttons .s-link.is-done { background: var(--ok); color: #fff; border-color: transparent; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.post-tags a {
	font-size: .8rem; padding: 5px 12px; border-radius: 999px;
	background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2);
}
.post-tags a:hover { border-color: var(--brand); color: var(--brand); }

/* ============ 12. جعبه نویسنده (دیسکاور) ============ */
.author-box {
	display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px;
	padding: 20px; margin: 32px 0;
	background: linear-gradient(160deg, #f7f8ff, #f2f9ff);
	border: 1px solid var(--line); border-radius: var(--radius);
}
.author-box .author-avatar, .author-box .avatar-initial { width: 68px; height: 68px; font-size: 1.7rem; }
.author-box .eyebrow { font-size: .72rem; font-weight: 700; color: var(--brand); letter-spacing: .04em; }
.author-box h3 { font-size: 1.05rem; margin: 2px 0 2px; }
.author-box .job { font-size: .8rem; color: var(--ink-3); margin: 0 0 8px; }
.author-box .bio { font-size: .88rem; margin: 0 0 10px; color: var(--ink-2); }
.author-box .author-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .82rem; }
.author-box .author-social { display: inline-flex; gap: 6px; }
.author-box .author-social a {
	display: inline-grid; place-items: center; width: 30px; height: 30px;
	border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink-2);
}
.author-box .author-social a:hover { color: var(--brand); border-color: var(--brand); }
@media (max-width: 520px) {
	.author-box { grid-template-columns: 1fr; text-align: start; }
}

/* صفحه آرشیو نویسنده */
.author-hero {
	display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center;
}
.author-hero .author-avatar, .author-hero .avatar-initial { width: 88px; height: 88px; font-size: 2rem; }
.author-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; font-size: .85rem; color: var(--ink-3); }
.author-stats strong { color: var(--ink); font-size: 1.05rem; display: block; }

/* ============ 13. مطالب مرتبط و صفحه‌بندی ============ */
.related-posts { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }

.navigation.pagination { margin-top: 34px; }
.navigation .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.navigation .page-numbers {
	display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: 10px; background: #fff;
	font-size: .88rem; font-weight: 700; color: var(--ink-2);
}
.navigation .page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.navigation .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.navigation .page-numbers.dots { border-color: transparent; }

.post-nav { display: grid; gap: 12px; margin-top: 30px; }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a {
	display: block; padding: 14px 16px; border: 1px solid var(--line);
	border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
}
.post-nav a:hover { border-color: var(--brand); }
.post-nav .lbl { display: block; font-size: .75rem; color: var(--ink-3); margin-bottom: 4px; }
.post-nav .ttl { font-size: .92rem; font-weight: 700; color: var(--ink); }

/* ============ 14. دیدگاه‌ها ============ */
.comments-area { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }
.comments-title { font-size: 1.15rem; margin-bottom: 20px; }

.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list ol.children { list-style: none; margin: 14px 0 0; padding-inline-start: 18px; border-inline-start: 2px solid var(--line-soft); }
.comment-body {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-head .avatar-initial, .comment-head .author-avatar { width: 34px; height: 34px; font-size: .9rem; }
.comment-head .name { font-weight: 700; color: var(--ink); font-size: .9rem; }
.comment-head .date { font-size: .75rem; color: var(--ink-3); }
.comment-head .badge-author {
	font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
	background: var(--brand-soft); color: var(--brand);
}
.comment-content { font-size: .92rem; }
.comment-content p:last-child { margin: 0; }
.comment-actions { margin-top: 8px; font-size: .8rem; }
.comment-actions a { font-weight: 600; }
.comment-awaiting-moderation { display: block; font-size: .78rem; color: #b45309; margin-top: 6px; }

/* فرم دیدگاه سبک */
.comment-respond {
	background: var(--bg-soft); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 18px;
}
.comment-reply-title { font-size: 1.02rem; margin: 0 0 4px; }
.comment-notes { font-size: .8rem; color: var(--ink-3); margin: 0 0 14px; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.comment-form .req { color: #e11d48; }
.comment-form .opt { font-weight: 400; color: var(--ink-3); font-size: .76rem; }
.comment-form p { margin: 0; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
	width: 100%; padding: 11px 13px; font: inherit; font-size: .92rem;
	border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.comment-form textarea { resize: vertical; min-height: 96px; line-height: 1.9; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--brand); }
.comment-form-fields { display: grid; gap: 12px; }
@media (min-width: 620px) { .comment-form-fields { grid-template-columns: 1fr 1fr; } }
.form-submit { margin: 0; }
.comment-form .submit { width: 100%; }
@media (min-width: 620px) { .comment-form .submit { width: auto; min-width: 180px; } }

/* ============ 15. صفحه تماس ============ */
.contact-layout { display: grid; gap: 22px; padding: 34px 0 56px; align-items: start; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }

.card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px; box-shadow: var(--shadow);
}
.card > h2 { font-size: 1.1rem; margin-bottom: 16px; }

.contact-form { display: grid; gap: 14px; }
.contact-form label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
	width: 100%; padding: 11px 13px; font: inherit; font-size: .93rem;
	border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .hp { position: absolute; inset-inline-start: -9999px; }
.form-note { font-size: .82rem; padding: 10px 12px; border-radius: 10px; margin: 0; }
.form-note.ok { background: #ecfdf5; color: #065f46; }
.form-note.err { background: #fef2f2; color: #991b1b; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .k { color: var(--ink-3); min-width: 82px; }
.contact-list .v { color: var(--ink); font-weight: 600; }
.contact-social { display: flex; gap: 8px; margin-top: 14px; }
.contact-social a {
	display: inline-grid; place-items: center; width: 38px; height: 38px;
	border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); background: #fff;
}
.contact-social a:hover { color: var(--brand); border-color: var(--brand); }
.contact-map { margin-top: 18px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* ============ 16. صفحه برگه و 404 ============ */
.page-content { padding: 34px 0 56px; }
.page-content .entry-content { max-width: 780px; }

.error-404 { text-align: center; padding: 80px 20px; }
.error-404 .code { font-size: 4.6rem; font-weight: 900; color: var(--brand); line-height: 1; }

/* ============ 17. فوتر ============ */
.site-footer {
	background: #0d1220; color: #a4adc4; margin-top: 20px;
	padding: 46px 0 20px; font-size: .9rem;
}
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.footer-col h4 { color: #fff; font-size: .95rem; margin: 0 0 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { color: #fff; font-size: .96rem; }
.footer-col .desc { color: #8f99b2; font-size: .85rem; line-height: 1.95; margin: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #a4adc4; font-size: .87rem; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a {
	display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
	background: rgba(255, 255, 255, .06); color: #cbd3e5;
}
.footer-social a:hover { background: var(--brand); color: #fff; }
.footer-bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
	margin-top: 34px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08);
	font-size: .8rem; color: #7d879f;
}
.footer-bottom .links { display: flex; gap: 14px; }

/* ============ 18. بازگشت به بالا ============ */
.back-to-top {
	position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 90;
	width: 42px; height: 42px; display: grid; place-items: center;
	border: 0; border-radius: 12px; cursor: pointer;
	background: var(--brand); color: #fff; box-shadow: var(--shadow-md);
	opacity: 0; visibility: hidden; transform: translateY(10px); transition: .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--brand-dark); }
