/* ========================================
   ブログ・お知らせ詳細
   ======================================== */
/* 本文はWPの出力に一括で当てる。埋め込み部品（.pitfaq 等）に効かないよう、見出し・リストは直下の要素に限定する。 */
.article-header {
  padding-top: 2.8rem;
}

.article-header__title {
  padding-bottom: 1.8rem;
  border-bottom: 1px solid #707070;
  color: #000;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.article-header__date {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.6rem;
  margin-top: 1.4rem;
  color: #000;
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 2rem;
}

/* 本文 */
.article-body {
  margin-top: 4.8rem;
  color: #3f3f3f;
  font-size: 1.6rem;
  line-height: 3.2rem;
  overflow-wrap: anywhere;
}

.article-body a {
  color: #1a5fb4;
  text-decoration: none;
}

.article-body p a[style],
.article-body li a[style] {
  color: #1a5fb4 !important;
  text-decoration: none !important;
}

.article-body span[style*="font-size"] {
  font-size: inherit !important;
}

.article-body span[style*="font-family"] {
  font-family: inherit !important;
}

.article-body mark {
  background-color: #ff0;
  color: inherit;
}

.article-body strong,
.article-body b {
  font-weight: 600;
}

.article-body > h2 {
  display: flex;
  align-items: center;
  min-height: 6.8rem;
  margin: 5rem 0 2rem;
  padding: 1.4rem 2.8rem;
  background: #0281cd;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.5;
}

.article-body > h3 {
  margin: 4rem 0 1.8rem;
  padding-left: 1.5rem;
  border-left: 5px solid #0281cd;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 2.6rem;
}

.article-body > h4 {
  margin: 3rem 0 1.2rem;
  color: #172c57;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 2.8rem;
}

.article-body > ul,
.article-body > ol {
  margin: 4rem 0;
  padding: 2.4rem 2.8rem 2.4rem 4.7rem;
  border-radius: 1rem;
  background: #f2f8fc;
}

.article-body > ul {
  list-style: none;
}

.article-body > ul > li {
  position: relative;
}

.article-body > ul > li::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: -1.9rem;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: #0281cd;
}

.article-body > ul ul,
.article-body > ol ol {
  margin: 0;
  padding-left: 2rem;
}

/* :where で優先度を下げ、埋め込み部品（.pitgraph 等）の表の指定を残す。 */
:where(.article-body) table {
  width: 100%;
  border-collapse: collapse;
}

.article-body > figure.wp-block-table {
  overflow-x: auto;
}

.article-body > table td,
.article-body > table th,
.article-body > figure > table td,
.article-body > figure > table th {
  width: auto !important;
  height: auto !important;
  padding: .6rem 1.2rem;
  border: 1px solid #0281cd;
  font-weight: 400;
  text-align: left;
}

.article-body > table tr:first-child > *,
.article-body > figure > table tr:first-child > * {
  font-weight: 600;
  text-align: center;
}

:where(.article-body) table td,
:where(.article-body) table th {
  padding: .6rem 1.2rem;
  border: 1px solid #0281cd;
  font-weight: 400;
  text-align: left;
}

:where(.article-body) table tr:first-child > * {
  font-weight: 600;
  text-align: center;
}

.article-body > hr {
  height: 0;
  margin: 4rem 0;
  border: 0;
  border-top: 1px solid #707070;
}

.article-body > figure {
  margin: 2rem 0;
}

.article-body figure img {
  max-width: 100%;
  height: auto;
}

.article-body figcaption {
  font-size: 1.6rem;
  line-height: 3.2rem;
}

.article-body > blockquote {
  margin: 3rem 0;
  padding: 1.6rem 2.8rem;
  border-left: 5px solid #e4e4e4;
  background: #f9f9f9;
}

.article-body iframe {
  max-width: 100%;
}

.article-body .has-text-align-center {
  text-align: center;
}

.article-body .has-text-align-left {
  text-align: left;
}

.article-body .has-vivid-red-color {
  color: #cf2e2e;
}

.article-body .has-vivid-cyan-blue-color {
  color: #0693e3;
}

/* 目次（Table of Contents Plus の出力） */
.article-body #toc_container {
  display: table;
  width: auto;
  min-width: 52rem;
  max-width: 100%;
  margin: 0 0 5rem;
  padding: 2rem 2.8rem 2.4rem;
  border: 1px solid #0281cd;
  background: #f2f8fc;
  font-size: 1.5rem;
  line-height: 3.2rem;
}

.article-body #toc_container .toc_title {
  margin-bottom: .8rem;
  color: #000;
  font-weight: 700;
  letter-spacing: 1em;
  text-align: center;
}

.article-body #toc_container ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-body #toc_container ul ul {
  padding-left: 1em;
}

.article-body #toc_container a {
  color: #1a5fb4;
}

.article-body #toc_container .toc_number {
  margin-right: .3em;
}

