/* ============================================================
   小汤圆网络 - 博客增强CSS (v10 - 全面优化)
   01. 统一容器宽度对齐导航栏
   02. 轮播3案例+左右箭头
   03. Tab左对齐参考领星
   04. 文章详情页加宽
   ============================================================ */

/* ===== 统一容器宽度（对齐导航栏 .nav 1280px + 40px padding）===== */
.blog-carousel-section > .container,
.blog-tab-section > .container,
.blog-main-section > .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  box-sizing: border-box;
}

/* ===== 置顶轮播 ===== */
.blog-carousel-section {
  padding: 48px 0 0;
}
.blog-carousel-wrap {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  background: #fff;
}
.blog-carousel-track {
  position: relative;
  width: 100%;
}
.blog-carousel-slide {
  display: none;
  width: 100%;
}
.blog-carousel-slide.active {
  display: block;
  animation: carouselFade 0.4s ease;
}
@keyframes carouselFade {
  from { opacity: 0.8; }
  to { opacity: 1; }
}
.blog-carousel-link {
  display: grid;
  grid-template-columns: 52fr 48fr;
  gap: 0;
  text-decoration: none;
  color: inherit;
  min-height: 420px;
}

/* 轮播左侧大图 */
.blog-carousel-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e8ecf4;
  min-height: 420px;
  width: 100%;
  transition: transform 0.6s ease;
}
.blog-carousel-link:hover .blog-carousel-img {
  transform: scale(1.04);
}

/* 轮播右侧信息 */
.blog-carousel-info {
  padding: 48px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

/* 头部：分类标签 + 日期 */
.blog-carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.blog-carousel-head-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  background: #eef2ff;
  padding: 4px 14px;
  border-radius: 6px;
}
.blog-carousel-head-left::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}
.blog-carousel-head-right {
  font-size: 14px;
  color: #9ca3af;
}

/* 标题 */
.blog-carousel-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a2035;
  line-height: 1.45;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 摘要 */
.blog-carousel-excerpt {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.8;
  margin: 0 0 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* 底部：按钮 + 标签 */
.blog-carousel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.blog-carousel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s;
}
.blog-carousel-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}
.blog-carousel-btn svg {
  stroke: #fff;
  fill: none;
}
.blog-carousel-tag {
  display: inline-block;
  padding: 6px 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 13px;
  color: #6b7280;
}

/* 轮播左右箭头 */
.blog-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.25s;
  z-index: 10;
}
.blog-carousel-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 20px rgba(37,99,235,0.12);
  border-color: #2563eb;
}
.blog-carousel-arrow svg {
  color: #4a5568;
}
.blog-carousel-arrow:hover svg {
  color: #2563eb;
}
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* 轮播指示点 */
.blog-carousel-dots {
  position: absolute;
  bottom: 20px;
  right: 48px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.blog-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(37,99,235,0.25);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.blog-carousel-dot.active {
  background: #2563eb;
  width: 24px;
  border-radius: 4px;
}

/* ===== 分类Tab（左对齐，参考领星）===== */
.blog-tab-section {
  padding: 36px 0 0;
}
.blog-tab-nav {
  display: flex;
  gap: 44px;
  justify-content: flex-start;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 0;
}
.blog-tab-btn {
  display: inline-block;
  padding: 14px 4px;
  font-size: 16px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.blog-tab-btn:hover {
  color: #2563eb;
}
.blog-tab-btn.active {
  color: #2563eb;
  font-weight: 700;
  border-bottom-color: #2563eb;
}

/* ===== 文章列表（左右布局） ===== */
.blog-main-section {
  padding: 40px 0 64px;
  background: #f8fafc;
}
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* 左侧文章列表 - 简洁卡片 */
.blog-list-col {
  min-width: 0;
}
.blog-list-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.blog-list-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #eef0f4;
  transition: padding 0.2s;
}
.blog-list-item:last-child {
  border-bottom: none;
}
.blog-list-item:hover {
  padding-left: 8px;
}
.blog-list-item:hover .blog-list-title {
  color: #2563eb;
}

/* 文章缩略图 */
.blog-list-img {
  width: 200px;
  height: 135px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #e8ecf4;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.blog-list-item:hover .blog-list-img {
  transform: scale(1.04);
}

/* 文章信息 */
.blog-list-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-list-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a2035;
  line-height: 1.5;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.blog-list-date {
  font-size: 13px;
  color: #9ca3af;
}

/* 分页 */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: all 0.2s;
}
.blog-pagination .page-numbers:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.blog-pagination .page-numbers.current {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* 空状态 */
.blog-empty {
  text-align: center;
  padding: 80px 0;
  font-size: 16px;
  color: #9ca3af;
}

/* ===== 右侧侧边栏 ===== */
.blog-sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a2035;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f2f5;
}
.sidebar-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-posts li a {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px dashed #f0f2f5;
}
.sidebar-posts li:last-child a {
  border-bottom: none;
}
.sidebar-posts li a:hover .sidebar-post-title {
  color: #2563eb;
}
.sidebar-post-cover {
  width: 90px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8ecf4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  transform: scale(1.6);
}
.sidebar-post-cover .blog-cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
}
.sidebar-post-title {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
  margin-bottom: 4px;
}
.sidebar-post-date {
  font-size: 12px;
  color: #9ca3af;
}

