/*
Theme Name: RentX
Theme URI: https://www.rentx.ir
Author: RentX
Description: قالب اختصاصی، راست‌به‌چپ، ریسپانسیو و بهینه برای سئو برای وب‌سایت خبری «اجاره ملک و خودرو» (rentx.ir). حالت روشن + دکمهٔ حالت تیره، سایدبار سمت چپ، فونت وزیرمتن.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rentx
Tags: rtl-language-support, blog, news, two-columns, left-sidebar, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   1. Tokens
   ========================================================= */
:root {
	--font: 'Vazirmatn', Tahoma, 'Segoe UI', system-ui, sans-serif;
	--bg: #f5f8f6;
	--surface: #ffffff;
	--surface-2: #eef3f0;
	--ink: #252a29;
	--ink-soft: #4b5753;
	--ink-mute: #66736d;
	--brand: #17804f;
	--brand-2: #239564;
	--on-brand: #ffffff;
	--tint: #e3f3ea;
	--line: #dce4df;
	--lane: #b9cbc1;
	--focus: #0f5f3a;
	--footer-bg: #1d2321;
	--footer-ink: #cfd9d3;
	--shadow-hover: 0 12px 28px -14px rgba(20, 60, 40, 0.35);

	--r-sm: 8px;
	--r-md: 14px;
	--r-lg: 24px;
	--wrap: 1240px;
	--pad: clamp(14px, 3vw, 24px);
	--side: 340px;
	--gap: clamp(16px, 2.4vw, 32px);
	--topbar-h: 40px;
	--adminbar-h: 0px;
	color-scheme: light;
}

html[data-theme='dark'] {
	--bg: #111816;
	--surface: #1a2320;
	--surface-2: #212c28;
	--ink: #e6ede9;
	--ink-soft: #b7c4bd;
	--ink-mute: #8d9c95;
	--brand: #3dbe85;
	--brand-2: #3dbe85;
	--on-brand: #06140d;
	--tint: #1f3a2d;
	--line: #2a3632;
	--lane: #3a4b44;
	--focus: #7fe0b0;
	--footer-bg: #0b100e;
	--footer-ink: #b9c7c0;
	--shadow-hover: 0 12px 28px -14px rgba(0, 0, 0, 0.7);
	color-scheme: dark;
}

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

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--adminbar-h) + 84px);
	overflow-x: clip;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.9;
	color: var(--ink);
	background: var(--bg);
	overflow-x: clip;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.55; font-weight: 800; }
p { margin: 0 0 1em; }
img, video, svg { max-width: 100%; }
img { height: auto; }
iframe, embed, object { max-width: 100%; }
a { color: var(--brand); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
ul, ol { padding-inline-start: 1.4em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

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

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--surface);
	color: var(--ink);
	clip: auto !important;
	clip-path: none;
	display: block;
	font-weight: 700;
	height: auto;
	inset-inline-start: 8px;
	top: 8px;
	padding: 12px 18px;
	width: auto;
	z-index: 100000;
	border-radius: var(--r-sm);
	box-shadow: 0 0 0 3px var(--brand);
	text-decoration: none;
}

.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }

/* =========================================================
   3. Signature: key-tag + road lane
   ========================================================= */
.key-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	min-height: 26px;
	padding-block: 0.1em;
	padding-inline: 0.65em 0.95em;
	background: var(--brand);
	color: var(--on-brand);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.7;
	white-space: nowrap;
	border-start-start-radius: 13px;
	border-end-start-radius: 13px;
	border-start-end-radius: 4px;
	border-end-end-radius: 4px;
}
.key-tag::before {
	content: '';
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--surface);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
}
a.key-tag:hover { text-decoration: none; filter: brightness(1.08); }

