/* =============================================================================
   blog-post.css — shared styles for all single blog-post pages.
   Pair with assets/js/blog-post.js (auto Table of Contents + accordion).
   Markup convention per post:
     <div class="blog-single blog-article">
       <div class="row">
         <div class="col-lg-4"><aside class="blog-toc" id="blogToc">
             <h3 class="blog-toc-title">…</h3><nav></nav>   ← nav filled by JS
         </aside></div>
         <div class="col-lg-8">
             <div class="blog-inner-img">…</div>            ← becomes "Introduction"
             <div class="blog-content"> …h2/h3 sections… </div>
         </div>
       </div>
     </div>
   Add data-no-toc to any heading you want excluded from the TOC.
   ============================================================================= */

/* ============ Article — professional reading layout ============ */
.blog-article .blog-content { font-size: 17px; }
.blog-article .blog-text { margin-bottom: 22px; line-height: 1.85; color: var(--body-color); text-align: justify; }
/* Lead paragraph (first intro line) reads a touch larger */
.blog-article .blog-content > p.blog-text:first-of-type { font-size: 19px; line-height: 1.8; color: var(--title-color); }

/* Hero image: no forced height/width (show full image), padding below */
.blog-article .blog-inner-img { margin-bottom: 40px; text-align: center; }
.blog-article .blog-inner-img img { height: auto; width: auto; max-width: 100%; object-fit: contain; }

/* Headings with subtle hierarchy + accent */
.blog-article h2 { font-size: 30px; font-weight: 700; color: var(--title-color);
    margin: 48px 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--th-border-color2);
    line-height: 1.3; }
.blog-article h3 { font-size: 24px; font-weight: 700; color: var(--title-color);
    margin: 36px 0 14px; padding-left: 16px; position: relative; line-height: 1.35; }
.blog-article h3::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 4px; border-radius: 4px; background: var(--theme-color); }
.blog-article h4 { font-size: 20px; font-weight: 700; color: var(--theme-color); margin: 28px 0 12px; }

/* Body links with animated underline */
.blog-article .blog-content a { color: var(--theme-color); font-weight: 600;
    text-decoration: underline; text-decoration-color: rgba(198,136,110,.4);
    text-underline-offset: 3px; transition: text-decoration-color .25s ease; }
.blog-article .blog-content a:hover { text-decoration-color: var(--theme-color); }
.blog-article .blog-content strong { color: var(--title-color); }

/* Custom list markers (neutral dot, works for both pros & cons lists) */
.blog-article .blog-content ul { list-style: none; margin: 0 0 24px; padding-left: 4px; }
.blog-article .blog-content ul li { position: relative; padding-left: 28px; margin: 11px 0;
    line-height: 1.7; color: var(--body-color); }
.blog-article .blog-content ul li::before { content: ""; position: absolute; left: 4px; top: 10px;
    width: 9px; height: 9px; border-radius: 50%; background: var(--theme-color); }

/* Key Takeaways — elevated card */
.key-takeaways { background: linear-gradient(180deg,#fff, var(--smoke-color));
    border: 1px solid var(--th-border-color2); border-left: 5px solid var(--theme-color);
    border-radius: 16px; padding: 26px 30px; margin: 30px 0 40px;
    box-shadow: 0 14px 30px rgba(58,45,34,.06); }
.key-takeaways h3 { margin: 0 0 16px; padding: 0; font-size: 22px; color: var(--title-color); }
.key-takeaways h3::before { display: none; }
.key-takeaways ul { list-style: none; margin: 0; padding-left: 0; }
.key-takeaways ul li { position: relative; padding-left: 30px; margin: 12px 0;
    color: var(--body-color); line-height: 1.7; }
/* CSS-drawn checkmark (font-independent) */
.key-takeaways ul li::before { content: ""; position: absolute; left: 4px; top: 6px;
    width: 6px; height: 11px; border: solid var(--theme-color); border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg); }

/* Post tags */
.blog-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--th-border-color2); }
.blog-tags-label { font-weight: 700; color: var(--title-color); margin-right: 4px; }
.blog-tags-label i { color: var(--theme-color); margin-right: 8px; }
.blog-tags .tag-chip { display: inline-block; padding: 7px 16px; border-radius: 30px;
    background: var(--smoke-color); border: 1px solid var(--th-border-color2);
    color: var(--body-color); font-size: 14px; font-weight: 500; line-height: 1.4;
    transition: all .25s ease; }
.blog-tags .tag-chip:hover { background: var(--theme-color); border-color: var(--theme-color); color: #fff; }

/* FAQ — accordion */
.blog-faq { margin-top: 56px; }
.blog-faq > h3 { margin-bottom: 22px; }
.blog-faq .faq-item { border: 1px solid var(--th-border-color2); border-radius: 14px;
    margin: 0 0 14px; background: #fff; overflow: hidden; transition: box-shadow .25s ease, border-color .25s ease; }
.blog-faq .faq-item.open { border-color: var(--theme-color); box-shadow: 0 10px 26px rgba(58,45,34,.07); }
.blog-faq .faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
    font-family: inherit; font-weight: 700; color: var(--title-color); font-size: 18px;
    padding: 20px 24px; line-height: 1.45; }
.blog-faq .faq-q i { flex: 0 0 auto; color: var(--theme-color); font-size: 15px;
    transition: transform .3s ease; }
.blog-faq .faq-item.open .faq-q i { transform: rotate(45deg); }
.blog-faq .faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease;
    color: var(--body-color); line-height: 1.75; padding: 0 24px; }
.blog-faq .faq-item.open .faq-a { max-height: 600px; padding-bottom: 22px; }

/* CTA box — accented */
.blog-cta-box { background: linear-gradient(135deg, var(--smoke-color), #fff);
    border: 1px solid var(--th-border-color2); border-radius: 18px; padding: 32px 34px; margin-top: 44px; }
.blog-cta-box p { margin-bottom: 0; line-height: 1.8; }

/* ---- Table of Contents (left sidebar) ---- */
html { scroll-behavior: smooth; }
/* overflow:hidden on an ancestor breaks position:sticky — clear it on the wrapper */
.blog-article { overflow: visible; }
.blog-article [id] { scroll-margin-top: 120px; }
.blog-toc { position: sticky; top: 160px; background: #fff; border: 1px solid var(--th-border-color2);
    border-radius: 16px; padding: 24px 24px 12px; margin-bottom: 32px; }
.blog-toc-title { font-size: 20px; font-weight: 600; color: var(--title-color);
    margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--th-border-color2); }
.blog-toc-title i { color: var(--theme-color); margin-right: 8px; }
.blog-toc nav ul { list-style: none; margin: 0; padding: 0; }
.blog-toc nav ul li { margin: 0; }
.blog-toc nav ul li a { display: block; padding: 9px 12px; border-radius: 8px;
    color: var(--body-color); font-size: 15px; line-height: 1.45; font-weight: 500;
    border-left: 3px solid transparent; transition: all .25s ease; }
.blog-toc nav ul li.toc-sub a { padding-left: 24px; font-size: 14px; }
.blog-toc nav ul li a:hover { background: var(--smoke-color); color: var(--theme-color); }
.blog-toc nav ul li a.active { background: var(--smoke-color); color: var(--theme-color);
    border-left-color: var(--theme-color); font-weight: 700; }
@media (max-width: 991px) {
    .blog-toc { position: static; top: auto; margin-bottom: 28px; }
}
