/* 
   新闻资讯页面样式
   News Page Styles
   蓝色系配色方案
*/

/* 第一部分：页面介绍区域 */
.news-intro-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.intro-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 60px 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
}

.intro-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.intro-icon i {
    font-size: 3rem;
    color: #ffffff;
}

.intro-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.intro-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: left;
}

/* 统计数据区域 */
.stats-box {
    margin-top: 40px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 15px;
    border: 2px solid rgba(59, 130, 246, 0.15);
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 第二部分：分类筛选和新闻列表 */
.news-list-section {
    padding: 80px 0;
}

/* 左侧：分类导航侧边栏容器 - 确保左右间距 */
.news-list-section .row {
    margin-left: 0;
    margin-right: 0;
}

.news-list-section .row > .col-lg-3 {
    padding-right: 25px;
}

.news-list-section .row > .col-lg-9 {
    padding-left: 25px;
}

/* 桌面端确保有足够的间距 */
@media (min-width: 992px) {
    .news-list-section .row > .col-lg-3 {
        padding-right: 30px;
    }

    .news-list-section .row > .col-lg-9 {
        padding-left: 30px;
    }
}

/* 左侧：分类导航侧边栏 */
.news-sidebar {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: sticky;
    top: 120px;
    transition: none;
    z-index: 100;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    will-change: transform;
}

.news-sidebar.fixed {
    box-sizing: border-box !important;
    transition: none;
}

.news-sidebar.sticky {
    top: 100px;
}

.news-sidebar.fixed {
    position: fixed;
    box-sizing: border-box;
    transition: none;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 2px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 15px 15px 0 0;
}

.sidebar-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
    padding: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-item:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    color: #3b82f6;
    border-left-color: #3b82f6;
    padding-left: 25px;
}

.sidebar-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.08) 100%);
    color: #3b82f6;
    border-left-color: #3b82f6;
    font-weight: 600;
}

.sidebar-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-item span {
    flex: 1;
    font-size: 0.95rem;
}

/* 新闻列表 */
.news-container {
    min-height: 400px;
}

.news-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: auto;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.news-image-wrapper {
    flex-shrink: 0;
    width: 320px;
    min-height: 400px;
    height: 100%;
    align-self: stretch;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: block;
}

.news-image-wrapper > a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* 图片占位符样式 */
.news-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #94a3b8;
}

.news-image-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

/* 图片加载失败时的样式 */
.news-image-wrapper.no-image {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.news-image-wrapper.no-image .news-image {
    display: none;
}

/* 图片加载中时的占位背景（通过JavaScript添加loading类） */
.news-image-wrapper.loading {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.news-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.news-card:hover .news-image-wrapper::after {
    opacity: 1;
}

.news-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.3s ease, transform 0.5s ease;
    display: block;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* 图片加载完成后的淡入效果 */
.news-image.loaded {
    opacity: 1;
}

/* 图片加载时的占位效果 */
.news-image[loading="lazy"] {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    min-height: 400px;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
}

.news-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: visible;
    justify-content: flex-start;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #3b82f6;
}

.news-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
}

.news-meta-item i {
    font-size: 0.9rem;
    color: #3b82f6;
}

.news-link {
    margin-top: 15px;
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-wrap: nowrap;
    width: fit-content;
    max-width: 100%;
}

.news-link:hover {
    gap: 12px;
    color: #2563eb;
}

.news-link i {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: inline-block;
    line-height: 1;
}

.news-link:hover i {
    transform: translateX(5px);
}

/* 分页样式 */
.pagination-wrapper {
    margin-top: 50px;
}

.pagination {
    gap: 10px;
}

.pagination .page-item {
    margin: 0 3px;
}

.pagination .page-link {
    padding: 10px 18px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    border-color: #e2e8f0;
    color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 5rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--text-muted);
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .news-list-section .row > .col-lg-3,
    .news-list-section .row > .col-lg-9 {
        padding-left: 15px;
        padding-right: 15px;
    }

    .news-sidebar {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        left: auto !important;
        margin-bottom: 30px;
    }

    .news-sidebar.sticky,
    .news-sidebar.fixed {
        position: relative !important;
        width: 100% !important;
        left: auto !important;
    }

    .news-card {
        flex-direction: column;
    }

    .news-image-wrapper {
        width: 100%;
        min-height: 220px;
        height: 220px;
    }
    
    .news-image {
        min-height: 220px;
        position: relative;
    }
}

