/* 全局样式重置 - 通用 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* 防止横向滚动 - 通用 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%; /* 通用 */
}

/* 头部样式 - 通用 */
header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
}

.logo {
    text-align: left;
    margin-bottom: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: 1px;
}

/* 导航栏样式 - 通用 + 列表页扩展 */
nav {
    background-color: #2c3e50;
    width: 100%;
}

.nav-list {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    width: 100%;
}

.nav-list li {
    margin: 0 8px;
}

.nav-list li:first-child {
    margin-left: 0;
}

.nav-list a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 14px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

/* 列表页专属：当前栏目高亮 */
.nav-list a.active {
    background-color: #34495e;
    border-radius: 4px;
}

.nav-list a:hover {
    background-color: #34495e;
}

/* 主体内容区域 - 通用 */
.main-content {
    display: flex;
    margin: 20px 0;
    gap: 20px;
    width: 100%;
}

/* ---------------------- 首页专属样式 ---------------------- */
/* 首页左侧栏目卡片区 */
.article-section {
    flex: 3;
    width: 100%;
}

/* 首页栏目卡片网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

/* 首页栏目卡片 */
.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    width: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
}

/* 首页栏目卡片头部 */
.column-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 10px 12px;
    font-size: 16px;
    font-weight: bold;
}

/* 首页栏目资讯列表 */
.column-news-list {
    padding: 8px 12px;
    list-style: none;
}

.column-news-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.column-news-list li:last-child {
    border-bottom: none;
}

.column-news-list a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.column-news-list a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

/* 首页查看更多按钮 */
.view-more {
    text-align: center;
    padding: 8px 0;
}

.view-more a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid #2c3e50;
    border-radius: 20px;
    transition: all 0.3s;
}

.view-more a:hover {
    background-color: #2c3e50;
    color: #fff;
}

/* ---------------------- 列表页专属样式 ---------------------- */
/* 列表页左侧栏目列表区 */
.column-list-section {
    flex: 3;
    width: 100%;
}

/* 列表页栏目头部Banner */
.column-header-banner {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 列表页栏目标题 */
.column-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 列表页栏目描述 */
.column-desc {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.8;
}

/* 列表页资讯列表容器 */
.news-list {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 列表页单个资讯项 */
.news-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.news-item:last-child {
    border-bottom: none;
}

/* 列表页资讯标题 */
.news-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.news-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.news-title a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* 列表页资讯摘要 */
.news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 列表页阅读全文按钮 */
.news-read-more {
    align-self: flex-start;
}

.news-read-more a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 10px;
    border: 1px solid #3498db;
    border-radius: 4px;
    transition: all 0.3s;
}

.news-read-more a:hover {
    background-color: #3498db;
    color: #fff;
}

/* 列表页分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
    list-style: none;
}

.pagination li a {
    display: block;
    padding: 8px 15px;
    background-color: #fff;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.pagination li a:hover,
.pagination li a.active {
    background-color: #2c3e50;
    color: #fff;
}

/* ---------------------- 通用侧边栏样式 ---------------------- */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
}

.widget-title {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #2c3e50;
}

.latest-news-list {
    list-style: none;
}

.latest-news-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.latest-news-list li:last-child {
    border-bottom: none;
}

.latest-news-list a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.latest-news-list a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

.recommend-list {
    list-style: none;
}

.recommend-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.recommend-list li:last-child {
    border-bottom: none;
}

.recommend-list a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.recommend-list a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background-color: #f1f1f1;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: #2c3e50;
    color: #fff;
}

/* ---------------------- 通用友情链接 + 页脚 ---------------------- */
.friend-links {
    background-color: #fff;
    padding: 15px 0;
    margin: 15px 0;
    width: 100%;
}

.friend-links h3 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 16px;
    color: #2c3e50;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0 10px;
}

.links-list a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

.links-list a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    width: 100%;
}

.footer-info {
    font-size: 13px;
    line-height: 1.6;
    padding: 0 10px;
}

/* ---------------------- 响应式适配 - 通用 + 分页面 ---------------------- */
/* 平板端 (992px以下) */
@media (max-width: 992px) {
    /* 首页适配 */
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* 列表页适配 */
    .column-title {
        font-size: 24px;
    }
    .column-desc {
        font-size: 15px;
    }
    .news-title {
        font-size: 16px;
    }
    
    /* 通用适配 */
    .logo-text {
        font-size: 22px;
    }
    .nav-list a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* 手机端 (768px以下) */
@media (max-width: 768px) {
    /* 通用导航修复 */
    .nav-list {
        flex-wrap: wrap;
        padding: 5px 0;
    }
    .nav-list li {
        margin: 2px 5px;
        flex-shrink: 0;
    }
    .nav-list a {
        padding: 6px 10px;
        font-size: 13px;
        border-radius: 4px;
    }

    /* 通用布局修复 */
    .main-content {
        flex-direction: column;
        margin: 15px 0;
        gap: 15px;
    }
    .logo-text {
        font-size: 20px;
    }
    
    /* 首页适配 */
    .article-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .column-header {
        font-size: 15px;
        padding: 8px 10px;
    }
    .column-news-list {
        padding: 6px 10px;
    }
    
    /* 列表页适配 */
    .column-header-banner {
        padding: 15px;
    }
    .column-title {
        font-size: 20px;
    }
    .column-desc {
        font-size: 14px;
    }
    .news-list {
        padding: 15px;
    }
    .news-title {
        font-size: 15px;
    }
    .news-excerpt {
        font-size: 13px;
    }
    
    /* 通用宽度适配 */
    header, nav, .main-content, .article-section, .column-list-section, 
    .sidebar, .friend-links, footer {
        padding-left: 0;
        padding-right: 0;
    }
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    .sidebar-widget {
        padding: 10px;
    }
}

/* 小屏手机 (480px以下) */
@media (max-width: 480px) {
    .nav-list a {
        padding: 5px 8px;
        font-size: 12px;
    }
    .logo-text {
        font-size: 18px;
    }
    
    /* 首页适配 */
    .column-news-list a {
        font-size: 12px;
    }
    
    /* 列表页适配 */
    .column-title {
        font-size: 18px;
    }
}
.article-detail-section .article-meta {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    font-size: 14px;
    color: #999;
}
.article-detail-section .article-meta span {
    margin-right: 15px;
}
.article-detail-section .article-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}
.article-detail-section .article-content p {
    margin-bottom: 18px;
    text-align: justify;
}
.article-detail-section .article-content h2 {
    font-size: 20px;
    margin: 25px 0 15px;
    color: #2c3e50;
}
.article-detail-section .article-content h3 {
    font-size: 18px;
    margin: 20px 0 12px;
    color: #2c3e50;
}
.article-detail-section .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.related-articles {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #2c3e50;
}
.related-articles h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
}
.related-list {
    list-style: none;
}
.related-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.related-list li:last-child {
    border-bottom: none;
}
.related-list a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}
.related-list a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* 移动端适配微调 */
@media (max-width: 768px) {
    .article-detail-section .article-content {
        font-size: 15px;
        line-height: 1.7;
    }
    .article-detail-section .article-content p {
        margin-bottom: 15px;
    }
    .article-detail-section .article-meta span {
        display: inline-block;
        margin-right: 10px;
        margin-bottom: 5px;
    }
}