/* css/news_grid.css */

.news-grid-section {
    padding: 3rem 0 5rem 0;
    background-color: #f4f6f9; /* 淡灰背景 */
    min-height: 600px;
}

/* --- 列表容器 (Flex布局) --- */
.news-card-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* 两端对齐，中间留空 */
    gap: 2rem; /* 行间距 */
}

/* --- 卡片样式 --- */
.news-card {
    /* 计算宽度：(100% - 中间间距) / 2 */
    width: calc(50% - 1rem);
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
    border-top: 3px solid transparent; /* 顶部预留线条位置 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.card-body {
    margin-bottom: 1.5rem;
}

.card-date {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
    background-color: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-weight: bold;
    /* 限制显示两行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.card-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    /* 限制显示三行 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 按钮样式 --- */
.card-footer {
    border-top: 1px solid #f5f5f5;
    padding-top: 1rem;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    color: #005bac; /* 医院蓝 */
    font-weight: 500;
    transition: all 0.3s;
}

.read-more-btn .arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

/* --- 交互效果 (Hover) --- */
.news-card:hover {
    transform: translateY(-8px); /* 整体上浮 */
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-top-color: #005bac; /* 顶部亮出蓝线 */
}

.news-card:hover .card-title {
    color: #005bac;
}

.news-card:hover .read-more-btn .arrow {
    transform: translateX(5px); /* 箭头向右移动 */
}

/* --- 分页样式 (Pagination) --- */
.pagination-wrapper {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.pagination li a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #666;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.pagination li.active a,
.pagination li a:hover {
    background-color: #005bac;
    border-color: #005bac;
    color: #fff;
}

.pagination li.disabled a {
    background-color: #f9f9f9;
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
}

/* 响应式：手机端变成单列 */
@media screen and (max-width: 768px) {
    .news-card {
        width: 100%;
    }
}