/* ============================================================
   page-bangzhu-zhongxin.css — 帮助中心 · Editorial v3
   色彩节奏：
     Hero          → 暖渐变全出血，左对齐大标题 + 底线搜索
     Bento 快捷    → 白色色带，暖纸卡片
     FAQ           → 纸色温底 (--ed-paper2)，左侧粘性栏
     CTA           → 白色包装，内嵌墨深圆角块
   ============================================================ */

/* ── Page wrapper ── */
.hbz-page {
  padding-top: 0;
  padding-bottom: 0;
}

/* =============================================================
   HERO — 左对齐大标题 + 底线搜索框
   ============================================================= */
.hbz-hero {
  background: linear-gradient(145deg, #faf6ef 0%, #efe6d8 48%, #e8dcc8 100%);
  padding: calc(var(--nav-height) + clamp(56px, 9vw, 104px))
           max(clamp(20px, 4vw, 48px), calc((100% - 1200px) / 2 + 24px))
           clamp(56px, 8vw, 96px);
}

.hbz-hero__inner {
  max-width: 48rem;
}

/* "Service & Support" 标签 */
.hbz-kicker {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(20, 18, 15, 0.38);
  margin-bottom: 24px;
}

/* 大标题 */
.hbz-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ed-ink, #14120f);
  margin-bottom: clamp(32px, 5vw, 48px);
}

.hbz-title em {
  font-style: italic;
  font-weight: 400;
  color: rgba(20, 18, 15, 0.18);
}

/* 底线搜索框 */
.hbz-search {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(20, 18, 15, 0.12);
  transition: border-color 0.3s ease;
}

.hbz-search:focus-within {
  border-bottom-color: var(--ed-ink, #14120f);
}

.hbz-search__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.22;
  stroke-width: 2;
}

.hbz-search__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 300;
  font-family: inherit;
  color: var(--ed-ink, #14120f);
}

.hbz-search__input::placeholder {
  color: rgba(20, 18, 15, 0.28);
}

