/*
Theme Name: فراموشی لی
Theme URI: https://leee.ir/
Author: Artudio
Author URI: https://artudio.ir/
Description: پوسته‌ی مینیمال و راست‌به‌چپ برای وبلاگ «فراموشی لی» — یک ستون خوانا، تاریخ شمسی، پیشنهاد کتاب و فیلم با تصویر، و قالب‌های بایگانی و معرفی نویسنده‌ها.
Version: 1.2.1
Requires at least: 6.0
Tested up to: 6.8
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: leee
Tags: blog, one-column, rtl-language-support, custom-logo, custom-menu, featured-images, threaded-comments
*/

@font-face {
	font-family: "Vazirmatn";
	src: url("assets/fonts/Vazirmatn-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--accent: #600000;
	--ink: #1C1C1C;
	--muted: #6B6B6B;
	--line: #E8E6E1;
	--field: #D9D6CF;
	--ground: #FCFCFA;
	--paper: #FFFFFF;
	--tint: #EFEDE8;
	--faint: #E1DED7;
}

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

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

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: Vazirmatn, Tahoma, sans-serif;
	font-size: 17px;
	line-height: 2;
	direction: rtl;
	text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

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

.skip-link {
	position: absolute;
	top: -100px;
	right: 16px;
	background: var(--ink);
	color: #fff;
	padding: 8px 16px;
	z-index: 100;
}
.skip-link:focus { top: 8px; color: #fff; }

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

/* ---------- Layout ---------- */

.wrap { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.wrap--wide { max-width: 1000px; }

/* ---------- Header ---------- */

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
	font-size: 13px;
	color: var(--muted);
	line-height: 1.6;
}

.icon-btn {
	width: 44px; height: 44px;
	display: flex; align-items: center; justify-content: center;
	background: none; border: none; padding: 0;
	color: var(--ink); cursor: pointer; border-radius: 22px;
}
.icon-btn:hover { color: var(--accent); }

.search-panel { padding: 16px 0; border-bottom: 1px solid var(--line); }

.masthead {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 28px 0;
	border-bottom: 1px solid var(--line);
}
.home .masthead { padding: 48px 0 40px; }

.site-logo a { display: block; max-width: 100%; }
.site-logo img { display: block; height: 38px; width: auto; max-width: 100%; }
.home .site-logo img { height: 48px; }
.site-title-text { font-weight: 800; font-size: 28px; line-height: 1.4; }

.primary-nav .menu {
	list-style: none;
	margin: 0; padding: 0;
	display: flex; align-items: center; flex-wrap: wrap;
	font-size: 17px; font-weight: 800; line-height: 1;
}
.primary-nav li { display: flex; align-items: center; }
.primary-nav li + li::before {
	content: "|";
	font-weight: 300;
	margin: 0 10px;
	color: var(--ink);
}
.primary-nav a {
	position: relative;
	display: inline-flex; align-items: center;
	min-height: 44px;
}
.primary-nav img { display: block; height: 26px; width: auto; }
.primary-nav a:hover img { opacity: .65; }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--accent); }
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after {
	content: "";
	position: absolute;
	right: 0; left: 0; bottom: 2px;
	height: 3px;
	background: var(--accent);
}

/* ---------- Search form ---------- */

.search-form label {
	display: flex; align-items: center; gap: 10px;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--field);
	border-radius: 24px;
	background: var(--paper);
	color: var(--muted);
}
.search-form input[type="search"] {
	flex: 1; min-width: 0;
	border: none; outline: none; background: transparent;
	font: inherit; font-size: 16px; color: var(--ink);
}

/* ---------- Home grid (recommendations aside) ---------- */

.home-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0 64px;
}
.recs { flex: 1 1 220px; min-width: 0; padding-top: 64px; }
.feed-col { flex: 999 1 560px; min-width: 0; max-width: 680px; }

.section-label {
	margin: 0 0 20px;
	font-size: 13px; font-weight: 500;
	color: var(--muted);
	letter-spacing: 0.5px;
}

