/* ===== HCO TOC ===== */
.hco-toc { width: 100%; }
.hco-toc * { box-sizing: border-box; }

.hco-toc__card{
  border-radius: 16px;
  padding: 20px;
  background: #F8F9FA;
}

.hco-toc__title{
  font-weight: 700;
  font-size: 1rem;
	margin-bottom: 10px;
}

/* List */
.hco-toc__list{
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
}

.hco-toc__item{ margin: 0; padding: 0; }

.hco-toc__link{
  display: block;
  text-decoration: none !important;
  padding: 7px 10px !important;
  border-radius: 10px;
  color: inherit;
  opacity: .78;
  transition: all .15s ease;
  line-height: 1.3;
  font-size: 14px;
}

.hco-toc__link:hover{
  opacity: 1;
  background: rgba(148,163,184,.12);
}

.hco-toc__link:focus{
  outline: none;
}

.hco-toc__link.is-active{
  opacity: 1;
  background: #fff;
  border-left: 2px solid #ED580F;
}

.hco-toc__link.is-passed{ opacity: 1; color: #0942AA}

/* Indent theo heading level */
.hco-toc__link[data-level='2']{ padding-left: 10px; }
.hco-toc__link[data-level='3']{ padding-left: 22px; }
.hco-toc__link[data-level='4']{ padding-left: 34px; }
.hco-toc__link[data-level='5']{ padding-left: 46px; }
.hco-toc__link[data-level='6']{ padding-left: 58px; }

/* Empty */
.hco-toc__empty { padding: 6px 0; opacity: .8; }

/* ===== Sticky & scroll behavior on sidebar =====
   Bạn đã có container .page-sidebar, nên sticky xử lý ở đây.
*/
.page-body .page-sidebar{
  position: sticky;
  top: var(--hco-sticky-top, 100px);

  /* TOC dài => scroll trong sidebar */
  max-height: calc(100vh - var(--hco-sticky-top, 100px) - 16px);
  overflow: auto;
  padding-bottom: 8px;
}

/* Mobile: thường không sticky để khỏi chiếm màn hình */
@media (max-width: 991px){
  .page-body .page-sidebar{
    position: static !important;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}