/* ===============================
   Blog / Post Detail Layout
   Class: sb-post-layout
================================ */

.sb-post-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 70px 24px 90px;
  background: #fff;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* 页面大标题 Post Title */
.sb-post-layout .elementor-widget-theme-post-title,
.sb-post-layout .elementor-widget-post-title {
  margin-bottom: 18px;
}

.sb-post-layout .elementor-widget-theme-post-title .elementor-heading-title,
.sb-post-layout .elementor-widget-post-title .elementor-heading-title {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0f172a;
  margin: 0;
  max-width: 880px;
}

/* 摘要 Post Excerpt */
.sb-post-layout .elementor-widget-theme-post-excerpt,
.sb-post-layout .elementor-widget-post-excerpt {
  margin-bottom: 42px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e5e7eb;
}

.sb-post-layout .elementor-widget-theme-post-excerpt .elementor-widget-container,
.sb-post-layout .elementor-widget-post-excerpt .elementor-widget-container {
  font-size: 18px;
  line-height: 1.75;
  color: #475569;
  max-width: 820px;
}

/* 正文整体 */
.sb-post-layout .elementor-widget-theme-post-content,
.sb-post-layout .elementor-widget-post-content {
  font-size: 17px;
  line-height: 1.9;
  color: #334155;
}

.sb-post-layout .elementor-widget-theme-post-content .elementor-widget-container,
.sb-post-layout .elementor-widget-post-content .elementor-widget-container {
  max-width: 860px;
}

/* 正文段落 */
.sb-post-layout .elementor-widget-theme-post-content p,
.sb-post-layout .elementor-widget-post-content p {
  margin: 0 0 22px;
}

/* 正文 H2 大章节标题 */
.sb-post-layout .elementor-widget-theme-post-content h2,
.sb-post-layout .elementor-widget-post-content h2 {
  position: relative;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
  margin: 56px 0 22px;
  padding-left: 18px;
  letter-spacing: -0.025em;
}

.sb-post-layout .elementor-widget-theme-post-content h2::before,
.sb-post-layout .elementor-widget-post-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, #2563eb, #38bdf8);
}

/* 正文 H3 小标题 */
.sb-post-layout .elementor-widget-theme-post-content h3,
.sb-post-layout .elementor-widget-post-content h3 {
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.35;
  font-weight: 750;
  color: #111827;
  margin: 38px 0 16px;
}

/* H4 更小标题 */
.sb-post-layout .elementor-widget-theme-post-content h4,
.sb-post-layout .elementor-widget-post-content h4 {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 700;
  color: #1e293b;
  margin: 30px 0 12px;
}

/* 列表优化 */
.sb-post-layout .elementor-widget-theme-post-content ul,
.sb-post-layout .elementor-widget-theme-post-content ol,
.sb-post-layout .elementor-widget-post-content ul,
.sb-post-layout .elementor-widget-post-content ol {
  margin: 0 0 28px 0;
  padding-left: 24px;
}

.sb-post-layout .elementor-widget-theme-post-content li,
.sb-post-layout .elementor-widget-post-content li {
  margin-bottom: 10px;
  padding-left: 4px;
}

/* 图片优化 */
.sb-post-layout .elementor-widget-theme-post-content img,
.sb-post-layout .elementor-widget-post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 38px auto;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

/* 引用块 */
.sb-post-layout .elementor-widget-theme-post-content blockquote,
.sb-post-layout .elementor-widget-post-content blockquote {
  margin: 38px 0;
  padding: 26px 30px;
  border-left: 5px solid #2563eb;
  background: #f8fafc;
  border-radius: 18px;
  color: #334155;
  font-size: 18px;
  line-height: 1.8;
}

