/* ===========================================================
   技术服务 · 常见问题页（批次十四建立 / 批次二十一升级）
   只在 /support/faq.html 与 /en/support/faq.html 加载，
   不改动站内任何已有类的行为，全部是新命名空间 .faq-*
   =========================================================== */

/* ---------- 搜索 ---------- */
.faq-search {
    margin: 0 0 32px;
}

.faq-search-box {
    display: flex;
    align-items: center;
    max-width: 740px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd8ea;
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.faq-search-box:focus-within {
    border-color: #3d29a4;
    box-shadow: 0 0 0 3px rgba(61, 41, 164, .10);
}

.faq-search-icon {
    width: 20px;
    height: 20px;
    color: #9a95a8;
    flex: 0 0 auto;
}

.faq-search-box input[type=search] {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    height: 42px;
    padding: 0 12px;
    font-size: 15px;
    color: #222;
    -webkit-appearance: none;
    appearance: none;
}

.faq-search-box input[type=search]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.faq-search-btn {
    flex: 0 0 auto;
    border: 0;
    cursor: pointer;
    background: #3d29a4;
    color: #fff;
    height: 42px;
    padding: 0 26px;
    border-radius: 999px;
    font-size: 15px;
    line-height: 42px;
    transition: background .18s ease;
}

.faq-search-btn:hover {
    background: #d38a3b;
}

.faq-search-tip {
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    color: #7b7b88;
}

.faq-search-tip a {
    color: #3d29a4;
}

/* ---------- 左侧分类：名称 + 条数 + 定位语 ---------- */
.faq-aside .blog-aside-item + .blog-aside-item {
    margin-top: 40px;
}

.faq-cats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-cats li {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
}

.faq-cats li:before,
.faq-cats li:after {
    display: none !important;
    content: none !important;
}

.faq-aside .faq-cats li > a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 10px;
    margin: 0;
    border-radius: 6px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: background .16s ease, color .16s ease;
}

.faq-aside .faq-cats li > a:hover {
    background: #f6f4fd;
    color: #3d29a4;
}

/* 覆盖批次十四那条 active 规则（这里用更高特异性） */
.faq-aside .faq-cats li > a.active {
    display: flex;
    margin-left: 0;
    padding: 8px 10px;
    background: #f1effc;
    color: #3d29a4;
    font-weight: 700;
}

.faq-cat-n {
    flex: 1 1 auto;
}

.faq-cat-c {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 12px;
    color: #8d8a99;
    background: #f2f1f6;
    border-radius: 999px;
    padding: 1px 8px;
    min-width: 24px;
    text-align: center;
}

.faq-aside .faq-cats li > a.active .faq-cat-c {
    background: #ddd7f6;
    color: #3d29a4;
}

.faq-cat-d {
    display: block;
    padding: 0 10px 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #8b8898;
}

.faq-aside .faq-cats li > a.zero {
    opacity: .38;
}

/* ---------- 结果条 ---------- */
.faq-bar {
    margin: 0 0 26px;
    padding: 10px 14px;
    background: #f7f6fb;
    border-left: 3px solid #3d29a4;
    font-size: 14px;
    color: #55515f;
}

.faq-bar b {
    color: #3d29a4;
}

/* ---------- 右侧问答列表 ---------- */
.faq-item {
    padding: 0 0 26px;
    margin: 0 0 26px;
    border-bottom: 1px solid #e8e8e8;
    /* 从别的页面带 #q12 跳进来时，别被固定头部挡住 */
    scroll-margin-top: 110px;
}

.faq-item:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    position: relative;
    padding-left: 36px;
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 600;
}

.faq-question:before {
    content: "Q";
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: #3d29a4;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.faq-answer {
    padding-left: 36px;
    color: #555;
    line-height: 1.8;
}

.faq-answer p {
    margin: 0 0 10px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* 正文内链：点线，与普通正文区分开，不抢标题 */
.faq-ilink {
    color: #3d29a4;
    border-bottom: 1px dashed rgba(61, 41, 164, .45);
    text-decoration: none;
}

.faq-ilink:hover {
    color: #d38a3b;
    border-bottom-color: rgba(211, 138, 59, .5);
}

/* 搜索命中高亮 */
.faq-main mark {
    background: #ffe08a;
    color: #4a2c00;
    padding: 0 2px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(211, 138, 59, .25);
}

/* ---------- 相关页面 + 复制链接 ---------- */
.faq-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 14px 0 0;
    padding-left: 36px;
}

.faq-rel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    font-size: 13px;
    color: #8b8898;
}

.faq-rel-t {
    color: #a5a1b0;
    margin-right: 6px;
}

.faq-rel a {
    color: #3d29a4;
    text-decoration: none;
}

.faq-rel a:hover {
    color: #d38a3b;
}

.faq-rel a + a:before {
    content: "·";
    color: #c9c6d2;
    margin: 0 7px;
}

.faq-copy {
    flex: 0 0 auto;
    border: 1px solid #e2dfec;
    background: #fff;
    color: #6f6b7d;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease;
}

.faq-copy:hover {
    border-color: #3d29a4;
    color: #3d29a4;
}

.faq-copy.is-done {
    border-color: #d38a3b;
    color: #d38a3b;
}

/* ---------- 分页：沿用站内 .pagination-custom，仅补间距 ---------- */
.faq-main .pagination-custom {
    margin-top: 34px;
    margin-bottom: 0;
    text-align: center;
}

.faq-main .pagination-custom .page-item {
    display: inline-block;
}

/* ---------- 空状态 ---------- */
.faq-empty {
    padding: 30px 0 40px;
    color: #777;
}

.faq-empty-t {
    font-size: 17px;
    color: #333;
    margin-bottom: 10px;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 991px) {
    .faq-aside .blog-aside-item + .blog-aside-item {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    .faq-search-box {
        border-radius: 10px;
        padding: 4px 4px 4px 12px;
    }

    .faq-search-box input[type=search] {
        height: 40px;
        font-size: 14px;
        padding: 0 8px;
    }

    .faq-search-btn {
        height: 40px;
        line-height: 40px;
        padding: 0 18px;
        border-radius: 8px;
    }

    .faq-question {
        font-size: 18px;
        padding-left: 30px;
    }

    .faq-question:before {
        width: 21px;
        height: 21px;
        line-height: 21px;
        font-size: 12px;
    }

    .faq-answer,
    .faq-meta {
        padding-left: 30px;
    }
}

/* 手机：分类改成一行横滑，省竖向空间 */
@media (max-width: 767px) {
    .faq-cats {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin: 0 -4px;
        padding: 2px 4px 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .faq-cats::-webkit-scrollbar {
        display: none;
    }

    .faq-cats li {
        flex: 0 0 auto;
        margin: 0;
    }

    .faq-aside .faq-cats li > a,
    .faq-aside .faq-cats li > a.active {
        border: 1px solid #e6e3ef;
        border-radius: 999px;
        padding: 7px 14px;
        white-space: nowrap;
        gap: 6px;
    }

    .faq-aside .faq-cats li > a.active {
        border-color: #3d29a4;
    }

    .faq-cat-d {
        display: none;
    }
}

/* -----------------------------------------------------------
   banner 兜底
   站内视差脚本（script.js）挂在 window.load 上，且依赖 material-parallax
   插件，个别页面在这个时机会拿不到底图，结果是白底 + 白色标题看不见。
   这里显式给尺寸和兜底色，图片 URL 由模板内联，跟着后台 banner 走。
   ----------------------------------------------------------- */
.faq-banner {
    background-color: #0d2a5c;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
