/* ==========================================================================
   常见问题页 - 独立原创样式
   布局：标号大字卷轴 + 粘性分类锚条 + 双栏问答墙 + 渐变 CTA
   每个分类独立成章，纵向卷轴展开感
   ========================================================================== */

/* ---------- Hero 装饰大问号 ---------- */
.faq-hero .container {
  position: relative;
  z-index: 2;
}

.faq-hero-mark {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-en);
  font-size: clamp(180px, 26vw, 340px);
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 2px rgba(155, 126, 222, 0.18);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  animation: faqMarkFloat 6s ease-in-out infinite;
}

@keyframes faqMarkFloat {
  0%, 100% { transform: translateY(-50%) rotate(-4deg); }
  50%      { transform: translateY(-54%) rotate(4deg); }
}

.faq-hero-stats {
  display: flex;
  flex-wrap: wrap;
  margin-top: 36px;
}

.faq-hero-stats > div {
  padding: 4px 38px;
  border-left: 1px solid rgba(155, 126, 222, 0.28);
}

.faq-hero-stats > div:first-child {
  padding-left: 0;
  border-left: none;
}

.faq-hero-stats strong {
  display: block;
  font-size: 32px;
  font-family: var(--font-en);
  color: var(--purple-deep);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.faq-hero-stats span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* ---------- 介绍引语 ---------- */
.faq-intro {
  max-width: 720px;
  margin: 8px 0 0;
  font-size: 15.5px;
  color: var(--body);
  line-height: 1.95;
}

.faq-intro strong {
  color: var(--purple-ink);
  font-weight: 600;
}

/* ---------- 粘性分类锚条 ---------- */
.faq-navwrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  background: rgba(251, 249, 253, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(107, 79, 174, 0.06);
}

.faq-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.faq-nav::-webkit-scrollbar {
  display: none;
}

.faq-nav .nav-label {
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--purple);
  font-family: var(--font-en);
  text-transform: uppercase;
  padding-right: 6px;
  border-right: 1px solid var(--line);
  margin-right: 4px;
}

.faq-nav a {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--body);
  background: #fff;
  border: 1px solid var(--line);
  transition: all 0.28s ease;
  white-space: nowrap;
}

.faq-nav a .num {
  font-family: var(--font-en);
  font-size: 11px;
  opacity: 0.65;
  font-weight: 700;
}

.faq-nav a:hover {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}

.faq-nav a:hover .num {
  opacity: 0.9;
}

/* ---------- 分类章节（独立成章） ---------- */
.faq-cat {
  padding: 88px 0;
  scroll-margin-top: calc(var(--nav-h) + 72px);
  position: relative;
  overflow: hidden;
}

.faq-cat--alt-a {
  background: linear-gradient(180deg, var(--purple-mist) 0%, var(--cream) 100%);
}

.faq-cat--alt-b {
  background: linear-gradient(180deg, var(--blue-mist) 0%, var(--cream) 100%);
}

.faq-cat--alt-c {
  background: linear-gradient(180deg, var(--pink-mist) 0%, var(--cream) 100%);
}

/* 分类主题色变量 */
.faq-cat--blue {
  --cat-color: var(--blue);
  --cat-deep: var(--blue-deep);
  --cat-mist: var(--blue-mist);
  --cat-soft: var(--blue-soft);
}

.faq-cat--purple {
  --cat-color: var(--purple);
  --cat-deep: var(--purple-deep);
  --cat-mist: var(--purple-mist);
  --cat-soft: var(--purple-soft);
}

.faq-cat--pink {
  --cat-color: var(--pink);
  --cat-deep: var(--pink-deep);
  --cat-mist: var(--pink-mist);
  --cat-soft: var(--pink-soft);
}

/* 章节头部：大号描边编号 + 信息 + 计数 */
.faq-cat-head {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 52px;
  padding-bottom: 28px;
  border-bottom: 1px dashed var(--line);
  position: relative;
}

