/* ========== 常见问答页面样式 ========== */

/* 页面整体 */
.faq-page {
    width: 100%;
    background: #ffffff;
    overflow: hidden;
}

/* 通用内容容器 */
.faq-container {
    width: 75rem;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ===========================================
   一、Hero 区（20rem 粉色背景色框占位，暂不做背景图）
   - 背景直接挂在 .faq-hero 上（与 vipService.html 的 .vip-hero 模式一致）
   - 居中放标题 + 搜索框
   =========================================== */
.faq-hero {
    width: 100%;
    height: 20rem;
    overflow: hidden;
    box-sizing: border-box;
    background: url('/static/img/faqImages/topBanner.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 100% 20rem;
    /* 改善缩放时的文字边缘锯齿（Safari / 老 Chrome 走 -webkit-optimize-contrast；现代浏览器走 high-quality） */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    /* 强制 GPU 渲染，避免某些情况下 text 重采样模糊 */
    transform: translateZ(0);
    will-change: transform;
}

.faq-hero .faq-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 11rem;
}

/* 搜索框 */
.faq-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 45rem;
    height: 4rem;
    background: #ffffff;
    padding: 0 1.25rem;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 2.25rem;
    border: 0.0625rem solid #DCDFE6;
    box-shadow: 0 0.375rem 1.25rem 0 rgba(58, 105, 249, 0.15);
}

.faq-search-input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    font-size: 1rem;
    color: #999999;
    font-weight: normal;
    line-height: 1.25rem;
    padding: 0;
}

.faq-search-input::placeholder {
    color: #86909C;
}

.faq-search-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
    cursor: pointer;
    user-select: none;
}

/* 清空按钮（X.png，0.75rem × 0.75rem）—— 仅在输入框有值时显示，点击清空 + 触发搜索 */
.faq-clear-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
    object-fit: contain;
    display: block;
    cursor: pointer;
    user-select: none;
}

/* ===========================================
   二、问答列表
   - 白色背景，列表卡片：圆角 + 浅边框 + 阴影
   - 展开项：浅蓝灰底色显示答案
   =========================================== */
.faq-main {
    position: relative;
    width: 100%;
    background: #ffffff;
    padding: 1.25rem 0 2rem;
    box-sizing: border-box;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
    box-sizing: border-box;
}

/* 单条 FAQ 卡片 */
.faq-item {
    width: 100%;
    background: #ffffff;
    border: 0.0625rem solid #E7E9ED;
    border-radius: 0.75rem;
    overflow: hidden;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.faq-item:hover {
    border-color: #C7CDF6;
    box-shadow: 0 0.25rem 0.75rem 0 rgba(110, 91, 255, 0.10);
}

.faq-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1.125rem 1.25rem;
    box-sizing: border-box;
    min-height: 3.125rem;
}

.faq-item-head-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.faq-item-icon {
    /* wen.png 作为"问"字徽章背景图，宽 1.875rem，高 1.5rem */
    width: 1.875rem;
    height: 1.5rem;
    flex-shrink: 0;
    background-image: url('/static/img/faqImages/wen.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3A69F9;
    line-height: 1.5rem;
    padding-left: 0.375rem;
    box-sizing: border-box;
}

.faq-item-question {
    flex: 1;
    font-family: Source Han Sans SC;
    font-size: 1rem;
    font-weight: bold;
    color: #000000;
    line-height: normal;
    min-width: 0;
    overflow: hidden;
    /* 超出部分省略号显示 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 展开/收起按钮（+ / - 图标，1.75rem × 1.75rem） */
.faq-item-toggle {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

/* 兼容旧 class 名（防止其他地方残留引用，不影响渲染） */
.faq-item-toggle-plus,
.faq-item-toggle-minus {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

/* 答案区域 */
.faq-item-body {
    border-radius: 0.5rem;
    margin: 0 1.25rem 1.125rem 1.25rem;
    box-sizing: border-box;
    background: #F4F7FE;
    padding: 1.25rem;
}

.faq-item-answer {
    font-family: Source Han Sans SC;
    font-size: 1rem;
    font-weight: normal;
    line-height: normal;
    color: #333333;
    word-break: break-word;
}

/* 关键字高亮（搜索时） */
.faq-highlight {
    color: #FF4D4F;
    font-style: normal;
    background: #E8EFFF;
    border-radius: 0.125rem;
    padding: 0 0.0625rem;
}

/* 列表骨架（加载占位） */
.faq-skeleton-item {
    width: 100%;
    height: 3.125rem;
    background: linear-gradient(90deg, #F2F4F7 0%, #E5E7EB 50%, #F2F4F7 100%);
    background-size: 200% 100%;
    border-radius: 0.5rem;
    animation: faq-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes faq-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* 空态 */
.faq-empty {
    width: 100%;
    padding: 3.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-sizing: border-box;
}

.faq-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-empty-text {
    font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    font-size: 0.9375rem;
    color: #86909C;
    line-height: 1.25rem;
}

/* ===========================================
   三、底部 CTA：我有新的问题
   - 浅紫粉背景
   - 标题 + 两个按钮（主蓝 / 次蓝）
   =========================================== */
.faq-cta {
    position: relative;
    width: 100%;
    background: #F7F9FF;
    padding: 3.375rem 0 5.5rem;
    box-sizing: border-box;
}

.faq-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.faq-cta-title {
    font-family: Source Han Sans SC;
    font-size: 2.25rem;
    font-weight: bold;
    color: #333333;
    line-height: normal;
}

.faq-cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    box-sizing: border-box;
}

.faq-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    padding: 1rem 1.25rem;
    border-radius: 0.25rem;
    font-family: Source Han Sans CN;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 3rem;
    text-align: center;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* 左按钮 */
.faq-cta-btn-primary {
    background: linear-gradient(270deg, #8bd1ff 0%, #3a69f9 100%);
}

.faq-cta-btn-primary:hover {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.375rem 1rem 0 rgba(37, 99, 235, 0.35);
}

.faq-cta-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 0.125rem 0.5rem 0 rgba(37, 99, 235, 0.30);
}

/* 右按钮 */
.faq-cta-btn-secondary {
    min-width: 9.375rem;
    background: linear-gradient(270deg, #8a9efe 0%, #5268d5 100%);
}

.faq-cta-btn-secondary:hover {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.25rem 0.75rem 0 rgba(37, 99, 235, 0.12);
}

.faq-cta-btn-secondary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===========================================
   入场动画
   - 由 faq.html 末尾的 inViewAnimations 触发 .faq-item-visible
   =========================================== */
.faq-item {
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item.faq-item-visible {
    opacity: 1;
    transform: translateY(0);
}