﻿@charset "utf-8";
/* ================================================================
   news.css — 新闻页独有样式
   包含：左图右文新闻卡片列表
   特点：每条新闻高度一致，带 border-bottom 分隔线
   ================================================================ */

.main-content {
    position: relative;
    z-index: 2;
    background: #f7f9fc;
    padding-top: 32px;
    padding-bottom: 56px;
}
.page-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ===== 左侧菜单 ===== */
.sidebar-menu {
    flex: 0 0 300px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow var(--transition);
    position: sticky;
    top: 20px;
}
.sidebar-menu:hover {
    box-shadow: var(--shadow-hover);
}
.sidebar-menu .menu-header {
    padding: 20px 24px 16px;
    border-bottom: 2px solid var(--primary);
    background: linear-gradient(135deg, #f8faff 0%, #f0f5fa 100%);
}
.sidebar-menu .menu-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}
.sidebar-menu .menu-toggle {
    display: none;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 17px;
    color: var(--primary);
    background: #f8faff;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    user-select: none;
}
.sidebar-menu .menu-toggle .arrow-icon {
    transition: transform 0.3s ease;
    font-size: 14px;
}
.sidebar-menu .menu-toggle.open .arrow-icon {
    transform: rotate(180deg);
}
.sidebar-menu .menu-list {
    padding: 6px 0;
}
.sidebar-menu .menu-list.hidden {
    display: none;
}
.sidebar-menu .level1-item {
    border-bottom: 1px solid #f0f2f5;
}
.sidebar-menu .level1-item:last-child {
    border-bottom: none;
}
.sidebar-menu .level1-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    transition: background var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-menu .level1-row:hover {
    background: #f0f5fa;
}
.sidebar-menu .level1-item.active>.level1-row {
    border-left-color: var(--primary);
    background: #f0f5fa;
}
.sidebar-menu .level1-link {
    flex: 1;
    padding: 14px 12px 14px 24px;
    font-weight: 600;
    font-size: 17px;
    color: var(--text);
    transition: color var(--transition);
    text-decoration: none;
    display: block;
    min-width: 0;
}
.sidebar-menu .level1-link:hover {
    color: var(--primary);
}
.sidebar-menu .level1-item.active>.level1-row .level1-link {
    color: var(--primary);
}
.sidebar-menu .level1-toggle {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #999;
    transition: transform 0.3s ease, color 0.3s ease;
    user-select: none;
    border: none;
    background: transparent;
    font-family: var(--font);
}
.sidebar-menu .level1-toggle:hover {
    color: var(--primary);
}
.sidebar-menu .level1-item.open>.level1-row .level1-toggle {
    transform: rotate(90deg);
    color: var(--primary);
}
.sidebar-menu .level1-item.no-children .level1-toggle {
    display: none;
}
.sidebar-menu .level2-wrap {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    background: #f8faff;
}
.sidebar-menu .level1-item.open .level2-wrap {
    max-height: 600px;
    opacity: 1;
}
.sidebar-menu .level2-item a {
    display: block;
    padding: 10px 24px 10px 48px;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-light);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    border-left: 3px solid transparent;
    position: relative;
    text-decoration: none;
}
.sidebar-menu .level2-item a::before {
    content: "—";
    position: absolute;
    left: 28px;
    font-size: 14px;
    opacity: 0.25;
    transition: opacity 0.3s ease;
}
.sidebar-menu .level2-item a:hover {
    background: #edf3fa;
    color: var(--primary);
    border-left-color: var(--primary);
}
.sidebar-menu .level2-item a:hover::before {
    opacity: 0.6;
}
.sidebar-menu .level2-item.active a {
    background: var(--primary);
    color: #fff;
    border-left-color: var(--accent);
    font-weight: 600;
}
.sidebar-menu .level2-item.active a::before {
    opacity: 1;
    color: #fff;
}
.sidebar-menu .level2-item.active a:hover {
    background: var(--primary-light);
    color: #fff;
}

