/*
Theme Name: روش سئو
Theme URI: https://www.howtoseo.ir
Author: روش سئو
Description: پوستهٔ اختصاصی، راست‌به‌چپ و سئو-محور برای سایت آموزش سئوی «روش سئو». نشانهٔ بصری: دایره‌های هم‌مرکز هدف (برگرفته از لوگو)، حالت تیره با کلید عدسی، سازگار با Yoast و ابزارک «لینک دوستان (CMS)».
Version: 1.0.0
Requires at least: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: roshseo
Tags: rtl-language-support, blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================================
   ۱) متغیرها
   ========================================================================= */
:root {
	color-scheme: light;
	--brand: #ff5a00;
	--brand-ink: #c23f00;
	--brand-2: #cc6a08;
	--brand-soft: #fff1e8;
	--btn-bg: #c23f00;
	--on-brand: #fff;
	--bg: #fff;
	--bg-soft: #fff7f1;
	--surface: #fff;
	--ink: #1f2430;
	--muted: #5b6272;
	--line: #ede7e1;
	--line-strong: #ddd2c8;
	--hover-line: #e8a27a;
	--shadow-md: 0 12px 30px -16px rgba(120, 60, 20, .35);
	--code-bg: #1f2430;
	--code-ink: #f3ede7;
	--footer-bg: #1b1612;
	--r-card: 14px;
	--r-ctl: 10px;
	--container: 1200px;
	--side: 320px;
	--nav-h: 62px;
	--adminbar-h: 0px;
	--font: 'Vazirmatn', Tahoma, 'Segoe UI', system-ui, -apple-system, sans-serif;
	--ring-md: radial-gradient(circle, var(--brand) 0 2.5px, transparent 2.5px 4.5px, var(--brand) 4.5px 6px, transparent 6px);
	--ring-sm: radial-gradient(circle, var(--brand) 0 1.6px, transparent 1.6px 3.1px, var(--brand) 3.1px 4.4px, transparent 4.4px);
	--ring-lg: radial-gradient(circle, var(--brand) 0 5px, transparent 5px 11px, var(--brand-2) 11px 15px, transparent 15px);
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--brand: #ff7a33;
	--brand-ink: #ff8f52;
	--brand-2: #e08a2e;
	--brand-soft: #2b1c12;
	--btn-bg: #ff7a33;
	--on-brand: #1a0f08;
	--bg: #14110f;
	--bg-soft: #1a1612;
	--surface: #1d1915;
	--ink: #f3ede7;
	--muted: #a89f96;
	--line: #2e2822;
	--line-strong: #40372f;
	--hover-line: #8a4a26;
	--shadow-md: 0 12px 30px -16px rgba(0, 0, 0, .8);
	--code-bg: #0e0c0a;
	--footer-bg: #0f0d0b;
}

.admin-bar { --adminbar-h: 32px; }
@media (max-width: 782px) { .admin-bar { --adminbar-h: 46px; } }
@media (max-width: 600px) { .admin-bar { --adminbar-h: 0px; } }

/* =========================================================================
   ۲) پایه
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--adminbar-h) + 16px); }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.9;
	color: var(--ink);
	background: var(--bg);
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
}
.site-shell { overflow-x: clip; }
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.55; font-weight: 800; }
p { margin: 0 0 1.1em; }
ul, ol { padding-inline-start: 1.4em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.ico { flex: none; vertical-align: middle; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip-path: inset(50%);
	white-space: nowrap; word-wrap: normal;
}
.screen-reader-text:focus { position: static !important; width: auto; height: auto; margin: 0; clip-path: none; }
.skip-link:focus {
	position: fixed !important; z-index: 1000;
	inset-block-start: 8px; inset-inline-start: 8px;
	padding: 10px 18px; border-radius: 999px;
	background: var(--btn-bg); color: var(--on-brand);
	text-decoration: none; font-weight: 700;
}

/* =========================================================================
   ۳) هدر
   ========================================================================= */
.topbar { background: var(--bg-soft); border-block-end: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; }
.social-list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.social-list a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); transition: color .2s, background .2s; }
.social-list a:hover { color: var(--brand-ink); background: var(--brand-soft); }

