/* ========================================
   新闻中心页面专属样式
   ======================================== */

/* 新闻中心 Banner 区域 */
.news-hero {
    height: 60vh;
    min-height: 400px;

    background: url('../bc/bc_news.jpg');
    /* background: linear-gradient(135deg, 
        rgba(0, 86, 179, 0.95) 0%, 
        rgba(0, 168, 232, 0.85) 100%),
        url('../bc/bc_news.jpg'); */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* 修复iOS设备上background-attachment: fixed的问题 */
@supports (-webkit-touch-callout: none) {
    .news-hero {
        background-attachment: scroll;
    }
}

.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.news-hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.news-hero h2 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.news-hero p {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-decoration {
    font-size: 80px;
    opacity: 0.15;
    margin-top: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* 新闻区域 */
.news-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 50%);
    min-height: 600px;
    position: relative;
}

/* 加载状态 */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 500;
}

/* 错误提示 */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    gap: 20px;
}

.error-message i {
    font-size: 64px;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.error-message h3 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.error-message p {
    color: var(--text-light);
    font-size: 16px;
    max-width: 500px;
}

.retry-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.retry-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

/* 新闻网格布局 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* 新闻卡片 */
.news-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 86, 179, 0.05);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 86, 179, 0.15);
    border-color: var(--primary-color);
}

/* 新闻图片 */
.news-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

/* 日期徽章 */
.news-date-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.date-day {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 2px;
}

.date-month {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
}

/* 新闻内容 */
.news-content {
    padding: 25px;
}

.news-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 56px;
    transition: color 0.3s ease;
}

.news-card:hover .news-title {
    color: var(--primary-color);
}

/* 新闻元信息 */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.news-date i {
    color: var(--primary-color);
}

/* 新闻状态 */
.news-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.news-status.published {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.news-status.draft {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

/* 阅读更多按钮 */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2);
}

.read-more-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.3);
}

.read-more-btn.disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.read-more-btn.disabled:hover {
    transform: none;
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
    font-size: 16px;
}

/* 分页控件 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 60px;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.3);
}

.pagination-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.page-info {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0 20px;
}

.page-info span {
    color: var(--primary-color);
    font-size: 22px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }

    .news-hero h2 {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .news-hero {
        height: 50vh;
        min-height: 350px;
    }

    .news-hero h2 {
        font-size: 36px;
    }

    .news-hero p {
        font-size: 18px;
    }

    .hero-decoration {
        font-size: 60px;
    }

    .news-section {
        padding: 50px 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-card {
        max-width: 500px;
        margin: 0 auto;
    }

    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .news-hero h2 {
        font-size: 28px;
    }

    .news-hero p {
        font-size: 16px;
    }

    .news-title {
        font-size: 18px;
    }

    .news-date-badge {
        padding: 8px 12px;
        min-width: 50px;
    }

    .date-day {
        font-size: 24px;
    }
}