/* ==========================================================================
   BLOG POST SIDEBAR — style.css v2
   Includes: two-column post layout, sticky sidebar, ToC, CTA, recent posts
   ========================================================================== */

/* ── Two-column post layout ─────────────────────────────────────────────────
   Applied to the wrapping group in single.html: .intero-post-layout
   ─────────────────────────────────────────────────────────────────────────── */
.intero-post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 48px;
    padding-bottom: 88px;
    align-items: start;
}
@media (min-width: 1024px) {
    .intero-post-layout {
        grid-template-columns: minmax(0, 1fr) 312px;
        gap: 64px;
    }
}

/* ── Sidebar shell ──────────────────────────────────────────────────────────── */
.blog-post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
/* Prevent the sidebar's max-height (desktop sticky variant) from
   compressing any of the three widgets — TOC, CTA, Recent Articles all
   keep their intrinsic height. The sidebar itself becomes scrollable
   instead via overflow-y: auto on the @media block. */
.blog-post-sidebar > * {
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .blog-post-sidebar {
        position: sticky;
        top: 96px; /* below fixed site header */
        padding-bottom: 24px;
        /* No max-height or inner scroll — the sidebar takes its natural
           height and rides the page scroll when its content extends past
           the viewport. Avoids double scrollbars and clipped CTAs. */
    }
}

/* ── Shared section heading ─────────────────────────────────────────────────── */
.blog-post-sidebar__section-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-dark);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

/* ── Table of Contents ──────────────────────────────────────────────────────── */
.blog-post-sidebar__toc {
    background: var(--color-bg-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 22px 22px 20px;
    order: -1; /* Always first */
}
.blog-post-sidebar__toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
/* ToC items injected by view.js have class bps-toc-item--h2 / bps-toc-item--h3 */
.bps-toc-item--h3 { padding-left: 14px; }

.bps-toc-link {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    padding: 5px 6px 5px 10px;
    border-radius: var(--radius-sm);
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.bps-toc-item--h3 .bps-toc-link {
    font-weight: 500;
    font-size: 12px;
    color: var(--color-text-muted);
}
.bps-toc-link:hover {
    color: var(--color-secondary);
    border-left-color: rgba(46,196,182,0.4);
    background: rgba(46,196,182,0.05);
}
.bps-toc-link.is-active {
    color: var(--color-secondary);
    border-left-color: var(--color-secondary);
    background: rgba(46,196,182,0.06);
    font-weight: 700;
}

/* ── CTA widget ─────────────────────────────────────────────────────────────── */
.blog-post-sidebar__cta {
    background: var(--color-dark);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    min-height: auto;  /* never collapse below intrinsic content height */
}
.blog-post-sidebar__cta > * {
    flex-shrink: 0;  /* prevent children from being squeezed out */
}
/* Subtle glow accent */
.blog-post-sidebar__cta::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46,196,182,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.blog-post-sidebar__cta-badge {
    display: inline-flex;
    padding: 4px 12px;
    background: rgba(46,196,182,0.12);
    color: var(--color-secondary);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    width: fit-content;
    position: relative;
    z-index: 1;
}
.blog-post-sidebar__cta-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0;
    position: relative;
    z-index: 1;
}
.blog-post-sidebar__cta-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
    margin: 0;
    position: relative;
    z-index: 1;
}
.blog-post-sidebar__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 13px !important;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}
.blog-post-sidebar__cta-btn:hover {
    text-decoration: none;
}

/* ── Recent articles ────────────────────────────────────────────────────────── */
.blog-post-sidebar__recent {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.blog-post-sidebar__recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.blog-post-sidebar__recent-link {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    transition: opacity 0.2s;
}
.blog-post-sidebar__recent-link:hover { opacity: 0.7; }
.blog-post-sidebar__recent-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    background: var(--color-bg-muted);
}
.blog-post-sidebar__recent-thumb--placeholder {
    background: linear-gradient(135deg, rgba(46,196,182,0.12) 0%, rgba(43,123,185,0.08) 100%);
    border: 1px solid var(--color-border);
}
.blog-post-sidebar__recent-text { display: flex; flex-direction: column; gap