/* ============================================
   豆瓣风格 - 文章页面 HTML5 Grid布局
   比例: 主内容70% + 侧边栏30%
   ============================================ */

/* 重置和基础 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.single-post {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #111;
  background-color: #f6f6f6;
}

/* 主容器 - 使用CSS Grid */
.douban-container {
  display: grid;
  grid-template-columns: 7fr 3fr; /* 70% : 30% */
  gap: 25px;
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 15px;
}

/* 主内容区 */
.douban-main {
  background: #fff;
  border-radius: 4px;
  padding: 30px 35px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.douban-main h1 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
}

.douban-main h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 25px 0 12px;
  padding-left: 12px;
  border-left: 3px solid #007722;
}

.douban-main h3 {
  font-size: 15px;
  font-weight: 600;
  color: #666;
  margin: 20px 0 10px;
}

.douban-main p {
  margin-bottom: 15px;
  text-align: justify;
}

.douban-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 13px;
}

.douban-main table th {
  background-color: #eef7f2;
  color: #007722;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border-top: 1px solid #007722;
  border-bottom: 1px solid #007722;
}

.douban-main table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.douban-main table tr:nth-child(even) {
  background-color: #fafafa;
}

.douban-main blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid #007722;
  background-color: #eef7f2;
  font-size: 13px;
  color: #555;
}

.douban-main img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

/* 侧边栏 */
.douban-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-box {
  background: #fff;
  border-radius: 4px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-box h3 {
  font-size: 15px;
  font-weight: 600;
  color: #007722;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.sidebar-box ul {
  list-style: none;
}

.sidebar-box li {
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.sidebar-box li:last-child {
  border-bottom: none;
}

.sidebar-box a {
  color: #333;
  text-decoration: none;
}

.sidebar-box a:hover {
  color: #007722;
}

.sidebar-box li span {
  float: right;
  color: #999;
  font-size: 11px;
}

/* 标签 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags a {
  display: inline-block;
  background: #f5f5f5;
  color: #666;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid #e0e0e0;
}

.tags a:hover {
  background: #007722;
  color: #fff;
  border-color: #007722;
}

/* 医师卡片 */
.doc-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-info img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eee;
}

.doc-info h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.doc-info p {
  font-size: 12px;
  color: #888;
}

/* 导航 */
.nav li {
  padding: 7px 0;
}

/* 隐藏示例页面 */
nav a[href*="sample-page"],
a[href*="示例页面"] {
  display: none !important;
}

/* 响应式 */
@media (max-width: 900px) {
  .douban-container {
    grid-template-columns: 1fr;
  }
  
  .douban-main {
    padding: 20px;
  }
}

/* 放大网站标题 */
.site-title,
.site-title a,
.wp-block-site-title,
.wp-block-site-title a {
  font-size: 28px !important;
  font-weight: 700 !important;
}

/* 相关内容推荐列表样式 */
.related-posts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.related-posts li a {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

/* ============================================
   主页SEO优化链接区域
   ============================================ */

/* SEO链接区域 */
.seo-links-section {
  background-color: #f9f9f9;
  padding: 40px 0;
  border-top: 1px solid #e5e5e5;
  margin-top: 40px;
}

.seo-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
}

.seo-column h3 {
  font-size: 15px;
  font-weight: 600;
  color: #007722;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.seo-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.seo-column li {
  margin-bottom: 8px;
}

.seo-column a {
  color: #666;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.seo-column a:hover {
  color: #007722;
}

/* 友情链接区域 */
.seo-friend-links {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 20px;
  border-top: 1px solid #e0e0e0;
}

.seo-friend-links h4 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.seo-friend-links p {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.seo-friend-links a {
  color: #888;
  font-size: 12px;
  text-decoration: none;
}

.seo-friend-links a:hover {
  color: #007722;
}

/* 响应式 */
@media (max-width: 1024px) {
  .seo-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .seo-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .seo-container {
    grid-template-columns: 1fr;
  }
}