.faq-cat-no {
  flex-shrink: 0;
  font-family: var(--font-en);
  font-size: clamp(80px, 11vw, 132px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -3px;
  color: transparent;
  -webkit-text-stroke: 2px var(--cat-color);
  transition: -webkit-text-stroke-color 0.4s ease;
  position: relative;
}

.faq-cat-no::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 10px;
  background: var(--cat-mist);
  z-index: -1;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.faq-cat-head:hover .faq-cat-no::after {
  transform: scaleX(1);
}

.faq-cat-info {
  flex: 1;
  min-width: 0;
}

.faq-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 3px;
  font-family: var(--font-en);
  text-transform: uppercase;
  color: var(--cat-deep);
  background: var(--cat-mist);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 12px;
  font-weight: 700;
}

.faq-cat-label svg {
  flex-shrink: 0;
}

.faq-cat-info h2 {
  font-size: clamp(26px, 3vw, 32px);
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.faq-cat-info p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.75;
}

.faq-cat-count {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 6px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--cat-deep);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.faq-cat-count::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat-color);
}

/* ---------- 问答墙：双栏网格 ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ---------- 单个 FAQ 卡片（覆盖 components.css，保留折叠逻辑） ---------- */
.faq-cat .faq-item {
  position: relative;
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin-bottom: 0;
  overflow: hidden;
  transition: border-color 0.32s ease, box-shadow 0.32s ease;
}

.faq-cat .faq-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--cat-color);
  opacity: 0.45;
  transition: opacity 0.3s ease, width 0.3s ease;
}

.faq-cat .faq-item:hover {
  border-color: var(--cat-soft);
  box-shadow: var(--shadow-md);
}

.faq-cat .faq-item:hover::before {
  opacity: 1;
  width: 6px;
}

.faq-cat .faq-item.open {
  border-color: var(--cat-soft);
  box-shadow: var(--shadow-md);
}

.faq-cat .faq-item.open::before {
  opacity: 1;
  width: 6px;
}

/* 问题行 */
.faq-cat .faq-q {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px 20px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}

.faq-qnum {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 15px;
  background: var(--cat-mist);
  color: var(--cat-deep);
  transition: background 0.32s ease, color 0.32s ease, transform 0.32s ease;
}

.faq-cat .faq-item:hover .faq-qnum {
  transform: scale(1.06);
}

.faq-cat .faq-item.open .faq-qnum {
  background: var(--cat-color);
  color: #fff;
  transform: scale(1.06);
}

.faq-qtext {
  flex: 1;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  transition: color 0.25s ease;
}

.faq-cat .faq-item:hover .faq-qtext {
  color: var(--cat-deep);
}

/* 切换图标（自定义 SVG） */
.faq-cat .faq-q .ico {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cat-mist);
  color: var(--cat-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.32s ease, color 0.32s ease, transform 0.32s ease;
}

.faq-cat .faq-item.open .faq-q .ico {
  background: var(--cat-color);
  color: #fff;
  transform: rotate(45deg);
}

/* 答案区：保留折叠机制，覆盖外观 */
.faq-cat .faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.42s ease;
}

.faq-cat .faq-item.open .faq-a {
  max-height: 640px;
}

.faq-cat .faq-a-inner {
  margin: 0 24px 22px 66px;
  padding: 16px 20px;
  background: var(--cat-mist);
  border-left: 3px solid var(--cat-color);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--body);
  line-height: 1.9;
}

.faq-cat .faq-a-inner p {
  margin-bottom: 8px;
}

.faq-cat .faq-a-inner p:last-child {
  margin-bottom: 0;
}

.faq-cat .faq-a-inner strong {
  color: var(--cat-deep);
  font-weight: 600;
}

.faq-cat .faq-a-inner a {
  color: var(--cat-deep);
  font-weight: 600;
  border-bottom: 1px dashed var(--cat-color);
}

.faq-cat .faq-a-inner a:hover {
  color: var(--pink-deep);
}

