/* Blog pages. A plain stylesheet (not the Vite/Tailwind build) and hex colours
   only, like the rest of the site, so old smart-TV and phone browsers render it.
   The site is dark; the article itself sits on a light "paper" because the
   articles (Shahrzad's design) carry their own light-background inline styles. */

.blog-wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.blog-hero { border-bottom: 1px solid #0c2342; padding: 3.5rem 0 2.5rem; text-align: center; }
.blog-hero h1 { color: #eaf4ff; font-size: 1.9rem; font-weight: 700; line-height: 1.7; margin: 1rem auto 0; max-width: 52rem; }
.blog-hero p { color: #8fb4d9; font-size: .95rem; line-height: 2; margin: .9rem auto 0; max-width: 46rem; }
.blog-crumbs { color: #6d8fb6; font-size: .75rem; display: flex; gap: .5rem; justify-content: center; }
.blog-crumbs a { color: #6d8fb6; text-decoration: none; }
.blog-crumbs a:hover { color: #b8d9f5; }
.blog-meta { color: #6d8fb6; font-size: .8rem; display: flex; gap: 1.25rem; justify-content: center; margin-top: 1rem; }

.blog-list-wrap { padding-top: 2.5rem; }
.blog-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.blog-card { display: flex; flex-direction: column; background: #07152a; border: 1px solid #16375e; border-radius: 1rem; overflow: hidden; text-decoration: none; transition: border-color .2s, transform .2s; }
.blog-card:hover { border-color: #4ad9ff; transform: translateY(-2px); }
.blog-card img, .blog-card-noimg { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; background: #0a1c33; }
.blog-card-noimg { background: linear-gradient(135deg, #0c2342, #163a68); }
.blog-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.blog-card h2 { color: #eaf4ff; font-size: 1rem; font-weight: 700; line-height: 1.8; margin: 0; }
.blog-card p { color: #8fb4d9; font-size: .85rem; line-height: 1.9; margin: 0; }
.blog-date { color: #6d8fb6; font-size: .75rem; margin-top: auto; }
.blog-empty { color: #8fb4d9; text-align: center; padding: 3rem 0; }
.blog-pages { margin-top: 2rem; }

/* The article sits in the site's own dark theme; Shahrzad writes it in the site's colours
   (Shahrzad → settings → «رنگ‌بندی مقاله: هماهنگ با تم سایت»). */
.blog-paper { background: #040d1d; color: #b8d9f5; border: 1px solid #122a4a; border-radius: 1.25rem; margin: 2rem auto 0; max-width: 56rem; padding: 2rem 2.25rem 2.25rem; }
.blog-cover { width: 100%; height: auto; display: block; border-radius: 1rem; margin-bottom: 1.5rem; }
.blog-body { font-size: 1rem; line-height: 2.1; color: #b8d9f5; overflow-wrap: anywhere; }
.blog-body h2 { scroll-margin-top: 6rem; }
.blog-body h2, .blog-body h3 { color: #eaf4ff; }
.blog-body img { max-width: 100%; height: auto; }
.blog-body table { max-width: 100%; }
.blog-body a { color: #4ad9ff; }
.blog-toc { background: #07152a; border: 1px solid #16375e; border-radius: .9rem; padding: .9rem 1.2rem; margin-bottom: 1.5rem; }
.blog-toc summary { cursor: pointer; font-weight: 700; color: #eaf4ff; }
.blog-toc ol { margin: .75rem 0 0; padding-right: 1.25rem; columns: 2; column-gap: 2rem; line-height: 2.1; font-size: .9rem; color: #6d8fb6; }
.blog-toc a { color: #b8d9f5; text-decoration: none; }
.blog-toc a:hover { color: #4ad9ff; }
.blog-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.blog-tags span { background: #0a1c33; border: 1px solid #16375e; color: #7ce9ff; border-radius: 999px; padding: .25rem .8rem; font-size: .8rem; }
.blog-ref { color: #6d8fb6; font-size: .85rem; margin-top: 1rem; }
.blog-ref a { color: #4ad9ff; }
.blog-related { margin: 3rem auto 0; max-width: 56rem; }
.blog-related h2 { color: #eaf4ff; font-size: 1.15rem; margin-bottom: 1rem; }
.blog-preview-bar { background: #7a5b00; color: #fff7d6; text-align: center; font-size: .85rem; padding: .6rem 1rem; }

@media (max-width: 640px) {
    .blog-hero { padding: 2.25rem 0 1.75rem; }
    .blog-hero h1 { font-size: 1.4rem; }
    .blog-paper { padding: 1.25rem 1rem 1.5rem; border-radius: 1rem; margin-top: 1.25rem; }
    .blog-toc ol { columns: 1; }
}
