.table-of-contents-container {
    position: relative;
    padding: 30px;
}

.table-of-contents {
    margin-bottom: 20px;
    border-radius: 5px;
    display: none;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
}

.toc-caret {
    width: 16px;
    height: 16px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.toc-header.expanded .toc-caret {
    transform: rotate(180deg); /* Rotates up when expanded */
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 0 0 5px;
    padding: 0 0 5px;
    border-bottom: 1px solid #000;
}

.table-of-contents a {
    text-decoration: none;
    color: #000;
}

@media (max-width: 1024px) {
    .table-of-contents {
        display: none;
    }

    .table-of-contents-container {
        padding: 10px 10px 0px 10px;
    }

    .toc-header {
        cursor: pointer;
    }

    .toc-caret {
        display: inline-block;
    }
}

@media (min-width: 1025px) {
    .table-of-contents {
        display: block !important;
    }

    .toc-header {
        cursor: default;
    }

    .toc-caret {
        display: none;
    }
}