/* 表格优化 */
.sb-post-layout .elementor-widget-theme-post-content table,
.sb-post-layout .elementor-widget-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 36px 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.sb-post-layout .elementor-widget-theme-post-content th,
.sb-post-layout .elementor-widget-theme-post-content td,
.sb-post-layout .elementor-widget-post-content th,
.sb-post-layout .elementor-widget-post-content td {
  padding: 15px 18px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.sb-post-layout .elementor-widget-theme-post-content th,
.sb-post-layout .elementor-widget-post-content th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

/* 链接 */
.sb-post-layout .elementor-widget-theme-post-content a,
.sb-post-layout .elementor-widget-post-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.sb-post-layout .elementor-widget-theme-post-content a:hover,
.sb-post-layout .elementor-widget-post-content a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* 手机端 */
@media (max-width: 767px) {
  .sb-post-layout {
    padding: 42px 18px 64px;
  }

  .sb-post-layout .elementor-widget-theme-post-title .elementor-heading-title,
  .sb-post-layout .elementor-widget-post-title .elementor-heading-title {
    font-size: 34px;
    line-height: 1.14;
  }

  .sb-post-layout .elementor-widget-theme-post-excerpt .elementor-widget-container,
  .sb-post-layout .elementor-widget-post-excerpt .elementor-widget-container {
    font-size: 16px;
    line-height: 1.7;
  }

  .sb-post-layout .elementor-widget-theme-post-content,
  .sb-post-layout .elementor-widget-post-content {
    font-size: 16px;
    line-height: 1.82;
  }

  .sb-post-layout .elementor-widget-theme-post-content h2,
  .sb-post-layout .elementor-widget-post-content h2 {
    font-size: 25px;
    margin-top: 42px;
  }

  .sb-post-layout .elementor-widget-theme-post-content h3,
  .sb-post-layout .elementor-widget-post-content h3 {
    font-size: 21px;
  }

  .sb-post-layout .elementor-widget-theme-post-content img,
  .sb-post-layout .elementor-widget-post-content img {
    border-radius: 16px;
    margin: 28px auto;
  }
}

/* =====================================================
   Post Content Upgrade
   图片并排 + 蓝色改黑色
   外层 Class: sb-post-layout
===================================================== */

/* 1. 把文章区域内蓝色链接统一改成黑色 */
.sb-post-layout a,
.sb-post-layout .elementor a,
.sb-post-layout .elementor-widget-container a {
  color: #111827 !important;
  text-decoration: none !important;
  font-weight: 600;
}

.sb-post-layout a:hover,
.sb-post-layout .elementor a:hover,
.sb-post-layout .elementor-widget-container a:hover {
  color: #000 !important;
  text-decoration: underline !important;
}

/* 2. H2 左侧蓝色竖线改成黑色 */
.sb-post-layout .elementor-widget-theme-post-content h2::before,
.sb-post-layout .elementor-widget-post-content h2::before {
  background: linear-gradient(180deg, #111827, #6b7280) !important;
}

/* 3. 引用块蓝色边框改黑色 */
.sb-post-layout .elementor-widget-theme-post-content blockquote,
.sb-post-layout .elementor-widget-post-content blockquote {
  border-left-color: #111827 !important;
}

/* 4. 表格标题背景改成黑灰风格 */
.sb-post-layout .elementor-widget-theme-post-content th,
.sb-post-layout .elementor-widget-post-content th {
  background: #111827 !important;
  color: #fff !important;
}

/* 5. 图片并排模块 */
.sb-post-layout .sb-post-img-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 46px 0;
}

/* 三张图片并排 */
.sb-post-layout .sb-post-img-grid.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 四张图片并排 */
.sb-post-layout .sb-post-img-grid.is-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 图片卡片 */
.sb-post-layout .sb-post-img-grid figure {
  margin: 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

/* 图片本身 */
.sb-post-layout .sb-post-img-grid img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 !important;
  border-radius: 16px;
  box-shadow: none !important;
  background: #fff;
}

/* 适合教程截图，保持完整显示 */
.sb-post-layout .sb-post-img-grid.sb-contain img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: 10px;
}

/* 适合产品图，裁切统一大小 */
.sb-post-layout .sb-post-img-grid.sb-cover img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* 图片说明文字 */
.sb-post-layout .sb-post-img-grid figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
  text-align: center;
}

/* 6. 单张教程图片居中优化 */
.sb-post-layout .elementor-widget-theme-post-content > .elementor-widget-container > img,
.sb-post-layout .elementor-widget-post-content > .elementor-widget-container > img {
  max-width: 860px;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 7. 去掉可能出现的蓝色按钮/蓝色文字 */
.sb-post-layout button,
.sb-post-layout .elementor-button,
.sb-post-layout input[type="submit"] {
  background: #111827 !important;
  color: #fff !important;
  border-color: #111827 !important;
}

.sb-post-layout button:hover,
.sb-post-layout .elementor-button:hover,
.sb-post-layout input[type="submit"]:hover {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}

/* 8. 手机端图片自动一列 */
@media (max-width: 767px) {
  .sb-post-layout .sb-post-img-grid,
  .sb-post-layout .sb-post-img-grid.is-3,
  .sb-post-layout .sb-post-img-grid.is-4 {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 32px 0;
  }

  .sb-post-layout .sb-post-img-grid figure {
    padding: 10px;
    border-radius: 18px;
  }

  .sb-post-layout .sb-post-img-grid img {
    border-radius: 14px;
  }
}