/*
Theme Name: روزنوشته‌های سارا درهمی
Theme URI: https://saraderhami.com
Author: Sara Derhami
Author URI: https://saraderhami.com
Description: A minimal child theme of Twenty Twenty-Three for saraderhami.com — Ahang everywhere, a quiet writer-first homepage with a topic index, and the dark Night Writings section. Design tokens follow the Twenty Twenty-Four "Writer" pattern (8px spacing rhythm, narrow content / wide card grid, monochromatic palette), tailored to ink + mina only.
Template: twentytwentythree
Version: 3.2.10
License: GNU General Public License v2 or later
Text Domain: roozneveshteha
*/

/* Ahang — self-hosted (files already owned by the site, no CDN).
   DemiBold 600 for post body text, Regular 400 for body text, Medium 500
   for subheads, Bold 700 for headings and topics, Light 300 for comments. */
@font-face {
	font-family: "Ahang";
	src: url("assets/fonts/Ahang-Light.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Ahang";
	src: url("assets/fonts/Ahang-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Ahang";
	src: url("assets/fonts/Ahang-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Ahang";
	src: url("assets/fonts/Ahang-DemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Ahang";
	src: url("assets/fonts/Ahang-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Ahang";
	src: url("assets/fonts/Ahang-ExtraBold.woff2") format("woff2");
	font-weight: 800;
	font-style: normal;
	font-display: block;
}

/* ---------- Base: one font, one ink, tight rhythm ---------- */

/* Ahang everywhere, including elements that would otherwise fall
   back to a browser or plugin default. */
html,
code,
pre,
kbd,
samp {
	font-family: "Ahang", Tahoma, sans-serif;
}

body,
button,
input,
select,
textarea {
	font-family: "Ahang", Tahoma, sans-serif;
}

body {
	background: var(--wp--preset--color--background);
	/* Dot texture: tiny, varied, very feathered warm dots — a faint
	   tonal texture (cream / beige / brown), never a visible pattern.
	   No ink black, no mina turquoise. */
	background-image:
		radial-gradient(circle, rgba(180, 150, 110, 0.10) 0 0.5px, transparent 3px),
		radial-gradient(circle, rgba(140, 110, 70, 0.08) 0 0.8px, transparent 3px),
		radial-gradient(circle, rgba(210, 185, 140, 0.12) 0 1.1px, transparent 2.5px);
	background-size: 260px 260px, 340px 340px, 210px 210px;
	background-position: 0 0, 120px 90px, 60px 170px;
	color: var(--wp--preset--color--foreground);
}

h1, h2, h3, h4, h5, h6 {
	font-family: "Ahang", Tahoma, sans-serif;
	font-weight: 700;
	line-height: 1.35;
}

/* Titles are always Ahang — one airtight rule. */
h1, h2, h3, h4, h5, h6,
.hero-title,
.wp-block-site-title,
.post-card h3,
.section-head h2 {
	font-family: "Ahang", Tahoma, sans-serif;
}

/* Links: ink by default, no underline; content links underline on hover (turquoise). */
a {
	text-decoration: none;
	color: var(--wp--preset--color--foreground);
}
a:hover {
	color: var(--wp--preset--color--mina-deep);
}
/* Post body text: DemiBold (Ahang 600) — headings stay Bold 700,
   comments stay thin (Light 300). */
.entry-content,
.wp-block-post-content {
	font-weight: 600;
}
.entry-content a,
.wp-block-post-content a,
.comment-content a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--mina);
	text-underline-offset: 0.25em;
}
.entry-content a:hover,
.wp-block-post-content a:hover,
.comment-content a:hover {
	text-decoration-color: var(--wp--preset--color--mina-deep);
}

/* "درباره من" — NEVER underlined, in any state. */
.about-link,
.about-link:link,
.about-link:visited,
.about-link:hover,
.about-link:focus,
.about-link:active {
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
	background-image: none !important;
}

/* ---------- Header (inner pages only; the front page has its own hero) ---------- */

.site-header {
	padding-top: 28px;
	padding-bottom: 16px;
	padding-left: 24px;
	padding-right: 24px;
}
.site-header .wp-block-site-title {
	font-family: "Ahang", Tahoma, sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
}
.site-header .wp-block-site-title a:hover {
	color: var(--wp--preset--color--mina-deep);
}

/* ---------- Hero ---------- */

.hero-title {
	font-family: "Ahang", Tahoma, sans-serif;
	margin-top: 0;
	margin-bottom: 0;
}
.mina-rule {
	width: 64px;
	height: 3px;
	margin: 20px auto 28px;
	border: 0;
	background: var(--wp--preset--color--mina);
}

/* Hero channels: avatar + handle + YouTube mark */
.channels {
	display: flex;
	justify-content: center;
	gap: 32px;
	flex-wrap: wrap;
	margin-top: 0;
}
.channel {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}
.channel:hover .handle {
	color: var(--wp--preset--color--mina-deep);
}
.channels img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.ch-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.channels .handle {
	font-family: "Ahang", Tahoma, sans-serif;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--wp--preset--color--foreground);
	direction: ltr;
}
.ch-sub {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 2px;
	color: var(--wp--preset--color--foreground);
}
.ch-sub svg {
	width: 16px;
	height: 16px;
	display: block;
}
.channels .lang {
	font-family: "Ahang", Tahoma, sans-serif;
	font-size: 12px;
	color: rgba(28, 26, 23, 0.6);
}

/* Topics row: About sits in the same row as the topic branches. */
.topics-row {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin-top: 32px;
}
.topic {
	position: relative;
}
.topic-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	padding: 6px 2px;
	display: inline-block;
	white-space: nowrap;
}
.topic-name:hover {
	color: var(--wp--preset--color--mina-deep);
}
.topic .subs {
	display: none;
	position: absolute;
	top: 100%;
	right: 50%;
	transform: translateX(50%);
	background: #fff;
	border: 1px solid rgba(28, 26, 23, 0.1);
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(28, 26, 23, 0.12);
	padding: 8px 14px;
	white-space: nowrap;
	z-index: 5;
	font-size: 13.5px;
}
.topic:hover .subs,
.topic:focus-within .subs {
	display: block;
}
.topic .subs a {
	color: rgba(28, 26, 23, 0.65);
	text-decoration: none;
}
.topic .subs a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.topic .subs .dot {
	color: rgba(28, 26, 23, 0.3);
	margin: 0 6px;
}

/* ---------- Popular-posts section ---------- */

.section-head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}
.section-head h2 {
	font-size: 20px;
	margin: 0;
	white-space: nowrap;
}
.section-head .section-line {
	flex: 1;
	height: 1px;
	background: rgba(28, 26, 23, 0.14);
}
.section-head .section-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--mina);
	flex: none;
}