.faq-cat .faq-a-inner code {
  font-family: "SF Mono", "Consolas", "Monaco", monospace;
  background: rgba(255, 255, 255, 0.65);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--cat-deep);
}

/* ---------- 仍有疑问 CTA：渐变分栏卡片 ---------- */
.faq-cta {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, var(--purple-ink) 0%, var(--purple-deep) 55%, var(--blue-deep) 100%);
  border-radius: var(--r-xl);
  padding: 52px 56px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-purple);
}

.faq-cta::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 123, 169, 0.22) 0%, transparent 70%);
}

.faq-cta::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 179, 232, 0.22) 0%, transparent 70%);
}

.faq-cta-illu {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-cta-illu .ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  backdrop-filter: blur(4px);
}

.faq-cta-illu .ring::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  animation: faqRingSpin 18s linear infinite;
}

@keyframes faqRingSpin {
  to { transform: rotate(360deg); }
}

.faq-cta-text {
  position: relative;
  z-index: 1;
}

.faq-cta-text .eyebrow {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 3px;
  color: var(--pink-soft);
  text-transform: uppercase;
  font-family: var(--font-en);
  margin-bottom: 14px;
  padding: 5px 16px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--r-pill);
}

.faq-cta-text h3 {
  font-size: 30px;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.3;
}

.faq-cta-text p {
  font-size: 15px;
  color: rgba(251, 249, 253, 0.82);
  line-height: 1.9;
  margin-bottom: 28px;
  max-width: 480px;
}

.faq-cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.faq-cta-actions .btn {
  padding: 13px 28px;
}

.faq-cta-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.faq-cta-actions .btn-ghost:hover {
  background: #fff;
  color: var(--purple-deep);
  border-color: #fff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .faq-cta {
    padding: 44px 40px;
    gap: 28px;
  }
  .faq-cat-head {
    gap: 26px;
  }
}

@media (max-width: 980px) {
  .faq-cat {
    padding: 64px 0;
  }
  .faq-cat-head {
    gap: 22px;
    margin-bottom: 38px;
  }
  .faq-cat-info h2 {
    font-size: 24px;
  }
  .faq-cta {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 34px;
    text-align: center;
  }
  .faq-cta-text {
    text-align: center;
  }
  .faq-cta-text p {
    margin-left: auto;
    margin-right: auto;
  }
  .faq-cta-actions {
    justify-content: center;
  }
  .faq-cta-illu .ring {
    width: 160px;
    height: 160px;
  }
  .faq-hero-mark {
    right: -4%;
    opacity: 0.6;
  }
}

@media (max-width: 760px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .faq-cat-head {
    flex-wrap: wrap;
    gap: 16px;
  }
  .faq-cat-no {
    font-size: 72px;
  }
  .faq-cat-count {
    order: 3;
    align-self: auto;
  }
  .faq-cat .faq-q {
    padding: 18px 20px 16px;
    gap: 12px;
  }
  .faq-qnum {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .faq-qtext {
    font-size: 14.5px;
  }
  .faq-cat .faq-q .ico {
    width: 30px;
    height: 30px;
  }
  .faq-cat .faq-a-inner {
    margin: 0 18px 18px 56px;
    padding: 14px 16px;
    font-size: 13.5px;
  }
  .faq-cta {
    padding: 34px 24px;
  }
  .faq-cta-text h3 {
    font-size: 24px;
  }
  .faq-nav .nav-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .faq-hero-stats {
    flex-direction: column;
    gap: 16px;
    margin-top: 28px;
  }
  .faq-hero-stats > div {
    border-left: none;
    border-top: 1px solid rgba(155, 126, 222, 0.2);
    padding: 14px 0 0;
  }
  .faq-hero-stats > div:first-child {
    border-top: none;
    padding-top: 0;
  }
  .faq-cat .faq-a-inner {
    margin: 0 16px 16px 16px;
  }
  .faq-cta-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
