﻿/* 面包屑导航样式 - 无背景，箭头分隔，顶部紧凑 */
.breadcrumb-nav {
    padding: 2px 0;  /* 最小化上下内边距 */
    margin: 0 0 8px 0;  /* 上右下左，顶部和底部边距最小化 */
    font-size: 16px;
    color: #666;
    line-height: 1.2;  /* 更紧凑的行高 */
}

.breadcrumb-nav a {
    color: #0746ce;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.breadcrumb-nav a:hover {
    color: #0639a1;
    text-decoration: underline;
}

.breadcrumb-nav span {
    color: #666;
}

/* 使用箭头分隔符 */
.breadcrumb-nav a:not(:last-child)::after {
    content: " → ";  /* 右箭头分隔符 */
    color: #999;
    margin: 0 4px;  /* 箭头间距 */
    font-weight: normal;
}

/* 移除短横线分隔符的CSS规则 */
/* 不需要::after伪元素，因为现在使用逗号文本分隔 */
/* 文章正文图片自适应 - 防止图片撑破父容器 */
.article-body img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box;
}

.article-body table {
    max-width: 100% !important;
    width: auto !important;
}

.article-body {
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 新闻页CSS - 限制最大宽度1280px */

/* 移除会覆盖主CSS的.container样式 */
.container {
    /* 不设置max-width: 100%，让主CSS的1280px限制生效 */
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* 新闻列表页特定样式 */
.news-list-container {
    margin: 20px 0;
    width: 100%;
}

.news-list-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.news-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #0746ce;
    margin-bottom: 8px;
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    width: 100%;
}

.news-title:hover {
    text-decoration: underline;
}

.news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.8em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.news-date {
    display: block;
    font-size: 13px;
    color: #888;
}

/* 新闻导航 */
.news-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    width: 100%;
}

.prev-news, .next-news {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    max-width: 45%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.prev-news:hover, .next-news:hover {
    background-color: #0746ce;
    color: white;
}

/* 新闻类别导航 */
.news-category-nav {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0 30px 0;
    width: 100%;
}

.category-nav-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-link {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.category-link:hover {
    background: #0746ce;
    color: white;
    border-color: #0746ce;
}

.category-link.active {
    background: #0746ce;
    color: white;
    border-color: #0746ce;
}

.home-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    color: #0746ce;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #0746ce;
    margin-right: 10px;
    transition: all 0.3s;
}

.home-link:hover {
    background: #0746ce;
    color: white;
}

/* 响应式设计 - 修复横向滚动 */
@media (max-width: 1280px) {
    /* 在1280px以下的屏幕上，容器使用100%宽度 */
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .news-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .prev-news, .next-news {
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
    
    .category-links {
        justify-content: center;
    }
    
    .content-wrapper {
        display: block;
    }
    
    .news-content, .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        float: none;
    }
    
    /* 确保所有图片不会超出屏幕 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 修复长文本 */
    .news-title, .news-excerpt, .prev-news, .next-news, .category-link {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* 额外安全措施 */
@media (max-width: 480px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
        position: relative;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .news-title {
        font-size: 16px;
    }
    
    .news-excerpt {
        font-size: 13px;
    }
}