.popular-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px 24px;
}
.post-card {
	display: block;
	text-decoration: none;
}
.post-card .thumb {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 14px;
	aspect-ratio: 16 / 10;
	background: rgba(28, 26, 23, 0.06);
}
.post-card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}
.post-card h3 {
	font-size: 15.5px;
	font-weight: 700;
	color: var(--wp--preset--color--foreground);
	margin-top: 14px;
	margin-bottom: 0;
	line-height: 1.75;
	transition: color 0.25s ease;
}
.post-card:hover img {
	transform: scale(1.04);
}
.post-card:hover .thumb {
	box-shadow: 0 10px 26px rgba(28, 26, 23, 0.14);
}
/* The card is a <div>; the thumbnail + title are one link (nested <a>
   tags are invalid HTML, so nothing else goes inside it). Tags are NOT
   shown on grid cards — they live on the single post page instead. */
.post-card-link {
	display: block;
	text-decoration: none;
}
.post-card-link:hover,
a.post-card:hover {
	text-decoration: none;
}
.post-tags {
	display: block;
	margin-top: 6px;
	font-size: 11.5px;
	line-height: 1.7;
	color: rgba(28, 26, 23, 0.5);
	font-family: "Ahang", Tahoma, sans-serif;
}
.post-tags a {
	color: rgba(28, 26, 23, 0.5);
	text-decoration: none;
}
.post-tags a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.post-tags .tag-sep {
	color: rgba(28, 26, 23, 0.3);
	margin: 0 5px;
}
body.night-writings .post-tags,
body.night-writings .post-tags a {
	color: rgba(236, 231, 219, 0.55);
}
body.night-writings .post-tags a:hover {
	color: #8fd8c9;
}
body.night-writings .post-tags .tag-sep {
	color: rgba(236, 231, 219, 0.35);
}
/* Hover subcategories on Night Writings pages: the dropdown panel is
   dark here (the day dropdown is white) so it reads on the navy bg. */
