.tas-post-body {
  margin-bottom: 32px;
  min-width: 0;
  max-width: 100%;
}

.tas-post-body__figure {
  margin: 0 0 28px;
}

.tas-post-body__image {
  display: block;
  width: 100%;
  height: 400px !important;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tas-post-body__content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #444;
  min-width: 0;
  overflow-wrap: break-word;
}

.tas-post-body__content > :first-child {
  margin-top: 0;
}

.tas-post-body__content p {
  margin: 0 0 1.15em;
}
blockquote p:last-child,
.elementor-widget-text-editor blockquote p:last-child,
.elementor-text-editor blockquote p:last-child {
  margin-bottom: 0;
}

.tas-post-body__content h2,
.tas-post-body__content h3,
.tas-post-body__content h4 {
  margin: 1.0em 0 0.75em;
  font-weight: 600;
  line-height: 1.0;
  color: var(--primary);
}

.tas-post-body__content h2 {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
}

.tas-post-body__content h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

.tas-post-body__content ul,
.tas-post-body__content ol {
  margin: 0 0 1.15em;
  padding-left: 1.35em;
}

.tas-post-body__content li {
  margin-bottom: 0.45em;
}

.tas-post-body__content li::marker {
  color: var(--accent);
}

.tas-post-body__content img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* 表格双栏：右侧贴顶，图片统一宽度与比例 */
.tas-post-body__content table td,
.elementor-widget-text-editor table td {
  vertical-align: top;
}

.tas-post-body__content table td .wp-caption,
.tas-post-body__content table td figure,
.elementor-widget-text-editor table td .wp-caption,
.elementor-widget-text-editor table td figure {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 12px;
}

.tas-post-body__content figure,
.tas-post-body__content .wp-caption,
.tas-post-body__content .wp-block-image {
  max-width: 100%;
}

.tas-post-body__content .wp-caption {
  width: auto !important;
  max-width: 100% !important;
}

/* 非表格：相邻两图并排一行（与 table 双栏视觉一致）；兼容 li 内相邻图 */
.tas-post-body__content > .wp-caption:has(+ .wp-caption),
.tas-post-body__content > .wp-caption + .wp-caption,
.tas-post-body__content > figure:has(+ figure),
.tas-post-body__content > figure + figure,
.tas-post-body__content > .wp-block-image:has(+ .wp-block-image),
.tas-post-body__content > .wp-block-image + .wp-block-image,
.tas-post-body__content li > .wp-caption:has(+ .wp-caption),
.tas-post-body__content li > .wp-caption + .wp-caption,
.tas-post-body__content li > figure:has(+ figure),
.tas-post-body__content li > figure + figure,
.tas-post-body__content li > .wp-block-image:has(+ .wp-block-image),
.tas-post-body__content li > .wp-block-image + .wp-block-image,
.elementor-widget-text-editor > .wp-caption:has(+ .wp-caption),
.elementor-widget-text-editor > .wp-caption + .wp-caption,
.elementor-widget-text-editor > figure:has(+ figure),
.elementor-widget-text-editor > figure + figure,
.elementor-widget-text-editor li > .wp-caption:has(+ .wp-caption),
.elementor-widget-text-editor li > .wp-caption + .wp-caption,
.elementor-widget-text-editor li > figure:has(+ figure),
.elementor-widget-text-editor li > figure + figure {
  box-sizing: border-box;
  display: inline-block;
  width: calc(50% - 10px) !important;
  max-width: calc(50% - 10px) !important;
  vertical-align: top;
}

.tas-post-body__content > .wp-caption:has(+ .wp-caption),
.tas-post-body__content > figure:has(+ figure),
.tas-post-body__content > .wp-block-image:has(+ .wp-block-image),
.tas-post-body__content li > .wp-caption:has(+ .wp-caption),
.tas-post-body__content li > figure:has(+ figure),
.tas-post-body__content li > .wp-block-image:has(+ .wp-block-image),
.elementor-widget-text-editor > .wp-caption:has(+ .wp-caption),
.elementor-widget-text-editor > figure:has(+ figure),
.elementor-widget-text-editor li > .wp-caption:has(+ .wp-caption),
.elementor-widget-text-editor li > figure:has(+ figure) {
  margin-right: 20px;
}

