/* Table of Contents Styling */
.toc {
    position: sticky;
    top: 100px;
    padding: 16px;
    border-left: 1px solid #ddd;

    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

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

.toc li {
    margin-bottom: 8px;
}

.toc li.h3 {
    margin-left: 16px;
    font-size: 0.95em;
}

.toc li.h4 {
    margin-left: 32px;
    font-size: 0.9em;
}

.toc a {
    text-decoration: none;
    color: #64748b;
    transition: color 0.2s ease;
}

/* Active section highlight */
.toc a.active {
    color: #22c55e;
    font-weight: 600;
}

/* scrollbar styling */
.toc::-webkit-scrollbar {
    width: 6px;
}

.toc::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.toc::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* =========================================
   CUSTOM KB DASHBOARD
========================================= */

.custom-kb-dashboard {
    padding-bottom: 60px;
}

/* =========================================
   GRID
========================================= */

.custom-kb-dashboard .custom-section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* =========================================
   LAYOUT
========================================= */

.custom-kb-container {
    display: flex;
    justify-content: center;
}

.custom-kb-content {
    flex: 0 0 100%;
}

/* =========================================
   SECTION CARD
========================================= */

.custom-kb-dashboard .custom-section-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* TOP GREEN ACCENT */

.custom-kb-dashboard .custom-section-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    width: 100%;
    background: #26ab7c;
}

/* CARD HOVER */

.custom-kb-dashboard .custom-section-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* =========================================
   SECTION TITLES
========================================= */

.custom-kb-dashboard .custom-section-title {
    margin-bottom: 14px;
}

.custom-kb-dashboard .custom-section-title a {
    color: #111827;
    text-decoration: none;
    font-weight: 700;
}

.custom-kb-dashboard .custom-section-title a:hover {
    color: #26ab7c;
}

/* =========================================
   SECTION DESCRIPTION
========================================= */

.custom-kb-dashboard .custom-section-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* =========================================
   MAIN ARTICLE LIST
========================================= */

.custom-kb-dashboard .custom-article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-kb-dashboard .custom-article-item {
    margin-bottom: 12px;
    padding: 0;
    overflow: visible;
}

/* =========================================
   MAIN ARTICLE LINKS
========================================= */

.custom-kb-dashboard .custom-article-link {
    display: block;

    padding: 14px 16px;
    border-radius: 12px;

    background: #f9fafb;
    border: 1px solid #e5e7eb;

    text-decoration: none;
    color: #374151;

    font-weight: 500;

    transition: all 0.2s ease;
}

/* ARTICLE HOVER */

.custom-kb-dashboard .custom-article-link:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #166534;

    transform: translateY(-2px);
}

/* =========================================
   CHILD SECTIONS
========================================= */

.custom-kb-dashboard .custom-child-sections {
    list-style: none;
    margin: 16px 0 0 0;
    padding: 0;
}

.custom-kb-dashboard .custom-child-section-item {
    margin-bottom: 12px;
}

/* =========================================
   CHILD SECTION LINKS
========================================= */

.custom-kb-dashboard .custom-child-section-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 16px;
    border-radius: 12px;

    background: #f9fafb;
    border: 1px solid #e5e7eb;

    text-decoration: none;
    color: #374151;

    font-weight: 500;

    transition: all 0.2s ease;
}

/* CHILD HOVER */

.custom-kb-dashboard .custom-child-section-link:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #166534;

    transform: translateY(-2px);
}

/* CHILD ARROW */

.custom-kb-dashboard .custom-child-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;

    opacity: 0.7;

    transition: all 0.2s ease;
}

/* ARROW MOVE */

.custom-kb-dashboard .custom-child-section-link:hover .custom-child-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* =========================================
   SHOW ALL LINK
========================================= */

.custom-kb-dashboard .custom-see-all {
    display: inline-block;
    margin-top: 18px;

    text-decoration: none;
    font-weight: 600;
    color: #26ab7c;
}

.custom-kb-dashboard .custom-see-all:hover {
    text-decoration: underline;
}

/* =========================================
   HEADER
========================================= */

.custom-kb-dashboard .custom-kb-header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
}

.custom-kb-dashboard .custom-kb-header h1 {
    margin-bottom: 12px;
    color: #111827;
}

/* =========================================
   CATEGORY DESCRIPTION
========================================= */

.custom-kb-dashboard .custom-kb-description {
    color: #6b7280;
    max-width: 700px;
    line-height: 1.7;
}

/* =========================================
   SEARCH
========================================= */

.custom-kb-dashboard .custom-kb-search input {
    border-radius: 14px;
    border: 1px solid #d1d5db;
    padding: 14px 18px;
    transition: all 0.2s ease;
}

.custom-kb-dashboard .custom-kb-search input:focus {
    border-color: #26ab7c;
    box-shadow: 0 0 0 4px rgba(38, 171, 124, 0.15);
}

/* =========================================
   EMPTY STATE
========================================= */

.custom-kb-dashboard .category-empty {
    display: block;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    border-radius: 18px;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
    .custom-kb-dashboard .custom-section-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .custom-kb-dashboard .custom-section-card {
        padding: 24px;
    }
}
