/* ---------------------------------------------------------------------------
   AllInOneMonitor - Website, server & infrastructure monitoring
   Author: MD OMAR FARUK | www.faruk.bd | Copyright (c) 2026
   --------------------------------------------------------------------------- */
/* AllInOneMonitor - blog pages only (loaded by app/site/blog.php): post layout,
   table of contents, key takeaways, figures with captions, FAQ, call to action,
   related posts and the category tabs. Colours come from app.css variables,
   so the dark theme follows automatically. */

/* ---------- list */
.blog-cats { justify-content: center; margin-bottom: 24px; }
.blog-list .post-card { color: var(--ink); transition: border-color .15s, transform .15s; }
.blog-list .post-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.blog-list .post-card h3, .post-related .post-card h3 { font-size: 17px; line-height: 1.35; margin: 8px 0 6px; color: var(--ink); }
.blog-list .post-card .cover, .post-related .post-card .cover { height: auto; aspect-ratio: 1200 / 630; }
.blog-list .post-card .body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.blog-list .post-card .body small { margin-top: auto; padding-top: 6px; }

/* ---------- post head */
.blog-post h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.2; margin: 6px 0 10px; }
.blog-post .post-crumbs .pill { text-decoration: none; }
.blog-post .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.blog-post .post-read { display: inline-flex; align-items: center; gap: 4px; }
.blog-post .post-read svg { width: 15px; height: 15px; }
.blog-post .post-cover { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 14px; margin: 16px 0 20px; background: var(--line-2); }

/* ---------- table of contents */
.post-toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin: 0 0 18px; }
.post-toc summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.post-toc ol { margin: 10px 0 2px; padding-left: 22px; columns: 2 280px; column-gap: 28px; }
.post-toc li { margin: 0 0 6px; break-inside: avoid; font-size: 14.5px; line-height: 1.4; }

/* ---------- body */
.blog-post .post-body { padding: clamp(18px, 4vw, 36px); font-size: 16.5px; line-height: 1.72; color: var(--ink-2); }
.blog-post .post-body h2 { text-align: left; font-size: clamp(22px, 2.6vw, 27px); line-height: 1.3; margin: 1.7em 0 .5em; color: var(--ink); scroll-margin-top: 84px; }
.blog-post .post-body h3 { font-size: 19px; margin: 1.4em 0 .4em; color: var(--ink); }
.blog-post .post-body p { margin: 0 0 1em; }
.blog-post .post-body ul, .blog-post .post-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.blog-post .post-body li { margin-bottom: 6px; }
.blog-post .post-body p.lead { text-align: left; max-width: none; margin: 0 0 1.2em; font-size: 18.5px; line-height: 1.6; color: var(--ink); }
.blog-post .post-body code { font-family: var(--mono, ui-monospace, monospace); font-size: .9em; background: var(--line-2); border-radius: 5px; padding: 1px 5px; }
.blog-post .post-body pre { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; margin: 0 0 1.2em; }
.blog-post .post-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.blog-post .post-body table.data { width: 100%; border-collapse: collapse; margin: 0 0 1.3em; font-size: 15px; }
.blog-post .post-body table.data th, .blog-post .post-body table.data td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.blog-post .post-body table.data thead th { background: var(--line-2); color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.blog-post .post-body p.tip { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 12px 16px; color: var(--ink); }

/* key takeaways */
.blog-post .key-takeaways { border: 1px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent 140%); border-radius: 12px; padding: 16px 20px 6px; margin: 0 0 1.6em; }
.blog-post .key-takeaways .kt-title { font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; font-size: 13.5px; margin: 0 0 8px; }
.blog-post .key-takeaways ul { padding-left: 1.2em; }
.blog-post .key-takeaways li { color: var(--ink); }

/* figures */
.blog-post figure.shot { margin: 1.6em 0; text-align: center; }
.blog-post figure.shot img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); background: var(--line-2); }
.blog-post figure.shot figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* FAQ */
.blog-post .post-faq { display: grid; gap: 10px; margin: 0 0 1.6em; }
.blog-post .post-faq .faq-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: var(--card); }
.blog-post .post-faq .faq-item h3 { margin: 0 0 6px; font-size: 17px; }
.blog-post .post-faq .faq-item p:last-child { margin-bottom: 0; }

/* call to action */
.blog-post .post-cta { margin: 2em 0 .4em; padding: 24px 26px; border-radius: 14px; background: linear-gradient(135deg, #064e3b, #059669); color: #ecfdf5; }
.blog-post .post-cta p { color: #d1fae5; margin-bottom: .7em; }
.blog-post .post-cta .cta-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: .35em; line-height: 1.3; }
.blog-post .post-cta .btn-primary { background: #fff; border-color: #fff; color: #065f46; font-weight: 700; }
.blog-post .post-cta .btn-primary:hover { background: #d1fae5; border-color: #d1fae5; text-decoration: none; }
.blog-post .post-cta p:last-child { margin: 0; }

/* related */
.post-related { margin-top: 40px; }
.post-related h2 { text-align: left; font-size: 22px; margin-bottom: 14px; }
.post-related .post-card { color: var(--ink); }
.post-related .post-card:hover { border-color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  .blog-post .post-body { font-size: 16px; }
  .blog-post .post-body p.lead { font-size: 17px; }
  .post-toc ol { columns: 1; }
  .blog-post .post-body table.data { display: block; overflow-x: auto; }
  .blog-post .post-cta { padding: 20px; }
}
