/* ===============================
   ROOT
================================ */
:root {
    --header-height: 80px;
}

/* ===============================
   SIDEBAR (DESKTOP / TABLET)
================================ */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
    align-self: flex-start;
    width: 300px; /* lebar default desktop */
    box-sizing: border-box;
}

/* ===============================
   SEARCH (IKUT SIDEBAR)
================================ */
.search-container {
    display: flex; /* default row */
    gap: 10px;
    padding: 12px;
    margin-bottom: 24px;
    background-color: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Search box */
.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f3f4f6;
    border-radius: 8px;
    padding: 0 14px;
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 14px;
    outline: none;
}

.search-icon {
    font-size: 16px;
    color: #9ca3af;
}

/* Button */
.btn-search {
    padding: 12px 18px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-search:hover {
    background-color: #1d4ed8;
}

/* ===============================
   TABLE OF CONTENT
================================ */
.toc-box {
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 24px;
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111827;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 12px;
}

.toc-list a {
    color: #374151;
    text-decoration: none;
    font-size: 14px;
}

.toc-list a:hover {
    color: #2563eb;
}

/* ===============================
   RESPONSIVE (MOBILE)
================================ */
/* ===============================
   RESPONSIVE (TABLET & MOBILE)
================================ */
/* RESPONSIVE TABLET & MOBILE */
@media (max-width: 1024px) {
    .detail-layout {
        display: flex;
        flex-direction: column; /* stack sidebar + content */
        gap: 24px;
    }

    .sidebar {
        position: static;
        width: 100%;
        order: -1; /* sidebar pindah ke atas */
        margin-bottom: 24px;
    }

    .search-container {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .search-box {
        flex: unset;
        width: 100%;
    }

    .btn-search {
        width: 100%;
        padding: 12px 0;
    }

    .toc-box {
        width: 100%;
    }
}