.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; min-width: 0; }
.brand-logo { height: 48px; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.brand-name { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.brand-tag { font-size: .8125rem; color: var(--muted); }
.header-banner { flex: 0 1 728px; min-width: 0; }
.header-banner img { display: block; width: 100%; height: auto; border-radius: var(--r-ctl); }

.navbar {
	position: sticky; inset-block-start: var(--adminbar-h); z-index: 50;
	background: var(--bg);
	border-block: 1px solid var(--line);
}
@supports (background: color-mix(in srgb, red 50%, blue)) {
	.navbar { background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.navbar-in { display: flex; align-items: center; gap: 8px; min-height: var(--nav-h); }
.nav-mark { display: none; flex: none; }
.nav-mark img { display: block; border-radius: 8px; }
.navbar.is-stuck .nav-mark { display: block; }
.nav-menu { flex: 1; min-width: 0; }
.nav-list, .nav-list ul { margin: 0; padding: 0; list-style: none; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-list a {
	display: block; padding: 8px 14px; border-radius: 999px;
	color: var(--ink); font-weight: 600; font-size: .9375rem; text-decoration: none;
	transition: background .2s, color .2s;
}
.nav-list a:hover, .nav-list li:focus-within > a { background: var(--brand-soft); color: var(--brand-ink); }
.nav-list .current-menu-item > a, .nav-list .current-menu-ancestor > a, .nav-list .current_page_item > a { background: var(--brand-soft); color: var(--brand-ink); }
.nav-list .sub-menu {
	position: absolute; inset-inline-start: 0; inset-block-start: calc(100% + 6px); z-index: 60;
	min-width: 220px; padding: 8px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav-list .sub-menu a { border-radius: 8px; }
.submenu-toggle { display: none; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.nav-list > li.menu-item-has-children > .submenu-toggle { display: grid; margin-inline-start: -8px; }

.nav-toggle { display: none; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle.is-open .nav-toggle-close { display: inline-flex; }
.nav-toggle.is-open .nav-toggle-open { display: none; }

.nav-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.tool-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); transition: border-color .2s, color .2s; }
.tool-btn:hover, .nav-toggle:hover { border-color: var(--brand); color: var(--brand-ink); }

/* کلید حالت تیره: عدسیِ هدف که به هلال تبدیل می‌شود */
.theme-switch { display: inline-flex; padding: 0; border: 0; background: none; }
.theme-switch-track {
	position: relative; display: inline-flex; align-items: center; justify-content: space-between;
	width: 68px; height: 36px; padding-inline: 10px;
	border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line-strong);
	color: var(--muted); transition: background .3s, border-color .3s;
}
.theme-switch:hover .theme-switch-track { border-color: var(--brand); }
.theme-switch-lens {
	position: absolute; inset-block-start: 3px; inset-inline-start: 3px;
	display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
	background: var(--surface); border: 2px solid var(--brand);
	box-shadow: 0 2px 8px rgba(194, 63, 0, .28);
	transition: inset-inline-start .45s cubic-bezier(.34, 1.56, .64, 1);
}
.lens-core { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--brand-2); transition: all .3s; }
:root[data-theme="dark"] .theme-switch-lens { inset-inline-start: 35px; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .lens-core { width: 13px; height: 13px; background: transparent; box-shadow: inset -4px -2px 0 0 var(--brand); }

.search-panel { border-block-start: 1px solid var(--line); background: var(--bg-soft); padding-block: 14px; }
.search-panel[hidden] { display: none; }
.search-box { position: relative; display: flex; align-items: center; max-width: 640px; margin-inline: auto; }
.search-input {
	flex: 1; width: 100%; min-height: 46px; padding: 8px 20px; padding-inline-end: 56px;
	border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
}
.search-input:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 3px var(--brand-soft); }
.search-submit { position: absolute; inset-inline-end: 5px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--btn-bg); color: var(--on-brand); }

/* =========================================================================
   ۴) چیدمان
   ========================================================================= */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 32px; align-items: start; padding-block: 28px 40px; }
.layout-main { min-width: 0; }
.sidebar { min-width: 0; }

.sec-head { display: flex; align-items: center; gap: 12px; margin-block-end: 18px; }
.sec-title { flex: 1; display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; }
.sec-title::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--ring-md); }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-more { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

.chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 1px 12px; border-radius: 999px;
	background: var(--brand-soft); color: var(--brand-ink); font-size: .8125rem; font-weight: 600; text-decoration: none;
}
a.chip:hover { background: var(--brand); color: var(--on-brand); }
.chip-count { opacity: .75; }
.chip-cloud, .tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }

