/* =========================================================
   一级栏目页面
========================================================= */

.category-page {
    padding: 18px 0 44px;
    background: #f5f8fc;
}

.category-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

/* =========================================================
   左侧：二级栏目与文章预览
========================================================= */

.category-sidebar {
    min-height: 560px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d4dce6;
    box-shadow: 0 3px 10px rgba(21, 63, 105, .08);
}

.category-sidebar-title {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #fff;
    background: #0d559c;
    font-size: 18px;
    font-weight: 700;
}

.category-sidebar-title img {
    display: block;
    width: 21px;
    height: 21px;
    margin-right: 10px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.category-all-link {
    min-height: 43px;
    display: flex;
    align-items: center;
    padding: 0 17px;
    color: #31465b;
    background: #f7f9fc;
    border-bottom: 1px solid #dce3eb;
    font-size: 14px;
    font-weight: 700;
}

.category-all-link span {
    margin-right: 8px;
    color: #0d559c;
    font-size: 20px;
}

.category-all-link:hover,
.category-all-link.active {
    color: #0756a3;
    background: #eaf4ff;
}

.category-preview-groups {
    padding-bottom: 10px;
}

.category-preview-group {
    border-bottom: 1px solid #dce3eb;
}

.category-preview-group:last-child {
    border-bottom: 0;
}

/* 二级栏目蓝色标题条 */
.category-preview-title {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 13px;
    color: #fff;
    background: #155ca5;
    transition: background-color .2s ease;
}

.category-preview-title:hover,
.category-preview-title.active {
    color: #fff;
    background: #08477f;
}

.category-preview-title img {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin-right: 9px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.category-preview-title span {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.category-preview-title b {
    flex: 0 0 auto;
    margin-left: 8px;
    font-size: 12px;
    font-weight: 400;
    opacity: .88;
}

/* 二级栏目下的前几条文章 */
.category-preview-list {
    margin: 0;
    padding: 9px 13px 12px;
    list-style: none;
    background: #fff;
}

.category-preview-list li {
    min-height: 32px;
    display: flex;
    align-items: center;
}

.category-preview-list li a {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    color: #263747;
    font-size: 13px;
}

.category-preview-list li a:hover {
    color: #0d559c;
}

.category-preview-dot {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    margin-right: 8px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid #2d4b68;
}

.category-preview-list em {
    min-width: 0;
    overflow: hidden;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.category-preview-empty {
    padding: 8px 0;
    color: #9aa5b0;
    font-size: 13px;
    text-align: center;
}

/* =========================================================
   右侧：一级栏目全部文章
========================================================= */

.category-content {
    min-width: 0;
    min-height: 560px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d4dce6;
    box-shadow: 0 3px 10px rgba(21, 63, 105, .08);
}

.category-breadcrumb {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    color: #0d559c;
    border-bottom: 2px solid #2c63b5;
    font-size: 15px;
}

.category-breadcrumb img {
    width: 22px;
    height: 22px;
    margin-right: 2px;
    object-fit: contain;
}

.category-breadcrumb a:hover {
    text-decoration: underline;
}

.category-breadcrumb strong {
    font-weight: 500;
}

.category-list {
    padding: 10px 12px 18px;
}

.category-list-item {
    min-height: 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px dashed #d8dde3;
}

.category-list-title {
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #202b36;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.category-list-title:hover {
    color: #0d559c;
}

.category-list-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    border-radius: 50%;
    background: #9aa5b0;
}

.category-list-item time {
    color: #222;
    font-size: 13px;
    white-space: nowrap;
}

.category-empty {
    padding: 90px 20px;
    color: #8a96a3;
    text-align: center;
}

/* 分页 */
.category-pagination {
    padding: 10px 20px 28px;
    text-align: center;
}

.category-pagination .pagination {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-pagination .pagination li a,
.category-pagination .pagination li span {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #3f5265;
    background: #fff;
    border: 1px solid #d7e0ea;
}

.category-pagination .pagination li.active span {
    color: #fff;
    border-color: #0d559c;
    background: #0d559c;
}

.category-pagination .pagination li.disabled span {
    color: #a9b1b9;
    background: #f5f7f9;
}

.category-pagination .pagination li a:hover {
    color: #fff;
    border-color: #0d559c;
    background: #0d559c;
}

/* 平板 */
@media screen and (max-width: 980px) {
    .category-layout {
        grid-template-columns: 270px minmax(0, 1fr);
    }
}

/* 手机 */
@media screen and (max-width: 700px) {
    .category-page {
        padding-top: 12px;
        padding-bottom: 26px;
    }

    .category-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .category-sidebar {
        min-height: auto;
    }

    .category-content {
        min-height: 420px;
    }

    .category-preview-title {
        min-height: 44px;
    }

    .category-list {
        padding: 6px 12px 14px;
    }

    .category-list-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 9px 4px;
    }

    .category-list-title {
        font-size: 13px;
    }

    .category-list-item time {
        padding-left: 16px;
        color: #8a96a3;
        font-size: 12px;
    }
}
