/* ===== News Page Styles ===== */

/* 滚动入场动画 */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.page-header.animated {
    opacity: 1;
    transform: translateY(0);
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.filter-bar.animated {
    opacity: 1;
    transform: translateY(0);
}

.headline-section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.headline-section.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 新闻卡片入场动画 */
.news-card-link {
    text-decoration: none;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.news-card-link.animated {
    opacity: 1;
    transform: translateY(0);
}

.page-title {
    font-size: 2.5rem;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #666;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--primary-purple);
    border-radius: 25px;
    background: white;
    color: var(--primary-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: -1;
}

.filter-btn.active, .filter-btn:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.filter-btn.active::before, .filter-btn:hover::before {
    width: 300%;
    height: 300%;
}

/* Headline Section - 头条新闻 */
.headline-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 1.5rem;
}

.headline-link {
    text-decoration: none;
}

.headline-card {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 350px;
}

.headline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(133, 45, 136, 0.15);
}

.headline-image-wrapper {
    flex: 1;
    min-width: 50%;
    max-width: 55%;
    overflow: hidden;
}

.headline-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.headline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, #852D88 0%, #DD137E 100%);
    color: white;
    position: relative;
}

.headline-category {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.headline-title-text {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: white;
}

.headline-excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.headline-readmore {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    align-self: flex-start;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;

}

.headline-readmore:hover {
    background: white;
    color: var(--primary-purple);
    transform: translateY(-2px);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* 空状态在 grid 中居中 */
.news-grid .common-box-empty {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 500px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.news-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #852D88, #2D99D3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(133, 45, 136, 0.15);
}

.news-card:hover::after {
    transform: scaleX(1);
}

.news-image-wrapper {
    position: relative;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.news-content {
    padding: 1.25rem;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-purple);
    color: var(--primary-purple);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
    gap: 0.05rem;
}

.news-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #999;
    font-size: 0.75rem;
}

.news-views::before {
    content: '👁';
    font-size: 1.1rem;
}

.news-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;

}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .headline-card {
        flex-direction: column;
    }

    .headline-image-wrapper {
        min-width: 100%;
        max-width: 100%;
    }

    .headline-image {
        min-height: 200px;
    }

    .headline-content {
        padding: 1.5rem;
    }

    .headline-title-text {
        font-size: 1.3rem;
    }

    .news-image {
        height: 150px;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .headline-card {
        flex-direction: column;
    }

    .headline-image-wrapper {
        min-width: 100%;
        max-width: 100%;
    }

    .headline-image {
        min-height: 220px;
    }
}
