/* ==========================================================================
   SIDEBARS, TOC & QUICK LINKS
   ========================================================================== */

.single-sidebar {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 100px !important;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 10;
  /* Ensure the element itself doesn't collapse */
  min-height: 0;
  flex-shrink: 0;
}

/* ---------- Table of Contents (TOC) ---------- */
.dynamic-toc-list {
  list-style: none !important;   /* removes dots */
  padding: 0;
  margin: 0;
}

.dynamic-toc-list li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.dynamic-toc-list a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.3s ease;
  display: block;
}

.dynamic-toc-list a:hover {
  color: var(--color-accent);
}

/* Sub‑items */
.toc-sub-item {
  padding-left: 15px;
  border-left: 2px solid var(--color-border-secondary);
}

.toc-sub-item a {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Scroll offset for fixed header */
.single-entry-content h2,
.single-entry-content h3 {
  scroll-margin-top: 100px;
}

/* ---------- Sidebar Quick Links Menu ---------- */
.sidebar-quick-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-quick-menu li {
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--color-border-secondary);
  padding-bottom: 12px;
}

.sidebar-quick-menu li:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-quick-menu li a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.sidebar-quick-menu li a::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  background-color: var(--color-accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  transition: transform 0.3s ease;
}

.sidebar-quick-menu li a:hover::before {
  transform: translateX(3px);
}

.sidebar-quick-menu li a:hover {
  color: var(--color-accent);
  transform: translateX(6px);
}

/* ---------- Responsive sidebar stacking ---------- */
@media (max-width: 1024px) {
  .single-sidebar {
    position: static;   /* disable sticky on tablets */
  }
}

.datochai-pillar-wrapper,
.layout-wrapper {
  overflow: visible !important;
}