/* ===== 右侧内容 ===== */
.main-content-area {
    flex: 1;
    min-width: 0;
    width: 100%;
}
.breadcrumb-area {
    background: #fff;
    padding: 16px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 28px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 17px;
    color: var(--text-light);
}
.breadcrumb-area .home-link {
    color: var(--primary);
    font-weight: 500;
}
.breadcrumb-area .home-link:hover {
    text-decoration: underline;
}
.breadcrumb-area .sep {
    color: #ccc;
    margin: 0 4px;
}
.breadcrumb-area .current {
    color: var(--text);
    font-weight: 500;
}

/* ===== 新闻列表 ===== */
.news-list-wrap {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.news-list-wrap:hover {
    box-shadow: var(--shadow-hover);
}
.news-list-wrap .list-header {
    padding: 20px 28px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.news-list-wrap .list-header .list-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}
.news-list-wrap .list-header .list-count {
    font-size: 16px;
    color: var(--text-light);
    background: var(--primary-bg);
    padding: 2px 16px;
    border-radius: 20px;
}

/* ===== 新闻列表容器 — 使用 grid 保证所有卡片高度一致 ===== */
.news-list {
    display: grid;
    grid-template-columns: 1fr;
    padding: 4px 0;
}

/* ===== 新闻卡片 — 高度一致，带 border-bottom 分隔线 ===== */
.news-item {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    border-bottom: 1px solid #e8edf4;  /* 清晰的分隔线 */
    transition: background var(--transition), padding var(--transition), border-radius var(--transition);
    border-radius: 4px;
    cursor: pointer;
    align-items: stretch;
    min-height: 180px;                 /* 保证最小高度一致 */
}
.news-item:last-child {
    border-bottom: none;
}
.news-item:hover {
    background: #f5f8fc;
    padding-left: 26px;
    padding-right: 26px;
    border-radius: var(--radius-sm);
}

/* ===== 左侧图片 — 固定高度，带边框 ===== */
.news-item .news-thumb {
    flex: 0 0 220px;
    height: 160px;                     /* 固定高度，决定卡片整体高度 */
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: var(--primary-bg);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}
.news-item .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.news-item:hover .news-thumb img {
    transform: scale(1.05);
}
.news-item .news-thumb .thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(10, 61, 107, 0.15);
    background: linear-gradient(135deg, #f0f5fa, #e8edf4);
}

/* ===== 右侧内容 — flex:1 填充剩余空间 ===== */
.news-item .news-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 6px;
    padding: 2px 0;
}
.news-item .news-body .news-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
    transition: color var(--transition);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-item:hover .news-body .news-title {
    color: var(--primary);
}
.news-item .news-body .news-title .tag {
    display: inline-block;
    color: #fff;
    font-size: 12px;
    padding: 0 10px;
    border-radius: 12px;
    font-weight: 400;
    line-height: 22px;
    margin-right: 6px;
    vertical-align: middle;
}
.news-item .news-body .news-title .tag.hot {
    background: #dc143c;
}
.news-item .news-body .news-title .tag.new {
    background: #1a6b8a;
}
.news-item .news-body .news-summary {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.news-item .news-body .news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
    font-size: 14px;
    color: #999;
}
.news-item .news-body .news-meta .news-date {
    display: flex;
    align-items: center;
    gap: 4px;
}
.news-item .news-body .news-meta .news-date::before {
    content: "";
    font-size: 14px;
    opacity: 0.6;
}
.news-item .news-body .news-meta .news-views {
    display: flex;
    align-items: center;
    gap: 4px;
}
.news-item .news-body .news-meta .news-views::before {
    content: "";
    font-size: 14px;
    opacity: 0.6;
}

