/* ===============================================================
 * CMS本文コンテンツ用スタイル（旧デザインHTML → PH3トンマナ調整）
 * ※ Kurocoから新デザインのHTMLが来たら削除可能
 * =============================================================== */

/* --- コンテンツ下余白（フッターとの間隔確保） --- */
.post {
  padding-bottom: 8rem;
}
@media screen and (max-width: 834px) {
  .post {
    padding-bottom: 5rem;
  }
}

/* --- 見出し（wp-block-headingなしのh1-h6に対応） --- */
.post-dtl h1 {
  margin-top: 0;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.4;
  border-bottom: 2px solid #45b035;
}
@media screen and (max-width: 834px) {
  .post-dtl h1 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
  }
}

.post-dtl h2:not(.wp-block-heading) {
  position: relative;
  margin-top: 6rem;
  margin-bottom: 3rem;
  padding-left: 2.4rem;
  font-size: 2.2rem;
  font-weight: 600;
  border-left: 3px solid #45b035;
}
@media screen and (max-width: 834px) {
  .post-dtl h2:not(.wp-block-heading) {
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    padding-left: 1.8rem;
    font-size: 2rem;
    border-left-width: 2px;
  }
}

.post-dtl h3:not(.wp-block-heading) {
  position: relative;
  margin-top: 4rem;
  margin-bottom: 2rem;
  padding-left: 5rem;
  font-size: 2rem;
  font-weight: 500;
}
@media screen and (max-width: 834px) {
  .post-dtl h3:not(.wp-block-heading) {
    margin-top: 3rem;
    padding-left: 3rem;
    font-size: 1.8rem;
  }
}
.post-dtl h3:not(.wp-block-heading)::before {
  position: absolute;
  content: "";
  width: 2rem;
  aspect-ratio: 1;
  top: 0.5em;
  left: 1.3rem;
  border: 5px solid #45b035;
  border-radius: 100vmax;
}
@media screen and (max-width: 834px) {
  .post-dtl h3:not(.wp-block-heading)::before {
    width: 1.7rem;
    left: 0;
    border-width: 4px;
  }
}

.post-dtl h4:not(.wp-block-heading) {
  position: relative;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-left: 4rem;
  font-size: 1.8rem;
  font-weight: 500;
}
@media screen and (max-width: 834px) {
  .post-dtl h4:not(.wp-block-heading) {
    padding-left: 3rem;
    font-size: 1.7rem;
  }
}
.post-dtl h4:not(.wp-block-heading)::before {
  position: absolute;
  content: "";
  width: 2.6rem;
  height: 1px;
  top: 1em;
  left: 0;
  background-color: #45b035;
}
@media screen and (max-width: 834px) {
  .post-dtl h4:not(.wp-block-heading)::before {
    width: 2rem;
  }
}

/* --- テーブル --- */
.post-dtl table,
.post-dtl .c-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0 3rem;
  font-size: 1.6rem;
  line-height: 1.8;
  border: 1px solid #e0e0e0;
}
@media screen and (max-width: 834px) {
  .post-dtl table,
  .post-dtl .c-table {
    font-size: 1.4rem;
  }
}
.post-dtl table th,
.post-dtl .c-table th {
  background-color: #f7f7f5;
  padding: 1.5rem 2rem;
  font-weight: 500;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  white-space: nowrap;
}
@media screen and (max-width: 834px) {
  .post-dtl table th,
  .post-dtl .c-table th {
    padding: 1rem 1.5rem;
    white-space: normal;
  }
}
.post-dtl table td,
.post-dtl .c-table td {
  padding: 1.5rem 2rem;
  vertical-align: top;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
}
@media screen and (max-width: 834px) {
  .post-dtl table td,
  .post-dtl .c-table td {
    padding: 1rem 1.5rem;
  }
}
.post-dtl table.-row th,
.post-dtl .c-table.-row th {
  width: 12rem;
}
@media screen and (max-width: 640px) {
  .post-dtl table.-row tr,
  .post-dtl .c-table.-row tr {
    display: flex;
    flex-direction: column;
  }
  .post-dtl table.-row th,
  .post-dtl .c-table.-row th {
    width: 100%;
    border-bottom: none;
  }
}

/* --- リスト --- */
.post-dtl ul,
.post-dtl .c-list {
  padding-left: 2rem;
  margin: 1rem 0;
}
.post-dtl ul.-disc li,
.post-dtl .c-list.-disc li {
  list-style-type: disc;
}
.post-dtl ul li,
.post-dtl .c-list li {
  margin-bottom: 0.5em;
  line-height: 1.8;
}

/* --- リンク --- */
.post-dtl a {
  color: #45b035;
  text-decoration: underline;
  word-break: break-all;
}
.post-dtl a:hover {
  opacity: 0.7;
}
.post-dtl a.u-none-after::after {
  display: none;
}

/* --- 旧デザイン ユーティリティクラス互換 --- */
.post-dtl .u-mb-0 { margin-bottom: 0 !important; }
.post-dtl .u-mt-0 { margin-top: 0 !important; }
.post-dtl .u-mb-5 { margin-bottom: 0.5rem !important; }
.post-dtl .u-ma-0 { margin: 0 !important; }
.post-dtl .u-ta-right { text-align: right !important; }
.post-dtl .u-ta-center { text-align: center !important; }

/* --- 段落の間隔 --- */
.post-dtl p {
  margin: 0 0 2rem;
}
.post-dtl p:last-child {
  margin-bottom: 0;
}

/* --- figure --- */
.post-dtl figure {
  margin: 0;
}
.post-dtl figure.table {
  margin: 2rem 0 3rem;
  overflow-x: auto;
}
