/* ==========================================================================
   新闻页面样式 - 行业新闻模块
   ========================================================================== */

/*
 * 设计理念：
 * 1. 清晰的信息层次，突出重要内容
 * 2. 现代化卡片设计，提升视觉吸引力
 * 3. 响应式布局，适配所有设备
 * 4. 符合网站整体风格，使用渐变色彩
 */

/* ==========================================================================
   分类筛选区域
   ========================================================================== */

.news-filters-section {
    background: #ffffff;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filters-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--light-color);
    border: 2px solid transparent;
    border-radius: 30px;
    color: var(--gray-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ==========================================================================
   新闻列表区域
   ========================================================================== */

.news-list-section {
    background: var(--light-color);
    padding: 60px 0;
}

.news-grid {
    column-count: 3;
    column-gap: 30px;
    margin-bottom: 50px;
}

/* 新闻卡片设计 */
.news-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    break-inside: avoid;
    margin-bottom: 30px;
    width: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* 新闻分类标签 */
.news-category {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    margin-bottom: 12px;
}

/* 新闻内容区域 */
.news-content {
    padding: 25px;
}

/* 新闻元信息 */
.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--gray-color);
}

.news-date,
.news-views {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-meta i {
    color: var(--primary-color);
}

/* 新闻标题 */
.news-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-title a {
    color: var(--dark-color);
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a:hover {
    color: var(--primary-color);
}

/* 新闻摘要 */
.news-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-color);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 阅读更多按钮 */
.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.news-read-more:hover {
    color: var(--secondary-color);
    gap: 12px;
}

/* ==========================================================================
   分页组件
   ========================================================================== */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: #ffffff;
    color: var(--dark-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    color: var(--gray-color);
    font-size: 18px;
}

/* ==========================================================================
   新闻详情页
   ========================================================================== */

.news-detail-section {
    background: var(--light-color);
    padding: 60px 0;
}

.news-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-bottom: 60px;
}

/* 新闻详情主体 */
.news-detail-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 新闻详情头部 */
.news-detail-header {
    margin-bottom: 30px;
}

.news-detail-category {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.news-detail-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-color);
}

.meta-item i {
    color: var(--primary-color);
}

/* 新闻详情正文 */
.news-detail-body {
    line-height: 2.0;
    color: var(--dark-color);
    font-size: 16px;
}

.news-summary {
    background: rgba(102, 126, 234, 0.05);
    padding: 24px;
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 2.0;
    color: var(--dark-color);
}

.news-summary strong {
    color: var(--primary-color);
    font-size: 17px;
    font-weight: 700;
}

.news-detail-body h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 50px 0 25px;
    color: var(--dark-color);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    line-height: 1.4;
}

.news-detail-body h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 40px 0 20px;
    color: var(--dark-color);
    line-height: 1.4;
}

.news-detail-body p {
    margin-bottom: 25px;
    font-size: 16px;
    color: var(--dark-color);
    line-height: 2.0;
    text-align: justify;
}

.news-detail-body ul {
    margin: 30px 0 30px 40px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 12px;
}

.news-detail-body li {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--dark-color);
    line-height: 2.0;
    padding-left: 10px;
    list-style-type: disc;
    list-style-position: outside;
}

.news-detail-body li strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 新闻详情页脚 */
.news-detail-footer {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(102, 126, 234, 0.2);
}

.tag i {
    font-size: 11px;
}

.news-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.share-label {
    font-size: 14px;
    color: var(--gray-color);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-color);
    color: var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px);
}

.share-btn.weixin:hover {
    background: #07c160;
}

.share-btn.weibo:hover {
    background: #e6162d;
}

.share-btn.linkedin:hover {
    background: #0077b5;
}

.share-btn.email:hover {
    background: #ea4335;
}

/* ==========================================================================
   侧边栏
   ========================================================================== */

.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary-color);
    font-size: 16px;
}

.widget-list {
    list-style: none;
}

.widget-item {
    margin-bottom: 15px;
}

.widget-item:last-child {
    margin-bottom: 0;
}

.widget-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dark-color);
    transition: var(--transition);
    font-size: 14px;
}

.widget-link:hover {
    color: var(--primary-color);
}

.widget-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.widget-text {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.widget-date {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 12px;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--light-color);
    border-radius: 10px;
    color: var(--dark-color);
    transition: var(--transition);
    font-size: 14px;
}

.category-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding-left: 20px;
}

.category-link i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.category-link:hover i {
    transform: translateX(3px);
}

