/* =============================================================
   NEMTHQ Blog Progressive Disclosure
   Mobile: accordion sections (tap to expand)
   Desktop: full content + sticky TOC sidebar
   ============================================================= */

/* --- Table of Contents (desktop only) --- */
.blog-toc {
    display: none;
}

@media (min-width: 768px) {
    .blog-post-layout {
        display: flex;
        gap: 0;
        max-width: 1000px;
        margin: 0 auto;
    }

    .blog-toc {
        display: block;
        width: 220px;
        flex-shrink: 0;
        position: sticky;
        top: 80px;
        align-self: flex-start;
        padding: 0 20px 20px 0;
        border-right: 1px solid #f0eeeb;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

    .blog-toc-title {
        font-family: 'Bricolage Grotesque', sans-serif;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        color: #999;
        font-weight: 700;
        margin: 0 0 12px;
    }

    .blog-toc a {
        display: block;
        font-size: 13px;
        color: #666;
        text-decoration: none;
        padding: 5px 10px;
        border-radius: 6px;
        margin-bottom: 2px;
        line-height: 1.4;
        transition: all 0.15s ease;
    }

    .blog-toc a:hover,
    .blog-toc a.active {
        color: #1B3A8C;
        background: #EBF0FF;
    }

    .blog-post-content {
        flex: 1;
        min-width: 0;
        padding-left: 32px;
    }
}

/* --- Accordion behavior (mobile only) --- */
.blog-section-toggle {
    display: none;
}

@media (max-width: 767px) {
    .blog-post-content h2 {
        cursor: pointer;
        position: relative;
        padding-right: 32px;
        margin: 0;
        padding-top: 16px;
        padding-bottom: 16px;
        border-top: 1px solid #f0eeeb;
        font-size: 1.15rem;
        transition: color 0.15s ease;
    }

    .blog-post-content h2:first-of-type {
        border-top: none;
    }

    .blog-post-content h2::after {
        content: '';
        position: absolute;
        right: 8px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid #999;
        border-bottom: 2px solid #999;
        transform: translateY(-60%) rotate(45deg);
        transition: transform 0.2s ease;
    }

    .blog-post-content h2.section-open::after {
        transform: translateY(-30%) rotate(-135deg);
    }

    .blog-post-content h2:active {
        color: #FF6B2C;
    }

    .blog-section-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .blog-section-content.section-open {
        max-height: 5000px;
    }

    .blog-post-content .post-intro {
        display: block;
    }

    .blog-cta-box {
        display: block;
    }
}