.btn, .submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 24px; border: 0; border-radius: 999px;
	background: var(--btn-bg); color: var(--on-brand); font-weight: 700; text-decoration: none;
	transition: transform .2s, box-shadow .2s;
}
.btn:hover, .submit:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* =========================================================================
   ۵) کارت‌ها
   ========================================================================= */
.card-stack { display: grid; gap: 16px; }
.article-card {
	position: relative; display: grid; gap: 16px; padding: 14px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
	transition: transform .25s, border-color .25s, box-shadow .25s;
}
.article-card:hover { transform: translateY(-2px); border-color: var(--hover-line); box-shadow: var(--shadow-md); }
.article-card.is-list { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
.card-media { display: block; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.card-media.is-empty { background-image: var(--ring-lg); background-repeat: no-repeat; background-position: center; background-size: 40px 40px; }
.card-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.article-card:hover .card-img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.card-title { margin: 0; font-size: 1.0625rem; line-height: 1.7; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-title a:hover { color: var(--brand-ink); }
.chip-cat { position: relative; z-index: 2; }
.card-excerpt {
	margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.8;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-block-start: auto; color: var(--muted); font-size: .8125rem; }
.card-meta-item { display: inline-flex; align-items: center; gap: 4px; }

.rank {
	flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
	border: 2px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
	color: var(--brand-ink); background: var(--surface); font-weight: 800; font-size: .95rem; line-height: 1;
}

.feature { padding-block-start: 28px; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.article-card.is-lead { display: block; min-height: 400px; padding: 0; overflow: hidden; border: 0; isolation: isolate; color: #fff; background: #2a1d14; }
.is-lead .card-media { position: absolute; inset: 0; z-index: -2; aspect-ratio: auto; border-radius: 0; }
.is-lead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(18, 10, 4, .9) 6%, rgba(18, 10, 4, .35) 55%, rgba(18, 10, 4, .05)); }
.is-lead .card-body { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 26px; gap: 10px; }
.is-lead .card-title { font-size: clamp(1.3rem, 2.4vw, 1.85rem); line-height: 1.6; }
.is-lead .card-title a { color: #fff; }
.is-lead .card-title a:hover { color: #ffd2b8; }
.is-lead .card-meta { color: #e6dacf; }
.lead-top { display: flex; align-items: center; gap: 10px; }
.is-lead .rank { background: rgba(0, 0, 0, .4); color: #fff; border-color: #ff7a33; box-shadow: 0 0 0 4px rgba(255, 122, 51, .25); }
.is-lead .chip-cat { background: var(--brand); color: #1a0f08; }

.rank-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; align-content: start; }
.article-card.is-rank { grid-template-columns: auto 92px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; }
.is-rank .card-title { font-size: .95rem; line-height: 1.7; }
.is-rank .card-body { gap: 2px; }

.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tile-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-card.is-tile { grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; padding: 12px; }
.is-tile .card-title { font-size: 1rem; }
.cat-blocks { padding-block: 8px 48px; }
.cat-block { margin-block-end: 36px; }

.archive-head { margin-block-end: 24px; }
.archive-title { margin: 0 0 .3em; font-size: clamp(1.5rem, 3vw, 2rem); }
.archive-desc, .archive-count { color: var(--muted); }
.archive-count { margin: 0; font-size: .875rem; }
.empty-state { padding: 28px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-card); color: var(--muted); }
.not-found .search-box { margin-inline: 0; }
.archive-list { margin: 0 0 24px; padding: 0; list-style: none; }
.archive-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 10px; border-block-end: 1px solid var(--line); }
.archive-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.archive-list a:hover { color: var(--brand-ink); }
.archive-list time { flex: none; color: var(--muted); font-size: .8125rem; }

/* =========================================================================
   ۶) ابزارک‌های سایدبار
   ========================================================================= */
.widget { margin-block-end: 20px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow-wrap: anywhere; }
.widget > :last-child { margin-block-end: 0; }
.widget-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1rem; }
.widget-title::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--ring-md); }
.widget-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; padding-block: 8px; border-block-end: 1px solid var(--line); font-size: .9375rem; }
.widget li:last-child { border-block-end: 0; padding-block-end: 0; }
.widget li > ul, .widget .children { flex-basis: 100%; padding-inline-start: 12px; }
.widget a { color: var(--ink); text-decoration: none; }
.widget a:hover { color: var(--brand-ink); }
.widget select { width: 100%; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); }
.widget-more { margin: 12px 0 0; padding-block-start: 12px; border-block-start: 1px dashed var(--line-strong); font-size: .875rem; }
.widget-more a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-weight: 700; }
.widget .tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.widget .tagcloud a { padding: 2px 12px; border: 1px solid var(--line-strong); border-radius: 999px; line-height: 1.9; transition: border-color .2s, color .2s, background .2s; }
.widget .tagcloud a:hover { border-color: var(--brand); background: var(--brand-soft); }
.widget .textwidget p:last-child { margin-block-end: 0; }
.widget .search-box { margin: 0; max-width: none; }
.widget img { border-radius: 8px; }

