/*
Theme Name: SEO16
Description: 轻量双栏、SEO友好、自动缩略图
*/

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Microsoft YaHei", sans-serif;
    background: #f7f8fa;
    color: #333;
    line-height: 1.7;
}
a {
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}
a:hover {
    color: #42b983;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部 */
.header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.logo {
    font-size: 24px;
    font-weight: bold;
}

/* 主体双栏 —— 修复核心 */
.main {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: nowrap;
    align-items: flex-start;
}
.content {
    flex: 1;
    min-width: 0;
    width: 100%;
}
.sidebar {
    width: 300px;
    flex-shrink: 0;
    min-width: 300px;
}

/* 文章卡片 */
.article {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.article-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}
.article-title {
    font-size: 20px;
    margin-bottom: 10px;
}
.article-meta {
    color: #999;
    font-size: 13px;
    margin-bottom: 15px;
}
.article-excerpt {
    color: #555;
}

/* 侧边栏 */
.widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.widget-title {
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
    color: #444;
}
.widget-list li {
    list-style: none;
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.widget-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.widget-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

/* 底部 */
.footer {
    background: #fff;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #eee;
}
.footer-about {
    max-width: 800px;
    margin: 0 auto 20px;
    color: #666;
    font-size: 14px;
}
.footer-copyright {
    color: #999;
    font-size: 13px;
}

/* 文章单独页样式 */
.single-title {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.4;
}
.article-thumb-single img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
}
.single-meta {
    color: #999;
    font-size: 13px;
    margin-bottom: 20px;
}
.single-content {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
}
.single-content p {
    margin-bottom: 1.2em;
}
.single-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
}
.single-content h2,
.single-content h3 {
    margin: 25px 0 15px;
    line-height: 1.4;
}

/* 移动端适配 */
@media (max-width: 900px) {
    .main {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        min-width: auto;
    }
    .article-thumb {
        height: 180px;
    }
}
/* 美化版分页 */
.pagination {
  margin: 40px 0;
  text-align: center;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0 5px;
  border-radius: 50%;
  background: #ffffff;
  color: #555;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  text-decoration: none;
}
.pagination .page-numbers:hover {
  background: #f0f9f4;
  color: #42b983;
}
.pagination .current {
  background: #42b983 !important;
  color: #fff !important;
  font-weight: 500;
}
.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 15px;
  border-radius: 30px;
}
/* 首页底部 8个随机图文推荐 —— 两排版 */
.random-posts-wrap {
    margin-top: 20px;
}
.random-title {
    font-size: 16px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #42b983;
    color: #333;
}
.random-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
/* 两排布局：一行4个 */
.random-item {
    width: calc(25% - 9px);
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.random-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}
.random-item h4 {
    padding: 8px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: normal;
    text-align: center;
}
.random-item h4 a {
    color: #333;
}
.random-item h4 a:hover {
    color: #42b983;
}

/* 移动端 */
@media (max-width: 768px) {
    .random-item {
        width: calc(50% - 6px);
    }
}

/* 移动端适配 */
@media (max-width: 900px) {
    .random-item {
        width: calc(25% - 9px);
    }
}
@media (max-width: 500px) {
    .random-item {
        width: calc(33.33% - 8px);
    }
}
/* 文章页 相关阅读 6篇横排 */
.related-posts-wrap {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.related-title {
    font-size: 16px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #42b983;
    color: #333;
}
.related-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.related-item {
    width: calc(16.66% - 11px);
    background: #f9f9f9;
    border-radius: 6px;
    overflow: hidden;
}
.related-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}
.related-item h4 {
    padding: 6px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    font-weight: normal;
}
.related-item h4 a {
    color: #333;
}
.related-item h4 a:hover {
    color: #42b983;
}

/* 移动端适配 */
@media (max-width: 900px) {
    .related-item {
        width: calc(33.33% - 10px);
    }
}
@media (max-width: 500px) {
    .related-item {
        width: calc(50% - 8px);
    }
}