/* ===============================================================
 * FAQ 常见问题页
 *
 * 依赖 newslist.css + newslist.page.css：页面容器（.srs-news__inner）、
 * 面包屑、标题、引导语、分类筛选条（.srs-case-filter）、空状态与分页
 * 都复用那两份，本文件只负责手风琴与底部求助块。
 *
 * 1. 手风琴容器
 * 2. 单条：问题行
 * 3. 单条：答案面板（含无 JS 降级）
 * 4. 底部求助块
 * 5. 响应式
 * =============================================================== */

/* ---------------------------------------------------------------
 * 1. 手风琴容器
 * --------------------------------------------------------------- */
.srs-faq-list {
    margin: 0 0 90px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px
}

/* ---------------------------------------------------------------
 * 2. 单条：问题行
 * --------------------------------------------------------------- */
.srs-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color .25s, box-shadow .25s
}

.srs-faq-item:hover {
    border-color: #c9d4e4
}

.srs-faq-item.is-open {
    border-color: var(--news-blue);
    box-shadow: 0 10px 30px rgba(21, 42, 211, .07)
}

/* h2 只做语义层级，视觉尺寸交给内部按钮 —— 免得继承 newslist 的标题样式。 */
.srs-faq-item__q {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit
}

.srs-faq-item__trigger {
    width: 100%;
    padding: 28px 32px;
    border: 0;
    background: none;
    color: #000;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: color .25s
}

.srs-faq-item__trigger:hover,
.srs-faq-item.is-open .srs-faq-item__trigger {
    color: var(--news-blue)
}

/* 键盘可见焦点：按钮铺满整行，用内缩的 outline 才不会贴到卡片边框上。 */
.srs-faq-item__trigger:focus-visible {
    outline: 2px solid var(--news-blue);
    outline-offset: -4px;
    border-radius: 10px
}

.srs-faq-item__text {
    flex: 1
}

.srs-faq-item__tag {
    flex: none;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f1f4f9;
    color: var(--news-muted);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap
}

/* 图标用两条伪元素画 +/−：竖线在展开时转 90° 并淡出，得到 − 的效果。 */
.srs-faq-item__icon {
    position: relative;
    flex: none;
    width: 20px;
    height: 20px
}

.srs-faq-item__icon::before,
.srs-faq-item__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    border-radius: 2px;
    transition: transform .3s, opacity .3s
}

.srs-faq-item__icon::before {
    width: 18px;
    height: 2px;
    transform: translate(-50%, -50%)
}

.srs-faq-item__icon::after {
    width: 2px;
    height: 18px;
    transform: translate(-50%, -50%)
}

.srs-faq-item.is-open .srs-faq-item__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0
}

/* ---------------------------------------------------------------
 * 3. 单条：答案面板
 *
 * 默认（无 .is-js）为展开态，禁用 JS 时全文可读。
 * JS 就绪后 .srs-faq-list.is-js 接管：面板收起，高度由脚本写内联值过渡。
 * --------------------------------------------------------------- */
.srs-faq-item__a {
    overflow: hidden
}

.srs-faq-list.is-js .srs-faq-item__a {
    height: 0;
    transition: height .3s ease
}

/*
 * 首帧禁用过渡：脚本写入初始 height:0 时过渡已经生效，不压掉的话
 * 页面载入瞬间会看到全部答案「收起」一次。脚本在下一帧移除本类。
 */
.srs-faq-list.is-init .srs-faq-item__a {
    transition: none
}

.srs-faq-item__inner {
    padding: 0 32px 28px;
    color: #4b5565;
    font-size: 16px;
    line-height: 1.75
}

.srs-faq-item__inner> :first-child {
    margin-top: 0
}

.srs-faq-item__inner> :last-child {
    margin-bottom: 0
}

.srs-faq-item__inner p {
    margin: 0 0 14px
}

.srs-faq-item__inner ul,
.srs-faq-item__inner ol {
    margin: 0 0 14px;
    padding-left: 22px
}

.srs-faq-item__inner li {
    margin: 0 0 8px
}

.srs-faq-item__inner strong {
    color: #0a0a0a;
    font-weight: 600
}

.srs-faq-item__inner a {
    color: var(--news-blue);
    text-decoration: underline;
    text-underline-offset: 3px
}

/* ---------------------------------------------------------------
 * 4. 底部求助块
 * --------------------------------------------------------------- */
.srs-faq-cta {
    margin: 0 0 120px;
    padding: 60px 40px;
    border-radius: 12px;
    background: #f6f8fb;
    text-align: center
}

.srs-faq-cta__title {
    margin: 0;
    color: #000;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3
}

.srs-faq-cta__text {
    max-width: 720px;
    margin: 16px auto 0;
    color: var(--news-muted);
    font-size: 16px;
    line-height: 1.7
}

.srs-faq-cta__link {
    margin: 32px 0 0;
    color: var(--news-blue);
    font-size: 18px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 12px
}

.srs-faq-cta__link span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--news-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s
}

.srs-faq-cta__link:hover span {
    transform: translateX(4px)
}

.srs-faq-cta__link span img {
    width: 14px
}

/* ---------------------------------------------------------------
 * 5. 响应式：断点对齐 newslist.page.css 第 10 节
 * --------------------------------------------------------------- */
@media (max-width:1440px) {
    .srs-faq-item__trigger {
        padding: 24px 28px;
        font-size: 18px
    }

    .srs-faq-item__inner {
        padding: 0 28px 24px
    }
}

@media (max-width:1024px) {
    .srs-faq-list {
        margin-bottom: 70px
    }

    .srs-faq-cta {
        margin-bottom: 90px;
        padding: 48px 32px
    }

    .srs-faq-cta__title {
        font-size: 28px
    }
}

@media (max-width:768px) {
    .srs-faq-list {
        gap: 12px;
        margin-bottom: 60px
    }

    .srs-faq-item__trigger {
        padding: 20px;
        gap: 14px;
        font-size: 17px
    }

    /* 窄屏隐藏分类标签：问题本身更重要，标签会把标题挤成两三行。 */
    .srs-faq-item__tag {
        display: none
    }

    .srs-faq-item__icon {
        width: 16px;
        height: 16px
    }

    .srs-faq-item__icon::before {
        width: 14px
    }

    .srs-faq-item__icon::after {
        height: 14px
    }

    .srs-faq-item__inner {
        padding: 0 20px 20px;
        font-size: 15px
    }

    .srs-faq-cta {
        margin-bottom: 70px;
        padding: 40px 20px
    }

    .srs-faq-cta__title {
        font-size: 24px
    }

    .srs-faq-cta__text {
        font-size: 15px
    }

    .srs-faq-cta__link {
        font-size: 16px
    }
}
