/* ===== 帮助文档页面样式 ===== */

/* 外层居中容器 */
.help-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 主布局：侧边栏 + 内容区，上下顶满 */
.help-layout {
  display: flex;
  min-height: calc(100vh - 96px); /* header 60px + announcement ~36px */
  align-items: stretch;
}

/* 侧边栏：飞书风格，上下顶满 */
.help-sidebar {
  flex-shrink: 0;
  width: 220px;
  background: #fafafa;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.help-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  flex: 1;
}

.help-nav-section {
  border-bottom: 1px solid #f3f4f6;
}

.help-nav-section:last-child {
  border-bottom: none;
}

.help-nav-title {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s, color 0.2s;
}

.help-nav-title:hover {
  background: #f3f4f6;
  color: #f97316;
}

.help-nav-title::after {
  content: '›';
  font-size: 16px;
  color: #9ca3af;
  transition: transform 0.2s;
}

.help-nav-section.expanded .help-nav-title::after {
  transform: rotate(90deg);
  color: #f97316;
}

.help-nav-list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 0;
}

.help-nav-section:not(.expanded) .help-nav-list {
  display: none;
}

.help-nav-link {
  display: block;
  padding: 8px 16px 8px 28px;
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
}

.help-nav-link:hover {
  color: #f97316;
  background: #fffbeb;
}

.help-nav-link.active {
  color: #f97316;
  font-weight: 500;
  background: #fffbeb;
  border-left-color: #f97316;
}

/* 主内容区 */
.help-content {
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 32px 40px 48px;
  overflow-y: auto;
}

.help-content-panels {
  position: relative;
}

/* 内容面板：默认隐藏，激活时显示 */
.help-content-panel {
  display: none;
}

.help-content-panel.active {
  display: block;
}

.help-panel-title {
  margin: 0 0 20px 0;
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.help-article-body {
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
}

.help-article-body p {
  margin: 0 0 12px 0;
}

.help-article-body p:last-child {
  margin-bottom: 0;
}

/* 名词解释列表 */
.help-glossary-list {
  margin: 0;
  padding: 0;
}

.help-glossary-list dt {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-top: 20px;
  margin-bottom: 6px;
  padding-left: 10px;
  border-left: 3px solid #f97316;
}

.help-glossary-list dt:first-child {
  margin-top: 0;
}

.help-glossary-list dd {
  margin: 0 0 16px 0;
  padding: 0;
  color: #4b5563;
  line-height: 1.8;
}

.help-glossary-list strong {
  color: #374151;
  font-weight: 600;
}

/* 配方怎么看：分节样式 */
.help-intro {
  margin-bottom: 20px;
  font-weight: 500;
  color: #374151;
}

.help-howto-section {
  margin-bottom: 24px;
}

.help-howto-section:last-child {
  margin-bottom: 0;
}

.help-howto-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
  padding-left: 10px;
  border-left: 3px solid #f97316;
}

.help-howto-section p {
  margin: 0 0 12px 0;
}

.help-howto-section p:last-of-type {
  margin-bottom: 0;
}

.help-case-list {
  margin: 12px 0;
  padding-left: 24px;
  color: #4b5563;
  line-height: 1.9;
}

.help-case-list li {
  margin-bottom: 6px;
}

.help-case-list li:last-child {
  margin-bottom: 0;
}

/* 响应式：移动端 */
@media (max-width: 900px) {
  .help-layout {
    flex-direction: column;
    min-height: auto;
  }

  .help-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    max-height: none;
  }

  .help-nav {
    padding: 12px 0;
  }

  .help-nav-section.expanded .help-nav-list,
  .help-nav-section .help-nav-list {
    display: block;
  }

  .help-nav-title::after {
    display: none;
  }

  .help-content {
    padding: 24px 20px 40px;
  }

  .help-panel-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .help-wrapper {
    padding: 0 12px;
  }

  .help-content {
    padding: 20px 16px 32px;
  }

  .help-panel-title {
    font-size: 18px;
  }
}