/* «لینک دوستان (CMS)»: فقط لینک؛ نشانهٔ حلقه با CSS؛ بدون کادر اضافه چون wrapper اگر رندر نشود چیزی نیست */
.widget_cms_friends_links .cms-friends-links { margin: 0; padding: 0; list-style: none; }
.cms-friends-links li { display: block; padding: 0; border-block-end: 1px solid var(--line); }
.cms-friends-links li:last-child { border-block-end: 0; }
.cms-friends-links a {
	display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 2px;
	color: var(--ink); font-size: .9rem; font-weight: 500; line-height: 1.7; text-decoration: none;
	overflow-wrap: anywhere; word-break: break-word;
	transition: color .2s, padding .2s;
}
.cms-friends-links a::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--ring-sm); transition: transform .25s; }
.cms-friends-links a:hover { color: var(--brand-ink); padding-inline-start: 6px; }
.cms-friends-links a:hover::before { transform: scale(1.25); }

/* =========================================================================
   ۷) نوشته
   ========================================================================= */
.entry { padding: clamp(18px, 3vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.breadcrumb { margin-block-end: 14px; color: var(--muted); font-size: .85rem; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-ink); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "›"; margin-inline-end: 6px; }
.entry-title { margin: .4em 0 .6em; font-size: clamp(1.55rem, 3.4vw, 2.2rem); line-height: 1.65; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-block-end: 24px; padding-block-end: 20px; border-block-end: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.meta-author, .meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta-author a, .meta-item { color: inherit; text-decoration: none; }
.meta-author a { color: var(--ink); font-weight: 700; }
a.meta-item:hover { color: var(--brand-ink); }
.meta-avatar, .cmt-avatar, .author-avatar { border-radius: 50%; }
.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { width: 100%; border-radius: 14px; }

.entry-content { font-size: 1.0625rem; line-height: 2.05; max-width: 100%; }
.entry-content > * { max-width: 100%; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.9em 0 .6em; }
.entry-content h2 { font-size: 1.55rem; }
.entry-content h2::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 10px; vertical-align: -1px; background: var(--ring-md); }
.entry-content h3 { font-size: 1.28rem; }
.entry-content h4 { font-size: 1.1rem; }
.entry-content ul li::marker, .entry-content ol li::marker { color: var(--brand); font-weight: 700; }
.entry-content li { margin-block-end: .35em; }
.entry-content blockquote { margin: 1.6em 0; padding: 1em 1.4em; border-inline-start: 3px solid var(--brand); border-radius: var(--r-ctl); background: var(--bg-soft); }
.entry-content blockquote p:last-child { margin-block-end: 0; }
.entry-content img { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: 12px; }
.entry-content figure { max-width: 100%; margin: 1.6em 0; }
.entry-content figcaption, .wp-caption-text { margin-block-start: .5em; color: var(--muted); font-size: .85rem; text-align: center; }
.entry-content iframe, .entry-content embed, .entry-content video { max-width: 100%; border: 0; border-radius: 12px; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content table { display: block; width: max-content; max-width: 100%; margin: 1.6em 0; overflow-x: auto; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid var(--line-strong); text-align: start; }
.entry-content th { background: var(--bg-soft); font-weight: 700; }
.entry-content pre { direction: ltr; text-align: left; margin: 1.6em 0; padding: 16px 18px; overflow-x: auto; border-radius: 12px; background: var(--code-bg); color: var(--code-ink); font-size: .9rem; line-height: 1.7; }
.entry-content code { direction: ltr; unicode-bidi: isolate; padding: 1px 6px; border-radius: 6px; background: var(--bg-soft); font-size: .9em; overflow-wrap: anywhere; }
.entry-content pre code { padding: 0; background: none; overflow-wrap: normal; }
.entry-content hr { margin: 2em 0; border: 0; border-block-start: 1px solid var(--line-strong); }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; clear: both; }
.page-links { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 1.5em; }
.page-links a, .page-links > span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding-inline: 8px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; }

