/* =========================================================
   FAQ 列表页
   /static/css/frontend/faqs/faq_list.css
========================================================= */


/* =========================================================
   基础
========================================================= */

.faq-list-page {
    width: 100%;
    min-height: 60vh;
    background: #f7f8fa;
    color: #1f2937;
}

.faq-list-page .container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}


/* =========================================================
   页面头部
========================================================= */

.faq-list-hero {
    padding: 28px 0 34px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.faq-list-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #8a8f98;
    font-size: 14px;
    line-height: 1.5;
}

.faq-list-breadcrumb a {
    color: #5f6670;
    text-decoration: none;
}

.faq-list-breadcrumb a:hover {
    color: #1677ff;
}

.faq-list-hero-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.faq-list-hero h1 {
    margin: 0;
    color: #1f2937;
    font-size: 34px;
    line-height: 1.3;
    font-weight: 700;
}

.faq-list-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #667085;
    font-size: 16px;
    line-height: 1.8;
}


/* =========================================================
   主体
========================================================= */

.faq-list-main {
    padding: 30px 0 50px;
}


/* =========================================================
   搜索
========================================================= */

.faq-search-panel {
    margin-bottom: 22px;
}

.faq-search-box {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 760px;
    overflow: hidden;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.faq-search-box:focus-within {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.faq-search-box input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 15px;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-family: inherit;
    font-size: 15px;
    outline: none;
}

.faq-search-box input::placeholder {
    color: #9ca3af;
}

.faq-search-box button {
    flex: 0 0 auto;
    min-width: 92px;
    border: 0;
    background: #1677ff;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-search-box button:hover {
    background: #0958d9;
}


/* =========================================================
   分类
========================================================= */

.faq-category-list {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.faq-category-item {
    min-height: 38px;
    padding: 7px 16px;
    border: 1px solid #d8dde5;
    border-radius: 20px;
    background: #ffffff;
    color: #4b5563;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.faq-category-item:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.faq-category-item.is-active {
    border-color: #1677ff;
    background: #1677ff;
    color: #ffffff;
}


/* =========================================================
   状态
========================================================= */

.faq-list-status {
    margin-bottom: 14px;
    color: #7a828d;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   FAQ 卡片
========================================================= */

.faq-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.faq-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.faq-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.faq-card.no-cover {
    grid-template-columns: minmax(0, 1fr);
}

.faq-card-cover {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    background: #eef1f5;
}

.faq-card-cover a {
    display: block;
    width: 100%;
    height: 100%;
}

.faq-card-cover img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.faq-card:hover .faq-card-cover img {
    transform: scale(1.03);
}

.faq-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 22px 24px;
}

.faq-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.faq-card-category {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: 14px;
    background: #edf5ff;
    color: #1677ff;
    font-size: 12px;
    line-height: 1.4;
}

.faq-card-date {
    color: #9aa1aa;
    font-size: 12px;
}

.faq-card-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 600;
}

.faq-card-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.faq-card-title a:hover {
    color: #1677ff;
}

.faq-card-summary {
    margin: 10px 0 0;
    overflow: hidden;
    color: #667085;
    font-size: 14px;
    line-height: 1.8;
    max-height: 3.6em;
}

.faq-card-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 14px;
    color: #1677ff;
    font-size: 14px;
    text-decoration: none;
}

.faq-card-link:hover {
    color: #0958d9;
}


/* =========================================================
   加载与空状态
========================================================= */

.faq-loading,
.faq-empty {
    display: none;
    padding: 50px 20px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #ffffff;
    text-align: center;
}

.faq-loading.is-visible,
.faq-empty.is-visible {
    display: block;
}

.faq-loading {
    color: #7a828d;
    font-size: 15px;
}

.faq-empty-title {
    color: #374151;
    font-size: 18px;
    font-weight: 600;
}

.faq-empty-text {
    margin-top: 8px;
    color: #8a8f98;
    font-size: 14px;
}


/* =========================================================
   分页
========================================================= */

.faq-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.faq-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d8dde5;
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
    font-family: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.faq-page-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.faq-page-btn.is-active {
    border-color: #1677ff;
    background: #1677ff;
    color: #ffffff;
}

.faq-page-btn:disabled {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #b0b6bf;
    cursor: not-allowed;
}


/* =========================================================
   平板
========================================================= */

@media (max-width: 900px) {

    .faq-list-hero h1 {
        font-size: 30px;
    }

    .faq-card {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .faq-card-body {
        padding: 20px;
    }

}


/* =========================================================
   手机
========================================================= */

@media (max-width: 640px) {

    .faq-list-page .container {
        width: min(100% - 24px, 1200px);
    }

    .faq-list-hero {
        padding: 20px 0 24px;
    }

    .faq-list-breadcrumb {
        margin-bottom: 14px;
        font-size: 13px;
    }

    .faq-list-hero h1 {
        font-size: 25px;
    }

    .faq-list-hero p {
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.7;
    }

    .faq-list-main {
        padding: 20px 0 36px;
    }

    .faq-search-box input {
        height: 44px;
        font-size: 16px;
    }

    .faq-search-box button {
        min-width: 76px;
        font-size: 14px;
    }

    .faq-category-list {
        gap: 8px;
        margin-bottom: 18px;
    }

    .faq-category-item {
        min-height: 36px;
        padding: 6px 13px;
    }

    .faq-card {
        display: block;
    }

    .faq-card-cover {
        min-height: 180px;
        aspect-ratio: 16 / 9;
    }

    .faq-card-cover img {
        min-height: 180px;
    }

    .faq-card-body {
        padding: 18px;
    }

    .faq-card-title {
        font-size: 18px;
    }

    .faq-card-summary {
        display: -webkit-box;
        margin-top: 8px;
        overflow: hidden;
        font-size: 14px;
        line-height: 1.8;

        line-clamp: 3;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .faq-pagination {
        gap: 6px;
        margin-top: 22px;
    }

    .faq-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
    }

}