/**
 * Table of Contents Styles
 * Sticky sidebar TOC for blog articles
 */

/* Article layout with sidebar */
.article-layout {
    display: grid;
    grid-template-columns: 400px 800px;
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    justify-content: center;
}

@media (max-width: 1280px) {
    .article-layout {
        grid-template-columns: 300px 1fr;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* TOC Sidebar */
.toc-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
}

@media (max-width: 1024px) {
    .toc-sidebar {
        position: static;
        max-height: none;
        padding-right: 0;
        order: -1;
    }
}

/* TOC Container */
.toc-container {
    background: #F2EBE1;
    border-left: 3px solid #9BD1C7;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.toc-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2A367E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* TOC List */
#toc-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toc-list li {
    margin-bottom: 0.5rem;
    list-style: none;
}

#toc-list li::before {
    content: none;
}

#toc-list a {
    display: block;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #4B5563;
    text-decoration: none;
    padding: 0.25rem 0;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
}

#toc-list a:hover {
    color: #2A367E;
    border-left-color: #9BD1C7;
}

#toc-list a.active {
    color: #2A367E;
    font-weight: 600;
    border-left-color: #2A367E;
}

/* Note: Only h2 headings are shown in TOC */

/* Scrollbar styling */
.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: #9BD1C7;
    border-radius: 2px;
}

.toc-sidebar::-webkit-scrollbar-thumb:hover {
    background: #2A367E;
}

/* Article content area */
.article-content-area {
    min-width: 0;
}

/* Remove emojis from headings in articles */
.article-content h2::before,
.article-content h3::before {
    content: none;
}
