/* ================= 全局基础样式 ================= */
body { margin: 0; padding: 0; font-family: "Helvetica Neue", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; line-height: 1.6; }
a { text-decoration: none; color: #333; transition: color 0.2s; }
a:hover { color: #38a68a; }
ul, li { list-style: none; padding: 0; margin: 0; }
h1, h2, h3 { margin: 0; font-weight: normal; }
img { border: 0; vertical-align: middle; }

/* 顶部导航 */
.site-header { background: #38a68a; height: 60px; line-height: 60px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-bottom: 24px; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; padding: 0 15px; }
.logo a { color: #fff; font-size: 22px; font-weight: bold; margin-right: 40px; display: block; }
.nav-container ul li { display: inline-block; margin-right: 20px; }
.nav-container a { color: rgba(255,255,255,0.9); font-size: 16px; }
.nav-container a:hover { color: #fff; text-decoration: underline; }

/* 布局容器 */
.container { max-width: 1200px; margin: 0 auto; display: flex; gap: 24px; padding: 0 15px; align-items: flex-start; }
.main-content { flex: 1; background: #fff; padding: 0; border-radius: 4px; overflow: hidden; }
.sidebar { width: 320px; flex-shrink: 0; }

/* 左侧列表样式 */
.news-item { display: flex; padding: 20px; border-bottom: 1px solid #f0f0f0; transition: background 0.2s; }
.news-item:hover { background: #fafafa; }
.news-thumb { width: 200px; height: 130px; flex-shrink: 0; margin-right: 20px; overflow: hidden; border-radius: 4px; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-item:hover .news-thumb img { transform: scale(1.05); }

.news-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.news-title { font-size: 18px; font-weight: bold; line-height: 1.4; margin-bottom: 8px; }
.news-intro { font-size: 14px; color: #666; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
.news-meta { font-size: 12px; color: #999; }
.news-meta span { margin-right: 15px; }

/* 右侧侧边栏样式 */
.sidebar-box { background: #fff; padding: 20px; border-radius: 4px; margin-bottom: 20px; }
.side-title { font-size: 16px; font-weight: bold; border-left: 4px solid #38a68a; padding-left: 10px; margin-bottom: 15px; }

/* 快讯时间轴 */
.flash-news-list li { position: relative; padding-left: 20px; margin-bottom: 15px; border-left: 1px solid #e0e0e0; }
.flash-news-list li::before { content: ''; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; background: #38a68a; border-radius: 50%; }
.flash-news-list .time { color: #f5a623; font-size: 12px; display: block; }
.flash-news-list a { font-size: 14px; line-height: 1.5; display: block; }

/* 热门排行 */
.hot-news-list li { display: flex; margin-bottom: 12px; align-items: center; }
.rank-num { width: 18px; height: 18px; line-height: 18px; text-align: center; background: #eee; color: #999; font-size: 12px; margin-right: 10px; border-radius: 2px; font-style: normal; }
.rank-1 { background: #ff4d4f; color: #fff; }
.rank-2 { background: #ff7a45; color: #fff; }
.rank-3 { background: #ffa940; color: #fff; }
.hot-news-list a { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-news-list .views { font-size: 12px; color: #ccc; margin-left: 5px; }

/* 分页 */
.pagination { padding: 20px; text-align: center; }
.pagination span, .pagination a { display: inline-block; padding: 5px 12px; border: 1px solid #ddd; margin: 0 2px; border-radius: 2px; }
.pagination .now-page { background: #38a68a; color: #fff; border-color: #38a68a; }

/* 页脚 */
.site-footer { text-align: center; padding: 40px 0; color: #999; font-size: 13px; margin-top: 40px; background: #222; color: #fff; }

/* ================= 文章页专属样式 ================= */
.single-page { padding: 40px; background: #fff; border-radius: 4px; }
.breadcrumb { margin-bottom: 20px; color: #999; font-size: 14px; }
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: #38a68a; }

.article-title { font-size: 28px; font-weight: bold; margin-bottom: 15px; }
.article-body img { max-width: 100%; height: auto; display: block; margin: 20px auto; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.article-body p { margin-bottom: 20px; line-height: 1.8; font-size: 16px; color: #444; }
.article-body blockquote { border-left: 4px solid #38a68a; background: #f9f9f9; padding: 15px 20px; margin: 20px 0; color: #666; }

/* 相关阅读模块 */
.related-posts { margin-top: 50px; border-top: 1px solid #eee; padding-top: 20px; }
.related-posts h3 { font-size: 18px; border-left: 4px solid #38a68a; padding-left: 10px; margin-bottom: 15px; font-weight: bold; }
.related-posts ul { display: flex; flex-wrap: wrap; gap: 15px; }
.related-posts li { width: 48%; }
.related-posts li a { display: block; padding: 10px; background: #f9f9f9; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-posts li a:hover { background: #f0f0f0; color: #38a68a; }

/* ================= 移动端适配 (SEO 必备) ================= */
@media screen and (max-width: 768px) {
    .container { flex-direction: column; padding: 0 10px; }
    .header-inner { flex-direction: column; height: auto; padding: 10px; }
    .site-header { height: auto; line-height: 1.5; }
    .logo a { margin-right: 0; display: block; text-align: center; margin-bottom: 10px; }
    
    .nav-container { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 10px; }
    .nav-container ul li { display: inline-block; margin: 0 10px; }
    
    .main-content, .sidebar { width: 100%; max-width: 100%; }
    
    .news-item { flex-direction: column; }
    .news-thumb { width: 100%; height: 180px; margin-right: 0; margin-bottom: 10px; }
    .news-title { font-size: 18px; }
    .news-intro { display: none; } /* 手机上隐藏摘要 */
    
    .single-page { padding: 20px; } /* 手机上内页边距减小 */
    .article-title { font-size: 22px; }
    .related-posts li { width: 100%; } /* 手机上相关文章单栏显示 */
    
    .sidebar { margin-top: 30px; }
}