/*
 * WGACA Frontend - Blog Page Styles
 * 博客页面样式
 */

.blog-section {
  padding: 60px 0;
}

/* 博客列表 */
.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.blog-list .blog-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-list .blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.blog-list .blog-item .img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
  background: #f5f5f5;
}

.blog-list .blog-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.blog-list .blog-item:hover img {
  transform: scale(1.05);
}

.blog-list .blog-item .info {
  padding: 25px;
  flex: 1;
  min-width: 0;
}

.blog-list .blog-item .meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #999;
}

.blog-list .blog-item .meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-list .blog-item h3 {
  font-size: 20px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-list .blog-item h3 a {
  color: #333;
  transition: color 0.3s;
}

.blog-list .blog-item h3 a:hover {
  color: var(--style-color);
}

.blog-list .blog-item .excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-list .blog-item .read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  transition: gap 0.3s;
}

.blog-list .blog-item .read-more:hover {
  gap: 10px;
}

/* 博客分类 */
.blog-categories {
  background: #fafafa;
  padding: 30px 0;
  margin-bottom: 40px;
}

.blog-categories .list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.blog-categories .list a {
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 30px;
  font-size: 13px;
  color: #666;
  transition: all 0.3s;
}

.blog-categories .list a:hover,
.blog-categories .list a.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* 博客详情 */
.blog-detail {
  padding: 60px 0;
}

.blog-detail .article {
  max-width: 900px;
  margin: 0 auto;
}

.blog-detail .article-header {
  text-align: center;
  margin-bottom: 40px;
}

.blog-detail .article-header .meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #999;
}

.blog-detail .article-header h1 {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 20px;
}

.blog-detail .article-header .author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.blog-detail .article-header .author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.blog-detail .article-header .author .info {
  text-align: left;
}

.blog-detail .article-header .author .name {
  font-size: 14px;
  font-weight: 600;
}

.blog-detail .article-header .author .role {
  font-size: 12px;
  color: #999;
}

.blog-detail .article-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
}

.blog-detail .article-image img {
  width: 100%;
  height: auto;
}

.blog-detail .article-content {
  font-size: 16px;
  line-height: 1.9;
  color: #444;
}

.blog-detail .article-content p {
  margin-bottom: 20px;
}

.blog-detail .article-content h2 {
  font-size: 26px;
  margin: 40px 0 20px;
}

.blog-detail .article-content h3 {
  font-size: 22px;
  margin: 30px 0 15px;
}

.blog-detail .article-content blockquote {
  border-left: 4px solid #000;
  padding: 20px 25px;
  margin: 30px 0;
  background: #fafafa;
  font-style: italic;
  font-size: 18px;
  color: #555;
}

.blog-detail .article-content ul,
.blog-detail .article-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

.blog-detail .article-content li {
  margin-bottom: 10px;
}

.blog-detail .article-content img {
  width: 100%;
  border-radius: 8px;
  margin: 25px 0;
}

.blog-detail .article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.blog-detail .article-tags .tag {
  padding: 5px 15px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 13px;
  color: #666;
}

.blog-detail .article-share {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 30px 0;
}

.blog-detail .article-share .label {
  font-size: 14px;
  font-weight: 600;
}

.blog-detail .article-share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f5f5f5;
  border-radius: 50%;
  color: #666;
  transition: all 0.3s;
}

.blog-detail .article-share a:hover {
  background: #000;
  color: #fff;
}

/* 相关推荐 */
.related-posts {
  background: #fafafa;
  padding: 60px 0;
}

.related-posts .title {
  font-size: 28px;
  text-align: center;
  margin-bottom: 40px;
}

.related-posts .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

/* 分页 */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
}

.blog-pagination a,
.blog-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
}

.blog-pagination a:hover,
.blog-pagination .active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* 响应式 */
@media (min-width: 768px) {
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-posts .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-detail .article-header h1 {
    font-size: 42px;
  }
}

@media (min-width: 992px) {
  .blog-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