/* ===== 分页 ===== */
.pagination-wrap {
    padding: 18px 28px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--border);
}
.pagination-wrap .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.pagination-wrap .page-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}
.pagination-wrap .page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination-wrap .page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 1200px) {
    .sidebar-menu {
        flex: 0 0 260px;
    }
    .news-item .news-thumb {
        flex: 0 0 180px;
        height: 140px;
    }
    .news-item {
        min-height: 160px;
    }
}
@media (max-width: 992px) {
    .page-layout {
        flex-direction: column;
        gap: 28px;
    }
    .sidebar-menu {
        flex: 1 1 auto;
        width: 100%;
        position: static;
    }
    .sidebar-menu .menu-toggle {
        display: flex;
    }
    .sidebar-menu .menu-list {
        display: block;
    }
    .sidebar-menu .menu-list.hidden {
        display: none;
    }
    .sidebar-menu .level2-item a {
        padding-left: 40px;
    }
    .sidebar-menu .level2-item a::before {
        left: 20px;
    }
    .sidebar-menu .level1-link {
        padding: 14px 12px 14px 20px;
        font-size: 16px;
    }
    .news-item .news-thumb {
        flex: 0 0 160px;
        height: 120px;
    }
    .news-item {
        min-height: 140px;
        gap: 18px;
    }
    .news-item .news-body .news-title {
        font-size: 18px;
    }
    .news-item .news-body .news-summary {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }
}
@media (max-width: 768px) {
    .main-content {
        padding-top: 20px;
        padding-bottom: 28px;
    }
    .sidebar-menu .menu-header {
        padding: 16px 18px;
    }
    .sidebar-menu .menu-header h2 {
        font-size: 19px;
    }
    .sidebar-menu .menu-toggle {
        font-size: 16px;
        padding: 12px 18px;
    }
    .sidebar-menu .level1-link {
        padding: 12px 12px 12px 18px;
        font-size: 16px;
    }
    .sidebar-menu .level1-toggle {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
    .sidebar-menu .level2-item a {
        padding: 10px 18px 10px 34px;
        font-size: 15px;
    }
    .sidebar-menu .level2-item a::before {
        left: 16px;
    }
    .breadcrumb-area {
        padding: 12px 18px;
        font-size: 15px;
        border-radius: var(--radius-sm);
        margin-bottom: 18px;
    }
    .news-list-wrap .list-header {
        padding: 14px 18px;
    }
    .news-list-wrap .list-header .list-title {
        font-size: 19px;
    }
    .news-list-wrap .list-header .list-count {
        font-size: 14px;
    }

    /* ===== 手机版：卡片纵向排列，高度一致 ===== */
    .news-item {
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid #e8edf4;
        min-height: auto;                /* 手机端由内容决定，但图片固定高度保证一致性 */
        align-items: stretch;
    }
    .news-item:hover {
        padding-left: 16px;
        padding-right: 16px;
    }
    .news-item:last-child {
        border-bottom: none;
    }

    /* 手机版：图片宽度100%，固定高度，保证卡片高度一致 */
    .news-item .news-thumb {
        flex: 0 0 auto;
        width: 100%;
        height: 160px;                  /* 固定高度，保证所有卡片高度一致 */
        max-height: 200px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
    }
    .news-item .news-body .news-title {
        font-size: 17px;
    }
    .news-item .news-body .news-summary {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }
    .news-item .news-body .news-meta {
        font-size: 13px;
        gap: 12px;
    }
    .pagination-wrap {
        padding: 14px 18px 18px;
        gap: 4px;
        flex-wrap: wrap;
    }
    .pagination-wrap .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 15px;
        padding: 0 10px;
    }
}
@media (max-width: 480px) {
    .sidebar-menu .menu-header h2 {
        font-size: 17px;
    }
    .sidebar-menu .level1-link {
        font-size: 15px;
        padding: 10px 10px 10px 16px;
    }
    .sidebar-menu .level1-toggle {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }
    .sidebar-menu .level2-item a {
        font-size: 14px;
        padding: 8px 16px 8px 28px;
    }
    .sidebar-menu .level2-item a::before {
        font-size: 10px;
        left: 14px;
    }
    .breadcrumb-area {
        padding: 8px 12px;
        font-size: 14px;
    }
    .news-list-wrap .list-header {
        padding: 10px 12px;
    }
    .news-list-wrap .list-header .list-title {
        font-size: 18px;
    }
    .news-item {
        padding: 12px 12px;
        gap: 10px;
        border-bottom: 1px solid #e8edf4;
    }
    .news-item:last-child {
        border-bottom: none;
    }
    .news-item .news-thumb {
        height: 140px;                  /* 小屏稍矮，但所有卡片一致 */
        max-height: 170px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
    }
    .news-item .news-body .news-title {
        font-size: 16px;
    }
    .news-item .news-body .news-summary {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }
    .news-item .news-body .news-meta {
        font-size: 12px;
        gap: 10px;
    }
    .pagination-wrap .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
        padding: 0 8px;
    }
}