body.night-writings .topic .subs {
	background: #1a2438;
	border-color: rgba(236, 231, 219, 0.16);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
body.night-writings .topic .subs a {
	color: rgba(236, 231, 219, 0.75);
}
body.night-writings .topic .subs a:hover {
	color: #8fd8c9;
}
body.night-writings .topic .subs .dot {
	color: rgba(236, 231, 219, 0.35);
}
/* Night landing page (id 5082) row + grid: centred on the page at the
   same 1120px width as the homepage grid. The row+grid are rendered by
   a render_block filter on core/post-content, so they sit directly
   under <main> (full width, no .entry-content wrapper at all) — a
   plain width + margin-inline auto centres them on the page. The old
   margin-left:50% + translateX(-50%) breakout is gone: it centred on
   the .entry-content box, which is itself offset ~192px left of the
   page centre, so the grid landed 192px left even at the right width
   (measured centre x=767.5 vs page centre 959.5, on a 1919px
   viewport). The «ادامه» button lives inside the wrap, so it is
   centred on the page too. */
body.page-id-5082 .night-topics-row,
body.page-id-5082 .night-grid-wrap {
	width: min(1120px, calc(100vw - 32px));
	max-width: min(1120px, calc(100vw - 32px));
	margin-inline: auto;
}
body.page-id-5082 .night-grid-wrap {
	margin-top: 48px;
}
/* Page 5082 heading: visually hidden so the word "شب‌نوشته‌ها" appears
   only ONCE at the top of the page — in the header site title. The H1
   stays in the HTML for SEO and document structure (standard
   screen-reader-only pattern), but it takes no space and is not
   visible. Only page 5082; no other page's heading is affected. */
body.page-id-5082 .wp-block-post-title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* Night landing page (5082) title: the header site title «شب‌نوشته‌ها»
   is the page's visible title, sitting right above the Topics row —
   Sara wants it BIGGER and CENTRED (a clear page title, not a small
   header label). The header is a flex group, so justify-content centres
   the title item; text-align centres the title text inside it. Only
   page 5082 — every other page keeps the 1.5rem header title. The
   landing-page H1 stays sr-only (above), so the title still appears
   only ONCE. Font stays Ahang, weight stays Bold 700. The title colour
   is set by the night-title rule just below (very light warm off-white). */
body.page-id-5082 .site-header {
	justify-content: center;
	text-align: center;
	padding-bottom: 24px;
}
body.page-id-5082 .site-header .wp-block-site-title {
	font-size: 3rem;
	text-align: center;
}
/* Night header title — very light warm off-white, plain text (not a link).
   Sara (Nov 30): the night title «شب‌نوشته‌ها» must not be clickable
   (the anchor is stripped in functions.php). v3.2.5 used #ddd2b8 (muted
   beige-cream) but Sara found it too colourful — v3.2.6 uses #f2eee2,
   a very light warm off-white: clearly whiter than #ddd2b8, only a faint
   warm tint, NOT pure white. Still highly readable on the dark #0a1120
   night background. This covers ALL night contexts (landing page 5082,
   night single posts, night category archives): on night singles/archives
   the title is the 1.5rem base size, on 5082 the 3rem rule above. No
   hover rule — there is no link to hover. The DAY title keeps its
   link home and its ink colour. */
body.page-id-5082 .site-header .wp-block-site-title,
body.category-mood .site-header .wp-block-site-title,
body.category-sarawrites .site-header .wp-block-site-title,
body.single-post.category-mood .site-header .wp-block-site-title,
body.single-post.category-sarawrites .site-header .wp-block-site-title,
body.night-writings .site-header .wp-block-site-title {
	color: #f2eee2;
}
/* ---------- Night category archives (v3.2.8) ----------
   Category archive pages in the Night Writings section (cat 10, 37
   and descendants, e.g. سفرنامه) must look exactly like the Night
   Writings landing page (5082). The parent theme's archive template
   renders the archive title and the post titles HUGE and the site
   title small at the top-right — Sara wants the landing-page
   presentation instead. These rules target ONLY night archives
   (body.archive.night-writings): night single posts keep their
   1.5rem header title, and day archives are untouched. The grid
   itself is rendered by archive-night.php with the same .post-card
   markup as the landing page, so the card titles are already the
   landing-page size (15.5px) — no title-size override is needed. */
/* Site title: centred, 3rem, exactly like the landing page. The
   header is a flex group, so justify-content centres the title item.
   Colour #f2eee2 comes from the night-title rule above; plain text
   (no link) is handled by the render_block filter in functions.php. */
body.archive.night-writings .site-header {
	justify-content: center;
	text-align: center;
	padding-bottom: 24px;
}
body.archive.night-writings .site-header .wp-block-site-title {
	font-size: 3rem;
	text-align: center;
}
/* Archive/section title (e.g. «سفرنامه»): a small label at the
   top-right of the line, NOT a huge heading. It sits above the grid,
   right-aligned (RTL: the line starts at the right). */
body.archive.night-writings .night-archive-label {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.6;
	text-align: right;
	color: #f4f0e6;
	margin: 0 0 24px;
}
/* Archive grid wrapper: same width and centring as the landing page's
   .night-grid-wrap (1120px, centred on the page). */
body.archive.night-writings .night-archive-wrap {
	width: min(1120px, calc(100vw - 32px));
	max-width: min(1120px, calc(100vw - 32px));
	margin-inline: auto;
}
.post-card:hover h3 {
	color: var(--wp--preset--color--mina-deep);
}

/* ---------- "ادامه" load-more button ---------- */

.more-posts {
	text-align: center;
	margin-top: 36px;
}
.more-posts button {
	background: none;
	border: none;
	border-bottom: 2px solid var(--wp--preset--color--mina);
	color: var(--wp--preset--color--foreground);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.9;
	padding: 0 2px 2px;
	cursor: pointer;
}
.more-posts button:hover {
	color: var(--wp--preset--color--mina-deep);
	border-bottom-color: var(--wp--preset--color--mina-deep);
}
.more-posts button:disabled {
	opacity: 0.55;
	cursor: default;
}

/* ---------- Posts, archives, single pages ---------- */

.wp-block-post-title a {
	text-decoration: none;
}
.wp-block-post-title a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.wp-block-post-featured-image img {
	border-radius: 14px;
}
.wp-block-post-featured-image {
	margin-bottom: 24px;
}
.wp-block-post-template li + li {
	margin-top: 40px;
}
.wp-block-post-excerpt__excerpt {
	color: rgba(28, 26, 23, 0.72);
}
.wp-block-post-date,
.wp-block-post-author,
.wp-block-post-terms {
	color: rgba(28, 26, 23, 0.55);
	font-size: 13px;
}
.wp-block-post-date a,
.wp-block-post-author a,
.wp-block-post-terms a {
	color: rgba(28, 26, 23, 0.65);
}
.wp-block-post-date a:hover,
.wp-block-post-author a:hover,
.wp-block-post-terms a:hover {
	color: var(--wp--preset--color--mina-deep);
}

/* ---------- Footer: professional multi-column footer ---------- */

.site-footer {
	background: #f3efe7;
	border-top: 3px solid var(--wp--preset--color--mina);
	margin-top: 64px;
	padding-top: 44px;
}
.site-footer-inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 32px;
}
.footer-brand-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.9;
	margin: 0 0 9px;
}
.footer-brand-title a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.footer-email {
	font-family: "Ahang", Tahoma, sans-serif;
	font-size: 14px;
	direction: ltr;
	text-align: right;
	margin: 0;
}
.footer-email a {
	color: rgba(28, 26, 23, 0.72);
	text-decoration: none;
}
.footer-email a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.footer-tagline {
	font-size: 14px;
	line-height: 1.9;
	color: rgba(28, 26, 23, 0.65);
	margin: 0;
}
.footer-col-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.9;
	margin: 0 0 9px;
}
.footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.footer-col ul li {
	line-height: 1.9;
	margin: 0;
}
.footer-col ul li + li {
	margin-top: 9px;
}
.footer-col ul a {
	font-size: 14px;
	color: rgba(28, 26, 23, 0.72);
	text-decoration: none;
}
.footer-col ul a:hover {
	color: var(--wp--preset--color--mina-deep);
}
/* Footer tags column — the tags replace the Topics column (Sara, Nov 30:
   the topics are already in the header Topics row, so the footer only
   repeated them). Tags render as small inline links that wrap inside
   the column, most-used first (the 12 most-used tags, hardcoded in
   parts/footer.html from the live tag list, Nov 30 2026). */
