/* ================= 列表页布局 ================= */

/* 使用 Flexbox 实现左右分栏 */
.page-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    /* 顶部对齐 */
}

/* --- 左侧侧边栏 --- */
.sidebar {
    flex: 0 0 250px;
    /* 固定宽度 250px */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.sidebar-header {
    background-color: #1976d2;
    /* 使用主色调 */
    padding: 15px 20px;
}

.sidebar-header h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
    font-weight: normal;
}

.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu li {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s;
    color: #555;
    position: relative;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu li:hover {
    color: #1976d2;
    background-color: #f9fbfd;
    padding-left: 25px;
    /* 悬停时稍微右移 */
}

/* 侧边栏选中状态 */
.sidebar-menu li.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
    border-left: 4px solid #1976d2;
}

/* --- 右侧内容区域 --- */
.list-wrapper {
    flex: 1;
    /* 占满剩余宽度 */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 25px;
    min-height: 600px;
}

/* 面包屑导航 */
.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #1976d2;
    text-decoration: underline;
}

.breadcrumb span {
    color: #1976d2;
    font-weight: bold;
}

/* 内容标题 */
.content-header h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 25px;
    padding-left: 10px;
    border-left: 5px solid #1976d2;
}

/* --- 新闻列表样式 --- */
.news-list-group {
    margin-bottom: 30px;
}

.news-list-group li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #e0e0e0;
    transition: background-color 0.2s;
}

.news-list-group li:hover {
    background-color: #fafafa;
}

.news-list-group li:hover .news-title {
    color: #1976d2;
}

/* 新闻标题 */
.news-title {
    font-size: 16px;
    color: #333;
    flex: 1;
    /* 占据主要空间 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 超长省略 */
    margin-right: 20px;
    display: block;
    position: relative;
    padding-left: 15px;
}

/* 标题前的小圆点 */
.news-title::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: #ccc;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.3s;
}

.news-list-group li:hover .news-title::before {
    background-color: #1976d2;
}

/* 日期 */
.news-date {
    color: #999;
    font-size: 14px;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

/* --- 分页组件 --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #555;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.page-btn:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.page-btn.active {
    background-color: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}

.page-btn.disabled:hover {
    border-color: #eee;
    color: #ccc;
}

/* ================= 响应式适配 (列表页) ================= */
@media screen and (max-width: 768px) {

    /* 手机端：改为单列布局 */
    .page-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex: none;
        margin-bottom: 20px;
    }

    /* 侧边栏菜单横向排列 (可选，方便手机点击) */
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }

    .sidebar-menu li {
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
        padding: 10px 15px;
    }

    .sidebar-menu li.active {
        border-left: none;
        border-bottom: 3px solid #1976d2;
    }

    .news-title {
        font-size: 14px;
    }

    .news-date {
        font-size: 12px;
    }
}