.entry-footer { display: grid; gap: 18px; margin-block-start: 28px; padding-block-start: 22px; border-block-start: 1px solid var(--line); }
.entry-footer .tag-list { margin: 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share-label { color: var(--muted); font-size: .875rem; font-weight: 600; }
.share-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .875rem; text-decoration: none; transition: border-color .2s, color .2s; }
.share-btn:hover { border-color: var(--brand); color: var(--brand-ink); }

.author-box { display: flex; gap: 16px; align-items: center; margin-block-start: 20px; padding: 18px 20px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-card); }
.author-avatar { flex: none; }
.author-name { margin: 0 0 4px; font-weight: 800; }
.author-name a { color: var(--ink); text-decoration: none; }
.author-bio { margin: 0; color: var(--muted); font-size: .9rem; }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-block-start: 20px; }
.post-nav-link { display: grid; gap: 4px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--ink); text-decoration: none; transition: border-color .2s; }
.post-nav-link:hover { border-color: var(--hover-line); }
.post-nav-link.is-next { grid-column: 2; text-align: end; }
.post-nav-link.is-prev { grid-column: 1; }
.post-nav-label { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-size: .8125rem; font-weight: 700; }
.post-nav-link.is-next .post-nav-label { justify-content: flex-end; }
.post-nav-title { font-weight: 700; line-height: 1.7; }
.related { margin-block-start: 32px; }

/* =========================================================================
   ۸) دیدگاه‌ها
   ========================================================================= */
.comments-area { margin-block-start: 32px; }
.cmt-list, .cmt-list .children { margin: 0; padding: 0; list-style: none; }
.cmt-list .children { margin-inline-start: clamp(14px, 4vw, 40px); }
.cmt { margin-block-end: 14px; }
.cmt-body { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.cmt-head { display: flex; align-items: center; gap: 12px; margin-block-end: 8px; }
.cmt-info { display: flex; flex-direction: column; line-height: 1.6; }
.cmt-author { font-weight: 800; }
.cmt-author a { color: var(--ink); text-decoration: none; }
.cmt-date { color: var(--muted); font-size: .8125rem; text-decoration: none; }
.cmt-await { padding: 8px 12px; border-radius: 8px; background: var(--brand-soft); font-size: .875rem; }
.cmt-text { overflow-wrap: anywhere; }
.cmt-text p:last-child { margin-block-end: 0; }
.cmt-foot { display: flex; gap: 16px; margin-block-start: 8px; font-size: .875rem; }
.cmt-foot a { font-weight: 700; text-decoration: none; }
.no-comments { color: var(--muted); }
.comment-respond { margin-block-start: 28px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.comment-reply-title { margin: 0 0 12px; font-size: 1.2rem; }
.comment-reply-title small { margin-inline-start: 10px; font-size: .8125rem; font-weight: 500; }
.comment-form label { display: block; margin-block-end: 4px; font-weight: 600; font-size: .9rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 3px var(--brand-soft); }
.comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }
.comment-notes, .required-field-message { color: var(--muted); font-size: .85rem; }
.required { color: var(--brand-ink); }
.comments-area .nav-links { display: flex; justify-content: space-between; gap: 12px; margin-block: 16px; }
.comments-area .akismet-fields-container { display: none; }

/* =========================================================================
   ۹) صفحه‌بندی
   ========================================================================= */
.pager { margin-block-start: 28px; }
.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pager-link { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s; }
a.pager-link:hover { border-color: var(--brand); color: var(--brand-ink); }
.pager-link.is-current { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--on-brand); }
.pager-gap { display: inline-grid; place-items: center; height: 42px; color: var(--muted); }

/* =========================================================================
   ۱۰) فوتر
   ========================================================================= */
