/*
Theme Name: SEO22
Author: CleanCode
Version: 1.0
Description: 全新随机色SEO自适应主题，代码全新无重复
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
  background-color: #f4f6f9;
  color: #222;
  line-height: 1.9;
}
a {
  color: #2979ff;
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: #0052cc;
}
img {
  max-width: 100%;
  border-radius: 6px;
  display: block;
}

/* 全局容器 */
.main-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 主体弹性布局 */
.layout-flex {
  display: flex;
  gap: 30px;
  margin: 24px 0;
}
@media(max-width: 900px){
  .layout-flex {
    flex-direction: column;
  }
}

/* 主内容区 */
.main-content {
  flex: 1;
}

/* 侧边栏 */
.side-bar {
  width: 280px;
}
@media(max-width: 900px){
  .side-bar {
    width: 100%;
  }
}

/* 头部样式 */
.site-top {
  background: linear-gradient(135deg, #2979ff, #42a5f5);
  padding: 32px 0;
  text-align: center;
}
.site-top h1 {
  font-size: 26px;
  font-weight: 600;
  color: #fff;
}
.site-top a {
  color: #fff;
}

/* 导航栏 */
.site-nav {
  background: #1967d2;
}
.site-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
}
.site-nav li a {
  display: inline-block;
  color: #fff;
  padding: 14px 22px;
  font-size: 15px;
}
.site-nav li a:hover {
  background: #0d47a1;
}

/* 文章列表卡片 150*150 缩略图 */
.article-item {
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.article-thumb {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-info h2 {
  font-size: 19px;
  margin-bottom: 8px;
}
.article-time {
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
}
.article-desc {
  font-size: 15px;
  color: #555;
}

/* 分页单独样式 */
.page-turn {
  text-align: center;
  margin: 40px 0;
}
.page-turn a,
.page-turn span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 5px;
  margin: 0 4px;
}
.page-turn .current {
  background: #2979ff;
  color: #fff;
  border-color: #2979ff;
}

/* 猜你喜欢 四列网格 */
.recommend-box {
  margin-top: 50px;
}
.recommend-box h3 {
  font-size: 20px;
  margin-bottom: 18px;
  border-left: 4px solid #2979ff;
  padding-left: 12px;
}
.grid-four {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
}
@media(max-width:768px){
  .grid-four {
    grid-template-columns: repeat(2,1fr);
  }
}
.grid-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.grid-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.grid-title {
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

/* 侧边栏组件 */
.side-widget {
  background: #fff;
  padding: 22px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.side-widget h4 {
  font-size: 17px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
  color: #1967d2;
}

/* 侧边栏缩略图列表 */
.side-list-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
  align-items: center;
}
.side-list-img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}
.side-list-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-list-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

/* 内容页样式 */
.single-article {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.single-article h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 30px;
}
.single-content {
  font-size: 16px;
  line-height: 2.1;
  color: #333;
}

/* 内容页上下篇 */
.single-page-turn {
  display: flex;
  justify-content: space-between;
  margin: 35px 0;
}
.single-page-turn a {
  padding: 10px 18px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
}

/* 相关文章 */
.relative-list {
  margin-top: 40px;
}
.relative-list h4 {
  font-size: 19px;
  margin-bottom: 15px;
  padding-left: 12px;
  border-left: 4px solid #2979ff;
}
.relative-list a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px dashed #eee;
  font-size: 15px;
}

/* 底部 */
.site-footer {
  text-align: center;
  padding: 35px 0;
  margin-top: 50px;
  background: #fff;
  border-top: 1px solid #eee;
  color: #777;
  font-size: 14px;
}
/* 猜你喜欢卡片可点击样式 */
.grid-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.grid-card-link:hover {
    opacity: 0.9;
}
.grid-title a {
    color: #333;
    text-decoration: none;
}
.grid-title a:hover {
    color: #2979ff;
}
