.sidebar {
    background-color: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1rem;
}

.sidebar .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
}

.sidebar .list-group-item.active {
    background-color: var(--secondary-color) !important;
    color: #fff !important;
    border-radius: 0.375rem;
}

.sidebar .list-group-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sidebar-title {
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1rem;
}

.sidebar [data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar [data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar .submenu.level-2>.list-group-item {
    padding-left: 2rem;
    font-size: 0.9em;
}

.sidebar .submenu.level-3>.list-group-item {
    padding-left: 3.5rem;
    font-size: 0.85em;
}

.sidebar .submenu .list-group-item-action:hover,
.sidebar .submenu .list-group-item-action:focus {
    color: var(--secondary-color);
    background-color: #f8f9fa;
}

/* Main Content */
.category-description.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-toggle-description {
    background: transparent;
    border: none;
    color: #0d6efd;
    font-weight: 500;
    font-size: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.btn-toggle-description i {
    transition: transform 0.25s ease;
}

/* Hover */
.btn-toggle-description:hover {
    background-color: rgba(13, 110, 253, 0.08);
    text-decoration: none;
}

/* Khi mở */
.btn-toggle-description.expanded i {
    transform: rotate(180deg);
}

/* Css for content */
/* Ảnh trong nội dung CKEditor */
.content-html img,
.content-html .ratio {
    height: auto;
    display: block;
    margin: 1rem auto;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}

.content-html img {
    max-width: 80%;
}

.content-html .ratio {
    max-width: 60%;
}

/* Tiêu đề có underline đẹp */
.section-bg>h2,
.content-html h2 {
    position: relative;
    display: inline-block;
}

.section-bg>h2::after,
.content-html h2::after {
    content: "";
    display: block;
    height: 3px;
    width: 140px;
    margin: .6rem auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-color), rgba(255, 255, 255, 0));
    opacity: .95;
}

/* Heading phụ h3 kẻ mảnh */
.content-html h3 {
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    padding-bottom: .35rem;
    margin-bottom: .75rem;
}

/* ============ Bảng CKEditor: nền sáng, chữ tối ============ */
.content-html table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF !important;
    color: #2B1D14 !important;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    overflow: hidden;
    margin: 1rem 0;
}

.content-html thead th {
    background: #F6EFE7 !important;
    color: #2B1D14 !important;
    font-weight: 700;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    white-space: nowrap;
}

.content-html tbody td {
    color: #2B1D14 !important;
    background: #FFFFFF !important;
    padding: .8rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
    vertical-align: top;
}

.content-html tbody tr:nth-child(even) td {
    background: #FAF7F2 !important;
}

.content-html tbody tr:hover td {
    background: #F3EEE6 !important;
}

.content-html table a {
    color: #8B4513 !important;
    text-decoration-color: rgba(139, 69, 19, .45);
}

.content-html table a:hover {
    color: #4B2A0F !important;
    text-decoration-color: currentColor;
}

.content-html table td *,
.content-html table th * {
    color: inherit !important;
    background: transparent !important;
}

@media (max-width:768px) {
    .content-html table {
        display: block;
        overflow-x: auto;
    }
}
