/* bananana.marketing — blog pages (listing, category, post). Loaded after site.css; no inline styles (strict CSP). */

.blog-main, .post-main { padding-block: clamp(28px, 5vw, 56px) var(--sec); }

/* breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--text-3); }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--red); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--cream); }
.crumbs [aria-current] { color: var(--text-3); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* listing */
.blog-head { display: grid; gap: 18px; margin-block: clamp(28px, 4vw, 48px) 28px; max-width: 760px; }
.blog-empty { margin-top: 24px; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.cat-nav a { text-decoration: none; padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-size: 15px; font-weight: 700; }
.cat-nav a:hover { border-color: var(--cream); color: var(--cream); }
.cat-nav a[aria-current] { background: var(--red-btn); border-color: var(--red-btn); color: #fff; }

.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: clamp(18px, 2.4vw, 30px); }
.pc { display: grid; grid-template-rows: auto 1fr; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s ease, transform .2s ease; }
.pc:hover { border-color: #4a464a; transform: translateY(-3px); }
.pc-art { display: block; aspect-ratio: 16 / 9; background: var(--panel); overflow: hidden; text-decoration: none; }
.pc-img { width: 100%; height: 100%; object-fit: cover; }
.pc-ph { display: grid; place-items: center; height: 100%; font-size: 54px; color: var(--red); }
.pc-body { display: grid; align-content: start; gap: 10px; padding: 20px 22px 26px; }
.pc-t { font: 900 clamp(19px, 1.6vw, 22px)/1.6 var(--fa-head); }
.pc-t a { text-decoration: none; }
.pc-t a:hover { color: var(--red-hot); }
.pc-d { color: var(--text-2); font-size: 15.5px; line-height: 1.9; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; color: var(--text-3); }
.post-cat { color: var(--red-hot); font-weight: 800; text-decoration: none; }
.post-meta > * + *::before { content: "•"; margin-inline-end: 14px; color: var(--line); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 44px; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding-inline: 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; }
.pager [aria-current] { background: var(--cream); color: var(--ink); font-weight: 800; }
.pager a:hover { border-color: var(--cream); }

/* single post */
.post { max-width: 820px; margin-inline: auto; margin-top: clamp(24px, 4vw, 44px); }
.post-head { display: grid; gap: 16px; margin-bottom: 30px; }
.post-h { font: 900 clamp(30px, 4.4vw, 52px)/1.45 var(--fa-head); letter-spacing: -.01em; }
.post-lede { font-size: clamp(17px, 1.5vw, 19.5px); color: var(--text-2); line-height: 2; }
.post-cover { margin: 0 0 34px; border-radius: var(--r); overflow: hidden; background: var(--panel); }
.post-cover img { width: 100%; }

.toc { border: 1px solid var(--line); border-radius: 18px; padding: 16px 22px; margin-bottom: 34px; background: var(--ink-1); }
.toc summary { cursor: pointer; font-weight: 800; color: var(--cream); }
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 6px; margin-top: 12px; }
.toc li { counter-increment: toc; }
.toc li::before { content: counter(toc, persian) "."; color: var(--red-hot); margin-inline-end: 8px; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--cream); }

.prose { font-size: clamp(17px, 1.35vw, 18.5px); line-height: 2.1; color: var(--text); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font: 900 clamp(24px, 2.6vw, 32px)/1.55 var(--fa-head); margin-top: 1.9em; scroll-margin-top: 96px; }
.prose h3 { font: 800 clamp(20px, 2vw, 24px)/1.6 var(--fa); margin-top: 1.6em; scroll-margin-top: 96px; }
.prose h4 { font: 800 19px/1.6 var(--fa); margin-top: 1.4em; color: var(--cream-2); }
.prose a { color: var(--red-hot); text-underline-offset: 5px; }
.prose a:hover { color: var(--cream); }
.prose strong { color: var(--cream); font-weight: 800; }
.prose ul, .prose ol { padding-inline-start: 1.4em; display: grid; gap: .45em; }
.prose ul { list-style: none; }
.prose ul li { position: relative; }
.prose ul li::before { content: ""; position: absolute; inset-inline-start: -1.1em; top: .95em; width: 7px; height: 7px; rotate: 45deg; background: var(--red); }
.prose ol { list-style: persian; }
.prose ol li::marker { color: var(--red-hot); font-weight: 800; }
.prose blockquote { margin-inline: 0; padding: 14px 22px; border-inline-start: 4px solid var(--red); background: var(--ink-2); border-radius: 0 14px 14px 0; color: var(--cream-2); }
.prose code { font: 400 .88em var(--mono); background: var(--panel); padding: .1em .4em; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.prose pre { overflow-x: auto; background: var(--ink-1); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; line-height: 1.7; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2em; }
.prose figure { margin-inline: 0; }
.prose figure img { width: 100%; border-radius: 16px; }
.prose figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--text-3); }

.post-faq { margin-top: 3em; }
.post-faq h2 { font: 900 clamp(24px, 2.6vw, 30px)/1.5 var(--fa-head); margin-bottom: 14px; }
.post-faq details { border-bottom: 1px solid var(--line); padding: 16px 4px; }
.post-faq summary { cursor: pointer; font-weight: 800; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: "+"; color: var(--red-hot); font: 400 24px/1 var(--mono); }
.post-faq details[open] summary::after { content: "−"; }
.post-faq details p { color: var(--text-2); margin-top: 10px; line-height: 2; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.post-tags li { font-size: 14px; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; }
.post-tags li::before { content: "#"; color: var(--red); margin-inline-end: 2px; }

.post-cta { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-radius: var(--r); background: linear-gradient(to left, #262326, #0e0d0e); border: 1px solid var(--line); }
.post-cta p { font-weight: 800; font-size: 18px; }

.related { max-width: 1100px; margin: clamp(60px, 8vw, 100px) auto 0; }
.related h2 { font: 900 clamp(24px, 2.6vw, 32px)/1.5 var(--fa-head); margin-bottom: 24px; }

@media (max-width: 600px) {
  .pc-body { padding: 16px 18px 22px; }
  .post-cta { padding: 18px; }
}
