/* 博客页面样式 */
.blog-hero {
  background-color: #f8f8f8;
  padding: 120px 0 60px;
  text-align: center;
}

.blog-hero h1 {
  font-size: 3.6rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.blog-hero p {
  font-size: 1.8rem;
  max-width: 600px;
  margin: 0 auto;
  color: #666;
}

.blog-posts {
  padding: 60px 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 20px;
}

.post-content h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.post-content h2 a {
  color: #333;
  transition: color 0.3s ease;
}

.post-content h2 a:hover {
  color: var(--primary-color);
}

.post-meta {
  display: flex;
  margin-bottom: 15px;
  font-size: 1.4rem;
  color: #777;
}

.post-meta span {
  margin-right: 15px;
}

.post-meta .category {
  color: var(--primary-color);
  font-weight: 500;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 500;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: #c62828;
  text-decoration: underline;
}

/* 单篇博客文章页面样式 */
.blog-post {
  padding: 120px 0 60px;
}

.post-header {
  text-align: center;
  margin-bottom: 40px;
}

.post-header h1 {
  font-size: 3.2rem;
  margin-bottom: 15px;
}

.post-subtitle {
  max-width: 800px;
  margin: -6px auto 16px;
  font-size: 2rem;
  line-height: 1.5;
  color: #555;
  font-weight: 500;
}

.post-header .post-meta {
  justify-content: center;
}

.post-featured-image {
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: auto;
}

.post-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.7rem;
  line-height: 1.7;
}

.post-body p {
  margin-bottom: 20px;
}

.post-body h2 {
  font-size: 2.4rem;
  margin: 40px 0 20px;
}

.post-body h3 {
  font-size: 2rem;
  margin: 30px 0 15px;
}

.post-body ul, .post-body ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.post-body li {
  margin-bottom: 10px;
}

.post-body blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  font-style: italic;
  color: #555;
  margin: 20px 0;
}

.post-body figure {
  margin: 28px 0;
}

.post-figure img {
  display: block;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.post-figure figcaption {
  margin-top: 10px;
  font-size: 1.4rem;
  line-height: 1.5;
  color: #666;
  text-align: center;
}

.post-table-wrap {
  margin: 24px 0 30px;
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  background: #fff;
}

.post-body table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.post-body th,
.post-body td {
  border: 1px solid #e6e6e6;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.post-body th {
  background: #f8f8f8;
  font-weight: 700;
}

.article-cta {
  margin-top: 40px;
  padding: 28px;
  border: 1px solid #f1d2d2;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7f7 0%, #ffffff 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.article-cta h2 {
  margin: 0 0 12px;
  font-size: 2.4rem;
}

.article-cta p {
  margin-bottom: 18px;
}

.article-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.post-navigation a {
  color: #333;
  transition: color 0.3s ease;
}

.post-navigation a:hover {
  color: var(--primary-color);
}

.post-navigation .prev::before {
  content: "← ";
}

.post-navigation .next::after {
  content: " →";
}

.post-navigation .home::before {
  content: "🏠 ";
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 100px 0 40px;
  }
  
  .blog-hero h1 {
    font-size: 3rem;
  }
  
  .post-grid {
    grid-template-columns: 1fr;
  }
  
  .post-header h1 {
    font-size: 2.6rem;
  }

  .post-subtitle {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .blog-hero h1 {
    font-size: 2.6rem;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 5px;
  }
}
