/* =========================================================
   BLOG DETAIL — page styles (uses theme.css variables)
========================================================= */
.blog-detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; }

.blog-hero-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; margin-bottom: 1.8rem; }
.blog-hero-img img { width: 100%; max-height: 460px; object-fit: cover; object-position: center; transition: transform .5s ease; display: block; }
.blog-hero-img:hover img { transform: scale(1.03); }

.blog-detail-meta { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.blog-detail-tag { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--green); background: rgba(183, 169, 121, .25); border-radius: var(--radius-pill); padding: .3rem .8rem; }
.blog-detail-meta .meta-item { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--text-soft); }
.blog-detail-meta .meta-item i { color: var(--gold-dark); font-size: .75rem; }

.blog-detail-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.2; color: var(--green-dark); margin-bottom: 1.4rem; }

.blog-excerpt-box { background: var(--bg-soft); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); padding: 1.1rem 1.4rem; font-size: .98rem; color: var(--text); margin-bottom: 2rem; }

.blog-article-body { font-size: .94rem; line-height: 1.85; color: var(--text); }
.blog-article-body a { color: var(--green-light) !important; text-decoration: underline; text-decoration-color: var(--gold); }
.blog-article-body p { margin: 0 0 1.2rem; }
.blog-article-body h2 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); color: var(--green-dark); border-left: 3px solid var(--gold); padding-left: .9rem; margin: 2.4rem 0 1rem; }
.blog-article-body h3 { font-size: 1.08rem; color: var(--green-light); margin: 1.7rem 0 .7rem; }
.blog-article-body ul, .blog-article-body ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.blog-article-body li { margin-bottom: .4rem; }
.blog-article-body img { max-width: 100%; border-radius: var(--radius-md); margin: 1rem 0; box-shadow: var(--shadow-sm); }
.blog-article-body table { width: 100%; border-collapse: collapse; margin: 1.3rem 0; font-size: .86rem; }
.blog-article-body th, .blog-article-body td { padding: .65rem .9rem; border: 1px solid var(--border-soft); text-align: left; }
.blog-article-body th { background: var(--green); color: var(--white); }

.blog-faq-title { font-size: clamp(1.25rem, 2.2vw, 1.55rem); color: var(--green-dark); border-left: 3px solid var(--gold); padding-left: .9rem; margin: 2.6rem 0 1.4rem; }
.faq-accordion .accordion-item { border: 1px solid var(--border-soft); border-radius: var(--radius-sm) !important; margin-bottom: .7rem; overflow: hidden; }
.faq-accordion .accordion-button { color: var(--green-dark); font-weight: 600; background: var(--white); box-shadow: none; }
.faq-accordion .accordion-button:not(.collapsed) { background: var(--green); color: var(--white); }
.faq-accordion .accordion-button:not(.collapsed)::after { filter: brightness(0) invert(1); }

.blog-author-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--bg-soft); border-radius: var(--radius-md); padding: 1.1rem 1.4rem; margin: 2.4rem 0; }
.blog-author-left { display: flex; align-items: center; gap: .9rem; }
.blog-author-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: contain; border: 2px solid var(--gold); flex-shrink: 0; background: var(--white); }
.blog-author-name { color: var(--green-dark); font-size: .9rem; font-weight: 600; margin: 0 0 .15rem; }
.blog-author-role { font-size: .78rem; color: var(--text-soft); margin: 0; }
.blog-share-row { display: flex; align-items: center; gap: .5rem; }
.blog-share-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.blog-share-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--gold-light); display: inline-flex; align-items: center; justify-content: center; color: var(--green); font-size: .78rem; transition: all .2s ease; }
.blog-share-btn:hover { background: var(--green); border-color: var(--green); color: var(--gold-light); }

.blog-tags-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding-top: 1.4rem; border-top: 1px dashed var(--gold-light); }
.blog-tags-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.blog-tag-pill { font-size: .78rem; color: var(--green); background: rgba(183, 169, 121, .22); border-radius: var(--radius-pill); padding: .32rem .9rem; transition: all .2s ease; }
.blog-tag-pill:hover { background: var(--green); color: var(--white); }