.footer-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 12px;
}
.footer-tags a {
	font-size: 13px;
	color: rgba(28, 26, 23, 0.72);
	text-decoration: none;
}
.footer-tags a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.social-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(28, 26, 23, 0.28);
	border-radius: 50%;
	color: var(--wp--preset--color--foreground);
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.social-link svg {
	width: 18px;
	height: 18px;
	display: block;
}
.social-link:hover {
	background: var(--wp--preset--color--mina);
	border-color: var(--wp--preset--color--mina);
	color: #fff;
}
.footer-bottom {
	border-top: 1px solid rgba(28, 26, 23, 0.1);
	margin-top: 40px;
	padding: 18px 24px;
	text-align: center;
	font-size: 12.5px;
	color: rgba(28, 26, 23, 0.55);
}
.footer-bottom p {
	margin: 0;
}

/* ---------- شب‌نوشته‌ها — dark section ---------- */
body.page-id-5082,
body.category-mood,
body.category-sarawrites,
body.single-post.category-mood,
body.single-post.category-sarawrites,
body.night-writings {
	background-color: #0a1120;
	/* v3.2.8: Sara's real night-sky photograph is the background now
	   (she sent the photo Nov 30 — a real starfield). The v3.2.7 CSS
	   sparkle stars are gone: the photograph provides the real stars,
	   so no CSS stars are layered on top. background-color #0a1120 is
	   the fallback under the photo; the photo covers the viewport,
	   anchored at the top, and stays fixed while the page scrolls.
	   v3.2.10: the photo file itself was darkened — its colours shifted
	   one step toward navy (#0a1120) and a 40% black overlay baked in,
	   because Sara found it too starry. The original photo is kept as
	   night-sky-original-v329.jpg in the workspace. */
	background-image: url("assets/images/night-sky.jpg");
	background-size: cover;
	background-position: center top;
	background-attachment: fixed;
	color: #ece7db;
}
/* Night pages: a post without a photo still shows its card — the empty
   .thumb frame needs a faint warm tint so it reads as a deliberate
   placeholder on the dark background (the day tint rgba(28,26,23,0.06)
   is invisible on navy). The <img>, when present, covers it entirely. */
body.page-id-5082 .post-card .thumb,
body.category-mood .post-card .thumb,
body.category-sarawrites .post-card .thumb,
body.single-post.category-mood .post-card .thumb,
body.single-post.category-sarawrites .post-card .thumb,
body.night-writings .post-card .thumb {
	background: rgba(242, 238, 226, 0.08);
}
body.page-id-5082 h1, body.page-id-5082 h2, body.page-id-5082 h3,
body.category-mood h1, body.category-mood h2, body.category-mood h3,
body.category-sarawrites h1, body.category-sarawrites h2, body.category-sarawrites h3,
body.single-post.category-mood h1, body.single-post.category-mood h2, body.single-post.category-mood h3,
body.single-post.category-sarawrites h1, body.single-post.category-sarawrites h2, body.single-post.category-sarawrites h3,
body.night-writings h1, body.night-writings h2, body.night-writings h3 {
	color: #f4f0e6;
}
/* Night pages: every element in Ahang (the same font as the body text),
   and body text one step bolder (400) — Light 300 reads too thin on dark. */
