/* ========== TABLE OF CONTENTS STYLING ========== */
.toc-section {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 900px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toc-header {
    background: linear-gradient(135deg, #2C5F8D 0%, #1A3A52 100%);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    user-select: none;
}

.toc-header:hover {
    background: linear-gradient(135deg, #1A3A52 0%, #2C5F8D 100%);
}

.toc-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
}

.toc-header h2::after {
    display: none;
}

.toc-icon {
    font-size: 1.75rem;
}

.toc-toggle {
    color: white;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.toc-header[aria-expanded="true"] .toc-toggle {
    transform: rotate(180deg);
}

.toc-nav {
    padding: 1.5rem 2rem;
    background-color: white;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.75rem;
}

.toc-link {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #1F2937;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.toc-link:hover {
    background-color: #e3f2fd;
    color: #2C5F8D;
    transform: translateX(5px);
}

.toc-number {
    font-weight: 700;
    color: #2C5F8D;
    min-width: 2rem;
}

.toc-text {
    flex: 1;
    font-weight: 500;
}

.toc-sublist {
    list-style: none;
    padding-left: 3rem;
    margin-top: 0.5rem;
}

.toc-subitem {
    margin-bottom: 0.5rem;
}

.toc-sublink {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #4B5563;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.toc-sublink:hover {
    background-color: #f3f4f6;
    color: #2C5F8D;
    transform: translateX(5px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .toc-section {
        margin: 1.5rem 1rem;
    }
    
    .toc-header {
        padding: 1rem;
    }
    
    .toc-header h2 {
        font-size: 1.25rem;
    }
    
    .toc-nav {
        padding: 1rem;
    }
    
    .toc-link {
        font-size: 0.95rem;
        padding: 0.6rem 0.75rem;
    }
    
    .toc-sublist {
        padding-left: 2rem;
    }
}