.site-footer { margin-block-start: 24px; background: var(--footer-bg); color: #d8cfc6; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; padding-block: 44px 28px; }
.footer-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #fff; font-size: 1.1rem; }
.footer-title::before { content: ""; width: 14px; height: 14px; background: radial-gradient(circle, #ff7a33 0 2.5px, transparent 2.5px 4.5px, #ff7a33 4.5px 6px, transparent 6px); }
.footer-about p { color: #b9aea3; font-size: .95rem; }
.footer-posts { margin: 0; padding: 0; list-style: none; }
.footer-posts li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 9px; border-block-end: 1px solid #332b24; }
.footer-posts li:last-child { border-block-end: 0; }
.footer-posts a { color: #eee5dc; text-decoration: none; font-size: .93rem; }
.footer-posts a:hover, .footer-list a:hover { color: #ff8f52; }
.footer-posts time { flex: none; color: #8f857b; font-size: .78rem; }
.social-list-footer a { color: #b9aea3; }
.social-list-footer a:hover { background: #2b1c12; color: #ff8f52; }
.footer-bar { border-block-start: 1px solid #332b24; }
.footer-bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 16px; font-size: .85rem; }
.footer-copy { margin: 0; color: #9d9288; }
.footer-list { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.footer-list a { color: #d8cfc6; text-decoration: none; }
.site-footer :focus-visible { outline-color: #ff8f52; }

.to-top { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--btn-bg); color: var(--on-brand); box-shadow: var(--shadow-md); }
.to-top[hidden] { display: none; }
.toast { position: fixed; inset-block-end: 24px; inset-inline: 0; z-index: 100; width: max-content; max-width: calc(100% - 2rem); margin-inline: auto; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .9rem; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   ۱۱) ریسپانسیو
   ========================================================================= */
@media (max-width: 1100px) {
	.tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
	.nav-toggle { display: grid; }
	.nav-mark { display: block; }
	.nav-menu {
		position: absolute; inset-inline: 0; inset-block-start: 100%; display: none;
		max-height: calc(100vh - var(--nav-h) - var(--adminbar-h)); overflow-y: auto;
		padding: 10px 1rem 18px; background: var(--bg); border-block-end: 1px solid var(--line); box-shadow: var(--shadow-md);
	}
	.nav-menu.is-open { display: block; }
	.nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
	.nav-list > li { flex-wrap: wrap; }
	.nav-list > li > a { flex: 1; padding: 12px 14px; }
	.nav-list > li.menu-item-has-children > .submenu-toggle { display: grid; margin: 0; }
	.nav-list .sub-menu { position: static; display: none; flex-basis: 100%; min-width: 0; margin: 0 0 6px; padding: 0 12px 0 0; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; background: none; }
	.nav-list li.is-open > .sub-menu { display: block; }
	.navbar { position: sticky; }
}
@media (max-width: 899px) {
	.layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.feature-grid { grid-template-columns: minmax(0, 1fr); }
	.article-card.is-lead { min-height: 340px; }
	.header-banner { display: none; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 600px) {
	.topbar-date { font-size: .78rem; }
	.brand-logo { height: 40px; }
	.brand-name { font-size: 1.25rem; }
	.article-card.is-list { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px; }
	.article-card.is-list .card-excerpt { display: none; }
	.article-card.is-list .card-title { font-size: .98rem; }
	.tile-grid, .tile-grid-2 { grid-template-columns: minmax(0, 1fr); }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav-link.is-next, .post-nav-link.is-prev { grid-column: auto; }
	.entry-content { font-size: 1rem; }
	.alignleft, .alignright { float: none; display: block; margin-inline: auto; }
	.author-box { flex-direction: column; text-align: center; }
	.comment-respond { padding: 16px; }
	.is-lead .card-body { padding: 18px; }
	.article-card.is-rank { grid-template-columns: auto 76px minmax(0, 1fr); }
}

/* =========================================================================
   ۱۲) حرکت کم و چاپ
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
	.topbar, .navbar, .sidebar, .site-footer, .share, .post-nav, .related, .comment-respond, .to-top, .toast, .author-box, .search-panel, .header-banner, .social-list { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	.layout { display: block; padding: 0; }
	.entry { border: 0; padding: 0; }
	.entry-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
	.article-card, .entry-content img, .entry-content pre { break-inside: avoid; }
}