/* 热门标签 */
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sidebar-tag-item {
  display: inline-block;
  padding: 6px 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s;
}
.sidebar-tag-item:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
}

/* ===== 文章详情页增强 ===== */
/* 文章详情页容器加宽到1400px（比列表页更宽，减少留白）*/
.article-breadcrumb-section > .container,
.article-hero > .container,
.article-body-section > .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  box-sizing: border-box;
}
.article-breadcrumb-section {
  padding: 90px 0 0;
  background: linear-gradient(135deg,#f8f9ff 0%,#fff 100%);
}
.article-breadcrumb {
  font-size: 14px;
  color: #9ca3af;
  padding: 12px 0;
}
.article-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
}
.article-breadcrumb a:hover { color: #2563eb; }
.article-breadcrumb .breadcrumb-sep { margin: 0 8px; color: #d1d5db; }
.article-breadcrumb .current { color: #1a2035; font-weight: 500; }

.article-hero .article-title {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.article-meta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: #9ca3af;
  flex-wrap: wrap;
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.article-meta-item svg {
  stroke: #9ca3af;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.article-tags {
  margin-top: 40px;
  padding: 28px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.article-tags-label {
  font-size: 15px;
  font-weight: 600;
  color: #1a2035;
  margin-bottom: 12px;
}
.article-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.article-tag-item {
  display: inline-block;
  padding: 6px 16px;
  background: #f0f4ff;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  font-size: 13px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s;
}
.article-tag-item:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
}
.article-share-label {
  font-size: 14px;
  color: #6b7280;
  flex-shrink: 0;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #4a5568;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
}
.share-btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.share-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-related-posts li a {
  border-bottom: 1px dashed #f0f2f5;
  padding-bottom: 14px;
}
.article-text iframe {
  max-width: 100%;
  border-radius: 12px;
}

/* ===== 覆盖父主题文章布局宽度 ===== */
.article-layout {
  max-width: 1400px;
  padding: 0;
}
.article-hero .article-title {
  max-width: 1000px;
}

/* ===== 响应式 ===== */
@media (max-width: 1300px) {
  .blog-carousel-arrow {
    opacity: 1;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  }
  .carousel-prev { left: 16px; }
  .carousel-next { right: 16px; }
}
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    position: static;
    margin-top: 32px;
  }
  .blog-carousel-link {
    grid-template-columns: 1fr;
  }
  .blog-carousel-img {
    aspect-ratio: 16/9;
    min-height: auto;
  }
  .blog-carousel-info {
    padding: 28px 24px;
  }
  .blog-carousel-title {
    font-size: 22px;
  }
  .blog-list-img {
    width: 160px;
    height: 110px;
  }
}
@media (max-width: 768px) {
  .blog-carousel-section > .container,
  .blog-tab-section > .container,
  .blog-main-section > .container,
  .article-breadcrumb-section > .container,
  .article-hero > .container,
  .article-body-section > .container {
    padding: 0 16px;
  }
  .blog-carousel-section {
    padding: 20px 0 0;
  }
  .blog-tab-section {
    padding: 20px 0 0;
  }
  .blog-carousel-wrap {
    border-radius: 12px;
  }
  .blog-carousel-info {
    padding: 20px;
  }
  .blog-carousel-title {
    font-size: 18px;
  }
  .blog-carousel-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }
  .blog-carousel-head {
    margin-bottom: 12px;
  }
  .blog-carousel-head-left,
  .blog-carousel-head-right {
    font-size: 12px;
  }
  .blog-carousel-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
  .blog-carousel-tag {
    font-size: 12px;
    padding: 4px 12px;
  }
  .blog-carousel-dots {
    bottom: 12px;
    right: 16px;
    gap: 6px;
  }
  .blog-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
  }
  .blog-list-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .blog-tab-btn {
    padding: 10px 2px;
    font-size: 14px;
  }
  .blog-tab-nav {
    gap: 24px;
  }
  .blog-main-section {
    padding: 24px 0 48px;
  }
  .blog-layout {
    padding: 0 16px;
  }
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}
