/* Table of Contents Styles */

/* Fix for heading scroll offset due to fixed header */
h2 {
    scroll-margin-top: 200px; /* Adjust this value to match your header height */
}
.tcs-blog .toc-container {
    margin: 30px auto;
    font-family: Arial, sans-serif;
    border-radius: 8px;
    background: #fafafa;
    padding: 20px;
}

.tcs-blog .toc-container h3 {
    font-weight: bold;
    margin-bottom: 10px;
}

.tcs-blog .toc-header {
    display: flex;
    justify-content: space-between;
    background-color: #eee;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.tcs-blog .toc-header:hover {
    background-color: #ddd;
}

.tcs-blog .toc-content {
    margin-top: 15px;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
    padding: 0px 5%;
}

.tcs-blog .toc-content ul {
    padding-left: 20px;
    list-style: disc;
    margin: 0;
}

.tcs-blog .toggle-icon {
    font-weight: bold;
    font-size: 18px;
}

.tcs-blog .toc-container.open .toc-content {
    display: block;
}

.tcs-blog .toc-container.open .toggle-icon::before {
    content: "-";
}

.tcs-blog .toc-container:not(.open) .toggle-icon::before {
    content: "+";
}

.tcs-blog .toc-header p {
    margin-bottom: 0px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .tcs-blog .toc-container {
        margin: 20px 10px;
        padding: 15px;
    }
    
    .tcs-blog .toc-header {
        padding: 8px 12px;
    }
}