/* ===== コア技術ページ専用スタイル（本文改善・読みやすさ重視） ===== */

/* タブ下エリア：薄い背景でブロックを明確に */
.page-coretech main .container {
  background: #f6f7fb;
  padding: 2rem 1.25rem 3rem;
  border-radius: 0 0 12px 12px;
}
@media (min-width: 50rem) {
  .page-coretech main .container {
    padding: 2.75rem 2rem 4rem;
  }
}

/* 本文エリア */
.page-coretech .post-content {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  color: #1F2858;
}

/* 文章・リスト共通 */
.page-coretech .post-content p,
.page-coretech .post-content li {
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-size: clamp(0.98rem, 0.25vw + 0.95rem, 1.05rem);
  color: rgba(31, 40, 88, 0.92);
}
.page-coretech .post-content p {
  margin: 0 0 1.1em;
  text-align: left;
  text-indent: 0;
}

/* 全見出し：グローバル枠線オフ */
.page-coretech .post-content .wp-block-heading::before,
.page-coretech .post-content .wp-block-heading::after,
.page-coretech .post-content h2::before,
.page-coretech .post-content h2::after {
  display: none;
}

/* ===== h2：グループの直下にある場合のみ下線 ===== */
/* 修正①：カラム内・入れ子グループ内のh2には下線を出さない */
.page-coretech .post-content > .wp-block-group > .wp-block-group__inner-container > h2.wp-block-heading,
.page-coretech .post-content > .wp-block-group > .wp-block-group__inner-container > .wp-block-heading {
  font-family: "SHSJP-Heavy", sans-serif;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  color: #1F2858;
  margin: 0 0 1.1rem;
  padding: 0 0 0.7rem;
  border-bottom: 2px solid rgba(31, 40, 88, 0.35);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

/* h3：本文内の小見出し */
.page-coretech .post-content h3.wp-block-heading {
  font-family: "SHSJP-Bold", sans-serif;
  font-size: clamp(1.05rem, 1.1vw, 1.25rem);
  margin: 0 0 0.75rem;
  line-height: 1.45;
  border-bottom: none; /* 念のため下線を明示的にオフ */
}

/* 先頭セクション：カード */
.page-coretech .post-content > .wp-block-group:first-child {
  padding: 2rem 1.5rem 2.25rem;
  margin: 0 0 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  border-left: 5px solid rgba(31, 40, 88, 0.85);
  box-shadow: 0 10px 28px rgba(31, 40, 88, 0.08);
}
.page-coretech .post-content > .wp-block-group:first-child .wp-block-group__inner-container {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}
.page-coretech .post-content > .wp-block-group:first-child h2.wp-block-heading {
  margin-top: 0;
  text-align: center;
}
.page-coretech .post-content > .wp-block-group:first-child p:first-of-type {
  font-family: "SHSJP-Bold", sans-serif;
  font-size: clamp(1.05rem, 0.6vw + 1rem, 1.2rem);
  color: rgba(31, 40, 88, 0.9);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* 2ブロック目以降：白背景カード */
.page-coretech .post-content > .wp-block-group:not(:first-child) {
  margin: 1.25rem 0 0;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(31, 40, 88, 0.06);
  border: 1px solid rgba(31, 40, 88, 0.08);
}
.page-coretech .post-content > .wp-block-group:not(:first-child) .wp-block-group__inner-container {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}
.page-coretech .post-content > .wp-block-group:not(:first-child) .wp-block-heading {
  margin-top: 0;
}

/* ===== カラムブロック ===== */
.page-coretech .post-content .wp-block-columns {
  margin: 1.75rem 0;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: flex-start;
}
.page-coretech .post-content .wp-block-column {
  min-width: 0;
}
.page-coretech .post-content .wp-block-column .wp-block-image {
  margin: 0 0 1rem;
}

/* ===== 修正②：画像スタイル ===== */
/* カラム内の画像：aspect-ratioを強制しない・自然なサイズで表示 */
.page-coretech .post-content .wp-block-column .wp-block-image img {
  width: 100%;
  height: auto;
  aspect-ratio: unset;
  object-fit: unset;
  display: block;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(31, 40, 88, 0.12);
}

/* カラム外の単独画像のみ16:9を適用（修正③：スコープを限定） */
.page-coretech .post-content .wp-block-image:not(.wp-block-column .wp-block-image) img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(31, 40, 88, 0.12);
  /* aspect-ratio はここでは指定しない：図解が崩れるため */
}

/* リスト */
.page-coretech .post-content ul,
.page-coretech .post-content ol {
  margin: 0.9rem 0 1.4rem;
  padding-left: 1.3rem;
  color: rgba(31, 40, 88, 0.92);
  line-height: 1.85;
}
.page-coretech .post-content li {
  margin: 0.35rem 0;
}

/* デスクトップ：カード内の余白を増やす */
@media (min-width: 50rem) {
  .page-coretech .post-content > .wp-block-group:first-child {
    padding: 2.5rem 2.25rem 3rem;
  }
  .page-coretech .post-content > .wp-block-group:not(:first-child) {
    padding: 2.25rem 2.25rem 2.6rem;
  }
}

/* スマホ：カード余白を軽く */
@media (max-width: 36rem) {
  .page-coretech .post-content > .wp-block-group:first-child,
  .page-coretech .post-content > .wp-block-group:not(:first-child) {
    padding: 1.6rem 1.15rem;
    border-radius: 10px;
  }
}