/* --- 列表页样式 --- */

/* 主内容区域 */
.list-main {
    padding: 20px 0;
    min-height: 500px;
    background-color: #ffffff;
}

.list-container {
    display: flex;
    gap: 20px;
    padding: 0 20px;
}

.location-position {
    margin-bottom: 20px;
    display: block;
}

/* 左侧导航栏 */
.list-sidebar {
    width: 200px;
    flex-shrink: 0;
    background-color: #fff;
}

.sidebar-title {
    padding: 15px 20px;
    background-color: #0056b3;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f8f8f8;
}

.sidebar-nav li {
    text-align: center;
}

.sidebar-nav li:last-child {
    border-bottom: none;
}

.sidebar-nav li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
}

.sidebar-nav li a:hover {
    background-color: #f0f0f0;
    color: #0056b3;
}

.sidebar-nav li.active a {
    color: #0056b3;
    font-weight: bold;
}

/* 右侧内容区域 */
.list-content {
    flex: 1;
    background-color: #fff;
    padding: 0 20px;
}

/* 文章列表 */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    top: -20px;
}

.article-item {
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.article-item:last-child {
    border-bottom: none;
}

.article-info {
    width: 100%;
}

.article-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: normal;
    line-height: 1.5;
}

.article-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.article-title a:hover {
    color: #0056b3;
}

/* 描述和日期包装器 */
.article-desc-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
}

.article-desc {
    flex: 1;
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* 允许文本收缩 */
}

.article-date {
    flex-shrink: 0;
    color: #999;
    font-size: 14px;
    white-space: nowrap;
    align-self: flex-end;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.page-btn,
.page-number {
    display: inline-block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover,
.page-number:hover {
    background-color: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

.page-number.active {
    background-color: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-ellipsis {
    padding: 0 5px;
    color: #999;
}

/* --- 响应式适配 --- */
@media (max-width: 768px) {
    .list-main {
        padding: 10px 0;
    }

    .list-container {
        flex-direction: column;
        padding: 0 10px;
        gap: 15px;
    }

    /* 移动端：左侧导航改为顶部导航 */
    .list-sidebar {
        width: 100%;
        order: 1;
    }

    .sidebar-title {
        padding: 12px 15px;
        font-size: 15px;
    }

    .sidebar-nav li a {
        padding: 12px 15px;
        font-size: 14px;
    }

    .sidebar-nav li a:hover {
        padding-left: 20px;
    }

    /* 移动端：内容区域 */
    .list-content {
        order: 2;
        padding: 15px;
    }

    /* 移动端：文章项布局 */
    .article-item {
        padding: 15px 0;
    }

    /* 移动端：描述和日期包装器 */
    .article-desc-wrapper {
        flex-direction: row;
        align-items: flex-end;
        gap: 10px;
    }

    .article-date {
        font-size: 13px;
    }

    .article-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .article-desc {
        font-size: 13px;
        -webkit-line-clamp: 3; /* 移动端显示更多行 */
    }

    /* 移动端：分页控件 */
    .pagination {
        margin-top: 20px;
        padding-top: 15px;
        gap: 5px;
    }

    .page-btn,
    .page-number {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 35px;
    }

    /* 移动端：隐藏部分页码，只显示关键页码 */
    .page-numbers {
        gap: 3px;
    }

    .page-ellipsis {
        display: none; /* 移动端隐藏省略号 */
    }
}

@media (max-width: 480px) {
    .list-container {
        padding: 0 5px;
    }

    .list-content {
        padding: 10px;
    }

    .article-item {
        padding: 12px 0;
    }

    .article-title {
        font-size: 14px;
    }

    .article-desc {
        font-size: 12px;
    }

    .article-date {
        font-size: 12px;
    }

    .pagination {
        gap: 3px;
    }

    .page-btn,
    .page-number {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 30px;
    }

    /* 超小屏幕：进一步简化分页 */
    .page-numbers .page-number:nth-child(n+5):not(:last-child):not(:nth-last-child(2)):not(:nth-last-child(3)) {
        display: none; /* 只显示前3个和后3个页码 */
    }
}

