/* =========================
   BASE (MOBILE FIRST)
========================= */

.qh-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================
   SIDEBARS (MOBILE)
========================= */

.qh-sidebar-left,
.qh-sidebar-right {
  width: 100%;
  position: relative;

  background: var(--qh-surface);
  border: 1px solid var(--qh-border);
  border-radius: var(--qh-radius);
  box-shadow: var(--qh-shadow);

  padding: 16px;
font-size: var(--qh-font-xs);
  /* 👇 SHOW PARTIAL + SCROLL */
  max-height: calc(100vh - 160px);
  overflow-y: auto;

  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.qh-sidebar-left:empty,
.qh-sidebar-right:empty {
  display: none;
}
/* subtle fade (scroll hint) */
.qh-sidebar-left::after,
.qh-sidebar-right::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 30px;
  background: linear-gradient(to bottom, transparent, var(--qh-surface));
}

/* =========================
   ORDER (MOBILE)
========================= */

.qh-sidebar-left { order: 1; }
.qh-content { order: 2; }
.qh-sidebar-right { order: 3; }

/* =========================
   MAIN CONTENT
========================= */

.qh-content {
  padding: 16px;
  background: var(--qh-bg);
  min-width: 0;
}

.qh-full {
  width: 100%;
  padding: 16px;
}

/* =========================
   SIDEBAR TOGGLE
========================= */

.qh-sidebar-toggle {
  width: 100%;
  padding: 12px 14px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: var(--qh-surface);
  border: 1px solid var(--qh-border);
  border-radius: 10px;

  font-weight: 600;
  cursor: pointer;
}

.qh-sidebar-toggle i {
  transition: transform 0.3s ease;
}

.qh-sidebar-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

/* collapse animation */
#qhSidebarMenu {
  transition: all 0.3s ease;
}

/* =========================
   NAV LINKS
========================= */

.qh-nav-link {
  display: block;
  padding: 12px 14px;
  margin-bottom: 4px;

  border-radius: 10px;
  text-decoration: none;
  color: var(--qh-text);

  transition: all 0.25s ease;
}

.qh-nav-link:hover {
  background: rgba(37, 99, 235, 0.07);
  transform: translateX(4px);
}

.qh-nav-active {
  color:black;
  background: var(--qh-activeback);
  border: var(--qh-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
}
/* Parent Category Link */
.qh-parent-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--qh-surface);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius);
    color: var(--qh-headings);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    transition: all 0.25s ease;
    text-decoration: none;
}
.qh-parent-link.qh-nav-active {
    background: var(--qh-activeback);
    color: var(--qh-active);
    border-color: var(--qh-primary);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
}
.qh-parent-link:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: var(--qh-primary);
    transform: translateX(2px);
}
/* =========================
   DESKTOP (≥ 992px)
========================= */

@media (min-width: 992px) {

  .qh-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .qh-sidebar-left,
  .qh-sidebar-right {
    width: 260px;
    flex-shrink: 0;

    position: sticky;
    top: 60px;

    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .qh-content {
    flex: 1;
    padding: 20px;
  }

  .qh-full {
    padding: 20px;
  }

  /* scrollbar styling */
  .qh-sidebar-left::-webkit-scrollbar {
    width: 6px;
  }

  .qh-sidebar-left::-webkit-scrollbar-thumb {
    background: var(--qh-border);
    border-radius: 10px;
  }
}

/* =========================
   SMALL LAPTOP (992–1200)
========================= */

@media (min-width: 992px) and (max-width: 1200px) {
  .qh-sidebar-left,
  .qh-sidebar-right {
    width: 220px;
  }
}
/* =========================
   MODAL SYSTEM
========================= */
.qh-modal {
    display: none; /* default hidden */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 4;

    align-items: center;
    justify-content: center;
}

.qh-modal.show {
    display: flex;
}

.qh-modal-content {
    width: 100%;
    max-width: 520px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}