/* 帮助中心 — 左栏导航 + 右侧内容 */

.page-help {
  font-size: 16px;
}

.page-help .header-main--simple .header-main-inner {
  justify-content: space-between;
}

.page-help .page-wrap {
  background: var(--bg-page);
  padding-top: 16px;
}

/* 避免外链 hash 触发浏览器锚点滚动（区块 id 已改为 data-help-section） */
.page-help {
  scroll-padding-top: 0;
}

.help-center {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
  box-sizing: border-box;
}

.help-center-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 560px;
}

/* 左侧导航 — 标签在卡片高度内均匀分布 */
.help-center-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--primary);
  min-height: 560px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.12);
}

.help-center-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 10px 0 12px;
  list-style: none;
  box-sizing: border-box;
}

.help-center-nav li {
  flex: 1;
  display: flex;
  min-height: 0;
  margin: 0;
}

.help-center-nav a {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  text-align: center;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
}

.help-center-nav a:hover,
.help-center-nav a.is-active {
  background: rgba(255, 255, 255, 0.4);
  color: #fff;
  font-weight: 600;
}

.nav-arrow-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 1;
}

.help-center-nav a.is-active .nav-arrow-icon,
.help-center-nav a:hover .nav-arrow-icon {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* 右侧内容 */
.help-center-main {
  padding: 20px 30px 36px;
  background: #fff;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-height: 560px;
  box-sizing: border-box;
}

.help-center-crumb {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.4;
}

.help-panel {
  display: none;
}

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

/* 富文本内容区（后端注入 HTML / 图片） */
.help-rich-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.help-rich-content p {
  margin: 0 0 14px;
}

.help-rich-content p:last-child {
  margin-bottom: 0;
}

.help-rich-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 4px;
}

.help-rich-content ul,
.help-rich-content ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

.help-panel-body.help-rich-content {
  padding: 4px 0 0;
}

/* 列表型面板（注册登录、常见问题） */
.help-panel--list.is-active {
  display: block;
}

.help-go-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  transition: transform 0.2s ease;
  filter: brightness(0) saturate(100%) invert(52%) sepia(98%) saturate(2476%) hue-rotate(346deg) brightness(101%) contrast(101%);
}

.help-topic-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.55;
  cursor: pointer;
  text-align: left;
}

.help-topic-head:hover {
  color: var(--text);
}

.help-topic-title {
  flex: 1;
  min-width: 0;
}

.help-topic-item.is-expanded .help-go-icon {
  transform: rotate(90deg);
}

.help-topic-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.help-topic-item {
  margin: 0 0 6px;
}

.help-topic-body {
  display: none;
  padding: 0 0 14px 30px;
}

.help-topic-item.is-expanded .help-topic-body {
  display: block;
}

.help-topic-body .help-rich-content {
  padding: 0;
}

/* 整块富文本面板 */
.help-panel--rich.is-active {
  display: block;
}

.help-panel-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.help-panel-list li {
  position: relative;
  padding: 0 0 0 14px;
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.help-panel-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 1px;
}

.help-panel-list li strong {
  color: var(--text);
  font-weight: 600;
}

.help-app-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.help-app-qr {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  background: #fafafa;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.help-wechat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.help-wechat-box {
  text-align: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.help-wechat-box .qr {
  width: 100px;
  height: 100px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  background: #fafafa;
  font-size: 13px;
  color: var(--text-muted);
}

.help-contact-list p {
  margin: 0 0 10px;
}

@media (max-width: 992px) {
  .page-help .page-wrap {
    padding-top: 0;
  }

  .help-center {
    padding: 14px 12px 24px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .help-center-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
  }

  .help-center-sidebar {
    min-height: auto;
    height: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: none;
    overflow: hidden;
  }

  .help-center-nav {
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-padding-inline: 12px;
    scrollbar-width: none;
  }

  .help-center-nav::-webkit-scrollbar {
    display: none;
  }

  .help-center-nav li {
    flex: 0 0 auto;
    margin: 0;
  }

  .help-center-nav a {
    flex: 0 0 auto;
    justify-content: center;
    width: auto;
    min-height: 44px;
    padding: 8px 14px;
    margin: 0;
    border-right: 1px solid var(--border);
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    background: #fff;
  }

  .help-center-nav li:last-child a {
    border-right: none;
  }

  .help-center-nav a:hover,
  .help-center-nav a.is-active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
    border-radius: 0;
  }

  .nav-arrow-icon {
    display: none;
  }

  .help-center-main {
    min-height: auto;
    border-radius: 8px;
    padding: 16px 18px 28px;
  }

  .help-topic-head {
    font-size: 15px;
    padding: 10px 0;
  }
}

@media (max-width: 768px) {
  .help-center {
    padding: 12px 12px 20px;
  }

  .help-center-main {
    padding: 14px 16px 24px;
  }

  .help-center-crumb {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .help-app-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .help-wechat-grid {
    grid-template-columns: 1fr;
  }

  .help-topic-title {
    font-size: 15px;
  }
}