@media (max-width: 768px) {
    .intro-card {
        padding: 40px 30px;
    }

    .intro-title {
        font-size: 2rem;
    }

    .intro-description {
        font-size: 1rem;
    }

    .stats-box {
        gap: 20px;
        padding: 25px 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .sidebar-header {
        padding: 20px 15px;
    }

    .sidebar-header h3 {
        font-size: 1.1rem;
    }

    .news-body {
        padding: 20px;
    }

    .news-title {
        font-size: 1.2rem;
    }

    .news-image-wrapper {
        min-height: 200px;
        height: 200px;
    }
    
    .news-image {
        min-height: 200px;
        position: relative;
    }

    .pagination .page-link {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .intro-card {
        padding: 30px 20px;
    }

    .intro-icon {
        width: 80px;
        height: 80px;
    }

    .intro-icon i {
        font-size: 2.5rem;
    }

    .intro-title {
        font-size: 1.75rem;
    }

    .stats-box {
        flex-direction: column;
        gap: 25px;
    }

    .stat-item {
        min-width: 100%;
    }

    .sidebar-item {
        padding: 12px 15px;
    }

    .sidebar-item i {
        width: 18px;
        margin-right: 10px;
        font-size: 0.9rem;
    }

    .sidebar-item span {
        font-size: 0.85rem;
    }

    .news-image-wrapper {
        min-height: 180px;
        height: 180px;
    }
    
    .news-image {
        min-height: 180px;
        position: relative;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* ============================================
   新闻列表页新布局样式（参考图片2）
   ============================================ */

/* 新闻标题（大号橙色） */
.news-title-primary {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-title-primary a {
    color: #ff6b35; /* 橙色 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title-primary a:hover {
    color: #ff8555;
    text-decoration: underline;
}

/* 元数据行 */
.news-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* 主要分类（蓝色药丸按钮） */
.news-category-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.news-category-pill.news-category-primary {
    background-color: #3b82f6; /* 蓝色 */
    color: #ffffff;
}

.news-category-pill.news-category-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* 元数据项 */
.news-meta-row .news-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.9rem;
}

.news-meta-row .news-meta-item i {
    font-size: 0.9rem;
    color: #64748b;
}

/* 新闻摘要 */
.news-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-top: 10px;
    margin-bottom: 15px;
    flex: 1;
    /* 显示完整内容，不截断 */
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

/* 标签行（与阅读更多按钮同一行） */
.news-action-row .news-tags-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    flex-wrap: wrap;
    flex: 1;
}

/* 次要标签（灰色药丸按钮） */
.news-tag-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.news-tag-pill.news-tag-secondary {
    background-color: #e2e8f0; /* 灰色 */
    color: #475569;
    border: none;
}

.news-tag-pill.news-tag-secondary:hover {
    background-color: #cbd5e1;
    transform: translateY(-2px);
    color: #334155;
}

/* 阅读更多按钮和标签容器（同一行） */
.news-action-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 0;
    flex-wrap: wrap;
    width: 100%;
}

/* 阅读更多按钮（橙色）- 缩短长度 */
.news-read-more-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #ff6b35; /* 橙色 */
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: auto;
    max-width: fit-content;
    flex-shrink: 0;
}

.news-read-more-btn:hover {
    background-color: #ff8555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    color: #ffffff;
}

/* 新闻详情页样式 */
.news-detail-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.news-detail-meta .news-category-pill {
    margin-right: 5px;
}

.news-detail-meta .news-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.95rem;
}

.news-detail-meta .news-meta-item i {
    font-size: 0.95rem;
    color: #64748b;
}

/* 新闻标签区域（详情页） */
.news-tags-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.news-tags-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 10px;
}

.news-tags-section .news-tags-row {
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-title-primary {
        font-size: 1.4rem;
    }
    
    .news-meta-row {
        gap: 10px;
    }
    
    .news-category-pill,
    .news-tag-pill {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    .news-read-more-btn {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}
