/* ===== page-faq 专属样式 ===== */
.page-faq {
  display: block;
  background: var(--bg-light);
  padding: 2rem 1rem 3rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* 面包屑 */
.page-faq .breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
.page-faq .breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.page-faq .breadcrumb li {
  color: #6c757d;
}
.page-faq .breadcrumb li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: #aaa;
}
.page-faq .breadcrumb a {
  color: var(--green);
  text-decoration: none;
}
.page-faq .breadcrumb a:hover {
  text-decoration: underline;
}
.page-faq .breadcrumb [aria-current="page"] {
  color: var(--text-dark);
  font-weight: 600;
}

/* 页面标题 */
.page-faq .page-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 0.3rem;
  color: var(--text-dark);
  border-left: 6px solid var(--orange);
  padding-left: 1rem;
}
.page-faq .page-title-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* 布局容器 */
.page-faq .faq-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

/* ---- 索引 ---- */
.page-faq .faq-index {
  background: #fff;
  border: 2px solid var(--green);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  order: -1;
}
.page-faq .faq-index-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.page-faq .faq-index ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
}
.page-faq .faq-index li {
  font-size: 0.9rem;
}
.page-faq .faq-index a {
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.page-faq .faq-index a:hover,
.page-faq .faq-index a:focus {
  background: rgba(27, 122, 61, 0.08);
  border-color: var(--green-light);
  outline: none;
}

/* ---- 内容区 ---- */
.page-faq .faq-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ---- 分类 ---- */
.page-faq .faq-category {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem 1.25rem 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid #e9ecef;
  position: relative;
}
.page-faq .faq-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.page-faq #faq-cat-1.faq-category::before { background: var(--orange); }
.page-faq #faq-cat-2.faq-category::before { background: var(--blue); }
.page-faq #faq-cat-3.faq-category::before { background: var(--green); }

.page-faq .faq-category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px dashed #dee2e6;
}
.page-faq .faq-cat-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--bg-light);
  padding: 4px;
  flex-shrink: 0;
}

/* ---- 折叠面板项 ---- */
.page-faq .faq-item {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
  background: #fafbfc;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.page-faq .faq-item[open] {
  border-color: var(--green-light);
  box-shadow: 0 0 0 1px rgba(27, 122, 61, 0.12);
}

/* 印刷装饰：内框线 */
.page-faq .faq-item::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(27, 122, 61, 0.1);
  border-radius: calc(var(--border-radius) - 1px);
  pointer-events: none;
}

/* 问题标签 */
.page-faq .faq-question {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-dark);
  background: #fff;
  border-radius: var(--border-radius);
  transition: background var(--transition);
  user-select: none;
  position: relative;
  z-index: 1;
}
.page-faq .faq-question::-webkit-details-marker {
  display: none;
}
.page-faq .faq-question:hover {
  background: rgba(27, 122, 61, 0.04);
}
.page-faq .faq-question::before {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--orange);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  line-height: 1;
}
.page-faq .faq-item[open] .faq-question::before {
  content: "−";
  transform: rotate(180deg);
}

.page-faq .faq-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(27, 122, 61, 0.08);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  flex-shrink: 0;
  min-width: 2.2rem;
  text-align: center;
}
.page-faq .faq-question-text {
  flex: 1;
  min-width: 0;
}

/* 答案内容 */
.page-faq .faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 1.25rem 0 1rem;
  transition: max-height 0.45s ease, opacity 0.35s ease, padding 0.35s ease;
  border-top: 0 solid transparent;
}
.page-faq .faq-item[open] .faq-answer {
  max-height: 1000px;
  opacity: 1;
  padding: 0.75rem 1.25rem 1.25rem 1rem;
  border-top: 1px solid #e9ecef;
}
.page-faq .faq-answer p {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2c2c2e;
}
.page-faq .faq-answer p:last-child {
  margin-bottom: 0;
}
.page-faq .highlight {
  color: var(--green);
  font-weight: 700;
}

/* 步骤列表 */
.page-faq .faq-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}
.page-faq .faq-steps li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.3rem;
}
.page-faq .step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 普通列表 */
.page-faq .faq-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
}
.page-faq .faq-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.2rem;
}
.page-faq .faq-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--green-light);
  font-weight: 700;
}

/* 答案中的链接 */
.page-faq .faq-link,
.page-faq .faq-answer a[href^="/"],
.page-faq .faq-answer a[href^="mailto:"] {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.page-faq .faq-link:hover,
.page-faq .faq-answer a:hover {
  color: var(--orange);
  text-decoration: none;
}

/* 演示图片 */
.page-faq .faq-demo-img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  margin: 1rem 0 0.2rem;
  background: #f0f2f4;
  object-fit: cover;
}

/* ===== 响应式：桌面 ≥ 900px ===== */
@media (min-width: 900px) {
  .page-faq {
    padding: 2.5rem 2rem 4rem;
  }
  .page-faq .page-title {
    font-size: 2.8rem;
  }
  .page-faq .faq-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
  }
  .page-faq .faq-index {
    order: 0;
    flex: 0 0 260px;
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
  .page-faq .faq-index ul {
    flex-direction: column;
    gap: 0.3rem;
  }
  .page-faq .faq-index a {
    white-space: normal;
    display: block;
    padding: 0.35rem 0.8rem;
    font-size: 0.92rem;
  }
  .page-faq .faq-content {
    flex: 1;
    min-width: 0;
  }
  .page-faq .faq-category {
    padding: 2rem 1.75rem 2rem;
  }
  .page-faq .faq-category-title {
    font-size: 1.6rem;
  }
  .page-faq .faq-cat-icon {
    width: 56px;
    height: 56px;
  }
  .page-faq .faq-question {
    font-size: 1.02rem;
    padding: 1rem 1.5rem 1rem 1.25rem;
  }
  .page-faq .faq-answer {
    padding: 0 1.5rem 0 1.25rem;
  }
  .page-faq .faq-item[open] .faq-answer {
    padding: 1rem 1.5rem 1.5rem 1.25rem;
  }
  .page-faq .faq-demo-img {
    max-width: 420px;
  }
}

/* ===== 桌面宽屏 ≥ 1200px ===== */
@media (min-width: 1200px) {
  .page-faq .faq-index {
    flex: 0 0 300px;
  }
  .page-faq .faq-category {
    padding: 2rem 2.25rem 2.25rem;
  }
}