/* Sidebar */
.blog-sidebar { position: sticky; top: calc(var(--header-h) + 50px); display: flex; flex-direction: column; gap: 1.6rem; height: fit-content; }
.sidebar-box { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.sidebar-box-header { background: var(--green-dark); padding: .9rem 1.3rem; border-bottom: 3px solid var(--gold); }
.sidebar-box-header h4 { color: var(--white); font-size: .86rem; letter-spacing: .05em; text-transform: uppercase; margin: 0; }
.sidebar-box-body { padding: 1.1rem 1.2rem; }

.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 400px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.toc-list::-webkit-scrollbar { width: 5px; }
.toc-list::-webkit-scrollbar-track { background: transparent; }
.toc-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }
.toc-list a { display: flex; align-items: flex-start; gap: .5rem; padding: .5rem .6rem; border-radius: var(--radius-sm); font-size: .82rem; color: var(--text); transition: all .2s ease; }
.toc-list a:hover, .toc-list a.active { background: var(--bg-soft); color: var(--green); }
.toc-list li[data-level="3"] > a { padding-left: 1.4rem; font-size: .78rem; }
.toc-list li[data-level="4"] > a { padding-left: 2rem; font-size: .75rem; color: var(--text-soft); }
.toc-marker--num { flex-shrink: 0; width: 19px; height: 19px; border-radius: 50%; background: rgba(183, 169, 121, .25); border: 1.5px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: .6rem; color: var(--green); }
.toc-marker--dash { width: 9px; height: 2px; margin-top: 8px; background: var(--gold-light); border-radius: 2px; }
.toc-marker--dot { width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--gold-light); }

.related-post-item { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px dashed var(--gold-light); }
.related-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-post-item:hover { opacity: .85; }
.related-post-thumb { width: 60px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.related-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-post-title { font-size: .82rem; color: var(--green-dark); line-height: 1.4; margin: 0 0 .3rem; }
.related-post-date { font-size: .72rem; color: var(--text-soft); margin: 0; }

.sidebar-cta { background: linear-gradient(135deg, var(--green-dark), var(--green-light)); border-radius: var(--radius-md); padding: 1.7rem 1.4rem; text-align: center; }
.sidebar-cta-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; margin: 0 auto .9rem; color: var(--gold-light); font-size: 1.1rem; }
.sidebar-cta h4 { color: var(--white); font-size: .98rem; margin-bottom: .5rem; }
.sidebar-cta p { color: rgba(255, 255, 255, .85); font-size: .82rem; line-height: 1.6; margin-bottom: 1.1rem; }
.btn-brand-solid { display: inline-flex; align-items: center; gap: .5rem; background: var(--gold); color: var(--green-dark); border: 0; border-radius: var(--nav-radius); padding: .6rem 1.4rem; font-weight: 600; transition: all var(--transition-speed) ease; }
.btn-brand-solid:hover { background: var(--gold-light); color: var(--green-dark); }

@media (max-width: 991.98px) {
    .blog-detail-wrap { grid-template-columns: 1fr; gap: 2.4rem; }
    .blog-sidebar { position: static ; }
}
@media (max-width: 575.98px) {
    .blog-hero-img img { max-height: 260px; }
    .blog-author-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767.98px) {
    .blog-article-body table { display: block; width: 100%; overflow-x: auto;  scrollbar-width: thin; scrollbar-color: var(--gold) var(--bg-soft); }
    .blog-article-body table::-webkit-scrollbar { height: 6px; }
    .blog-article-body table::-webkit-scrollbar-track { background: var(--bg-soft); }
    .blog-article-body table::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }
}


@media (max-width: 991px) {
  .blog-sidebar { display: block !important; }
  .blog-sidebar .sidebar-box:first-child { display: block !important; }
  .toc-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 0 8px;
    scrollbar-width: thin;
  }
  .toc-list li { flex: 0 0 auto; }
}