body.page-id-5082 h1, body.page-id-5082 h2, body.page-id-5082 h3,
body.page-id-5082 h4, body.page-id-5082 h5, body.page-id-5082 h6,
body.page-id-5082 p, body.page-id-5082 a, body.page-id-5082 button,
body.page-id-5082 .wp-block-button__link, body.page-id-5082 .wp-block-site-title,
body.category-mood h1, body.category-mood h2, body.category-mood h3,
body.category-mood h4, body.category-mood h5, body.category-mood h6,
body.category-mood p, body.category-mood a, body.category-mood button,
body.category-mood .wp-block-button__link, body.category-mood .wp-block-site-title,
body.category-sarawrites h1, body.category-sarawrites h2, body.category-sarawrites h3,
body.category-sarawrites h4, body.category-sarawrites h5, body.category-sarawrites h6,
body.category-sarawrites p, body.category-sarawrites a, body.category-sarawrites button,
body.category-sarawrites .wp-block-button__link, body.category-sarawrites .wp-block-site-title,
body.single-post.category-mood h1, body.single-post.category-mood h2, body.single-post.category-mood h3,
body.single-post.category-mood h4, body.single-post.category-mood h5, body.single-post.category-mood h6,
body.single-post.category-mood p, body.single-post.category-mood a, body.single-post.category-mood button,
body.single-post.category-mood .wp-block-button__link, body.single-post.category-mood .wp-block-site-title,
body.single-post.category-sarawrites h1, body.single-post.category-sarawrites h2, body.single-post.category-sarawrites h3,
body.single-post.category-sarawrites h4, body.single-post.category-sarawrites h5, body.single-post.category-sarawrites h6,
body.single-post.category-sarawrites p, body.single-post.category-sarawrites a, body.single-post.category-sarawrites button,
body.single-post.category-sarawrites .wp-block-button__link, body.single-post.category-sarawrites .wp-block-site-title,
body.night-writings h1, body.night-writings h2, body.night-writings h3,
body.night-writings h4, body.night-writings h5, body.night-writings h6,
body.night-writings p, body.night-writings a, body.night-writings button,
body.night-writings .wp-block-button__link, body.night-writings .wp-block-site-title {
	font-family: "Ahang", Tahoma, sans-serif;
}
body.page-id-5082 p, body.page-id-5082 .entry-content, body.page-id-5082 .wp-block-post-content,
body.category-mood p, body.category-mood .entry-content, body.category-mood .wp-block-post-content,
body.category-sarawrites p, body.category-sarawrites .entry-content, body.category-sarawrites .wp-block-post-content,
body.single-post.category-mood p, body.single-post.category-mood .entry-content, body.single-post.category-mood .wp-block-post-content,
body.single-post.category-sarawrites p, body.single-post.category-sarawrites .entry-content, body.single-post.category-sarawrites .wp-block-post-content,
body.night-writings p, body.night-writings .entry-content, body.night-writings .wp-block-post-content {
	font-weight: 600;
}
/* Night post body text — READABILITY FIX. Sara's screenshot of a night
   single post showed the body text dark and nearly invisible on the dark
   #0a1120 background, even though the night body rule above sets
   color #ece7db: something (Global Styles / a preset-colour utility)
   overrides the inherited body colour on the post-content paragraphs.
   This sets the light warm off-white EXPLICITLY on the post body text
   itself (the .single-content wrapper single.php uses, plus the generic
   .entry-content / .wp-block-post-content), in all six night contexts,
   with !important so it beats preset-colour utilities and inline
   styles. Links inside the body keep their own turquoise colour (the
   night `a` rule targets `a` itself, not these containers). The night
   date/category meta is already turquoise and readable — left alone.
   Day body text colour is untouched. */
body.page-id-5082 .single-content, body.page-id-5082 .single-content p,
body.page-id-5082 .entry-content, body.page-id-5082 .entry-content p,
body.page-id-5082 .wp-block-post-content, body.page-id-5082 .wp-block-post-content p,
body.category-mood .single-content, body.category-mood .single-content p,
body.category-mood .entry-content, body.category-mood .entry-content p,
body.category-mood .wp-block-post-content, body.category-mood .wp-block-post-content p,
body.category-sarawrites .single-content, body.category-sarawrites .single-content p,
body.category-sarawrites .entry-content, body.category-sarawrites .entry-content p,
body.category-sarawrites .wp-block-post-content, body.category-sarawrites .wp-block-post-content p,
body.single-post.category-mood .single-content, body.single-post.category-mood .single-content p,
body.single-post.category-mood .entry-content, body.single-post.category-mood .entry-content p,
body.single-post.category-mood .wp-block-post-content, body.single-post.category-mood .wp-block-post-content p,
body.single-post.category-sarawrites .single-content, body.single-post.category-sarawrites .single-content p,
body.single-post.category-sarawrites .entry-content, body.single-post.category-sarawrites .entry-content p,
body.single-post.category-sarawrites .wp-block-post-content, body.single-post.category-sarawrites .wp-block-post-content p,
body.night-writings .single-content, body.night-writings .single-content p,
body.night-writings .entry-content, body.night-writings .entry-content p,
body.night-writings .wp-block-post-content, body.night-writings .wp-block-post-content p {
	color: #ece7db !important;
}
/* Night Writings: NO underlines on ANY link, in any state. The
   .entry-content a underline rule (and the parent theme's link styles)
   used to put a line under the category buttons, the card titles and
   the site title on night pages — Sara asked why everything was
   underlined. This overrides it everywhere in the night section:
   site title, category row, dropdowns, grid cards, footer, and post
   body links on night single posts. (The «ادامه» button is a <button>,
   not a link, so its mina underline is untouched.) */
body.page-id-5082 a, body.page-id-5082 a:hover, body.page-id-5082 a:focus,
body.category-mood a, body.category-mood a:hover, body.category-mood a:focus,
body.category-sarawrites a, body.category-sarawrites a:hover, body.category-sarawrites a:focus,
body.single-post.category-mood a, body.single-post.category-mood a:hover, body.single-post.category-mood a:focus,
body.single-post.category-sarawrites a, body.single-post.category-sarawrites a:hover, body.single-post.category-sarawrites a:focus,
body.night-writings a, body.night-writings a:hover, body.night-writings a:focus {
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}
/* On Night Writings pages the footer شب‌نوشته‌ها link is hidden (you are already there). */
body.page-id-5082 .footer-night-link,
body.category-mood .footer-night-link,
body.category-sarawrites .footer-night-link,
body.single-post.category-mood .footer-night-link,
body.single-post.category-sarawrites .footer-night-link,
body.night-writings .footer-night-link {
	display: none;
}
/* The footer روزنوشته‌ها link is the mirror image: hidden on day pages
   (you are already there), shown only on Night Writings pages. Hidden by
   default, shown only in night contexts — using the theme's six-selector
   night-context list (the same list as the footer-night-link rule above),
   because page 5082 does NOT carry the `night-writings` body class
   (functions.php adds it only for category archives and single posts in
   cats 10/37), so a bare body:not(.night-writings) rule would wrongly hide
   it on the night landing page itself. Net result: day pages show
   [درباره من, شب‌نوشته‌ها]; night pages show [درباره من, روزنوشته‌ها]. */
