/* ===== 新闻中心页面样式 ===== */

/* 页面容器 */
.news-page {
    min-height: 100vh;
    padding: 100px 20px 60px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 300px);
}

.news-page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面标题 */
.news-page-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.news-page-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #0ea5e9;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    padding: 6px 20px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.news-page-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.news-page-header p {
    font-size: 1.1rem;
    color: #64748b;
}

/* 空状态 */
.news-page-empty {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
    font-size: 1.1rem;
}

/* 标签切换 */
.news-page-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.news-page-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    background: #ffffff;
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-page-tab:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.news-page-tab.active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    font-weight: 700;
}

.news-page-tab:not(.active) .tab-count {
    background: #f1f5f9;
    color: #64748b;
}

/* 内容区域 */
.news-page-content {
    display: none;
}

.news-page-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 新闻列表 */
.news-page-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 新闻卡片 */
.news-page-card {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: #e0f2fe;
}

.news-page-card-image {
    flex-shrink: 0;
    width: 280px;
    overflow: hidden;
}

.news-page-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-page-card:hover .news-page-card-image img {
    transform: scale(1.05);
}

.news-page-card-content {
    flex: 1;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-page-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.news-page-card-category {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px;
}

.news-page-card-category.industry {
    background: linear-gradient(135deg, #10b981, #059669);
}

.news-page-card-date {
    font-size: 0.9rem;
    color: #94a3b8;
}

.news-page-card-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-page-card-content p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-page-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0ea5e9;
    font-size: 0.9rem;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.news-page-card:hover .news-page-card-link {
    gap: 8px;
}

/* ===== 抽屉面板 ===== */
.news-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden;
}

.news-drawer.active {
    pointer-events: auto;
    visibility: visible;
}

.news-drawer.closing {
    pointer-events: none;
}

.news-drawer.closing .news-drawer-backdrop {
    opacity: 0;
}

.news-drawer.closing .news-drawer-panel {
    transform: translateX(100%);
}

.news-drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.news-drawer.active .news-drawer-backdrop {
    opacity: 1;
}

.news-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 72%;
    height: 100%;
    background: #ffffff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}

.news-drawer.active .news-drawer-panel {
    transform: translateX(0);
}

.news-drawer-close {
    position: sticky;
    top: 16px;
    float: right;
    margin: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.news-drawer-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.news-drawer-body {
    padding: 32px 40px 48px;
    clear: both;
}

/* 抽屉顶部：图片 + 信息 */
.news-drawer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f1f5f9;
}

.news-drawer-img {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.news-drawer-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-drawer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-drawer-cat {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 16px;
    margin-bottom: 16px;
    width: fit-content;
}

.news-drawer-info h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.3;
}

.news-drawer-date {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.news-drawer-date span {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.news-drawer-date em {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 600;
    font-style: normal;
}

.news-drawer-desc p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.8;
}

/* 新闻详情 */
.news-drawer-specs {
    margin-top: 24px;
}

.news-drawer-specs-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0ea5e9;
    display: inline-block;
}

/* 信息组 */
.spec-group {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.spec-group-title {
    padding: 14px 20px;
    background: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.spec-grid {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 32px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-name {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.spec-value {
    font-size: 0.9rem;
    color: #0f172a;
    font-weight: 600;
    text-align: right;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .news-drawer-panel {
        width: 85%;
    }
}

@media (max-width: 768px) {
    .news-page {
        padding: 90px 16px 40px;
    }

    .news-page-header h2 {
        font-size: 2rem;
    }

    .news-page-tabs {
        flex-wrap: wrap;
    }

    .news-page-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .news-page-card {
        flex-direction: column;
    }

    .news-page-card-image {
        width: 100%;
        height: 200px;
    }

    .news-page-card-content {
        padding: 20px;
    }

    .news-page-card-content h3 {
        font-size: 1.2rem;
    }

    .news-drawer-panel {
        width: 100%;
    }

    .news-drawer-body {
        padding: 24px 20px 40px;
    }

    .news-drawer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .news-drawer-info h2 {
        font-size: 1.5rem;
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }
}
