/* ===== news.css - 新闻列表页面专用样式 ===== */
/* 修复手机端标题与图标换行问题 */

/* 页面基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 新闻主容器 */
.news-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 20px;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 内容包装器 - 白色卡片效果 */
.news-content-wrapper {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 50px;
    transition: all 0.3s ease;
}

/* ===== 面包屑导航 ===== */
.news-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
    color: #718096;
    font-size: 0.95rem;
}

.news-breadcrumb a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-breadcrumb a:hover {
    color: #08358f;
}

.news-breadcrumb i {
    margin: 0 10px;
    font-size: 0.75rem;
    color: #cbd5e0;
}

.news-breadcrumb .current {
    color: #08358f;
    font-weight: 600;
}

/* ===== 分类选项卡 - 左边通用图标 ===== */
.news-tabs {
    display: flex;
    margin-bottom: 35px;
    border-bottom: 2px solid #edf2f7;
    gap: 10px;
}

.tab-item {
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    background-color: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-item i {
    font-size: 1rem;
    color: #718096;
}

.tab-item.active {
    color: #08358f;
    background: linear-gradient(to top, rgba(8, 53, 143, 0.05), transparent);
}

.tab-item.active i {
    color: #08358f;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #08358f;
    border-radius: 3px 3px 0 0;
}

.tab-item:hover {
    color: #08358f;
    background-color: rgba(8, 53, 143, 0.03);
}

.tab-item:hover i {
    color: #08358f;
}

/* ===== 新闻列表容器 ===== */
.news-list {
    display: none;
    animation: fadeIn 0.5s ease;
}

.news-list.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 新闻条目 - 修复手机端换行 ===== */
.news-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f0f4f8;
    transition: all 0.2s ease;
}

.news-item:hover {
    background-color: #fafcff;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 8px;
}

/* 左侧通用图标 - 固定位置，不换行 */
.news-icon {
    flex-shrink: 0;
    width: 32px;
    display: flex;
    justify-content: flex-start;
    margin-right: 12px;
}

.news-icon i {
    font-size: 1.1rem;
    color: #1a4cb3;
}

/* 新闻标题 - 会议动态分类直接作为flex项 */
.news-item > .news-title {
    flex: 1;
    color: #1e3c72;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-word;
    padding-right: 15px;
}

.news-item > .news-title:hover {
    color: #08358f;
    text-decoration: underline;
}

/* 新闻标题包装器 - 媒体报道分类使用 */
.news-title-wrapper {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-right: 15px;
}

.news-title-wrapper .news-title {
    color: #1e3c72;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-word;
}

.news-title-wrapper .news-title:hover {
    color: #08358f;
    text-decoration: underline;
}

/* 新闻来源标签 */
.news-source {
    display: inline-block;
    padding: 2px 10px;
    background-color: #f0f7ff;
    color: #1a4cb3;
    font-size: 0.8rem;
    border-radius: 30px;
    border: 1px solid rgba(26, 76, 179, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

/* 右侧日期 - 固定宽度，不换行 */
.news-date {
    flex-shrink: 0;
    color: #718096;
    font-size: 0.9rem;
    white-space: nowrap;
    font-weight: 400;
    margin-left: auto;
}

/* ===== 分页 ===== */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 8px;
    flex-wrap: wrap;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-item:hover {
    background-color: #f0f7ff;
    border-color: #1a4cb3;
    color: #08358f;
}

.page-item.active {
    background: linear-gradient(135deg, #08358f, #1a4cb3);
    border-color: #08358f;
    color: white;
}

.page-item.disabled {
    background-color: #f7fafc;
    border-color: #e2e8f0;
    color: #cbd5e0;
    pointer-events: none;
}

.page-item i {
    font-size: 0.8rem;
}

/* ===== 响应式设计 - 修复手机端换行 ===== */

/* 1400px以下 */
@media screen and (max-width: 1400px) {
    .news-container {
        max-width: 1200px;
        padding: 45px 20px;
    }
    .news-content-wrapper {
        padding: 45px;
    }
}

/* 1200px以下 */
@media screen and (max-width: 1200px) {
    .news-container {
        max-width: 100%;
        padding: 40px 20px;
    }
    .news-content-wrapper {
        padding: 40px;
    }
}

/* 992px以下 - 平板 */
@media screen and (max-width: 992px) {
    .news-container {
        padding: 35px 15px;
    }
    .news-content-wrapper {
        padding: 35px 25px;
    }
    .tab-item {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* 768px以下 - 移动端 - 修复换行核心代码 */
@media screen and (max-width: 768px) {
    .news-container {
        padding: 30px 15px;
    }
    .news-content-wrapper {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .news-breadcrumb {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .news-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 5px;
    }

    .tab-item {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
        border: 1px solid #edf2f7;
    }

    .tab-item.active::after {
        display: none;
    }

    .tab-item.active {
        background: linear-gradient(135deg, #08358f, #1a4cb3);
        color: white;
        border-color: #08358f;
    }

    .tab-item.active i {
        color: white;
    }

    /* ===== 移动端保持一行布局，强制不换行 ===== */
    .news-item {
        display: flex;
        align-items: flex-start;
        flex-wrap: nowrap;
        padding: 16px 0;
    }

    .news-icon {
        flex-shrink: 0;
        width: 28px;
        margin-right: 10px;
    }

    /* 会议动态 - 标题和日期同一行 */
    .news-item > .news-title {
        flex: 1;
        font-size: 0.95rem;
        padding-right: 10px;
        white-space: normal;
        word-break: break-word;
        display: inline;
    }

    /* 媒体报道 - 标题包装器保持行内 */
    .news-title-wrapper {
        flex: 1;
        display: inline;
        padding-right: 10px;
    }

    .news-title-wrapper .news-title {
        font-size: 0.95rem;
        display: inline;
        white-space: normal;
        word-break: break-word;
    }

    .news-source {
        font-size: 0.75rem;
        padding: 1px 8px;
        margin-left: 6px;
        display: inline-block;
        vertical-align: middle;
    }

    /* 日期固定右侧，不换行 */
    .news-date {
        flex-shrink: 0;
        font-size: 0.85rem;
        margin-left: auto;
        white-space: nowrap;
    }
}

/* 576px以下 - 手机小屏 - 进一步优化 */
@media screen and (max-width: 576px) {
    .news-content-wrapper {
        padding: 20px 15px;
    }

    .news-item {
        padding: 14px 0;
    }

    .news-icon {
        width: 24px;
        margin-right: 8px;
    }

    .news-icon i {
        font-size: 0.95rem;
    }

    .news-item > .news-title {
        font-size: 0.9rem;
    }

    .news-title-wrapper .news-title {
        font-size: 0.9rem;
    }

    .news-date {
        font-size: 0.8rem;
    }

    .news-source {
        font-size: 0.7rem;
        padding: 1px 6px;
    }

    .page-item {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* 400px以下 - 超小屏 - 强制优化 */
@media screen and (max-width: 400px) {
    .news-item > .news-title {
        font-size: 0.85rem;
    }

    .news-title-wrapper .news-title {
        font-size: 0.85rem;
    }

    .news-date {
        font-size: 0.75rem;
    }

    .news-source {
        font-size: 0.65rem;
        padding: 1px 5px;
    }
}

/* 打印样式 */
@media print {
    .news-content-wrapper {
        box-shadow: none;
        padding: 20px;
    }
    .page-banner,
    .header,
    .footer,
    .news-tabs,
    .news-pagination {
        display: none;
    }
}