/* Post detail — content left, sidebar right layout. */
.post-detail-page{background:#fff}

/* ── Header ───────────────────────────────────────────────── */
.post-detail-header{margin-bottom:2.5rem}
.post-detail-header h1{color:var(--bv-primary);font-size:clamp(1.6rem,2.8vw,2.4rem);font-weight:800;line-height:1.2;margin:0 0 .8rem}
.post-excerpt{color:var(--bv-muted);font-size:1.05rem;line-height:1.65;margin:0 0 1.5rem;max-width:720px}

/* ── Meta row: author + date + share ──────────────────────── */
.post-meta-row{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 1.5rem;padding:1.2rem 0;border-top:1px solid var(--bv-line);border-bottom:1px solid var(--bv-line)}
.post-author{display:flex;align-items:center;gap:.65rem}
.post-author-avatar{width:40px;height:40px;border-radius:50%;background:var(--bv-blue-bg);color:var(--bv-primary);display:grid;place-items:center;font-size:1.2rem;flex-shrink:0}
.post-author strong{display:block;font-size:.88rem;color:var(--bv-ink);line-height:1.3}
.post-author-role{display:block;font-size:.76rem;color:var(--bv-muted)}
.post-meta-info{display:flex;align-items:center;gap:1rem;font-size:.82rem;color:var(--bv-muted)}
.post-meta-info i{font-size:.9rem;margin-right:.2rem}
.post-share{display:flex;align-items:center;gap:.5rem;margin-left:auto}
.post-share>span{font-size:.82rem;color:var(--bv-muted);margin-right:.15rem}
.post-share a,.post-share button{width:32px;height:32px;border-radius:50%;border:1px solid var(--bv-line);background:#fff;color:var(--bv-muted);display:grid;place-items:center;font-size:.9rem;text-decoration:none;cursor:pointer;transition:all .15s}
.post-share a:hover,.post-share button:hover{background:var(--bv-primary);color:#fff;border-color:var(--bv-primary)}

/* ── 2-column layout ──────────────────────────────────────── */
.post-layout{display:flex;align-items:flex-start;gap:2.5rem}
.post-detail{flex:1 1 0;min-width:0}
.post-sidebar{flex:0 0 320px;position:sticky;top:7.5rem;display:flex;flex-direction:column;gap:1.5rem}

/* ── Article content ──────────────────────────────────────── */
.post-featured-image{display:block;width:100%;height:auto;margin:0 0 2rem;border-radius:var(--bv-radius)}
.post-detail .cms-content h2{scroll-margin-top:7rem}

/* ── TOC (sidebar) ────────────────────────────────────────── */
.post-toc{padding:1.2rem 1.35rem;border:1px solid var(--bv-line);border-radius:var(--bv-radius);background:#fff}
.post-toc-title{display:flex;align-items:center;gap:.5rem;font-size:.95rem;font-weight:800;color:var(--bv-primary);margin:0 0 .8rem;padding-bottom:.8rem;border-bottom:1px solid var(--bv-line)}
.post-toc-title i{font-size:1.1rem}
.post-toc .post-toc-list{max-height:calc(100vh - 16rem);overflow-y:auto}

.post-toc-list{margin:0;padding:0;list-style:none;counter-reset:toc-item}
.post-toc-list li{margin:0;counter-increment:toc-item}
.post-toc-list a{display:block;padding:.55rem 0;color:#3b4650;font-size:.86rem;line-height:1.45;text-decoration:none;border-bottom:1px solid var(--bv-line);transition:color .15s}
.post-toc-list li:last-child a{border-bottom:0}
.post-toc-list a::before{content:counter(toc-item) ". ";color:var(--bv-primary);font-weight:700}
.post-toc-list a:hover{color:var(--bv-primary)}
.post-toc-list a.active{color:var(--bv-primary);font-weight:700}

/* ── CTA box (sidebar) ────────────────────────────────────── */
.post-cta-box{border-radius:var(--bv-radius);background:var(--bv-blue-bg);padding:1.5rem 1.35rem;text-align:center}
.post-cta-box h3{font-size:1.05rem;font-weight:800;color:var(--bv-primary);margin:0 0 .2rem}
.post-cta-box>p{font-size:.88rem;color:var(--bv-ink);font-weight:700;margin:0 0 .6rem}
.post-cta-desc{font-size:.8rem;color:var(--bv-muted);margin-bottom:1rem;line-height:1.5}
.post-cta-hotline{display:flex;align-items:center;justify-content:center;gap:.5rem;background:#fff;border:2px solid var(--bv-primary);border-radius:var(--bv-radius);padding:.65rem 1rem;font-size:1.1rem;font-weight:800;color:var(--bv-primary);text-decoration:none;margin-bottom:.8rem;transition:background .15s}
.post-cta-hotline:hover{background:var(--bv-primary);color:#fff}
.post-cta-btn{display:block;background:var(--bv-primary);color:#fff;border-radius:var(--bv-radius);padding:.7rem 1rem;font-size:.88rem;font-weight:700;text-decoration:none;text-align:center;transition:background .15s}
.post-cta-btn:hover{background:var(--bv-primary-dark,#005a9e);color:#fff}
.post-cta-links{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-top:1rem;text-align:left}
.post-cta-links a{display:flex;align-items:center;gap:.35rem;font-size:.78rem;color:var(--bv-primary);font-weight:600;text-decoration:none}
.post-cta-links a:hover{text-decoration:underline}

/* ── Banners (sidebar) ────────────────────────────────────── */
.post-banners{display:grid;gap:1.25rem}
.post-banners a{display:block;transition:opacity .2s}
.post-banners a:hover{opacity:.9}
.post-banners img{display:block;width:100%;height:auto;border-radius:var(--bv-radius)}

/* ── FAB + Modal TOC (mobile) ─────────────────────────────── */
.post-toc-fab{display:none}
.post-toc-modal .modal-content{border:0;border-radius:var(--bv-radius)}
.post-toc-modal .modal-title{color:var(--bv-primary);font-size:1.25rem;font-weight:800}
.post-toc-modal .post-toc-list li{margin:0}
.post-toc-modal .post-toc-list a{padding:.8rem 0}

/* ── Related posts ────────────────────────────────────────── */
.related-posts{margin-top:3.5rem;padding-top:2.5rem;border-top:1px solid var(--bv-line)}
.related-posts-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem 1rem;margin-bottom:1.5rem}
.related-posts h2{margin:0;color:var(--bv-primary);font-size:clamp(1.4rem,2.2vw,1.8rem);font-weight:800}
.related-more{display:inline-flex;align-items:center;gap:.35rem;color:var(--bv-primary);font-weight:800;text-decoration:none}
.related-more:hover{text-decoration:underline}
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:1.75rem 1.5rem}
.related-card{color:var(--bv-ink);text-decoration:none}
.related-card img{display:block;width:100%;aspect-ratio:16/10;margin-bottom:.85rem;border-radius:var(--bv-radius);object-fit:cover}
.related-card strong{display:block;color:var(--bv-ink);font-size:1.05rem;line-height:1.4}
.related-card:hover strong{color:var(--bv-primary)}
.related-card time{display:block;margin-top:.35rem;color:#8a938d;font-size:.85rem}

/* ── Responsive ───────────────────────────────────────────── */
@media(max-width:1199.98px){
    .post-sidebar{flex:0 0 280px}
}
@media(max-width:991.98px){
    .post-layout{flex-direction:column;align-items:stretch}
    .post-sidebar{position:static;flex:none;order:2}
    .post-detail{order:1}
    .post-toc{display:none}
    .post-toc-fab{position:fixed;top:50%;right:0;z-index:1020;display:grid;place-items:center;width:3rem;height:3rem;padding:0;border:0;border-radius:.8rem 0 0 .8rem;background:var(--bv-primary);color:#fff;font-size:1.4rem;box-shadow:0 .5rem 1.25rem rgba(0,51,160,.32);transform:translateY(-50%)}
}
@media(max-width:575.98px){
    .post-detail-header h1{font-size:1.5rem}
    .post-meta-row{flex-direction:column;align-items:flex-start;gap:.8rem}
    .post-share{margin-left:0}
    .post-cta-links{grid-template-columns:1fr}
}
