/* 常见问题 */
.faq { max-width: 1120px; margin: 0 auto; padding: 28px 32px 56px; }

/* 头部：标题 + 搜索 + 常问 */
.faq-head { position: relative; display: flex; align-items: center; gap: 32px; padding: 36px 44px; margin-bottom: 26px; border-radius: 28px; border: 1px solid #dfe9f8; overflow: hidden;
  background: radial-gradient(circle at 88% 30%, rgba(255, 255, 255, .9) 0, rgba(255, 255, 255, 0) 260px), linear-gradient(120deg, #e4eeff 0%, #efeaff 55%, #fff1e2 100%); }
.faq-head::before, .faq-head::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.faq-head::before { width: 220px; height: 220px; right: -60px; bottom: -110px; background: rgba(255, 178, 77, .16); }
.faq-head::after { width: 120px; height: 120px; left: 42%; top: -70px; background: rgba(106, 92, 246, .08); }
.faq-head-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.faq-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: #5a74a8; font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.faq-head h1 { margin-top: 10px; font-size: 34px; font-weight: 900; color: #22345a; }
.faq-head p { margin-top: 6px; font-size: 14px; color: var(--g-text-muted); }
.faq-head-art { position: relative; z-index: 1; width: 160px; height: 160px; flex-shrink: 0; border-radius: 34px; object-fit: cover; box-shadow: 0 20px 40px -14px rgba(61, 92, 160, .45); transform: rotate(5deg); }
.faq-search { display: flex; align-items: center; gap: 10px; max-width: 560px; height: 52px; margin-top: 18px; padding: 0 8px 0 18px; border-radius: 16px; background: #fff; border: 1.5px solid #e1e9f7; box-shadow: 0 10px 24px -16px rgba(40, 80, 160, .35); transition: border-color .15s, box-shadow .15s; }
.faq-search:focus-within { border-color: var(--g-primary); box-shadow: 0 0 0 4px rgba(61, 124, 245, .12); }
.faq-search > i { color: #a9b8d3; }
.faq-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; color: var(--g-text); }
.faq-search input::-webkit-search-cancel-button { display: none; }
.faq-search button { width: 34px; height: 34px; border-radius: 10px; color: #9aa6bb; }
.faq-search button:hover { background: #f1f5fb; color: var(--g-text); }
.faq-hot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: #7d8aa3; }
.faq-hot button { max-width: 240px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: #4a5f86; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s; }
.faq-hot button:hover { background: #fff; color: var(--g-primary); }

/* 主体：左边问题、右边客服 */
.faq-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }

.faq-cats { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.faq-cats::-webkit-scrollbar { display: none; }
.faq-cats button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 12px; background: #fff; border: 1px solid #e3eaf5; color: #5b6b86; font-size: 14px; font-weight: 700; transition: border-color .15s, background .15s, color .15s; }
.faq-cats button:hover { border-color: #c5d5f0; color: var(--g-primary); }
.faq-cats button em { min-width: 2.4ch; padding: 1px 6px; border-radius: 999px; background: #eef2f9; color: #8a97ad; font-size: 11px; font-style: normal; text-align: center; }
.faq-cats button.active { border-color: var(--g-primary); background: var(--g-primary); color: #fff; box-shadow: 0 6px 14px -6px rgba(56, 105, 223, .6); }
.faq-cats button.active em { background: rgba(255, 255, 255, .22); color: #fff; }
.faq-result { margin-bottom: 14px; font-size: 14px; color: var(--g-text-muted); }
.faq-result b { color: var(--g-primary); }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border-radius: 18px; background: #fff; border: 1px solid #e6ecf6; transition: border-color .2s, box-shadow .2s; scroll-margin: 24px; }
.faq-item:hover { border-color: #cddbf3; }
.faq-item.open { border-color: #bcd1f6; box-shadow: 0 16px 32px -18px rgba(61, 124, 245, .45); }
.faq-q { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 20px; text-align: left; }
.faq-mark { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; font-size: 14px; font-weight: 900; color: var(--g-primary); background: var(--g-primary-light); transition: background .2s, color .2s; }
.faq-item.open .faq-q .faq-mark { color: #fff; background: linear-gradient(135deg, #4c8bff, #6a5cf6); }
.faq-mark--a { color: #d97b0d; background: #fff2df; }
.faq-q b { flex: 1; min-width: 0; font-size: 16px; font-weight: 800; line-height: 1.5; color: #2c3d5e; }
.faq-q mark { padding: 0 2px; border-radius: 4px; background: #ffe7a8; color: inherit; }
.faq-tag { flex-shrink: 0; padding: 3px 9px; border-radius: 7px; background: #f3f6fb; color: #8a97ad; font-size: 11px; font-weight: 700; }
.faq-arrow { flex-shrink: 0; font-size: 13px; color: #a3afc2; transition: transform .25s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--g-primary); }
/* 展开收起：grid 行高从 0fr 过渡到 1fr，高度不用写死 */
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a-inner { display: flex; gap: 14px; margin: 0 20px 20px; padding-top: 16px; border-top: 1px dashed #e3e9f3; }
.faq-a-inner .faq-answer { flex: 1; min-width: 0; padding-top: 3px; }

/* 回答排版（后台 admin-faq.css 的预览与此一致） */
.faq-answer { font-size: 14px; line-height: 1.9; color: #5d6d88; word-break: break-word; }
.faq-answer p, .faq-answer ol, .faq-answer ul, .faq-answer figure { margin: 0 0 10px; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-answer b { color: #2c3d5e; }
.faq-answer a { color: var(--g-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.faq-answer ul { padding-left: 1.3em; }
.faq-answer ol { padding-left: 0; list-style: none; counter-reset: step; }
.faq-answer ol li { position: relative; padding-left: 34px; margin: 6px 0; counter-increment: step; }
.faq-answer ol li::before { content: counter(step); position: absolute; left: 0; top: 3px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--g-primary-light); color: var(--g-primary); font-size: 12px; font-weight: 800; line-height: 1; }
.faq-answer ul li { margin: 3px 0; }
.faq-answer ul li::marker { color: #b7c4da; }
.faq-answer img { display: block; max-width: 100%; border-radius: 12px; border: 1px solid #e6ecf6; }
.faq-answer figure img { box-shadow: 0 10px 24px -16px rgba(35, 67, 114, .35); }

.faq-empty { padding: 48px 16px; text-align: center; border-radius: 18px; border: 1px dashed #dbe3f0; background: #fff; }
.faq-empty img { width: 110px; height: 110px; border-radius: 28px; object-fit: cover; }
.faq-empty b { display: block; margin-top: 14px; font-size: 16px; color: #2c3d5e; }
.faq-empty p { margin: 4px 0 16px; font-size: 13px; color: var(--g-text-muted); }

/* 右侧：客服卡片 + 快捷入口，滚动时跟着 */
.faq-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.faq-contact { border-radius: 20px; background: #fff; border: 1px solid #f3dfc4; overflow: hidden; box-shadow: 0 16px 32px -22px rgba(190, 110, 20, .45); }
.faq-contact-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; background: linear-gradient(120deg, #fff4e3, #ffece8); }
.faq-contact-ico { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; font-size: 19px; color: #fff; background: linear-gradient(135deg, #ffb24d, #ff8a3d); box-shadow: 0 6px 14px -6px rgba(255, 138, 61, .8); }
.faq-contact-head b { display: block; font-size: 16px; color: #8a4b12; }
.faq-contact-head small { display: block; margin-top: 2px; font-size: 12px; color: #a27a55; }
.faq-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 18px 6px; }
.faq-qr img { width: 168px; height: 168px; padding: 8px; border-radius: 16px; border: 1px solid #efe6da; background: #fff; object-fit: contain; }
.faq-qr span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #6f7c92; }
.faq-qr span i { color: #19b44c; font-size: 14px; }
.faq-contact-rows { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 0; }
.faq-contact-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f7f9fc; }
.faq-contact-row > i { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; background: #fff; color: #19b44c; font-size: 15px; }
.faq-contact-row > i.fa-phone { color: var(--g-primary); font-size: 13px; }
.faq-contact-row span { flex: 1; min-width: 0; }
.faq-contact-row small { display: block; font-size: 11px; color: #96a2b6; }
.faq-contact-row b { display: block; font-size: 14px; color: #2c3d5e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.faq-contact-row button, .faq-contact-row a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border-radius: 9px; background: #fff; border: 1px solid #e3eaf5; color: var(--g-primary); font-size: 12px; font-weight: 700; }
.faq-contact-row button:hover, .faq-contact-row a:hover { border-color: var(--g-primary); }
.faq-contact-note { margin: 0; padding: 14px 18px 18px; font-size: 13px; line-height: 1.75; color: #7d6650; white-space: pre-line; }
.faq-contact > :last-child.faq-contact-rows { padding-bottom: 16px; }
.faq-contact > :last-child.faq-qr { padding-bottom: 18px; }

.faq-links { display: flex; flex-direction: column; padding: 6px; border-radius: 18px; background: #fff; border: 1px solid #e6ecf6; }
.faq-links a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: #4a5a76; font-size: 14px; font-weight: 700; transition: background .15s, color .15s; }
.faq-links a > i:first-child { width: 20px; text-align: center; color: #9aabca; }
.faq-links a > i:last-child { margin-left: auto; font-size: 11px; color: #c1cbdb; }
.faq-links a:hover { background: var(--g-primary-light); color: var(--g-primary); }
.faq-links a:hover > i { color: var(--g-primary); }

@media (max-width: 900px) {
  .faq-body { grid-template-columns: 1fr; }
  .faq-side { position: static; }
  .faq-links { display: none; }   /* 手机上顶部导航已经有这些入口 */
}
@media (max-width: 768px) {
  .faq { padding: 16px 16px 40px; }
  .faq-head { gap: 16px; padding: 22px 20px; border-radius: 22px; margin-bottom: 18px; }
  .faq-head-art { position: absolute; right: 16px; top: 18px; width: 64px; height: 64px; border-radius: 18px; }
  .faq-head h1 { font-size: 26px; padding-right: 76px; }
  .faq-head p { font-size: 13px; padding-right: 76px; }
  .faq-search { height: 48px; }
  .faq-search input { font-size: 16px; }   /* iOS 小于 16px 聚焦会放大页面 */
  .faq-hot button { max-width: 100%; }
  .faq-cats { margin: 0 -16px 14px; padding: 0 16px; }
  .faq-cats button { height: 36px; padding: 0 13px; font-size: 13px; }
  .faq-q { gap: 12px; padding: 16px; }
  .faq-q b { font-size: 15px; }
  .faq-tag { display: none; }
  .faq-a-inner { margin: 0 16px 16px; gap: 12px; }
  .faq-mark { width: 28px; height: 28px; font-size: 13px; border-radius: 9px; }
}
