/*
Theme Name: Yescafe
Theme URI: https://www.yescafe.ir/
Author: Yescafe
Description: پوستهٔ اختصاصی یسکافه — منوی کافهٔ مجله‌ای؛ راست‌به‌چپ، ریسپانسیو، حالت تیره، بهینه برای سئو.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: yescafe
Tags: rtl-language-support, blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================================
   Tokens
   ====================================================================== */
:root {
	--bg: #FBF6EE;
	--surface: #FFFDF8;
	--surface-2: #F4EBDD;
	--ink: #2A160A;
	--ink-soft: #6B5444;
	--heading: #3D1C06;
	--brand: #3D1C06;
	--on-brand: #FFF6E8;
	--accent: #8B3A00;
	--crema: #D9B98C;
	--line: #E6D8C3;
	--shadow: 0 12px 30px rgba(61, 28, 6, .12);
	--radius: 14px;
	--wrap: 1240px;
	--font: "YC Yekan", "Yekan Bakh", "IRANYekan", Tahoma, "Segoe UI", sans-serif;
	--steam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 40' fill='none' stroke='%238B3A00' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M8 38C2 30 14 26 8 18S14 6 10 2'/%3E%3Cpath d='M22 38C14 28 30 24 22 14S30 4 24 1'/%3E%3Cpath d='M36 38C30 30 42 26 36 18S42 8 38 4'/%3E%3C/svg%3E");
	--ext-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B3A00' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
	--bg: #17100B;
	--surface: #221810;
	--surface-2: #2B1E14;
	--ink: #F1E6D6;
	--ink-soft: #BBA68F;
	--heading: #F6EBDA;
	--brand: #0F0A06;
	--on-brand: #F6EBDA;
	--accent: #E0A468;
	--crema: #D9B98C;
	--line: #3A2A1C;
	--shadow: 0 12px 30px rgba(0, 0, 0, .45);
	--steam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 40' fill='none' stroke='%23E0A468' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M8 38C2 30 14 26 8 18S14 6 10 2'/%3E%3Cpath d='M22 38C14 28 30 24 22 14S30 4 24 1'/%3E%3Cpath d='M36 38C30 30 42 26 36 18S42 8 38 4'/%3E%3C/svg%3E");
	--ext-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E0A468' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}

/* =========================================================================
   Base
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font) !important;
	font-size: 1rem;
	line-height: 1.9;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body, button, input, textarea, select, h1, h2, h3, h4, h5, h6, p, a, li { font-family: var(--font) !important; }
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--heading); }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.6; }
ul, ol { padding-inline-start: 1.4rem; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.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, .skip-link:focus {
	background: var(--surface); color: var(--heading); clip: auto; clip-path: none;
	height: auto; width: auto; padding: .75rem 1.25rem; z-index: 100000;
	inset-block-start: .5rem; inset-inline-start: .5rem; border-radius: 8px;
	box-shadow: var(--shadow); font-weight: 800; text-decoration: none;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.site-shell { overflow-x: clip; }

/* =========================================================================
   Header
   ====================================================================== */
.topbar { background: var(--brand); color: var(--on-brand); font-size: .84rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.4rem; }
.topbar-tagline { opacity: .8; text-align: center; flex: 1; }
.topbar-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.topbar a { color: var(--on-brand); text-decoration: none; opacity: .9; }
.topbar a:hover { opacity: 1; color: var(--crema); }

.brandbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.brandbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.brand-link, .custom-logo-link { display: block; flex: none; line-height: 0; }
.brand-logo, .custom-logo { height: 3.6rem; width: auto; max-width: none; }
.brand-text { margin: 0; display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.brand-name { font-size: 1.9rem; font-weight: 900; color: var(--heading); text-decoration: none; letter-spacing: -.01em; }
.brand-sub { font-size: .85rem; color: var(--ink-soft); }
.header-banner { flex: none; max-width: 728px; line-height: 0; }
.header-banner img { border-radius: 8px; }

.navbar {
	position: sticky; top: 0; z-index: 50;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 6px 18px rgba(61, 28, 6, .05);
}
.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .navbar { top: 0; } }
.navbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 3.4rem; }
.site-nav .menu { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a {
	display: block; padding: .8rem 1rem; color: var(--ink); font-weight: 800;
	text-decoration: none; border-bottom: 3px solid transparent;
}
.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current-cat > a,
.site-nav .menu .current-menu-ancestor > a { color: var(--accent); border-bottom-color: var(--accent); }
.site-nav .sub-menu {
	position: absolute; inset-inline-start: 0; top: 100%; min-width: 12rem; list-style: none; margin: 0; padding: .4rem;
	background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.site-nav .menu > li:hover > .sub-menu,
.site-nav .menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { border: 0; border-radius: 8px; padding: .5rem .8rem; font-weight: 700; }
.site-nav .sub-menu a:hover { background: var(--surface-2); }
.submenu-toggle { display: none; }

.navbar-tools { margin-inline-start: auto; display: flex; gap: .5rem; }
.tool-btn, .nav-toggle {
	display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0;
	background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 50%;
}
.tool-btn:hover, .nav-toggle:hover { background: var(--surface-2); color: var(--accent); }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.nav-toggle { display: none; border-radius: 10px; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 1.1rem; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; inset-inline-start: 0; }
.nav-toggle-bars::after { position: absolute; top: 6px; inset-inline-start: 0; }

.finder-panel { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: .9rem; }
.finder-form { display: flex; gap: .5rem; }
.finder-input {
	flex: 1; min-width: 0; padding: .65rem 1rem; border: 1px solid var(--line); border-radius: 999px;
	background: var(--surface); color: var(--ink); font-size: 1rem;
}
.finder-submit {
	display: inline-grid; place-items: center; width: 2.9rem; border: 0; border-radius: 999px;
	background: var(--accent); color: var(--surface);
}
[data-theme="dark"] .finder-submit { color: #1A0F07; }
.finder-submit:hover { filter: brightness(1.1); }

/* =========================================================================
   Layout
   ====================================================================== */
.layout {
	display: grid; grid-template-columns: 320px minmax(0, 1fr); grid-template-areas: "side main";
	gap: 2.25rem; align-items: start; padding-block: 2rem;
}
.main-col { grid-area: main; min-width: 0; }
.side-col { grid-area: side; min-width: 0; }

.section-head {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	margin: 0 0 1.1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line);
}
.section-title { margin: 0; font-size: 1.35rem; font-weight: 900; display: flex; align-items: center; gap: .6rem; }
.section-title::before { content: ""; width: 1.7rem; height: 1.55rem; background: var(--steam) center / contain no-repeat; flex: none; }
.section-more { font-size: .9rem; font-weight: 800; text-decoration: none; }
.cat-section { margin-block: 0 2.75rem; }
.empty-note { padding: 1.5rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }

/* =========================================================================
   Hero
   ====================================================================== */
.hero-section { padding-top: 1.75rem; }
.hero-grid {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(14rem, 1fr));
	gap: 1rem;
}
.hero-grid--solo { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
.hero-card {
	position: relative; overflow: hidden; border-radius: var(--radius); background: var(--brand);
	isolation: isolate; min-height: 14rem; color: #fff;
}
.hero-card--large { grid-column: span 2; grid-row: span 2; min-height: 29rem; }
.hero-grid--solo .hero-card--large { grid-column: auto; grid-row: auto; min-height: 26rem; }
.hero-media { position: absolute; inset: 0; display: block; }
.hero-media .media-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-card:hover .hero-media .media-img { transform: scale(1.04); }
.hero-card::before {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(to top, rgba(26, 12, 4, .9), rgba(26, 12, 4, .2) 62%, rgba(26, 12, 4, 0));
}
.hero-card::after {
	content: ""; position: absolute; z-index: 1; width: 9rem; height: 9rem; border-radius: 50%;
	border: 12px solid rgba(255, 246, 232, .13); inset-inline-start: -3rem; top: -3rem; pointer-events: none;
}
.hero-body { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 1.1rem 1.25rem; }
.hero-title { margin: .45rem 0 0; font-size: 1.02rem; line-height: 1.65; font-weight: 800; color: #fff; }
.hero-card--large .hero-title { font-size: 1.85rem; line-height: 1.55; font-weight: 900; }
.hero-title a { color: inherit; text-decoration: none; }
.hero-title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.hero-excerpt { margin: .5rem 0 0; font-size: .98rem; color: rgba(255, 255, 255, .85); max-width: 42rem; }
.hero-card .media-fallback { background: var(--brand); }

/* =========================================================================
   Cards
   ====================================================================== */
.card-stack { display: grid; gap: 1.2rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; min-width: 0;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--crema); }
.article-card--list { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.2rem; padding: .75rem; }
.article-card--grid { display: flex; flex-direction: column; overflow: hidden; }
.card-media {
	position: relative; display: block; overflow: hidden; border-radius: 10px;
	aspect-ratio: 3 / 2; background: var(--surface-2);
}
.article-card--grid .card-media { border-radius: 0; }
.card-media::after {
	content: ""; position: absolute; width: 5.5rem; height: 5.5rem; border-radius: 50%;
	border: 8px solid rgba(255, 246, 232, .22); inset-inline-start: -1.6rem; bottom: -1.6rem; pointer-events: none;
}
.media-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: var(--surface-2); }
.media-fallback img { width: 26%; height: auto; opacity: .55; }
.card-body { display: flex; flex-direction: column; gap: .4rem; min-width: 0; padding: .25rem .5rem; }
.article-card--grid .card-body { padding: .9rem 1rem 1rem; flex: 1; }
.card-title { margin: 0; font-size: 1.2rem; line-height: 1.7; font-weight: 800; }
.article-card--grid .card-title { font-size: 1.02rem; }
.card-title a { color: var(--heading); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
	margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.9;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin: auto 0 0; font-size: .82rem; color: var(--ink-soft); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

.ring-badge {
	position: relative; z-index: 4; display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
	font-size: .78rem; font-weight: 800; line-height: 1.7; color: var(--accent); text-decoration: none;
	border: 1.5px solid currentColor; border-radius: 999px; padding: .08rem .75rem .08rem .6rem;
}
.ring-badge::before {
	content: ""; width: .75em; height: .75em; border-radius: 50%; border: 2px solid currentColor;
	background: radial-gradient(circle, currentColor 0 24%, transparent 27%);
}
.ring-badge:hover { background: var(--accent); color: var(--surface); border-color: var(--accent); }
[data-theme="dark"] .ring-badge:hover { color: #1A0F07; }
.ring-badge--light { color: #FFE9C7; border-color: rgba(255, 233, 199, .75); background: rgba(26, 12, 4, .4); }
.ring-badge--light:hover { background: #FFE9C7; color: #3D1C06; border-color: #FFE9C7; }

/* =========================================================================
   Pagination
   ====================================================================== */
.pager { margin-top: 2rem; }
.pager ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; justify-content: center; }
.pager a.page-numbers, .pager span.page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding-inline: .8rem;
	border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 800;
}
.pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pager span.page-numbers.current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
[data-theme="dark"] .pager span.page-numbers.current { background: var(--accent); border-color: var(--accent); color: #1A0F07; }
.pager span.dots { border-color: transparent; background: transparent; }

/* =========================================================================
   Archive heads, breadcrumbs
   ====================================================================== */
.archive-head { margin-bottom: 1.6rem; padding: 1.4rem 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.archive-title { margin: 0 0 .3rem; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; }
.archive-desc { margin: 0; color: var(--ink-soft); }
.archive-head .finder-form { margin-top: 1rem; }
.archive-months { margin-bottom: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; }
.archive-months summary { font-weight: 800; cursor: pointer; }
.archive-months ul { columns: 2 12rem; margin: .8rem 0 0; padding-inline-start: 1.2rem; }
.archive-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.archive-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1.1rem; border-bottom: 1px dashed var(--line); }
.archive-list li:last-child { border-bottom: 0; }
.archive-list a { color: var(--ink); text-decoration: none; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.archive-list a:hover { color: var(--accent); }
.archive-list time { color: var(--ink-soft); font-size: .85rem; flex: none; }

.crumbs { margin-bottom: 1rem; font-size: .88rem; color: var(--ink-soft); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "‹"; margin-inline-end: .5rem; opacity: .6; }
.crumbs span span, .crumbs span { display: inline; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current], .crumbs .breadcrumb_last { color: var(--ink); }

/* =========================================================================
   Single / page
   ====================================================================== */
.entry-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 2.2rem); min-width: 0; }
.entry-head { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.entry-title { margin: .4rem 0; font-size: clamp(1.5rem, 3.3vw, 2.25rem); line-height: 1.6; font-weight: 900; overflow-wrap: anywhere; }
.entry-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .88rem; color: var(--ink-soft); }
.meta-author { display: inline-flex; align-items: center; gap: .45rem; }
.meta-avatar { border-radius: 50%; }
.entry-meta a { color: var(--ink-soft); font-weight: 800; text-decoration: none; }
.entry-meta a:hover { color: var(--accent); }
.entry-figure { margin: 1.4rem 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.entry-figure img { display: block; width: 100%; height: auto; }

.entry-content { font-size: 1.07rem; line-height: 2.15; overflow-wrap: anywhere; margin-top: 1.2rem; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 2rem 0 .8rem; font-weight: 900; }
.entry-content h2 { font-size: 1.5rem; padding-inline-start: .8rem; border-inline-start: 4px solid var(--accent); }
.entry-content h3 { font-size: 1.28rem; }
.entry-content p { margin: 0 0 1.2rem; }
.entry-content a { text-decoration: underline; }
.entry-content img, .entry-content video, .entry-content iframe, .entry-content embed { max-width: 100%; }
.entry-content img { height: auto; border-radius: 10px; }
.entry-content iframe { border: 0; }
.entry-content figure { margin: 1.4rem 0; max-width: 100%; }
.entry-content figcaption, .wp-caption-text { font-size: .86rem; color: var(--ink-soft); text-align: center; margin-top: .4rem; }
.entry-content blockquote {
	margin: 1.6rem 0; padding: 1rem 1.3rem; background: var(--surface-2); border-inline-start: 5px solid var(--accent);
	border-radius: 10px; font-weight: 600;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre, .entry-content code { font-family: ui-monospace, Menlo, Consolas, monospace !important; direction: ltr; text-align: left; }
.entry-content pre { overflow-x: auto; padding: 1rem; background: #20130A; color: #F6EBDA; border-radius: 10px; max-width: 100%; }
.entry-content :not(pre) > code { background: var(--surface-2); padding: .1rem .4rem; border-radius: 6px; }
.table-scroll { overflow-x: auto; margin: 1.4rem 0; max-width: 100%; }
.entry-content table { border-collapse: collapse; width: 100%; min-width: 28rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: start; }
.entry-content th { background: var(--surface-2); font-weight: 900; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2rem; }
.source-line { font-weight: 800; color: var(--accent); padding-bottom: .8rem; margin-bottom: 1.4rem !important; border-bottom: 1px dashed var(--line); }
.alignleft { float: inline-start; margin-inline-end: 1.2rem; }
.alignright { float: inline-end; margin-inline-start: 1.2rem; }
.aligncenter { display: block; margin-inline: auto; }
.page-links { margin: 1.5rem 0; font-weight: 800; }

.entry-tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: 1.6rem; font-size: .9rem; }
.entry-tags-label { font-weight: 800; color: var(--ink-soft); }
.entry-tags a { padding: .1rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--bg); }
.entry-tags a:hover { border-color: var(--accent); color: var(--accent); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); }
.share-label { font-weight: 800; color: var(--ink-soft); margin-inline-end: .3rem; }
.share a, .share-copy {
	display: inline-block; padding: .25rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
	color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none;
}
.share a:hover, .share-copy:hover { border-color: var(--accent); color: var(--accent); }

.author-box { display: flex; gap: 1rem; margin-top: 1.5rem; padding: 1.1rem; background: var(--surface-2); border-radius: 12px; }
.author-box img { border-radius: 50%; flex: none; }
.author-box p { margin: 0; }
.author-box-name { font-weight: 900; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.post-nav a {
	display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem; background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
}
.post-nav a:hover { border-color: var(--accent); }
.post-nav-next { grid-column: 2; text-align: end; }
.post-nav-prev { grid-column: 1; }
.post-nav-label { font-size: .8rem; color: var(--accent); font-weight: 800; }
.post-nav-title { font-weight: 800; line-height: 1.7; overflow-wrap: anywhere; }
.related { margin-top: 2.5rem; }

/* Comments */
.comments-area { margin-top: 2.5rem; }
.comment-list, .comment-list ol { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-inline-start: 1.6rem; padding-inline-start: 1rem; border-inline-start: 2px solid var(--line); }
.comment-body { margin-bottom: 1rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .5rem; font-size: .88rem; }
.comment-avatar img { border-radius: 50%; display: block; }
.comment-author-name { font-weight: 900; }
.comment-date { color: var(--ink-soft); text-decoration: none; }
.comment-content { overflow-wrap: anywhere; }
.comment-content p { margin: 0 0 .6rem; }
.comment-actions { font-size: .85rem; font-weight: 800; }
.comment-respond { margin-top: 1.6rem; padding: 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-reply-title { font-size: 1.2rem; font-weight: 900; margin: 0 0 1rem; color: var(--heading); }
.comment-form label { display: block; font-weight: 800; margin-bottom: .3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 1rem;
}
.comment-form p { margin: 0 0 1rem; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: center; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; font-size: .9rem; }
.btn-primary, .comment-form .submit {
	padding: .65rem 1.8rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--surface); font-weight: 900; font-size: 1rem;
}
[data-theme="dark"] .btn-primary, [data-theme="dark"] .comment-form .submit { color: #1A0F07; }
.btn-primary:hover, .comment-form .submit:hover { filter: brightness(1.1); }

/* =========================================================================
   Sidebar & widgets
   ====================================================================== */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; min-width: 0; }
.widget-title { position: relative; margin: 0 0 .9rem; padding-bottom: .6rem; font-size: 1.08rem; font-weight: 900; border-bottom: 1px solid var(--line); }
.widget-title::after { content: ""; position: absolute; inset-inline-start: 0; bottom: -2px; width: 3rem; height: 3px; background: var(--accent); border-radius: 2px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .4rem 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink); text-decoration: none; font-weight: 700; }
.widget a:hover { color: var(--accent); }
.widget-more { display: inline-block; margin-top: .6rem; font-size: .88rem; font-weight: 800; color: var(--accent) !important; }
.widget .tagcloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.widget .tagcloud a {
	display: inline-block; padding: .1rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
	line-height: 1.9; font-weight: 700; white-space: nowrap;
}
.widget .tagcloud a:hover { border-color: var(--accent); color: var(--accent); }
.widget .finder-form { margin: 0; }

/* Better RSS widget ("دوستان یسکافه") */
.widget_better_rss_widget li { padding: .45rem 0; }
.widget_better_rss_widget a.rsswidget { display: flex !important; align-items: center; gap: .55rem; font-weight: 800; }
.widget_better_rss_widget a.rsswidget::before {
	content: ""; flex: none; width: .95rem; height: .95rem; background: var(--ext-icon) center / contain no-repeat; opacity: .85;
}
.widget_better_rss_widget img, .widget_rss img, .rsswidget img {
	width: 1.25rem !important; height: 1.25rem !important; max-width: 1.25rem !important; border-radius: 4px; object-fit: cover; margin: 0 !important; float: none !important;
}
.widget_better_rss_widget .rssSummary, .widget_rss .rssSummary { font-size: .85rem; color: var(--ink-soft); margin-top: .2rem; }
.widget_better_rss_widget .rss-date, .widget_rss .rss-date { font-size: .78rem; color: var(--ink-soft); }
.widget_better_rss_widget [style], .widget_rss [style] { max-width: 100% !important; }

/* =========================================================================
   Footer
   ====================================================================== */
.site-footer { margin-top: 3rem; background: var(--brand); color: var(--on-brand); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; padding-block: 2.8rem; }
.footer-about { display: flex; gap: 1.2rem; align-items: flex-start; }
.footer-barista { flex: none; width: 7.5rem; height: 7.5rem; border-radius: 50%; border: 3px solid rgba(217, 185, 140, .5); object-fit: cover; }
.footer-title { margin: 0 0 .7rem; font-size: 1.2rem; font-weight: 900; color: var(--crema); }
.footer-about p { margin: 0 0 .6rem; opacity: .92; }
.footer-social { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: #EBD7B8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { padding: .4rem 0; border-bottom: 1px dashed rgba(217, 185, 140, .25); }
.footer-list li:last-child { border-bottom: 0; }
.footer-bar { border-top: 1px solid rgba(217, 185, 140, .22); background: rgba(0, 0, 0, .18); }
.footer-bar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; padding-block: .9rem; font-size: .88rem; }
.copy { margin: 0; opacity: .85; }
.footer-nav .menu { display: flex; gap: 1.2rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.to-top {
	margin-inline-start: auto; display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
	border: 1px solid rgba(217, 185, 140, .5); background: transparent; color: var(--crema);
	opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--crema); color: var(--brand); }

/* Read Meter plugin: keep its progress bar slim, hide its title badge (theme shows its own). */
#bsf_rt_progress_bar_container { position: fixed !important; inset-inline: 0; bottom: 0; z-index: 60; height: 4px !important; background: transparent !important; }
#bsf_rt_progress_bar { height: 4px !important; background: var(--accent) !important; }
.bsf-rt-reading-time { display: none !important; }

/* =========================================================================
   Responsive
   ====================================================================== */
@media (max-width: 1060px) {
	.hero-card--large .hero-title { font-size: 1.5rem; }
	.article-card--list { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 899px) {
	.layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side"; gap: 1.5rem; }
	.hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
	.hero-card--large { grid-column: span 2; grid-row: auto; min-height: 21rem; }
	.hero-card { min-height: 12rem; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }

	.nav-toggle { display: inline-grid; }
	.site-nav {
		display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--surface);
		border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto;
	}
	.navbar.nav-open .site-nav { display: block; }
	.site-nav .menu { flex-direction: column; padding: .5rem 1.25rem 1rem; gap: 0; }
	.site-nav .menu a { border-bottom: 1px dashed var(--line); }
	.site-nav .menu > li { display: flex; flex-wrap: wrap; align-items: center; }
	.site-nav .menu > li > a { flex: 1; }
	.site-nav .sub-menu { position: static; display: none; width: 100%; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 1rem; }
	.site-nav .sub-open > .sub-menu { display: block; }
	.submenu-toggle { display: inline-block; width: 2.4rem; height: 2.4rem; background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); position: relative; }
	.submenu-toggle::after { content: ""; position: absolute; inset: 0; margin: auto; width: .5rem; height: .5rem; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
	.topbar-tagline { display: none; }
}
@media (max-width: 640px) {
	.brandbar-inner { flex-wrap: wrap; }
	.brand-logo, .custom-logo { height: 3rem; }
	.brand-name { font-size: 1.5rem; }
	.brand-sub { display: none; }
	.article-card--list { grid-template-columns: minmax(0, 1fr); }
	.card-grid--2 { grid-template-columns: minmax(0, 1fr); }
	.hero-card--large .hero-title { font-size: 1.3rem; }
	.hero-excerpt { display: none; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-next, .post-nav-prev { grid-column: auto; text-align: start; }
	.footer-about { flex-direction: column; }
	.topbar-links a:nth-child(n+4) { display: none; }
	.entry-content { font-size: 1.02rem; }
	.alignleft, .alignright { float: none; margin: 1rem auto; display: block; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.hero-card:hover .hero-media .media-img, .article-card:hover { transform: none; }
}

@media print {
	.topbar, .brandbar .header-banner, .navbar, .side-col, .site-footer, .share, .related, .post-nav, .comments-area, .to-top, #bsf_rt_progress_bar_container { display: none !important; }
	body { background: #fff; color: #000; }
	.layout { display: block; }
	.entry-article { border: 0; padding: 0; }
	a { color: #000; text-decoration: none; }
}