.lane, .hero-lane {
	position: relative;
	display: block;
	flex: 1 1 auto;
	min-width: 24px;
	height: 12px;
}
.lane::before, .hero-lane::before {
	content: '';
	position: absolute;
	top: 50%;
	inset-inline: 0 7px;
	border-top: 2px dashed var(--lane);
	transform: translateY(-50%);
}
.lane::after, .hero-lane::after {
	content: '';
	position: absolute;
	top: 50%;
	inset-inline-end: 0;
	width: 8px;
	height: 8px;
	border-left: 2px solid var(--brand);
	border-bottom: 2px solid var(--brand);
	transform: translateY(-50%) rotate(45deg);
}
.lane-solo { width: 100%; margin-block-start: 1rem; }

.sec-head { display: flex; align-items: center; gap: 1rem; margin-block-end: 1.1rem; }
.sec-title { margin: 0; font-size: 1.3rem; }
.more-link { flex: none; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }

/* =========================================================
   4. Header
   ========================================================= */
.site-header {
	position: sticky;
	top: calc(var(--adminbar-h) - var(--topbar-h));
	z-index: 50;
}

.topbar {
	height: var(--topbar-h);
	background: var(--footer-bg);
	color: var(--footer-ink);
	font-size: 0.8125rem;
}
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; height: 100%; }
.topbar-date { flex: none; font-weight: 600; color: #fff; }
.topbar-tagline { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.topbar-links { display: flex; gap: 1rem; margin: 0; padding: 0; list-style: none; flex: none; }
.topbar-links a { color: var(--footer-ink); }
.topbar-links a:hover { color: #fff; }

.nav-bar { position: relative; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }

.brand { flex: none; }
.brand-link { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand-link:hover { text-decoration: none; }
.brand-mark {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
}
.brand-mark img { width: 38px; height: 38px; }
.brand-word { direction: ltr; unicode-bidi: isolate; font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.brand-word-x { color: var(--brand-2); }
.custom-logo-link img { display: block; width: auto; max-height: 48px; }

.primary-nav { flex: 1 1 auto; min-width: 0; }
.primary-nav .menu { display: flex; flex-wrap: wrap; gap: 0.2rem; margin: 0; padding: 0; list-style: none; }
.primary-nav .menu li { position: relative; }
.primary-nav .menu a {
	display: block;
	padding: 0.5rem 0.85rem;
	border-radius: 10px;
	color: var(--ink);
	font-weight: 700;
}
.primary-nav .menu a:hover { background: var(--tint); text-decoration: none; }
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current_page_item > a { background: var(--tint); color: var(--brand); }

.primary-nav .menu-item-has-children { display: flex; align-items: center; }
.submenu-toggle {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	margin-inline-start: -0.6rem;
	background: none;
	border: 0;
	border-radius: 8px;
	color: var(--ink-soft);
}
.primary-nav .sub-menu {
	position: absolute;
	inset-inline-start: 0;
	top: 100%;
	z-index: 5;
	display: none;
	min-width: 210px;
	margin: 0;
	padding: 0.4rem;
	list-style: none;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	box-shadow: var(--shadow-hover);
}
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu,
.primary-nav .menu-item-has-children.is-open > .sub-menu { display: block; }
.primary-nav .sub-menu a { font-weight: 600; }

.nav-tools { display: flex; align-items: center; gap: 0.35rem; margin-inline-start: auto; }
.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	background: var(--surface-2);
	border: 1px solid transparent;
	border-radius: 12px;
	color: var(--ink);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.ico-sun { display: none; }
html[data-theme='dark'] .ico-sun { display: block; }
html[data-theme='dark'] .ico-moon { display: none; }
.menu-btn { display: none; }

.search-panel { padding-block: 0.9rem; background: var(--surface-2); border-top: 1px solid var(--line); }

/* Forms */
.search-form {
	display: flex;
	align-items: stretch;
	min-height: 48px;
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: 999px;
	overflow: hidden;
}
.search-form:focus-within { border-color: var(--brand); }
.search-field {
	flex: 1 1 auto;
	min-width: 0;
	padding-inline: 1.2rem;
	background: transparent;
	border: 0;
	outline: 0;
}
.search-submit {
	display: inline-grid;
	place-items: center;
	padding-inline: 1.2rem;
	background: var(--brand);
	color: var(--on-brand);
	border: 0;
}
.search-submit:hover { filter: brightness(1.1); }

/* =========================================================
   5. Layout
   ========================================================= */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--side);
	gap: var(--gap);
	align-items: start;
	padding-block: clamp(20px, 3vw, 36px);
}
.layout-main, .layout-side { min-width: 0; align-self: start; }
.layout-main > * { min-width: 0; }
.home-block { margin-block-end: clamp(28px, 4vw, 44px); }

/* Hero search panel */
.hero-panel {
	position: relative;
	margin-block-start: clamp(18px, 3vw, 30px);
	padding: clamp(1.4rem, 4vw, 2.6rem);
	background:
		repeating-linear-gradient(135deg, transparent 0 22px, rgba(35, 149, 100, 0.06) 22px 24px),
		linear-gradient(135deg, var(--tint), var(--surface-2));
	border-radius: var(--r-lg);
	overflow: hidden;
}
.hero-panel::after {
	content: '';
	position: absolute;
	inset-block: 12% 12%;
	inset-inline-end: 3%;
	width: clamp(120px, 16vw, 200px);
	background: url('assets/img/mark.png') center / contain no-repeat;
	opacity: 0.14;
	pointer-events: none;
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-title { margin: 0 0 1.1rem; font-size: clamp(1.45rem, 3.2vw, 2.2rem); font-weight: 800; line-height: 1.5; }
.hero-panel .search-form { max-width: 680px; min-height: 56px; box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.4); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0 0; padding: 0; list-style: none; }
.hero-chips .key-tag { min-height: 34px; padding-inline-end: 1.15rem; font-size: 0.9rem; }
.hero-lane { margin-block-start: 1.4rem; }
.hero-lane::before { border-top-color: var(--lane); }

/* =========================================================
   6. Cards
   ========================================================= */
.article-card, .article-row {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	overflow: hidden;
}
.article-card:hover, .article-row:hover { border-color: var(--brand); }
.article-card:hover .article-title a, .article-row:hover .article-title a { color: var(--brand); }

.article-media { position: relative; aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; }
.media-link { display: block; width: 100%; height: 100%; }
.thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { display: block; width: 100%; height: 100%; background: var(--tint) url('assets/img/placeholder.svg') center / cover no-repeat; }
.article-media > .key-tag { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; }

.article-body { padding: 0.9rem 1rem 1rem; }
.article-title { font-size: 1.05rem; line-height: 1.7; }
.article-title a { color: var(--ink); }
.article-title a:hover { text-decoration: none; }
.article-excerpt {
	margin: 0.45rem 0 0;
	color: var(--ink-soft);
	font-size: 0.9rem;
	line-height: 1.85;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 0.55rem; color: var(--ink-mute); font-size: 0.8125rem; }
.meta-sep { opacity: 0.5; }

.card-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card-grid-3 .article-card { display: flex; flex-direction: column; }
.card-grid-3 .article-body { flex: 1 1 auto; }

.loop-list { display: grid; gap: 14px; }
.article-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1rem; padding: 0.7rem; }
.article-row .article-media { border-radius: 10px; aspect-ratio: 16 / 11; }
.article-row .article-body { padding: 0.2rem 0.3rem 0.2rem 0.4rem; align-self: center; }
.article-row-compact { grid-template-columns: 96px minmax(0, 1fr); gap: 0.75rem; padding: 0.5rem; }
.article-row-compact .article-media { aspect-ratio: 1; }
.article-row-compact .article-title { font-size: 0.95rem; }

/* Featured block */
.feature-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.feature-side { display: grid; gap: 10px; align-content: start; }
.article-card-overlay { display: block; min-height: 340px; border: 0; }
.article-card-overlay .article-media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.article-card-overlay .article-media > .key-tag { inset-block-start: 12px; inset-block-end: auto; }
.article-card-overlay .article-body {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	padding: 3rem 1.2rem 1.1rem;
	background: linear-gradient(to top, rgba(8, 18, 13, 0.92), rgba(8, 18, 13, 0));
}
.article-card-overlay .article-title { font-size: clamp(1.15rem, 2vw, 1.5rem); }
.article-card-overlay .article-title a { color: #fff; }
.article-card-overlay:hover .article-title a { color: #fff; text-decoration: underline; }
.article-card-overlay .article-meta { color: #d3e3da; }

/* Pagination */
.pagination-nav ul.page-numbers { display: flex; flex-wrap: wrap; gap: 6px; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.pagination-nav li > .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding-inline: 0.8rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--ink);
	font-weight: 700;
}
.pagination-nav li > a.page-numbers:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination-nav li > .page-numbers.current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pagination-nav li > .page-numbers.dots { border-color: transparent; background: transparent; }

.empty-state { padding: 1.4rem; background: var(--surface); border: 1px dashed var(--lane); border-radius: var(--r-md); }

/* =========================================================
   7. Page headers & breadcrumb
   ========================================================= */
.page-head { margin-block-end: 1.4rem; }
.page-title { margin: 0.3rem 0 0.2rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.page-desc { margin: 0.4rem 0 0; color: var(--ink-soft); }
.not-found-code { margin: 0; color: var(--brand); font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1.1; }

.breadcrumb-nav { margin-block-end: 0.8rem; color: var(--ink-mute); font-size: 0.85rem; }
.breadcrumb-nav a { color: var(--ink-soft); }
.breadcrumb-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb-list li + li::before { content: '‹'; margin-inline-end: 0.35rem; color: var(--ink-mute); }

/* =========================================================
   8. Single / page
   ========================================================= */
.entry {
	padding: clamp(1rem, 3vw, 2rem);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
}
.entry-title { margin: 0.4rem 0 0.8rem; font-size: clamp(1.55rem, 3.2vw, 2.3rem); line-height: 1.55; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; color: var(--ink-mute); font-size: 0.9rem; }
.meta-author { display: inline-flex; align-items: center; gap: 0.5rem; }
.meta-avatar, .cmt-avatar, .author-avatar { border-radius: 50%; }
.entry-figure { margin: 1.1rem 0 1.5rem; overflow: hidden; border-radius: 12px; }
.entry-figure img { display: block; width: 100%; height: auto; }
.entry-figure figcaption { padding: 0.5rem 0.2rem 0; color: var(--ink-mute); font-size: 0.85rem; }

.entry-content { font-size: 1.0625rem; line-height: 2.05; overflow-wrap: break-word; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.8em 0 0.6em; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.12rem; }
.entry-content a { text-decoration: underline; text-underline-offset: 0.2em; }
.entry-content img { border-radius: 10px; }
.entry-content blockquote {
	margin: 1.5em 0;
	padding: 0.9rem 1.2rem;
	background: var(--tint);
	border-inline-start: 4px solid var(--brand);
	border-radius: 0 var(--r-md) var(--r-md) 0;
	color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 1.4em; }
.entry-content th, .entry-content td { padding: 0.55rem 0.8rem; border: 1px solid var(--line); text-align: start; }
.entry-content th { background: var(--surface-2); }
.entry-content pre {
	max-width: 100%;
	overflow-x: auto;
	padding: 1rem;
	background: var(--surface-2);
	border-radius: var(--r-sm);
	direction: ltr;
	text-align: left;
	line-height: 1.6;
}
.entry-content code { padding: 0.1em 0.4em; background: var(--surface-2); border-radius: 6px; font-size: 0.92em; direction: ltr; unicode-bidi: embed; }
.entry-content pre code { padding: 0; background: none; }
.entry-content figure { margin: 1.4em 0; max-width: 100%; }
.entry-content figcaption, .wp-caption-text { margin-top: 0.4rem; color: var(--ink-mute); font-size: 0.85rem; text-align: center; }
.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 0.3rem 1.2rem 0.8rem 0; }
.alignright { float: right; margin: 0.3rem 0 0.8rem 1.2rem; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ''; display: block; clear: both; }
.page-links { margin-block: 1.4rem; font-weight: 700; }

.entry-footer { margin-block-start: 1.6rem; padding-block-start: 1.2rem; border-top: 1px dashed var(--lane); }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.tag-chip {
	display: inline-block;
	padding: 0.1rem 0.8rem;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink-soft);
	font-size: 0.85rem;
}
.tag-chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.share-label { font-weight: 800; }
.share-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.share-list a, .share-copy {
	display: inline-block;
	padding: 0.15rem 0.9rem;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--ink);
	font-size: 0.875rem;
	font-weight: 600;
}
.share-list a:hover, .share-copy:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.author-box {
	display: flex;
	gap: 1rem;
	margin-block-start: 1.2rem;
	padding: 1.1rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
}
.author-name { margin: 0 0 0.2rem; font-weight: 800; }
.author-bio { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 1.2rem; }
.post-nav-link {
	display: block;
	padding: 0.9rem 1.1rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	color: var(--ink);
}
.post-nav-link:hover { border-color: var(--brand); text-decoration: none; }
.post-nav-label { display: block; color: var(--brand); font-size: 0.8125rem; font-weight: 700; }
.post-nav-title { display: block; font-weight: 700; line-height: 1.7; }
.post-nav-next { grid-column: 2; text-align: end; }
.post-nav-prev { grid-column: 1; }
.related { margin-block: 2rem; }

/* Comments */
.comments-area { margin-block-start: 2rem; padding: clamp(1rem, 3vw, 1.6rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.cmt-list { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.cmt-list .children { margin: 0; padding-inline-start: clamp(0.8rem, 3vw, 2rem); list-style: none; }
.cmt-body { padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.cmt-head { display: flex; align-items: center; gap: 0.75rem; }
.cmt-who { display: flex; flex-direction: column; line-height: 1.5; }
.cmt-author { font-weight: 800; }
.cmt-date { color: var(--ink-mute); font-size: 0.8125rem; }
.cmt-text { margin-block-start: 0.6rem; }
.cmt-text p:last-child { margin-bottom: 0; }
.cmt-wait { color: var(--ink-mute); font-style: italic; }
.cmt-actions a { font-size: 0.875rem; font-weight: 700; }
.comment-reply-title { margin-block-end: 0.8rem; font-size: 1.2rem; }
.comment-form p { margin-block-end: 0.9rem; }
.comment-form label { display: block; margin-block-end: 0.2rem; font-weight: 700; font-size: 0.9rem; }
.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea,
.widget select {
	width: 100%;
	padding: 0.6rem 0.9rem;
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: 10px;
}
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--brand); outline: 0; }
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: center; }
.comment-form-cookies-consent label { margin: 0; font-weight: 500; }
.comment-form .akismet_comment_form_privacy_notice, .comment-notes { color: var(--ink-mute); font-size: 0.8125rem; }
.btn-primary, .comment-form .submit {
	padding: 0.6rem 1.6rem;
	background: var(--brand);
	color: var(--on-brand);
	border: 0;
	border-radius: 10px;
	font-weight: 800;
}
.btn-primary:hover, .comment-form .submit:hover { filter: brightness(1.1); }
.comments-closed { color: var(--ink-mute); }

.archive-block { margin-block-start: 1.6rem; }
.archive-list { columns: 2 220px; column-gap: 2rem; margin: 0; padding: 0; list-style: none; }
.archive-list li { break-inside: avoid; padding: 0.35rem 0; border-bottom: 1px dashed var(--line); }

/* =========================================================
   9. Sidebar widgets
   ========================================================= */
.widget {
	min-width: 0;
	margin-block-end: 18px;
	padding: 1.1rem 1.1rem 1.2rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	overflow-wrap: break-word;
}
.widget-title { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem; font-size: 1.02rem; }
.widget-title::before {
	content: '';
	flex: none;
	width: 11px;
	height: 11px;
	border: 3px solid var(--brand-2);
	border-radius: 50%;
}
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 0.45rem 0; border-bottom: 1px dashed var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget li a { color: var(--ink); font-weight: 600; }
.widget li a:hover { color: var(--brand); }
.widget-more { display: inline-block; margin-block-start: 0.8rem; font-size: 0.875rem; font-weight: 700; }

.widget_categories ul, .widget_archive ul { display: grid; gap: 8px; }
.widget_categories ul { grid-template-columns: 1fr 1fr; }
.widget_categories li, .widget_archive li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.45rem 0.75rem;
	background: var(--surface-2);
	border: 1px solid transparent;
	border-radius: 10px;
	color: var(--ink-mute);
	font-size: 0.8125rem;
}
.widget_categories li:last-child, .widget_archive li:last-child { border-bottom: 1px solid transparent; }
.widget_categories li:hover, .widget_archive li:hover { border-color: var(--brand); }
.widget_categories li a, .widget_archive li a { flex: 1 1 auto; min-width: 0; font-size: 0.95rem; }

.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud a, .tag-cloud-link {
	display: inline-block;
	padding: 0.1rem 0.75rem;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink-soft);
	font-size: 0.8125rem !important;
	font-weight: 600;
}
.tagcloud a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.widget .search-form { min-height: 44px; }

/* Feed widgets (Feedzy block or classic): header as widget title, titles only, small house+car icon */
.widget .feedzy-rss { margin: 0; }
.widget .feedzy-rss .rss_header { margin: 0 0 0.9rem !important; padding: 0 !important; }
.widget .feedzy-rss .rss_header h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0 !important; font-size: 1.02rem !important; line-height: 1.55; }
.widget .feedzy-rss .rss_header h2::before { content: ''; flex: none; width: 11px; height: 11px; border: 3px solid var(--brand-2); border-radius: 50%; }
.widget .feedzy-rss .rss_header a { color: var(--ink) !important; font-weight: 800; }
.widget .feedzy-rss .rss_description { display: none !important; }
.widget .feedzy-rss ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.widget .feedzy-rss li, .widget .feedzy-rss .rss_item {
	display: block !important;
	margin: 0 !important;
	padding: 0.55rem 0 !important;
	border-bottom: 1px dashed var(--line) !important;
	background: none !important;
	list-style: none !important;
}
.widget .feedzy-rss li:last-child { border-bottom: 0 !important; }
.widget .feedzy-rss .rss_image, .widget .feedzy-rss .rss_content, .widget .feedzy-rss img, .widget .feedzy-rss small { display: none !important; }
.widget .feedzy-rss .title { position: relative; display: block !important; padding-inline-start: 1.6rem; font-size: 0.92rem !important; font-weight: 600; line-height: 1.75 !important; }
.widget .feedzy-rss .title::before {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	top: 0.38em;
	width: 1.1rem;
	height: 1.1rem;
	background: var(--brand-2);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 11 12 3l9.5 8'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M8 17.5v-2l1.2-2.5h5.6L16 15.5v2'/%3E%3Cpath d='M8 17.5h8'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 11 12 3l9.5 8'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M8 17.5v-2l1.2-2.5h5.6L16 15.5v2'/%3E%3Cpath d='M8 17.5h8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.widget .feedzy-rss .title a { color: var(--ink) !important; }
.widget .feedzy-rss .title a:hover { color: var(--brand) !important; text-decoration: none; }

/* =========================================================
   10. Footer & utilities
   ========================================================= */
.site-footer { margin-block-start: clamp(28px, 5vw, 56px); background: var(--footer-bg); color: var(--footer-ink); border-top: 4px solid var(--brand-2); }
.site-footer a { color: #e9f1ec; }
.site-footer a:hover { color: #7fe0b0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); padding-block: 2.4rem; }
.footer-about { display: flex; gap: 1.2rem; align-items: flex-start; }
.footer-logo { flex: none; padding: 6px; background: #fff; border-radius: 16px; }
.footer-logo img { display: block; width: 96px; height: 96px; }
.footer-title { margin: 0 0 0.8rem; color: #fff; font-size: 1.05rem; }
.footer-about p { margin: 0; line-height: 2; }
.footer-subtitle { margin: 1.2rem 0 0.6rem; color: #fff; font-size: 0.95rem; font-weight: 800; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footer-tags a { display: inline-block; padding: 0.05rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; color: #e9f1ec; font-size: 0.8125rem; }
.footer-tags a:hover { border-color: #7fe0b0; color: #7fe0b0; text-decoration: none; }
.footer-posts { margin: 0; padding: 0; list-style: none; }
.footer-posts li { padding: 0.4rem 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.15); }
.footer-posts li:last-child { border-bottom: 0; }
.footer-bar { border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.875rem; }
.footer-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; padding-block: 1rem; }
.footer-copy { margin: 0; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0; padding: 0; list-style: none; }

.to-top {
	position: fixed;
	inset-inline-start: 16px;
	inset-block-end: 18px;
	z-index: 40;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	background: var(--brand);
	color: var(--on-brand);
	border: 0;
	border-radius: 50%;
	box-shadow: var(--shadow-hover);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }

/* =========================================================
   11. Responsive
   ========================================================= */
@media (max-width: 1100px) {
	:root { --side: 300px; }
	.article-row { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 899px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.menu-btn { display: inline-grid; }
	.primary-nav {
		position: absolute;
		inset-inline: 0;
		top: 100%;
		display: none;
		padding: 0.6rem var(--pad) 1rem;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-hover);
	}
	.primary-nav.is-open { display: block; }
	.primary-nav .menu { flex-direction: column; }
	.primary-nav .menu-item-has-children { flex-wrap: wrap; }
	.primary-nav .menu-item-has-children > a { flex: 1 1 0; }
	.submenu-toggle { margin-inline-start: 0; width: 40px; height: 40px; }
	.primary-nav .sub-menu { position: static; flex: 1 0 100%; box-shadow: none; border: 0; padding-inline-start: 1rem; }
	.primary-nav .menu-item-has-children:hover > .sub-menu { display: none; }
	.primary-nav .menu-item-has-children.is-open > .sub-menu { display: block; }
	.feature-grid { grid-template-columns: minmax(0, 1fr); }
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
	:root { --topbar-h: 0px; }
	.topbar { display: none; }
}

@media (max-width: 600px) {
	.article-row { grid-template-columns: 120px minmax(0, 1fr); gap: 0.7rem; }
	.article-row .article-excerpt { display: none; }
	.article-row .article-media > .key-tag { display: none; }
	.article-row .article-title { font-size: 0.98rem; }
	.article-card-overlay { min-height: 280px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-next, .post-nav-prev { grid-column: 1; text-align: start; }
	.alignleft, .alignright { float: none; display: block; margin-inline: auto; }
	.widget_categories ul { grid-template-columns: 1fr; }
	.hero-panel::after { display: none; }
	.footer-about { flex-direction: column; }
}

/* =========================================================
   12. Motion & print
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header, .layout-side, .site-footer, .to-top, .share, .related, .post-nav, .comment-respond, .hero-panel { display: none !important; }
	.layout { display: block; padding: 0; }
	body { background: #fff; color: #000; }
	.entry { border: 0; padding: 0; }
	.entry-content a { color: #000; text-decoration: underline; }
}