/* 記事に埋め込まれた部品の色を合わせる */
.article-body .pitfaq .pf-h,
.article-body .pitjudge .pj-soon li::before {
  color: #0281cd;
}

.article-body .pitfaq summary::before,
.article-body .pitstep .ps-t::before,
.article-body .pitrec li::before,
.article-body .pitjudge .pj-h,
.article-body .pitjudge .pj-soon .pj-b,
.article-body .pitjudge .pj-cta {
  background-color: #0281cd;
}

.article-body .pitfaq .pf-a::before {
  background: #f2f8fc;
  color: #0281cd;
}

.article-body .pitrec {
  background: #f2f8fc;
}

/* CTA */
.article-cta {
  display: grid;
  grid-template-columns: 54.1rem minmax(0, 1fr);
  gap: 2.6rem;
  align-items: center;
  margin-block: 6rem 0;
  padding: 3.7rem 3.3rem;
  border-radius: 3rem;
  background: #f2f8fc;
}

/* 移動先の見出しがない記事では2つ並ぶため、1つだけ表示する。 */
.article-cta:has(+ .article-cta) {
  display: none;
}

.article-cta__image {
  width: 100%;
  aspect-ratio: 541 / 331;
  object-fit: cover;
}

.article-cta__title {
  font-size: 3rem;
  font-weight: 600;
  line-height: 4.8rem;
}

.article-cta__text {
  margin-top: .4rem;
  line-height: 3.6rem;
}

.article-cta__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 27.1rem));
  gap: 1.5rem 1.9rem;
  margin-top: 1.6rem;
}

.article-body .article-cta__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 5rem;
  border-radius: 100vmax;
  background: #0281cd;
  color: #fff;
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.2;
}

.article-cta__button--phone {
  grid-column: 1 / -1;
  width: calc(50% - .95rem);
}

.article-body .article-cta__button--line {
  background: #0cbc44;
}

.article-body .article-cta__button--web {
  background: #7d8f78;
}

.article-body .article-cta__button--reserve {
  background: #172c57;
}

.article-cta__button img {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
}

.article-cta__button--web img,
.article-cta__button--reserve img {
  filter: brightness(0) invert(1);
}

/* 関連記事 */
.article-related {
  max-width: 86rem;
  margin: 10rem auto 0;
}

.article-related h2 {
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 2.6rem;
  text-align: center;
}

.article-related ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.7rem;
  margin: 2.6rem 0 0;
  padding: 0;
  list-style: none;
}

.article-related a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-related__image {
  display: block;
  width: 100%;
  aspect-ratio: 269 / 173;
  object-fit: cover;
  border-radius: 1rem;
}

.article-related__image--empty {
  display: grid;
  place-items: center;
  background: #e4e4e4;
  color: #7e7e7e;
  font-size: 1.4rem;
}

.article-related time {
  display: block;
  margin-top: 1.4rem;
  color: #7e7e7e;
  font-family: "Roboto", sans-serif;
  font-size: 1.6rem;
  line-height: 2.6rem;
}

.article-related h3 {
  margin: .4rem 0 0;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 2.6rem;
}

/* 監修医師 */
.article-writers {
  max-width: 86rem;
  margin: 8rem auto 0;
  font-size: 1.5rem;
  line-height: 2.6rem;
}

.article-writers__heading {
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 2.6rem;
  text-align: center;
}

.article-writers__profile {
  margin-top: 2.6rem;
  padding: 3rem 3.2rem;
  border: 1px solid #349ad6;
  border-radius: 1rem;
}

.article-writers .writer-profile {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  column-gap: 3rem;
}

.article-writers .writer-profile > * {
  grid-column: 2;
}

.article-writers .writer-profile__image {
  grid-column: 1;
  grid-row: 1 / span 5;
}

.article-writers .writer-profile__image img {
  width: 14rem;
  height: 17.5rem;
  object-fit: cover;
  border-radius: 1.5rem;
}

.article-writers .writer-profile__image br {
  display: none;
}

.article-writers .writer-profile__title {
  margin: 0;
  color: #172c57;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 2.8rem;
}

.article-writers .writer-profile__link {
  margin-top: .4rem;
}

.article-writers .writer-profile__link a {
  color: #1a5fb4;
}

.article-writers .writer-profile__section {
  margin-top: 1.4rem;
}

.article-writers .writer-profile__section h4 {
  margin: 0;
  color: #0281cd;
  font-size: 1.5rem;
  font-weight: 600;
}

.article-writers .writer-profile__section ul {
  margin: 0;
  padding-left: 1.6rem;
}

/* 前後の記事・一覧へ戻る */
.article-pager {
  display: flex;
  justify-content: space-between;
  max-width: 58rem;
  margin: 8rem auto 0;
}

.article-pager__link {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  color: #172c57;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 3.2rem;
  text-decoration: none;
}