.footer-day-link {
	display: none;
}
body.page-id-5082 .footer-day-link,
body.category-mood .footer-day-link,
body.category-sarawrites .footer-day-link,
body.single-post.category-mood .footer-day-link,
body.single-post.category-sarawrites .footer-day-link,
body.night-writings .footer-day-link {
	display: list-item;
}
body.page-id-5082 a, body.category-mood a, body.category-sarawrites a,
body.single-post.category-mood a, body.single-post.category-sarawrites a,
body.night-writings a {
	color: #8fd8c9;
}
body.page-id-5082 a:hover, body.category-mood a:hover, body.category-sarawrites a:hover,
body.single-post.category-mood a:hover, body.single-post.category-sarawrites a:hover,
body.night-writings a:hover {
	color: #63c2b3;
}
body.page-id-5082 .wp-block-button__link, body.category-mood .wp-block-button__link,
body.category-sarawrites .wp-block-button__link, body.night-writings .wp-block-button__link {
	background: #202839;
	border-color: rgba(236, 231, 219, 0.16);
	color: #ece7db;
}
body.page-id-5082 .wp-block-navigation__submenu-container,
body.category-mood .wp-block-navigation__submenu-container,
body.category-sarawrites .wp-block-navigation__submenu-container,
body.night-writings .wp-block-navigation__submenu-container {
	background: #171e30;
}
body.page-id-5082 .site-footer,
body.category-mood .site-footer,
body.category-sarawrites .site-footer,
body.single-post.category-mood .site-footer,
body.single-post.category-sarawrites .site-footer,
body.night-writings .site-footer {
	background: #121623;
	border-top-color: #63c2b3;
	color: #ece7db;
}
body.page-id-5082 .footer-brand-title,
body.category-mood .footer-brand-title,
body.category-sarawrites .footer-brand-title,
body.single-post.category-mood .footer-brand-title,
body.single-post.category-sarawrites .footer-brand-title,
body.night-writings .footer-brand-title,
body.page-id-5082 .footer-col-title,
body.category-mood .footer-col-title,
body.category-sarawrites .footer-col-title,
body.single-post.category-mood .footer-col-title,
body.single-post.category-sarawrites .footer-col-title,
body.night-writings .footer-col-title {
	color: #f4f0e6;
}
body.page-id-5082 .footer-tagline,
body.category-mood .footer-tagline,
body.category-sarawrites .footer-tagline,
body.single-post.category-mood .footer-tagline,
body.single-post.category-sarawrites .footer-tagline,
body.night-writings .footer-tagline,
body.page-id-5082 .footer-col ul a,
body.category-mood .footer-col ul a,
body.category-sarawrites .footer-col ul a,
body.single-post.category-mood .footer-col ul a,
body.single-post.category-sarawrites .footer-col ul a,
body.night-writings .footer-col ul a,
body.page-id-5082 .footer-bottom,
body.category-mood .footer-bottom,
body.category-sarawrites .footer-bottom,
body.single-post.category-mood .footer-bottom,
body.single-post.category-sarawrites .footer-bottom,
body.night-writings .footer-bottom {
	color: rgba(236, 231, 219, 0.65);
}
body.page-id-5082 .footer-col ul a:hover,
body.category-mood .footer-col ul a:hover,
body.category-sarawrites .footer-col ul a:hover,
body.single-post.category-mood .footer-col ul a:hover,
body.single-post.category-sarawrites .footer-col ul a:hover,
body.night-writings .footer-col ul a:hover {
	color: #8fd8c9;
}
/* Night footer tags — same muted treatment as the other footer links. */
body.page-id-5082 .footer-tags a,
body.category-mood .footer-tags a,
body.category-sarawrites .footer-tags a,
body.single-post.category-mood .footer-tags a,
body.single-post.category-sarawrites .footer-tags a,
body.night-writings .footer-tags a {
	color: rgba(236, 231, 219, 0.65);
}
body.page-id-5082 .footer-tags a:hover,
body.category-mood .footer-tags a:hover,
body.category-sarawrites .footer-tags a:hover,
body.single-post.category-mood .footer-tags a:hover,
body.single-post.category-sarawrites .footer-tags a:hover,
body.night-writings .footer-tags a:hover {
	color: #8fd8c9;
}
body.page-id-5082 .footer-email a,
body.category-mood .footer-email a,
body.category-sarawrites .footer-email a,
body.single-post.category-mood .footer-email a,
body.single-post.category-sarawrites .footer-email a,
body.night-writings .footer-email a {
	color: rgba(236, 231, 219, 0.72);
}
body.page-id-5082 .footer-email a:hover,
body.category-mood .footer-email a:hover,
body.category-sarawrites .footer-email a:hover,
body.single-post.category-mood .footer-email a:hover,
body.single-post.category-sarawrites .footer-email a:hover,
body.night-writings .footer-email a:hover {
	color: #8fd8c9;
}
body.page-id-5082 .social-link,
body.category-mood .social-link,
body.category-sarawrites .social-link,
body.single-post.category-mood .social-link,
body.single-post.category-sarawrites .social-link,
body.night-writings .social-link {
	border-color: rgba(236, 231, 219, 0.35);
	color: #ece7db;
}
body.page-id-5082 .social-link:hover,
body.category-mood .social-link:hover,
body.category-sarawrites .social-link:hover,
body.single-post.category-mood .social-link:hover,
body.single-post.category-sarawrites .social-link:hover,
body.night-writings .social-link:hover {
	background: #63c2b3;
	border-color: #63c2b3;
	color: #1b2233;
}
body.page-id-5082 .footer-bottom,
body.category-mood .footer-bottom,
body.category-sarawrites .footer-bottom,
body.single-post.category-mood .footer-bottom,
body.single-post.category-sarawrites .footer-bottom,
body.night-writings .footer-bottom {
	border-top-color: rgba(236, 231, 219, 0.12);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.popular-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px 20px;
	}
	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 28px;
	}
}

