/* Chinese FAQ - same layout as the parent handbook (faq-forKids.html, About ADHD blue/light blue) */

body.channel-resources .faq-section,
body.channel-resources section.faq-section.resources-cn-sidebar-left {
  background: #f8fafc;
}

.handbook-content.faq-handbook-main .cover.faq-cover {
  background: linear-gradient(165deg, #eff6ff 0%, #f8fafc 45%, #ffffff 100%);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.ref-source {
  color: #6c757d;
  font-size: 0.85rem;
}
.faq-answer .ref-source {
  display: block;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e9ecef;
}
.handbook-content.faq-handbook-main .faq-answer {
  color: #475569;
}

.handbook-content.faq-handbook-main .faq-cover {
  margin-bottom: 8px;
}
.handbook-content.faq-handbook-main .faq-cover .kicker {
  color: var(--blue-600, #185fa5);
}
.handbook-content.faq-handbook-main .faq-cover-title {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 12px !important;
}

.handbook-content.faq-handbook-main .faq-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 6px;
  margin-bottom: 3px !important;
  box-shadow: none;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}
.handbook-content.faq-handbook-main .faq-item:hover {
  border-color: rgba(59, 130, 246, 0.22);
  background: #eff6ff;
  box-shadow: none;
  transform: none;
}
.handbook-content.faq-handbook-main .faq-item:has(.faq-question.active) {
  border-color: rgba(59, 130, 246, 0.32);
  background: #dbeafe;
  box-shadow: none;
}

.handbook-content.faq-handbook-main button.faq-question {
  padding: 8px 10px !important;
  margin: 0;
  width: 100% !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.28 !important;
  gap: 6px;
  align-items: center;
  min-height: 0 !important;
  height: auto !important;
  cursor: pointer;
  background: transparent !important;
  color: var(--text, #2c2c2a) !important;
  transition: color 0.2s ease, background 0.22s ease;
}
.handbook-content.faq-handbook-main .faq-question > * {
  pointer-events: none;
}
.handbook-content.faq-handbook-main .faq-answer {
  cursor: text;
}
.handbook-content.faq-handbook-main .faq-question > .d-flex {
  align-items: center;
  min-height: 0;
  line-height: 1.28;
  padding: 0;
  margin: 0;
}
.handbook-content.faq-handbook-main button.faq-question:hover {
  background: transparent !important;
  color: #1e40af !important;
}
.handbook-content.faq-handbook-main .faq-item:hover .faq-toggle {
  opacity: 0.75;
  color: #1e40af;
}
.handbook-content.faq-handbook-main button.faq-question.active {
  background: transparent !important;
  color: #1e3a8a !important;
  font-weight: 600 !important;
}

.handbook-content.faq-handbook-main .faq-icon {
  display: none;
}

.handbook-content.faq-handbook-main .faq-toggle {
  font-size: 0.9rem;
  line-height: 1;
  margin: 0;
  opacity: 0.4;
  flex-shrink: 0;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.handbook-content.faq-handbook-main .faq-question.active .faq-toggle {
  transform: rotate(45deg);
  opacity: 0.75;
}

/* Answer area: padding must be 0 when collapsed, otherwise question rows grow */
.handbook-content.faq-handbook-main .faq-answer {
  display: block !important;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  line-height: 1.72;
  transition: max-height 0.38s ease, opacity 0.28s ease, padding 0.3s ease, border-color 0.3s ease;
}
.handbook-content.faq-handbook-main .faq-answer.show {
  max-height: 12000px;
  opacity: 1;
  margin: 0 !important;
  padding: 14px 12px 12px 12px !important;
  border-top: 1px solid rgba(59, 130, 246, 0.18) !important;
  /* Answer area very light green background */
  background-color: #fafdfb !important;
  border-radius: 0 0 10px 10px !important;
  animation: none !important;
}
.handbook-content.faq-handbook-main .faq-answer.show > :first-child {
  margin-top: 0;
}

.category-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 2rem 0 1rem;
  padding: 10px 14px;
  border-left: 3px solid rgba(59, 130, 246, 0.55);
  background: rgba(239, 246, 255, 0.85);
  border-radius: 0 10px 10px 0;
  scroll-margin-top: 100px;
}

.faq-contact-block {
  margin-top: 2.5rem;
  padding: 32px 28px;
  background: linear-gradient(135deg, #f3fbf8 0%, #eef8f5 100%);
  border: 1px solid rgba(34, 177, 140, 0.18);
  border-radius: 18px;
  text-align: center;
}
.faq-contact-block .faq-contact-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f6e56;
  margin-bottom: 0.6rem;
}
/* Unify both buttons to the same pill style */
.faq-contact-block .btn {
  border-radius: 50px !important;
  padding: 12px 30px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
}
.faq-contact-block .btn-primary {
  background: linear-gradient(135deg, #22b18c, #17876a) !important;
  border: 1px solid #17876a !important;
  color: #fff !important;
}
.faq-contact-block .btn-outline-primary {
  background: #fff !important;
  border: 1px solid #22b18c !important;
  color: #17876a !important;
}
.faq-contact-block .btn-outline-primary:hover {
  background: #eef8f5 !important;
}

.faq-toc-col .sidebar-cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: transparent;
  color: var(--text, #2c2c2a);
  text-decoration: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.48;
  transition: background 0.2s ease, color 0.2s ease;
}
.faq-toc-col .sidebar-cat-btn:last-child {
  margin-bottom: 0;
}
.faq-toc-col .sidebar-cat-btn:hover,
.faq-toc-col .sidebar-cat-btn.active {
  background: #dbeafe;
  color: #1e40af;
  transform: none;
  box-shadow: none;
}

/* FAQ right column - pinned category nav (same as handbook chapter TOC) */
@media (min-width: 992px) {
  section.resources-cn-sidebar-left.faq-section {
    overflow: visible !important;
  }
  section.resources-cn-sidebar-left.faq-section
    .handbook-parents-layout
    .handbook-chapter-toc-col.faq-toc-col {
    position: relative;
    align-self: flex-start;
    z-index: 3;
  }
  section.resources-cn-sidebar-left.faq-section
    .faq-toc-col
    .handbook-toc-slot {
    position: sticky;
    top: 6.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    z-index: 4;
  }
  section.resources-cn-sidebar-left.faq-section
    .faq-toc-col
    .handbook-toc-shell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: min(calc(100dvh - 7.25rem), calc(100vh - 7.25rem));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.35) transparent;
  }
  section.resources-cn-sidebar-left.faq-section
    .faq-toc-col
    .handbook-toc-shell::-webkit-scrollbar {
    width: 6px;
  }
  section.resources-cn-sidebar-left.faq-section
    .faq-toc-col
    .handbook-toc-shell::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.32);
    border-radius: 6px;
  }
  /* Avoid double-sticky conflicts with .handbook-toc-slot */
  section.resources-cn-sidebar-left.faq-section
    .faq-toc-col
    .sidebar-sticky {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0;
  }
}

@media (max-width: 991.98px) {
  .handbook-content.faq-handbook-main button.faq-question {
    padding: 0 8px !important;
    font-size: 0.86rem !important;
  }
  .handbook-content.faq-handbook-main .faq-answer.show {
    padding: 12px 10px 10px 10px !important;
  }
  section.resources-cn-sidebar-left.faq-section .faq-toc-col .handbook-toc-slot {
    position: static;
    top: auto;
  }
}