.recs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 36px 24px;
}
.rec { display: flex; flex-direction: column; gap: 10px; }
.rec-link { display: flex; flex-direction: column; gap: 4px; }
.rec-link .rec-cover { margin-bottom: 10px; }
.rec-cover {
	aspect-ratio: 2 / 3;
	width: 150px;
	max-width: 100%;
	background: var(--tint);
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0,0,0,.06);
	display: flex; align-items: center; justify-content: center;
	color: var(--muted);
}
.rec-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-text { display: flex; flex-direction: column; gap: 2px; }
.rec-type { align-self: flex-start; font-size: 15px; font-weight: 700; color: var(--accent); line-height: 2; }
.rec-type:hover { text-decoration: underline; }
.rec-title { font-size: 15px; font-weight: 400; line-height: 1.8; }
.rec-meta { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ---------- Entries (lists) ---------- */

.entry { padding: 56px 0; border-bottom: 1px solid var(--line); }
.entry-date { font-size: 13px; color: var(--muted); }
.entry-title { margin: 6px 0 14px; font-weight: 800; font-size: 28px; line-height: 1.6; }
.entry-body > :first-child { margin-top: 0; }
.entry-body > :last-child { margin-bottom: 0; }
.entry-body p { margin: 0 0 16px; }
.entry-body p,
.prose p,
.prose li { text-align: justify; text-justify: inter-word; }
.more-link {
	display: inline-flex; align-items: center;
	min-height: 44px; margin-top: 8px;
	font-size: 15px; font-weight: 700;
	color: var(--accent);
}
.entry-foot {
	margin-top: 16px;
	display: flex; gap: 12px;
	font-size: 13px; color: var(--muted);
}
.entry-foot a { color: var(--muted); }
.entry-foot a:hover { color: var(--accent); }

.older { padding: 56px 0 24px; }
.older-row {
	display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
	padding: 10px 0; min-height: 44px;
	border-bottom: 1px dashed var(--line);
}
.older-row .t { font-size: 16px; }
.older-row .d { font-size: 13px; color: var(--muted); white-space: nowrap; }
.archive-link {
	display: inline-flex; align-items: center;
	min-height: 44px; margin-top: 16px;
	font-size: 15px; font-weight: 700; color: var(--accent);
}

.page-head { padding: 64px 0 8px; }
.page-title { margin: 0; font-weight: 800; font-size: 42px; line-height: 1.5; }
.lede { margin: 4px 0 32px; font-size: 15px; color: var(--muted); }
.lede p { margin: 0; }

.pagination { padding: 40px 0 8px; }
.pagination .nav-links { justify-content: center; }
.pagination .prev.page-numbers,
.pagination .next.page-numbers {
	border: 1px solid var(--field);
	padding: 0 20px;
	font-weight: 700;
}
.pagination .prev.page-numbers:hover,
.pagination .next.page-numbers:hover { border-color: var(--accent); }
.pagination .dots { min-width: 24px; }
.pagination .page-numbers.is-disabled { opacity: .35; pointer-events: none; }

/* تصویر شاخص کوچک، شناور سمت چپ متن */
.thumb-float,
.prose .thumb-float {
	float: left;
	width: 180px;
	max-width: 40%;
	margin: 8px 28px 16px 0;
}
.thumb-float img { display: block; width: 100%; height: auto; border-radius: 4px; }
.single .thumb-float { width: 220px; }
.entry-body::after, .prose::after { content: ""; display: table; clear: both; }
.entry-body img { max-width: 100%; height: auto; border-radius: 4px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 12px;
	border-radius: 22px; font-size: 15px;
}
.pagination .page-numbers.current { background: var(--accent); color: #fff; }

/* ---------- Single ---------- */

.single-article { padding: 64px 0 48px; font-size: 18px; line-height: 2.1; }
.single-title { margin: 0 0 8px; font-weight: 800; font-size: 28px; line-height: 1.6; }
.reading-time { font-size: 14px; color: var(--muted); margin-bottom: 40px; }
.single-cover { margin: 0 0 40px; }
.single-cover img { display: block; border-radius: 4px; }

.prose p { margin: 0 0 24px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.prose h2, .prose h3, .prose h4 { font-weight: 800; line-height: 1.6; margin: 40px 0 12px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 20px; }
.prose blockquote {
	margin: 0 0 24px;
	padding: 4px 20px 4px 0;
	border-right: 3px solid var(--accent);
	font-size: 20px; font-weight: 500; line-height: 2;
}
.prose blockquote p { margin: 0; }
.prose ul, .prose ol { padding-right: 24px; padding-left: 0; margin: 0 0 24px; }
.prose figure { margin: 0 0 24px; }
.prose figcaption, .wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }
.prose img { border-radius: 4px; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.prose code { font-size: .9em; background: var(--tint); padding: 2px 6px; border-radius: 4px; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.end-mark {
	margin: 48px 0 0;
	text-align: center;
	color: var(--accent);
	font-size: 18px;
	letter-spacing: 12px;
}

/* نوار اطلاعات زیر نوشته: پهن‌تر از ستون متن، در یک خط */
.post-meta {
	display: flex; flex-wrap: nowrap; align-items: center; justify-content: center;
	gap: 6px 14px;
	width: max-content;
	max-width: min(1040px, calc(100vw - 48px));
	margin-right: 50%;
	transform: translateX(50%);
	padding: 24px 0;
	border-top: 1px solid var(--line);
	font-size: 14px; color: var(--muted); line-height: 1.9;
	white-space: nowrap;
	overflow-x: auto;
}
@media (max-width: 760px) {
	.post-meta {
		width: auto; margin-right: 0; transform: none;
		flex-wrap: wrap; justify-content: flex-start;
		white-space: normal; overflow: visible;
	}
}
.post-meta a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--field);
	text-underline-offset: 5px;
}
.post-meta a:hover { color: var(--accent); }
.post-meta .sep { color: var(--field); }

.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	padding: 32px 0;
	border-top: 1px dashed var(--line);
	border-bottom: 1px solid var(--line);
}
.post-nav a { display: flex; flex-direction: column; gap: 4px; min-height: 44px; }
.post-nav .next { text-align: left; }
.post-nav .lbl { font-size: 13px; color: var(--muted); }
.post-nav .ttl { font-size: 19px; font-weight: 800; line-height: 1.6; }

/* ---------- Comments ---------- */

.comments { padding: 48px 0 24px; }
.comments-title { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.comments-note { margin: 0 0 24px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list .children { list-style: none; padding-right: 24px; margin: 0; border-right: 1px solid var(--line); }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.comment-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.comment-meta .fn { font-weight: 700; font-style: normal; color: var(--ink); font-size: 15px; }
.comment-meta .says { display: none; }
.comment-meta img.avatar { display: none; }
.comment-content p { margin: 8px 0; }
.reply a { font-size: 13px; color: var(--accent); }

.comment-respond .comment-reply-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: 14px; margin-bottom: 6px; }
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	width: 100%;
	font: inherit; font-size: 16px;
	padding: 10px 14px;
	border: 1px solid var(--field);
	border-radius: 6px;
	background: var(--paper);
	color: var(--ink);
}
.comment-form input[type="text"],
.comment-form input[type="email"] { height: 44px; }
.comment-form textarea { line-height: 1.9; resize: vertical; min-height: 140px; }
.comment-form .comment-notes,
.comment-form .logged-in-as { font-size: 13px; color: var(--muted); }
.comment-form .form-submit input,
.btn {
	height: 44px; padding: 0 28px;
	font: inherit; font-size: 15px; font-weight: 700;
	color: #fff; background: var(--accent);
	border: none; border-radius: 6px; cursor: pointer;
}
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.comment-form-cookies-consent label { margin: 0; }

/* ---------- Archive list template ---------- */

.year-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.year-filter button {
	height: 40px; min-width: 64px; padding: 0 18px;
	border-radius: 20px;
	font: inherit; font-size: 14px; font-weight: 700;
	cursor: pointer;
	border: 1px solid var(--field);
	background: transparent;
	color: var(--ink);
}
.year-filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.year-group { padding-top: 40px; }
.year-group[hidden] { display: none; }
.year-num { margin: 0 0 8px; font-weight: 800; font-size: 56px; line-height: 1.3; color: var(--faint); }
.month-row {
	display: flex; flex-wrap: wrap; gap: 8px 24px;
	padding: 20px 0;
	border-top: 1px solid var(--line);
}
.month-name { margin: 0; flex: 0 0 96px; font-size: 14px; font-weight: 700; color: var(--accent); line-height: 2.6; }
.month-posts { flex: 999 1 300px; min-width: 0; display: flex; flex-direction: column; }
.month-posts a { display: flex; align-items: baseline; gap: 16px; min-height: 44px; padding: 4px 0; }
.month-posts .day { flex: 0 0 28px; font-size: 13px; color: var(--muted); }
.month-posts .t { font-size: 17px; font-weight: 500; }

/* ---------- Authors template ---------- */

.authors-intro { font-size: 19px; line-height: 2.1; }
.authors-intro p { margin: 12px 0 0; }
.authors {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 48px 40px;
	margin-top: 64px;
	padding-top: 48px;
	border-top: 1px solid var(--line);
}
.author-card { display: flex; flex-direction: column; gap: 16px; }
.author-photo {
	aspect-ratio: 4 / 5; width: 100%;
	background: var(--tint);
	border-radius: 4px; overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	color: var(--muted);
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-name { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.6; }
.author-role { font-size: 14px; font-weight: 700; color: var(--accent); }
.author-bio { margin: 0; font-size: 16px; line-height: 2; }
.contact {
	margin-top: 72px;
	padding: 32px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
}
.contact h2 { margin: 0; font-size: 18px; font-weight: 800; }
.contact a { color: var(--accent); text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Footer ---------- */

.site-footer {
	margin-top: 48px;
	padding: 32px 0 56px;
	border-top: 1px solid var(--line);
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
	font-size: 13px; color: var(--muted); line-height: 1.8;
}
.site-footer a { color: var(--ink); font-weight: 700; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
	body { font-size: 16px; }
	.home .masthead { padding: 32px 0 28px; }
	.home .site-logo img { height: 40px; }
	.site-logo img { height: 32px; }
	.primary-nav img { height: 22px; }
	.entry { padding: 40px 0; }
	.entry-title, .single-title { font-size: 24px; }
	.page-title { font-size: 34px; }
	.single-article { font-size: 17px; }
	.recs { padding-top: 40px; }
	.thumb-float, .single .thumb-float { width: 120px; margin-right: 18px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .next { text-align: right; }
	.year-num { font-size: 44px; }
}