@media (max-width: 600px) {
	.popular-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}
	.topics-row {
		gap: 4px 20px;
	}
	.channels {
		gap: 20px;
	}
	.footer-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.site-footer {
		padding-top: 36px;
	}
}

/* ---------- Single post: two-column layout + left sidebar ---------- */

.single-layout {
	display: flex;
	gap: 64px;
	max-width: 1120px;
	margin: 32px auto 0;
	padding: 0 24px;
}
.single-main {
	flex: 1;
	min-width: 0;
}
.single-sidebar {
	width: 300px;
	flex: none;
}

/* Single-post title: smaller and ExtraBold. Sara's screenshot showed the
   h1 far too large; this is about a quarter smaller than the old
   clamp(1.7rem, 3.4vw, 2.2rem) and one weight step bolder (ExtraBold 800).
   Applies to day and night single posts alike. The Night Writings
   landing title (3rem) and the grid card titles are untouched. */
.single-title {
	font-size: clamp(1.25rem, 2.5vw, 1.6rem);
	font-weight: 800;
	line-height: 1.5;
	margin: 0 0 16px;
}
.single-featured {
	margin: 0 0 20px;
}
.single-featured img {
	width: 100%;
	height: auto;
	border-radius: 14px;
	display: block;
}
.single-meta {
	font-size: 13px;
	color: rgba(28, 26, 23, 0.55);
	margin: 0 0 24px;
}
.single-meta a {
	color: rgba(28, 26, 23, 0.65);
}
.single-meta a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.single-content {
	line-height: 1.9;
}
.single-content img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
}
/* Tags row under the post content (single posts only — never on grid
   cards). Small and muted, reusing the .post-tags style. */
.single-tags {
	margin-top: 28px;
}
#comments {
	margin-top: 48px;
}

/* Comment text: thin (Ahang Light 300). */
.comment-content,
.wp-block-comment-content {
	font-weight: 300;
}

/* Related posts (replaces YARPP) */
.single-related {
	margin-top: 48px;
}
.related-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px 24px;
}
.related-grid .post-card h3 {
	font-size: 15px;
}

/* Sidebar */
.single-sidebar .sidebar-section + .sidebar-section {
	margin-top: 40px;
}
.sidebar-head {
	margin-bottom: 16px;
}
.sidebar-head h2 {
	font-size: 15px;
}
/* Latest-comments title in mina (turquoise). */
.sidebar-comments .sidebar-head h2 {
	color: var(--wp--preset--color--mina);
}
.sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sidebar-list li {
	padding: 12px 0;
	border-bottom: 1px solid rgba(28, 26, 23, 0.1);
}
.sidebar-list li:first-child {
	padding-top: 0;
}
.sidebar-list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
.sidebar-list a {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.8;
}
.sidebar-list a:hover {
	color: var(--wp--preset--color--mina-deep);
}
.sidebar-date {
	display: block;
	font-size: 12.5px;
	color: rgba(28, 26, 23, 0.55);
	margin-top: 2px;
}
.sidebar-comment-author {
	font-size: 13.5px;
	font-weight: 700;
}
.sidebar-comment-text {
	font-size: 12.5px;
	font-weight: 300;
	line-height: 1.7;
	color: rgba(28, 26, 23, 0.60);
	margin: 4px 0;
}
.sidebar-comment-on {
	font-size: 12.5px;
	color: rgba(28, 26, 23, 0.55);
}
.sidebar-comment-on a {
	font-size: 12.5px;
	font-weight: 700;
	color: rgba(28, 26, 23, 0.65);
}
.sidebar-comment-on a:hover {
	color: var(--wp--preset--color--mina-deep);
}

