.wp-caption {
    max-width: 100% !important;
    height: auto;
    text-align: center;
}

.wp-caption img {
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

@media (max-width: 999px) {
    .right-conatainer {
        min-height: auto !important;
    }
}

li {
    font-family: 'Roboto', sans-serif !important;
    color: #506172;
    line-height: 30px;
    font-weight: normal;
}

body {
    font-family: 'Roboto', sans-serif;
}

.right-conatainer {
    position: relative;
}

.sidebar {
    transition: transform 0.3s ease, top 0.3s ease;
}

@media (min-width: 1400px) {
    .sidebar {
        /* background-color:orange; */
        height: 800px;
        padding: 15px;
    }

    .stick {
        position: fixed;
        top: 100px;
        transform: translateY(0);
    }

    .abs {
        position: absolute;
        bottom: 230px;
        transform: translateY(10px);
        /* Tuỳ chỉnh độ mượt nếu muốn */
    }
}

@media only screen and (min-width: 1000px) and (max-width: 1399px) {
    .stick {
        position: fixed;
        top: 100px;
        transform: translateY(0);
    }

    .abs {
        position: absolute;
        bottom: 30px;
        transform: translateY(10px);
        /* Tuỳ chỉnh độ mượt nếu muốn */
    }
}

/* Tắt sticky và reset lại ở mobile */
@media (max-width: 999px) {
    .sidebar.stick {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        transform: translateY(0);
    }
}

.toc-wrapper {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-family: 'Roboto', sans-serif;
}

.toc-wrapper h2 {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 16px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}

h2[id],
h3[id],
h4[id] {
    scroll-margin-top: 80px;
    /* chỉnh 80px phù hợp chiều cao header */
}

.toc-wrapper ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-wrapper li {
    margin-bottom: 8px;
    font-size: 18px;
}

.toc-wrapper a {
    color: #000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.toc-wrapper a:hover {
    color: #0073aa;
    text-decoration: underline;
}

.toc-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: transform 0.2s;
    background-color: orange;
}

.toc-toggle-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .toc-wrapper {
        font-size: 14px;
        padding: 12px 16px;
    }

    .toc-toggle-btn {
        top: 10px;
        right: 10px;
    }
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1055;
    /* phù hợp Bootstrap modal */
}

.popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}