.tas-post-body__content > .wp-caption:has(+ .wp-caption) img,
.tas-post-body__content > .wp-caption + .wp-caption img,
.tas-post-body__content > figure:has(+ figure) img,
.tas-post-body__content > figure + figure img,
.tas-post-body__content > .wp-block-image:has(+ .wp-block-image) img,
.tas-post-body__content > .wp-block-image + .wp-block-image img,
.tas-post-body__content li > .wp-caption:has(+ .wp-caption) img,
.tas-post-body__content li > .wp-caption + .wp-caption img,
.tas-post-body__content li > figure:has(+ figure) img,
.tas-post-body__content li > figure + figure img,
.tas-post-body__content li > .wp-block-image:has(+ .wp-block-image) img,
.tas-post-body__content li > .wp-block-image + .wp-block-image img,
.elementor-widget-text-editor > .wp-caption:has(+ .wp-caption) img,
.elementor-widget-text-editor > .wp-caption + .wp-caption img,
.elementor-widget-text-editor > figure:has(+ figure) img,
.elementor-widget-text-editor > figure + figure img,
.elementor-widget-text-editor li > .wp-caption:has(+ .wp-caption) img,
.elementor-widget-text-editor li > .wp-caption + .wp-caption img,
.elementor-widget-text-editor li > figure:has(+ figure) img,
.elementor-widget-text-editor li > figure + figure img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tas-post-body__content figure img,
.tas-post-body__content .wp-caption img,
.tas-post-body__content .wp-block-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Elementor 文本编辑器小部件（正文内嵌图片） */
.elementor-widget-text-editor img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.elementor-widget-text-editor figure,
.elementor-widget-text-editor .wp-caption,
.elementor-widget-text-editor .wp-block-image {
  max-width: 100%;
}

.elementor-widget-text-editor .wp-caption {
  width: auto !important;
  max-width: 100% !important;
}

.elementor-widget-text-editor figure img,
.elementor-widget-text-editor .wp-caption img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.tas-post-body__content table td img,
.tas-post-body__content table td .wp-caption img,
.tas-post-body__content table td figure img,
.elementor-widget-text-editor table td img,
.elementor-widget-text-editor table td .wp-caption img,
.elementor-widget-text-editor table td figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.tas-post-body__content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  border-bottom: 1px solid var(--primary);
}

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

.tas-post-body__content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 0 10px 10px 0;
  color: var(--text-muted);
}

.tas-post-body__page-links {
  margin-top: 24px;
  font-size: 0.875rem;
}

@media (max-width: 767px) {
  .tas-post-body__figure {
    margin-bottom: 22px;
  }

  .tas-post-body__image {
    height: auto !important;
    border-radius: 10px;
  }

  .tas-post-body__content {
    font-size: 0.9375rem;
  }

  .tas-post-body__content .alignleft,
  .tas-post-body__content .alignright,
  .elementor-widget-text-editor .alignleft,
  .elementor-widget-text-editor .alignright {
    float: none;
    margin-inline: 0;
  }

  .tas-post-body__content > .wp-caption:has(+ .wp-caption),
  .tas-post-body__content > .wp-caption + .wp-caption,
  .tas-post-body__content > figure:has(+ figure),
  .tas-post-body__content > figure + figure,
  .tas-post-body__content > .wp-block-image:has(+ .wp-block-image),
  .tas-post-body__content > .wp-block-image + .wp-block-image,
  .tas-post-body__content li > .wp-caption:has(+ .wp-caption),
  .tas-post-body__content li > .wp-caption + .wp-caption,
  .tas-post-body__content li > figure:has(+ figure),
  .tas-post-body__content li > figure + figure,
  .tas-post-body__content li > .wp-block-image:has(+ .wp-block-image),
  .tas-post-body__content li > .wp-block-image + .wp-block-image,
  .elementor-widget-text-editor > .wp-caption:has(+ .wp-caption),
  .elementor-widget-text-editor > .wp-caption + .wp-caption,
  .elementor-widget-text-editor > figure:has(+ figure),
  .elementor-widget-text-editor > figure + figure,
  .elementor-widget-text-editor li > .wp-caption:has(+ .wp-caption),
  .elementor-widget-text-editor li > .wp-caption + .wp-caption,
  .elementor-widget-text-editor li > figure:has(+ figure),
  .elementor-widget-text-editor li > figure + figure {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0;
  }
}
