/**
 * 奥斯盾网站排版全面修复
 * 修复 Alterna 主题字体过小、间距过密、层次不清等问题
 */

/* ===== 1. 全局基础 ===== */
body {
  font-family: 'Open Sans', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  color: #444;
  font-size: 16px;
  line-height: 1.8;
}

/* ===== 2. 标题层级（从大到小递减，层次清晰） ===== */
h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 20px;
  color: #222;
}
h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  margin: 30px 0 16px;
  color: #333;
  padding-bottom: 8px;
  border-bottom: 2px solid #7ab80e;
}
h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin: 24px 0 12px;
  color: #333;
}
h4 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin: 20px 0 10px;
  color: #444;
}
h5 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin: 16px 0 8px;
  color: #555;
}
h6 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin: 14px 0 8px;
  color: #666;
}

/* ===== 3. 正文段落 ===== */
p {
  margin: 0 0 20px;
  line-height: 1.8;
  color: #444;
}

/* ===== 4. 文章正文专用（单篇文章页） ===== */
.single-post .entry-content,
.single .entry-content {
  font-size: 16px;
  line-height: 1.9;
}
.single-post .entry-content p,
.single .entry-content p {
  margin-bottom: 22px;
  color: #333;
}
.single-post .entry-content h2,
.single .entry-content h2 {
  font-size: 24px;
  margin-top: 36px;
  margin-bottom: 16px;
}
.single-post .entry-content h3,
.single .entry-content h3 {
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 12px;
}
.single-post .entry-content h4,
.single .entry-content h4 {
  font-size: 18px;
  margin-top: 22px;
  margin-bottom: 10px;
}

/* ===== 5. 列表样式 ===== */
ul, ol {
  margin: 0 0 20px 20px;
  padding: 0;
}
li {
  margin-bottom: 8px;
  line-height: 1.8;
}
ul ul, ol ol, ul ol, ol ul {
  margin-bottom: 0;
}

/* ===== 6. 表格样式（对比表格用） ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}
th, td {
  padding: 12px 16px;
  border: 1px solid #ddd;
  text-align: left;
  line-height: 1.6;
}
th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
tr:nth-child(even) {
  background: #fafafa;
}
tr:hover {
  background: #f0f7e6;
}

/* ===== 7. 引用块 ===== */
blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 4px solid #7ab80e;
  background: #f9fbe7;
  color: #555;
  font-style: italic;
  line-height: 1.7;
}
blockquote p:last-child {
  margin-bottom: 0;
}

/* ===== 8. 代码样式 ===== */
code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  color: #c7254e;
}
pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 16px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 20px 0;
  line-height: 1.6;
}
pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ===== 9. 内容区宽度调整 ===== */
@media (min-width: 1201px) {
  .alterna-col.col-lg-9 {
    width: 75%;
  }
  .alterna-col.col-lg-3 {
    width: 25%;
  }
}

/* ===== 10. 文章元信息（日期、作者等） ===== */
.single-post .post-meta {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}
.single-post .post-meta a {
  color: #7ab80e;
  text-decoration: none;
}
.single-post .post-meta a:hover {
  text-decoration: underline;
}

/* ===== 11. 面包屑导航 ===== */
#page-breadcrumb {
  font-size: 14px;
  margin-bottom: 20px;
}

/* ===== 12. 侧边栏 ===== */
.widget {
  margin-bottom: 30px;
}
.widget-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #7ab80e;
}

/* ===== 13. 移动端适配 ===== */
@media (max-width: 767px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }
  
  .single-post .entry-content,
  .single .entry-content {
    font-size: 15px;
  }
  
  th, td {
    padding: 8px 10px;
    font-size: 14px;
  }
}

/* ===== 14. 图片样式 ===== */
.entry-content img,
.post-element-content img {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: 4px;
}
figure {
  margin: 20px 0;
  text-align: center;
}
figcaption {
  font-size: 13px;
  color: #888;
  margin-top: 8px;
  font-style: italic;
}

/* ===== 15. FAQ 样式（GEO/AEO 专用） ===== */
.faq-item,
.wp-block-pb-accordion-item {
  margin-bottom: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
}