.category-count {
    background: rgba(102, 126, 234, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
}

/* ==========================================================================
   相关新闻
   ========================================================================== */

.related-news-section {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.section-title-sm {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--dark-color);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-news-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--light-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    padding: 20px;
}

.related-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.related-news-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-news-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-date {
    font-size: 13px;
    color: var(--gray-color);
    margin-top: auto;
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .news-grid {
        column-count: 2;
        column-gap: 25px;
    }

    .news-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .news-sidebar {
        order: 2;
    }

    .news-detail-content {
        padding: 40px 30px;
    }

    .news-detail-title {
        font-size: 28px;
    }

    .related-news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* 手机设备 (≤768px) */
@media (max-width: 768px) {
    .news-filters-section {
        padding: 20px 0;
    }

    .filters-wrapper {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .news-list-section {
        padding: 40px 0;
    }

    .news-grid {
        column-count: 1;
        column-gap: 20px;
    }

    .news-content {
        padding: 20px;
    }

    .news-title {
        font-size: 18px;
    }

    .news-excerpt {
        -webkit-line-clamp: 4;
        font-size: 13px;
    }

    .pagination {
        padding: 8px 15px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .news-detail-section {
        padding: 40px 0;
    }

    .news-detail-content {
        padding: 30px 20px;
    }

    .news-detail-title {
        font-size: 24px;
    }

    .news-detail-body h2 {
        font-size: 24px;
        margin: 40px 0 20px;
    }

    .news-detail-body h3 {
        font-size: 20px;
        margin: 35px 0 18px;
    }

    .news-detail-body p,
    .news-detail-body li {
        font-size: 15px;
    }

    .news-summary {
        padding: 20px;
        font-size: 15px;
    }

    .related-news-section {
        padding: 30px 20px;
    }

    .section-title-sm {
        font-size: 20px;
    }

    .related-news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .sidebar-widget {
        padding: 20px;
    }

    .widget-title {
        font-size: 16px;
    }
}

/* 小屏幕手机 (≤480px) */
@media (max-width: 480px) {
    .filters-wrapper {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 12px;
    }

    .news-content {
        padding: 18px;
    }

    .news-title {
        font-size: 16px;
    }

    .news-meta {
        gap: 15px;
        font-size: 12px;
    }

    .news-excerpt {
        -webkit-line-clamp: 4;
        font-size: 13px;
        margin-bottom: 15px;
    }

    .pagination {
        padding: 6px 12px;
        gap: 6px;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 10px;
    }

    .news-detail-content {
        padding: 25px 15px;
    }

    .news-detail-title {
        font-size: 22px;
    }

    .news-detail-category {
        padding: 6px 16px;
        font-size: 12px;
        margin-bottom: 15px;
    }

    .news-detail-meta {
        gap: 15px;
        padding: 15px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-item {
        font-size: 13px;
    }

    .news-summary {
        padding: 15px;
        font-size: 14px;
    }

    .news-detail-body h2 {
        font-size: 22px;
        margin: 35px 0 18px;
    }

    .news-detail-body h3 {
        font-size: 18px;
        margin: 30px 0 15px;
    }

    .news-detail-body p,
    .news-detail-body li {
        font-size: 15px;
    }

    .news-detail-body ul {
        padding: 15px;
        margin: 25px 0 25px 30px;
    }

    .news-summary {
        padding: 18px;
        font-size: 15px;
    }

    .news-detail-footer {
        gap: 20px;
    }

    .tags {
        gap: 10px;
    }

    .tag {
        padding: 6px 12px;
        font-size: 12px;
    }

    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .related-news-section {
        padding: 25px 15px;
    }

    .section-title-sm {
        font-size: 18px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .related-news-content {
        padding: 12px;
    }

    .related-news-content h4 {
        font-size: 14px;
    }

    .sidebar-widget {
        padding: 18px;
    }

    .widget-link {
        font-size: 13px;
    }

    .category-link {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .news-filters-section {
        position: relative;
        padding: 15px 0;
    }

    .filters-wrapper {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* ==========================================================================
   动画效果
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.6s ease-out;
}

.news-card:nth-child(1) {
    animation-delay: 0.1s;
}

.news-card:nth-child(2) {
    animation-delay: 0.2s;
}

.news-card:nth-child(3) {
    animation-delay: 0.3s;
}

.news-card:nth-child(4) {
    animation-delay: 0.4s;
}

.news-card:nth-child(5) {
    animation-delay: 0.5s;
}

.news-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* 新闻卡片状态 - 加载动画 */
.news-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 新闻卡片状态 - 隐藏 */
.news-card.hidden {
    display: none;
}

/* 打印样式优化 */
@media print {
    .news-filters-section,
    .pagination-wrapper,
    .news-sidebar,
    .news-detail-footer {
        display: none;
    }

    .news-card,
    .news-detail-content {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .news-detail-body {
        font-size: 12pt;
    }
}