.article-pager__link--next {
  margin-left: auto;
}

.article-pager__arrow,
.article-back__arrow {
  position: relative;
  display: block;
  width: 3.7rem;
  height: 1px;
  background: currentColor;
}

.article-pager__arrow::after,
.article-back__arrow::after {
  content: "";
  position: absolute;
  top: -4px;
  border-block: 4px solid transparent;
}

.article-pager__link--next .article-pager__arrow::after {
  right: 0;
  border-left: 9px solid currentColor;
}

.article-pager__link--prev .article-pager__arrow::after,
.article-back__arrow::after {
  right: auto;
  left: 0;
  border-right: 9px solid currentColor;
  border-left: 0;
}

.article-back {
  width: 26rem;
  margin: 4.4rem auto 10rem;
  padding-inline: 5.6rem 1rem;
}

.article-related + .article-back,
.article-writers + .article-back {
  margin-top: 6rem;
}

.sub-button__arrow.article-back__arrow {
  position: absolute;
  right: auto;
  left: 1.2rem;
}

@media (hover: hover) {
  .article-body a:hover {
    text-decoration: underline;
  }

  .article-body .article-cta__button:hover,
  .article-related a:hover,
  .article-pager__link:hover {
    opacity: .75;
    text-decoration: none;
  }

  .article-body .article-cta__button,
  .article-related a,
  .article-pager__link {
    transition: opacity .2s;
  }
}

@media (min-width: 768px) and (max-width: 1056.25px) {
  .article-cta {
    grid-template-columns: minmax(0, 1fr);
    padding: 3rem;
  }

  .article-cta__image {
    width: 60%;
    margin-inline: auto;
  }
}

/* SP：TOPと同じく本文15px */
@media (max-width: 767px) {
  .article-header {
    padding-top: 2rem;
  }

  .article-header__title {
    padding-bottom: 1.2rem;
    font-size: 2.4rem;
    line-height: 1.5;
  }

  .article-header__date {
    margin-top: 1rem;
    font-size: 1.2rem;
  }

  .article-body {
    margin-top: 2.8rem;
    font-size: 1.5rem;
    line-height: 2;
  }

  .article-body > h2 {
    min-height: 5.6rem;
    margin: 4rem 0 1.6rem;
    padding: 1rem 1.4rem;
    font-size: 2rem;
  }

  .article-body > h3 {
    margin: 3rem 0 1.2rem;
    font-size: 1.7rem;
    line-height: 1.6;
  }

  .article-body > h4 {
    font-size: 1.6rem;
    line-height: 1.6;
  }

  .article-body > ul,
  .article-body > ol {
    margin: 2.4rem 0;
    padding: 1.6rem 1.4rem 1.6rem 3rem;
  }

  .article-body > ul > li::before {
    top: 1.2rem;
    left: -1.4rem;
  }

  .article-body figcaption {
    font-size: 1.4rem;
    line-height: 1.7;
  }

  .article-body #toc_container {
    display: block;
    min-width: 0;
    margin-bottom: 3rem;
    padding: 1.6rem;
    font-size: 1.4rem;
    line-height: 1.9;
  }

  .article-cta {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    margin-top: 4rem;
    padding: 2rem 1.6rem;
    border-radius: 1.5rem;
  }

  .article-cta__title {
    font-size: 2rem;
    line-height: 1.6;
  }

  .article-cta__title br {
    display: none;
  }

  .article-cta__text {
    line-height: 1.8;
  }

  .article-cta__buttons {
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
  }

  .article-cta__button--phone {
    grid-column: auto;
    width: 100%;
  }

  .article-body .article-cta__button {
    font-size: 1.8rem;
  }

  .article-related {
    margin-top: 5rem;
  }

  .article-related h2,
  .article-writers__heading {
    font-size: 1.8rem;
    line-height: 1.6;
  }

  .article-related ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    margin-top: 2rem;
  }

  .article-related time {
    margin-top: .8rem;
    font-size: 1.3rem;
    line-height: 2rem;
  }

  .article-related h3 {
    font-size: 1.5rem;
    line-height: 1.6;
  }

  .article-writers {
    margin-top: 5rem;
    font-size: 1.4rem;
  }

  .article-writers__profile {
    padding: 2rem 1.6rem;
  }

  .article-writers .writer-profile {
    display: block;
  }

  .article-writers .writer-profile__image img {
    margin: 1.2rem auto;
  }

  .article-pager {
    margin-top: 4rem;
  }

  .article-pager__link {
    gap: .8rem;
    font-size: 1.6rem;
  }

  .article-pager__arrow {
    width: 2.4rem;
  }

  .article-back,
  .article-related + .article-back,
  .article-writers + .article-back {
    width: 32rem;
    max-width: 100%;
    margin-block: 3.2rem 8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-body .article-cta__button, .article-related a, .article-pager__link { transition: none; }
}