/* Sidebar + single meta in the dark Night Writings mode. */
body.page-id-5082 .sidebar-head h2,
body.category-mood .sidebar-head h2,
body.category-sarawrites .sidebar-head h2,
body.single-post.category-mood .sidebar-head h2,
body.single-post.category-sarawrites .sidebar-head h2,
body.night-writings .sidebar-head h2,
body.page-id-5082 .sidebar-list a,
body.category-mood .sidebar-list a,
body.category-sarawrites .sidebar-list a,
body.single-post.category-mood .sidebar-list a,
body.single-post.category-sarawrites .sidebar-list a,
body.night-writings .sidebar-list a,
body.page-id-5082 .sidebar-comment-author,
body.category-mood .sidebar-comment-author,
body.category-sarawrites .sidebar-comment-author,
body.single-post.category-mood .sidebar-comment-author,
body.single-post.category-sarawrites .sidebar-comment-author,
body.night-writings .sidebar-comment-author {
	color: #ece7db;
}
body.page-id-5082 .sidebar-list a:hover,
body.category-mood .sidebar-list a:hover,
body.category-sarawrites .sidebar-list a:hover,
body.single-post.category-mood .sidebar-list a:hover,
body.single-post.category-sarawrites .sidebar-list a:hover,
body.night-writings .sidebar-list a:hover,
body.page-id-5082 .sidebar-comment-on a:hover,
body.category-mood .sidebar-comment-on a:hover,
body.category-sarawrites .sidebar-comment-on a:hover,
body.single-post.category-mood .sidebar-comment-on a:hover,
body.single-post.category-sarawrites .sidebar-comment-on a:hover,
body.night-writings .sidebar-comment-on a:hover {
	color: #8fd8c9;
}
body.page-id-5082 .sidebar-date,
body.category-mood .sidebar-date,
body.category-sarawrites .sidebar-date,
body.single-post.category-mood .sidebar-date,
body.single-post.category-sarawrites .sidebar-date,
body.night-writings .sidebar-date,
body.page-id-5082 .sidebar-comment-on,
body.category-mood .sidebar-comment-on,
body.category-sarawrites .sidebar-comment-on,
body.single-post.category-mood .sidebar-comment-on,
body.single-post.category-sarawrites .sidebar-comment-on,
body.night-writings .sidebar-comment-on,
body.page-id-5082 .single-meta,
body.category-mood .single-meta,
body.category-sarawrites .single-meta,
body.single-post.category-mood .single-meta,
body.single-post.category-sarawrites .single-meta,
body.night-writings .single-meta {
	color: rgba(236, 231, 219, 0.65);
}
body.page-id-5082 .sidebar-comment-text,
body.category-mood .sidebar-comment-text,
body.category-sarawrites .sidebar-comment-text,
body.single-post.category-mood .sidebar-comment-text,
body.single-post.category-sarawrites .sidebar-comment-text,
body.night-writings .sidebar-comment-text {
	color: rgba(236, 231, 219, 0.72);
}
body.page-id-5082 .sidebar-comment-on a,
body.category-mood .sidebar-comment-on a,
body.category-sarawrites .sidebar-comment-on a,
body.single-post.category-mood .sidebar-comment-on a,
body.single-post.category-sarawrites .sidebar-comment-on a,
body.night-writings .sidebar-comment-on a,
body.page-id-5082 .single-meta a,
body.category-mood .single-meta a,
body.category-sarawrites .single-meta a,
body.single-post.category-mood .single-meta a,
body.single-post.category-sarawrites .single-meta a,
body.night-writings .single-meta a {
	color: rgba(236, 231, 219, 0.75);
}
body.page-id-5082 .single-meta a:hover,
body.category-mood .single-meta a:hover,
body.category-sarawrites .single-meta a:hover,
body.single-post.category-mood .single-meta a:hover,
body.single-post.category-sarawrites .single-meta a:hover,
body.night-writings .single-meta a:hover {
	color: #8fd8c9;
}
body.page-id-5082 .sidebar-list li,
body.category-mood .sidebar-list li,
body.category-sarawrites .sidebar-list li,
body.single-post.category-mood .sidebar-list li,
body.single-post.category-sarawrites .sidebar-list li,
body.night-writings .sidebar-list li {
	border-bottom-color: rgba(236, 231, 219, 0.12);
}
body.page-id-5082 .sidebar-head .section-line,
body.category-mood .sidebar-head .section-line,
body.category-sarawrites .sidebar-head .section-line,
body.single-post.category-mood .sidebar-head .section-line,
body.single-post.category-sarawrites .sidebar-head .section-line,
body.night-writings .sidebar-head .section-line,
body.page-id-5082 .single-related .section-line,
body.category-mood .single-related .section-line,
body.category-sarawrites .single-related .section-line,
body.single-post.category-mood .single-related .section-line,
body.single-post.category-sarawrites .single-related .section-line,
body.night-writings .single-related .section-line {
	background: rgba(236, 231, 219, 0.14);
}

/* (Night Writings dots are set on the dark body rule above.) */

/* Single-post responsive: sidebar stacks below the article. */
@media (max-width: 900px) {
	.single-layout {
		flex-direction: column;
		gap: 40px;
	}
	.single-sidebar {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.related-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Popular archive page (مطالب پربازدید) ---------- */
.popular-archive {
	max-width: 1120px;
	margin: 0 auto;
	padding: 48px 24px 64px;
}
.popular-archive .archive-title {
	text-align: center;
	margin-bottom: 40px;
}
.popular-archive .archive-section {
	margin-bottom: 56px;
}
.popular-archive .archive-section:last-child {
	margin-bottom: 0;
}
@media (max-width: 600px) {
	.popular-archive .popular-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Archive lists: empty image slot for posts without a photo ---------- */
.wp-block-post-featured-image.post-featured-image-placeholder {
	aspect-ratio: 16 / 9;
	margin: 0;
}

/* ---------- Comment honeypot (spam trap, never shown) ---------- */
.roozneveshteha-hp {
	display: none !important;
}
