/* ============================================
   Table of Contents Styles (from includes/table-of-contents.php)
   Copied for WordPress Blog Posts
============================================ */

/* Table of Contents Container */
.table-of-contents {
    background: linear-gradient(135deg, #FEFCE8 0%, #FEF3C7 100%);
    border: 2px solid #F59E0B;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 2rem 0 3rem;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    cursor: pointer;
}

.toc-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #0A4D4E;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-toggle {
    background: #0A4D4E;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-toggle:hover {
    background: #0E7490;
    transform: scale(1.1);
}

.toc-toggle.collapsed {
    transform: rotate(-90deg);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem 2rem;
}

.toc-list.collapsed {
    display: none;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
}

.toc-list a:hover {
    background: white;
    color: #0E7490;
    border-color: #0E7490;
    transform: translateX(5px);
}

.toc-list a.active {
    background: #0A4D4E;
    color: white;
    border-color: #0A4D4E;
}

.toc-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #0E7490;
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toc-list a:hover .toc-number {
    background: #F97316;
}

.toc-list a.active .toc-number {
    background: #F97316;
}

/* Responsive */
@media (max-width: 768px) {
    .table-of-contents {
        padding: 1rem 1.25rem;
        margin: 1.5rem 0 2rem;
    }

    .toc-list {
        grid-template-columns: 1fr;
    }

    .toc-list a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}