/* 新闻列表页面样式 */

.main-container {
    max-width: 1500px;
    width: 1500px;
    margin: 0 auto;
    padding: 40px;
    background-color: #f8f9fa;
}

.news-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
    padding: 35px;
    position: relative;
    overflow: hidden;
}

.page-title {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 35px;
    position: relative;
    padding-left: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.page-title i {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 32px;
}

.page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    width: 6px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.news-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-label {
    font-size: 16px;
    color: #666;
    margin-right: 10px;
}

.category-filter {
    display: flex;
    gap: 15px;
}

.category-btn {
    padding: 8px 16px;
    border: none;
    background-color: #f0f0f0;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(21, 117, 64, 0.3);
}

.search-box {
    position: relative;
    width: 250px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(21, 117, 64, 0.1);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    color: var(--primary-color);
}

/* 新闻列表样式 */
.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* 新闻卡片样式 */
.news-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(21, 117, 64, 0.3);
}

.news-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.news-card:hover::after {
    opacity: 1;
}

.news-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s;
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

.news-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
    opacity: 0;
    transition: opacity 0.3s;
}

.news-card:hover .news-image-overlay {
    opacity: 1;
}

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-card:hover .news-title {
    color: var(--primary-color);
}

.news-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.news-date {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
}

.news-date i {
    margin-right: 5px;
}

.read-more {
    font-size: 13px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.read-more i {
    margin-left: 3px;
    transition: transform 0.3s;
}

.news-card:hover .read-more i {
    transform: translateX(3px);
}

.read-more::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.news-card:hover .read-more::before {
    transform: translateX(0);
}

/* 特色新闻样式 */
.featured-news {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

.featured-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.featured-news .news-image-container {
    height: 320px;
}

.featured-news .news-title {
    font-size: 22px;
}

.featured-news .news-subtitle {
    font-size: 16px;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 5px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover, .pagination-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination-btn.active {
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 暗黑模式切换按钮 */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 24px;
    color: #333;
    transition: transform 0.5s;
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-news {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .news-list {
        grid-template-columns: 1fr;
    }
    
    .featured-news {
        grid-column: span 1;
    }
    
    .main-container {
        padding: 20px;
    }
    
    .news-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-filter {
        margin-bottom: 15px;
        flex-wrap: wrap;
    }
    
    .search-box {
        width: 100%;
    }
    
    .news-container {
        padding: 20px;
    }
}

/* 加载动画 */
.loader {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.loader span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    margin: 0 5px;
    opacity: 0.6;
    animation: loader 1s infinite ease-in-out;
}

.loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loader {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
} 