/* 清除按钮 */
.hbz-search__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  background: rgba(20, 18, 15, 0.07);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(20, 18, 15, 0.42);
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.hbz-search__clear:hover {
  background: rgba(20, 18, 15, 0.14);
  color: var(--ed-ink, #14120f);
}

.hbz-search__clear svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

/* 搜索激活态：图标稍亮 */
.hbz-search--active .hbz-search__icon {
  opacity: 0.5;
}

/* 搜索高亮 mark */
mark.hbz-search-hl {
  background: #fde68a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* 无搜索结果提示 */
.hbz-search-noresults {
  padding: clamp(40px, 7vw, 72px) 0;
  flex: 1;
  min-width: 0;
}

.hbz-search-noresults__text {
  font-size: 15px;
  color: rgba(20, 18, 15, 0.38);
  margin: 0;
}

.hbz-search-noresults__query {
  font-weight: 600;
  color: rgba(20, 18, 15, 0.6);
}

/* 搜索时隐藏 FAQ 项 */
.hbz-faq[hidden] {
  display: none;
}

.hbz-topic[hidden] {
  display: none;
}

/* =============================================================
   QUICK NAV — 4 等宽卡片横排（对齐 ed-steps 节奏）
   白色色带；卡片暖纸底 + 大号 Fraunces 装饰水印序号
   ============================================================= */
.hbz-qnav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: #ffffff;
  padding: clamp(48px, 7vw, 80px)
           max(clamp(20px, 4vw, 48px), calc((100% - 1200px) / 2 + 24px));
}

/* 单张卡片 */
.hbz-qnav-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(28px, 3.5vw, 40px) clamp(24px, 3vw, 36px) clamp(24px, 3vw, 36px);
  text-decoration: none;
  color: var(--ed-ink, #14120f);
  border-right: 1px solid rgba(20, 18, 15, 0.07);
  overflow: hidden;
  transition: background 0.3s ease;
}

.hbz-qnav-card:last-child {
  border-right: none;
}

.hbz-qnav-card:hover {
  background: #fcf9f4;
}

/* 大号装饰序号（Fraunces 水印） */
.hbz-qnav-num {
  position: absolute;
  right: clamp(16px, 2.5vw, 24px);
  top: clamp(16px, 2vw, 22px);
  font-family: 'Fraunces', serif;
  font-size: clamp(52px, 8vw, 80px);
  font-weight: 700;
  line-height: 1;
  color: var(--ed-ink, #14120f);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease;
}

.hbz-qnav-card:hover .hbz-qnav-num {
  opacity: 0.07;
}

/* 图标方块 */
.hbz-qnav-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s ease;
}

.hbz-qnav-ico svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.hbz-qnav-ico--green  { background: rgba(13, 92, 77, 0.1);    color: #0d5c4d; }
.hbz-qnav-ico--blue   { background: rgba(29, 78, 216, 0.08);  color: #1d4ed8; }
.hbz-qnav-ico--orange { background: rgba(194, 65, 12, 0.08);  color: #c2410c; }
.hbz-qnav-ico--purple { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }

.hbz-qnav-card:hover .hbz-qnav-ico--green  { background: rgba(13, 92, 77, 0.15); }
.hbz-qnav-card:hover .hbz-qnav-ico--blue   { background: rgba(29, 78, 216, 0.13); }
.hbz-qnav-card:hover .hbz-qnav-ico--orange { background: rgba(194, 65, 12, 0.13); }
.hbz-qnav-card:hover .hbz-qnav-ico--purple { background: rgba(124, 58, 237, 0.13); }

/* 标题 + 描述 */
.hbz-qnav-title {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 700;
  color: var(--ed-ink, #14120f);
  line-height: 1.25;
}

.hbz-qnav-desc {
  font-size: 13px;
  color: rgba(20, 18, 15, 0.42);
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

/* 底部箭头：hover 滑入 */
.hbz-qnav-arrow {
  display: flex;
  align-items: center;
  color: var(--ed-accent, #0d5c4d);
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  margin-top: auto;
}

.hbz-qnav-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.hbz-qnav-card:hover .hbz-qnav-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* =============================================================
   FAQ SECTION — 纸色温底 + 左侧粘性栏 + 右侧问答
   ============================================================= */
.hbz-faq-section {
  background: #f2ebe0; /* --ed-paper2 */
  padding: clamp(64px, 9vw, 104px)
           max(clamp(20px, 4vw, 48px), calc((100% - 1200px) / 2 + 24px));
  overflow: visible;
}

/* Flexbox 比 Grid 对 sticky 的支持更可靠：
   align-items: flex-start 让每列高度贴内容，aside 才有"可滑动余量" */
.hbz-faq-layout {
  display: flex;
  align-items: flex-start;
  gap: clamp(40px, 8vw, 120px);
}

/* Flex 子元素 sticky：
   flex-shrink: 0 防止宽度被压缩；
   height: fit-content + align-self: flex-start 确保高度 = 内容高度 */
.hbz-faq-aside {
  position: sticky;
  top: max(calc(var(--nav-height, 72px) + 24px), calc(env(safe-area-inset-top, 0px) + var(--nav-height, 72px) + 8px));
  z-index: 2;
  flex: 0 0 clamp(200px, 30%, 320px);
  align-self: flex-start;
  height: fit-content;
  max-height: calc(100vh - var(--nav-height, 72px) - 40px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hbz-faq-aside__inner h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  font-weight: 700;
  color: var(--ed-ink, #14120f);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.hbz-faq-aside__inner > p {
  font-size: 14px;
  color: rgba(20, 18, 15, 0.45);
  line-height: 1.72;
  margin-bottom: 36px;
}

/* 统计数字 */
.hbz-faq-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hbz-faq-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hbz-faq-stat__num {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--ed-ink, #14120f);
  line-height: 1;
}

.hbz-faq-stat__label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(20, 18, 15, 0.28);
}

.hbz-faq-stat__sep {
  width: 1px;
  height: 40px;
  background: rgba(20, 18, 15, 0.12);
}

/* 右侧：FAQ 主题列表，flex: 1 占满剩余宽度，min-width: 0 防溢出 */
.hbz-faq-topics {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 9vw, 96px);
}

/* ── Topic 主题块 ── */
.hbz-topic {
  position: relative;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* 大背景序号 */
.hbz-topic__bg-num {
  position: absolute;
  right: -8px;
  top: -28px;
  font-family: 'Fraunces', serif;
  font-size: clamp(80px, 16vw, 128px);
  font-weight: 700;
  color: var(--ed-ink, #14120f);
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* 彩色分类标签 */
.hbz-topic__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hbz-topic__cat--green  { color: rgba(13, 92, 77, 0.6); }
.hbz-topic__cat--blue   { color: rgba(29, 78, 216, 0.6); }
.hbz-topic__cat--orange { color: rgba(194, 65, 12, 0.6); }
.hbz-topic__cat--purple { color: rgba(124, 58, 237, 0.6); }
.hbz-topic__cat--slate  { color: rgba(51, 65, 85, 0.6); }

/* ── FAQ accordion ── */
.hbz-faq-list {
  display: flex;
  flex-direction: column;
}

.hbz-faq {
  border-bottom: 1px solid rgba(20, 18, 15, 0.08);
  scroll-margin-top: calc(var(--nav-height) + 12px);
  transition: border-bottom-color 0.3s ease;
}

.hbz-faq:hover {
  border-bottom-color: var(--ed-accent, #0d5c4d);
}

.hbz-faq__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
}

.hbz-faq__summary::-webkit-details-marker {
  display: none;
}

.hbz-faq__q {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ed-ink, #14120f);
}

.hbz-faq__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.2;
  stroke-width: 2;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
}

.hbz-faq[open] .hbz-faq__icon {
  transform: rotate(135deg);
  opacity: 0.5;
}

.hbz-faq__body {
  padding-bottom: clamp(16px, 3vw, 24px);
  font-size: 15px;
  line-height: 1.78;
  color: rgba(20, 18, 15, 0.5);
}

.hbz-faq__body p {
  margin: 0;
}

.hbz-faq__body strong {
  color: var(--ed-ink, #14120f);
  font-weight: 700;
}

.hbz-faq__body a {
  color: var(--ed-accent, #0d5c4d);
  font-weight: 600;
  text-underline-offset: 3px;
}

.hbz-faq__body a:hover {
  opacity: 0.72;
}

/* =============================================================
   FOOTER CTA — 白色包装 + 内嵌墨深双列卡
   ============================================================= */
.hbz-cta-section {
  background: #ffffff;
  padding: clamp(48px, 7vw, 80px)
           max(clamp(20px, 4vw, 48px), calc((100% - 1200px) / 2 + 24px));
  padding-bottom: clamp(72px, 10vw, 120px);
}

.hbz-cta__inner {
  background: linear-gradient(165deg, #1c1916 0%, #14120f 100%);
  border-radius: 48px;
  padding: clamp(48px, 8vw, 96px) clamp(32px, 6vw, 80px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(26, 18, 10, 0.18);
}

/* M4 水印 */
.hbz-cta__bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: min(28vw, 400px);
  font-weight: 700;
  color: white;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* 双列网格 */
.hbz-cta__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hbz-cta__title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #f0ebe3;
  margin-bottom: clamp(14px, 2vw, 20px);
  line-height: 1.1;
}

.hbz-cta__desc {
  color: rgba(240, 235, 227, 0.38);
  font-size: 14px;
  line-height: 1.72;
  max-width: 28rem;
  margin: 0;
}

/* 右列：邮件 + 按钮 */
.hbz-cta__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}

/* 邮件链接：大号 Fraunces */
.hbz-cta__email {
  font-family: 'Fraunces', serif;
  font-size: clamp(1rem, 2.2vw, 1.65rem);
  font-weight: 400;
  color: #f0ebe3;
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 235, 227, 0.2);
  padding-bottom: 6px;
  transition: border-color 0.25s ease;
}

.hbz-cta__email:hover {
  border-color: rgba(240, 235, 227, 0.9);
}

/* 主按钮 */
.hbz-cta__btn {
  display: inline-block;
  background: #f5f0e8;
  color: var(--ed-ink, #14120f);
  padding: 16px 40px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hbz-cta__btn:hover {
  background: #ffffff;
  transform: scale(1.04);
}

/* =============================================================
   FADE-IN (IntersectionObserver in page-bangzhu-zhongxin.js)
   ============================================================= */
#page-bangzhu .fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#page-bangzhu .fade-in.visible {
  opacity: 1;
  transform: none;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .hbz-faq-layout {
    flex-direction: column;
    gap: clamp(32px, 5vw, 56px);
  }

  .hbz-faq-aside {
    position: static;
    flex: none;
    width: 100%;
    height: auto;
  }

  .hbz-faq-aside__inner h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
  }
}

@media (max-width: 768px) {
  .hbz-qnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hbz-qnav-card:nth-child(2) {
    border-right: none;
  }

  .hbz-qnav-card:nth-child(1),
  .hbz-qnav-card:nth-child(2) {
    border-bottom: 1px solid rgba(20, 18, 15, 0.07);
  }

  .hbz-cta__grid {
    grid-template-columns: 1fr;
    gap: clamp(24px, 5vw, 40px);
  }

  .hbz-cta__links {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hbz-qnav {
    grid-template-columns: 1fr;
  }

  .hbz-qnav-card {
    border-right: none;
    border-bottom: 1px solid rgba(20, 18, 15, 0.07);
  }

  .hbz-qnav-card:last-child {
    border-bottom: none;
  }

  .hbz-cta__inner {
    border-radius: 28px;
  }

  .hbz-cta__btn {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  #page-bangzhu .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hbz-bento-item:hover {
    transform: none;
  }

  .hbz-faq__icon {
    transition: none;
  }

  .hbz-cta__btn:hover {
    transform: none;
  }
}

/* ── Sticky FAQ 侧栏：html overflow-x:hidden 会破坏 position:sticky（与定价页一致） ── */
html:has(#page-bangzhu) {
  overflow-x: clip !important;
}

html.home-editorial:has(#page-bangzhu) body {
  overflow-x: clip !important;
}

#page-bangzhu.hbz-page {
  overflow-x: clip !important;
  overflow-y: visible !important;
}
