/* ========================================
   news.css - 新闻资讯页面样式
   ======================================== */

/* ---------- 页面横幅 ---------- */
.news-banner {
    background-image: url('../static/news/新闻咨询.png');
    height: 400px;
    padding: 0;
    display: flex;
    align-items: center;
}

/* 移动端横幅固定高度 */
@media (max-width: 768px) {
    .news-banner {
        height: 240px;
        padding: 0;
    }
}

/* ---------- 分类筛选 ---------- */
.news-filter {
    padding: 32px 0 0;
    background: #fff;
}

.news-tabs {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #E5E7EB;
    flex-wrap: nowrap;
}

.news-tabs .nav-link {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    margin-bottom: -1px;
}

.news-tabs .nav-link:hover,
.news-tabs .nav-link:focus {
    color: #005BAC;
    border-color: transparent;
    background: transparent;
}

.news-tabs .nav-link.active {
    color: #005BAC;
    border-color: transparent;
    border-bottom-color: #005BAC;
    font-weight: 600;
    background: transparent;
}

/* ---------- 新闻列表 ---------- */
.news-list-section {
    padding: 40px 0 80px;
    background: #fff;
}

.news-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 91, 172, 0.2);
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-card-body {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: #9CA3AF;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    line-height: 18px;
}

.news-card-tag.company {
    background: #EFF6FF;
    color: #005BAC;
}

.news-card-tag.product {
    background: #F0FDF4;
    color: #16A34A;
}

.news-card-tag.industry {
    background: #FFF7ED;
    color: #EA580C;
}

.news-card-title {
    font-size: 17px;
    font-weight: 600;
    color: #1F2937;
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
    color: #005BAC;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
}

.news-card-title a:hover {
    color: #005BAC;
}

.news-card-desc {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.7;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #005BAC;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.news-card-link:hover {
    color: #0A2E5C;
    gap: 8px;
}

.news-card-link::after {
    content: '›';
    font-size: 18px;
    font-weight: 700;
}

/* ---------- 分页 ---------- */
.news-pagination {
    margin-top: 48px;
}

.news-pagination .pagination {
    gap: 6px;
}

.news-pagination .page-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
    border-radius: 8px !important;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    padding: 0;
    transition: all 0.3s ease;
}

.news-pagination .page-link:hover {
    border-color: #005BAC;
    color: #005BAC;
    background: #EFF6FF;
}

.news-pagination .page-item.active .page-link {
    background: #005BAC;
    border-color: #005BAC;
    color: #fff;
}

.news-pagination .page-item.disabled .page-link {
    color: #D1D5DB;
    pointer-events: none;
}

/* ========================================
   新闻详情页样式
   ======================================== */

/* ---------- 面包屑 ---------- */
.news-detail-breadcrumb {
    padding: 20px 0;
    background: #F8FAFC;
    border-bottom: 1px solid #E5E7EB;
}

.news-detail-breadcrumb .breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 14px;
    color: #6B7280;
}

.news-detail-breadcrumb .breadcrumb a {
    color: #005BAC;
    text-decoration: none;
    transition: color 0.3s;
}

.news-detail-breadcrumb .breadcrumb a:hover {
    color: #0A2E5C;
}

.news-detail-breadcrumb .breadcrumb-separator {
    color: #9CA3AF;
    margin: 0 2px;
}

.news-detail-breadcrumb .breadcrumb-current {
    color: #1F2937;
    font-weight: 500;
}

/* ---------- 详情卡片 ---------- */
.news-detail {
    padding: 40px 0 60px;
    background: #fff;
}

.news-detail-article {
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.news-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    line-height: 1.5;
    margin: 0 0 20px;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E8E8E8;
    margin-bottom: 30px;
    font-size: 14px;
    color: #6B7280;
}

.news-detail-date,
.news-detail-source,
.news-detail-views {
    display: flex;
    align-items: center;
}

/* ---------- 正文 ---------- */
.news-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    word-break: break-word;
}

.news-detail-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.news-detail-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #005BAC;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E8E8E8;
}

/* ---------- 相关推荐 ---------- */
.news-detail-related {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 32px;
    background: #F8FAFC;
    border-radius: 8px;
}

.related-title {
    font-size: 22px;
    font-weight: 600;
    color: #000;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #005BAC;
}

.related-news-list {
    display: grid;
    gap: 12px;
}

.related-news-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.related-news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.related-news-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
}

.related-news-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-news-content h4 {
    font-size: 15px;
    font-weight: 500;
    color: #1F2937;
    margin: 0 0 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.related-news-item:hover .related-news-content h4 {
    color: #005BAC;
}

.related-news-date {
    font-size: 12px;
    color: #9CA3AF;
    white-space: nowrap;
}

/* ---------- 详情页响应式 ---------- */
@media (max-width: 767.98px) {
    .news-detail {
        padding: 24px 0 48px;
    }

    .news-detail-article {
        padding: 20px;
    }

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

    .news-detail-meta {
        flex-direction: column;
        gap: 8px;
    }

    .news-detail-content {
        font-size: 14px;
    }

    .news-detail-content h2 {
        font-size: 20px;
    }

    .news-detail-related {
        padding: 20px;
    }

    .related-news-item a {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
    .news-tabs {
        gap: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .news-tabs::-webkit-scrollbar {
        display: none;
    }

    .news-tabs .nav-link {
        padding: 10px 16px;
        font-size: 14px;
        white-space: nowrap;
    }
}

@media (max-width: 767.98px) {
    .news-list-section {
        padding: 24px 0 48px;
    }

    .news-card-img {
        height: 120px;
    }

    .news-card-body {
        padding: 12px 14px 16px;
    }

    .news-card-meta {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .news-card-tag {
        padding: 1px 8px;
        font-size: 11px;
        line-height: 16px;
    }

    .news-card-title {
        font-size: 15px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .news-card-desc {
        font-size: 12px;
        line-height: 1.6;
        margin-bottom: 12px;
        -webkit-line-clamp: 3;
    }

    .news-card-link {
        font-size: 12px;
    }

    .news-pagination {
        margin-top: 32px;
    }
}