/* 前台新闻列表样式 */

.news-page-wrapper {
    padding: 40px 0 80px 0;
    min-height: auto;
}

/* 搜索栏 */
.news-search-bar {
    margin-bottom: 32px;
}

.news-search-form {
    display: flex;
    gap: 12px;
    max-width: 600px;
}

.news-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.news-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb, 16, 185, 129), 0.1);
}

.news-search-button {
    padding: 12px 24px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.news-search-button:hover {
    background: var(--accent-color);
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-color-rgb, 16, 185, 129), 0.3);
}

/* 标签页导航 */
.news-tabs-wrapper {
    margin-bottom: 32px;
    border-bottom: 2px solid #e5e7eb;
}

.news-tabs {
    display: flex;
    gap: 0;
}

.news-tab {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
    position: relative;
}

.news-tab:hover {
    color: var(--accent-color);
}

.news-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

/* 新闻网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* 新闻卡片 */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.news-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-placeholder,
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f7ff 0%, #e5e7eb 100%);
    color: #9ca3af;
    position: absolute;
    top: 0;
    left: 0;
}

.news-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
}

.news-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.badge-pinned {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.badge-hot {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.news-category {
    font-size: 13px;
    color: var(--accent-color);
    font-weight: 500;
    transition: color 0.3s;
}

.news-card:hover .news-category {
    color: var(--accent-color);
    opacity: 0.8;
}

.news-separator {
    font-size: 13px;
    color: #d1d5db;
}

.news-date {
    font-size: 13px;
    color: #6b7280;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.5;
    margin-bottom: 0;
    padding-bottom: 12px;
    position: relative;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.news-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.5s ease;
}

.news-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.news-title::after {
    z-index: 1;
}

.news-card:hover .news-title::after {
    width: 100%;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.news-card:hover .news-title {
    color: var(--accent-color);
}

.news-title a:hover {
    color: var(--accent-color);
    opacity: 0.9;
}

.news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    width: 100%;
}

.btn-view-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    opacity: 1;
}

.btn-view-detail-text {
    flex: 1;
}

.btn-view-detail-icon {
    flex-shrink: 0;
    transition: transform 0.3s;
}

.news-card:hover .btn-view-detail {
    color: var(--accent-color);
    font-weight: 600;
}

.btn-view-detail:hover {
    color: var(--accent-color);
    opacity: 0.8;
}

.btn-view-detail:hover .btn-view-detail-icon {
    transform: translateX(4px);
}


/* 分页 */
.news-pagination,
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pagination-link,
.pagination-current,
.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #f0fdf4;
}

.pagination-current {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    font-weight: 600;
}

.pagination-ellipsis {
    border: none;
    background: transparent;
    color: #9ca3af;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid #e5e7eb;
}

.pagination-jump span {
    font-size: 14px;
    color: #6b7280;
}

.page-input {
    width: 60px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.page-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb, 16, 185, 129), 0.1);
}

.page-jump-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    background: var(--accent-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-jump-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-color-rgb, 16, 185, 129), 0.3);
}

/* 空状态 */
.news-empty-state,
.no-results {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

.news-empty-state svg,
.no-results svg {
    color: #d1d5db;
    margin: 0 auto 20px;
}

.news-empty-state h3,
.no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.news-empty-state p,
.no-results p {
    font-size: 15px;
    color: #9ca3af;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .news-search-form {
        max-width: 100%;
    }
    
    .news-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .news-tab {
        padding: 12px 24px;
        font-size: 15px;
        white-space: nowrap;
    }
    
    .news-pagination,
    .pagination-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-jump {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-top: 12px;
        width: 100%;
        justify-content: center;
    }
}

