/* ============================================
   FAQ 独立页面样式 (方案 A: 分类 Tab + 折叠列表)
   scope: .faq-page 命名空间,不影响主站
   ============================================ */

.faq-page {
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF6EA 100%);
  min-height: 100vh;
}

/* Hero 区 */
.faq-page-hero {
  padding: 72px 0 48px;
  text-align: center;
}

.faq-page-title {
  font-size: 42px;
  font-weight: 800;
  color: #1F1F1F;
  margin: 8px 0 12px;
  letter-spacing: -0.5px;
}

.faq-page-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0 0 32px;
}

.faq-page-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.faq-page-search input {
  width: 100%;
  padding: 16px 48px 16px 52px;
  font-size: 16px;
  border: 2px solid rgba(255, 168, 76, 0.2);
  border-radius: 14px;
  background: #FFFFFF;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px -12px rgba(255, 132, 34, 0.15);
}

.faq-page-search input:focus {
  border-color: #FF8422;
  box-shadow: 0 8px 24px -8px rgba(255, 132, 34, 0.35);
}

.faq-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #FF8422;
  pointer-events: none;
}

#faqSearchClear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 168, 76, 0.15);
  color: #FF8422;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}

#faqSearchClear:hover {
  background: rgba(255, 168, 76, 0.3);
}

/* Body 区 */
.faq-page-body {
  padding: 24px 0 64px;
}

/* 分类 Tab */
.faq-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}

.faq-cat-tab {
  padding: 10px 20px;
  background: #FFFFFF;
  border: 1.5px solid rgba(255, 168, 76, 0.2);
  border-radius: 999px;
  font-size: 14px;
  color: #4A4A4A;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 500;
  white-space: nowrap;
}

.faq-cat-tab:hover {
  border-color: #FF8422;
  color: #FF8422;
}

.faq-cat-tab.is-active {
  background: linear-gradient(135deg, #FF8422 0%, #FFA84C 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(255, 132, 34, 0.4);
}

.faq-cat-tab .cat-count {
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.7;
}

/* 状态提示 (搜索无结果等) */
.faq-page-status {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 15px;
  background: #FFFFFF;
  border-radius: 16px;
  margin-bottom: 20px;
}

/* 折叠列表 */
.faq-accordion {
  list-style: none;
  margin: 0;
  padding: 0;
}

.faq-item {
  background: #FFFFFF;
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
  border: 1px solid rgba(255, 168, 76, 0.08);
}

.faq-item:hover {
  box-shadow: 0 8px 24px -12px rgba(255, 132, 34, 0.15);
}

.faq-item.is-open {
  box-shadow: 0 12px 32px -12px rgba(255, 132, 34, 0.2);
  border-color: rgba(255, 132, 34, 0.25);
}

.faq-item-question {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.faq-item-question:hover {
  background: rgba(255, 168, 76, 0.03);
}

.faq-item-cat {
  flex-shrink: 0;
  padding: 4px 10px;
  background: rgba(255, 168, 76, 0.12);
  color: #FF8422;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 2px;
}

.faq-item-title {
  flex: 1;
  font-size: 16.5px;
  font-weight: 600;
  color: #1F1F1F;
  line-height: 1.55;
}

.faq-item-title mark {
  background: #FFE7B8;
  color: #C86400;
  padding: 0 2px;
  border-radius: 2px;
}

.faq-item-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 168, 76, 0.12);
  color: #FF8422;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.3s ease, background 0.2s;
  line-height: 1;
}

.faq-item.is-open .faq-item-toggle {
  transform: rotate(45deg);
  background: #FF8422;
  color: #FFFFFF;
}

.faq-item-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.is-open .faq-item-answer {
  max-height: 2000px;
}

.faq-item-answer-inner {
  padding: 4px 24px 24px 24px;
  color: #4A4A4A;
  font-size: 15px;
  line-height: 1.85;
  border-top: 1px dashed rgba(255, 168, 76, 0.15);
  margin-top: 0;
}

.faq-item-answer-inner p {
  margin: 12px 0 0;
}

.faq-item-answer-inner strong {
  color: #FF8422;
  font-weight: 600;
}

.faq-item-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faq-item-tags span {
  padding: 4px 12px;
  background: rgba(255, 168, 76, 0.1);
  color: #FF8422;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}

/* 底部 CTA */
.faq-page-cta {
  padding: 24px 0 80px;
}

.faq-cta-card {
  background: linear-gradient(135deg, #FF8422 0%, #FFA84C 100%);
  border-radius: 20px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: #FFFFFF;
  box-shadow: 0 20px 50px -20px rgba(255, 132, 34, 0.4);
}

.faq-cta-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
}

.faq-cta-card p {
  margin: 0;
  opacity: 0.92;
  font-size: 15px;
  line-height: 1.6;
}

.faq-cta-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.faq-cta-card .btn-primary {
  background: #FFFFFF;
  color: #FF8422;
}

.faq-cta-card .btn-primary:hover {
  background: #FFF5E8;
}

.faq-cta-card .btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: #FFFFFF;
}

.faq-cta-card .btn-ghost:hover {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* 响应式 */
@media (max-width: 900px) {
  .faq-page-hero {
    padding: 48px 0 32px;
  }
  .faq-page-title {
    font-size: 30px;
  }
  .faq-item-question {
    padding: 16px 18px;
    gap: 12px;
  }
  .faq-item-title {
    font-size: 15px;
  }
  .faq-item-answer-inner {
    padding: 4px 18px 20px 18px;
    font-size: 14.5px;
  }
  .faq-cta-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
}
