/* ============================================================
   コラム専用 CSS（完全版）
   - h1 / リード文 / メタ情報
   - 本文（h2 / h3 / p）
   - 注意書き（note）
   - まとめ（summary）
   - CTA（来院予約・メール相談）
   - 表（table）
   - 箇条書き（ul / ol）
   - 関連記事
   - 目次（TOC）
   - 記事対象のテキストリンク（ページ最下部に固定））
============================================================ */

/* -----------------------------------------
   ★ h1（記事タイトル）
----------------------------------------- */
#autoH1 {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.05em;
  margin-top: 25px;
  margin-bottom: 25px;
  padding: 0.5em;
  color: #222;
  font-family: "Noto Serif JP", serif;
}


/* -----------------------------------------
   ★ リード文（description）
----------------------------------------- */
#leadText {
  border-radius: 5px;
  background: #eff3f4;
  padding: 0.5em;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.05em;
  margin-top: 20px;
  margin-bottom: 25px;
  color: #222;
  font-family: "Noto Serif JP", serif;
}


/* -----------------------------------------
   ★ メタ情報（カテゴリ・日付・院名）
----------------------------------------- */
#articleMeta {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
}

#articleMeta .meta-clinic,
#articleMeta .meta-category {
  background: #f2f2f2;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  border: 1px solid #e0e0e0;
}

#articleMeta .meta-date {
  font-size: 13px;
  color: #666;
}


/* -----------------------------------------
   ★ メイン画像
----------------------------------------- */
.main-image-wrap {
  margin: 20px 0;
}

.main-image {
  width: 100%;
  height: auto;
}


/* -----------------------------------------
   ★ 本文（h2 / h3 / p）
----------------------------------------- */

/* h2（大見出し） */
.article-body h2 {
  font-size: 1.4em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #003366;
  border-left: 4px solid #003366;
  padding-left: 10px;
  font-family: "Noto Serif JP", serif;
}

@media (max-width: 720px) {
  .article-body h2 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.3em;
  }
}

/* p（本文） */
.article-body p {
  margin-bottom: 20px;
  line-height: 1.9;
  font-size: 1em;
}


/* h3（小見出し） */
#wrapText #articleBody h3 {
  position: relative;
  margin: 1.2em 0 0.8em 0;
  font-size: 1.2em;
  font-weight: lighter;
  color: #333;
  line-height: 1.45em;
  font-family: '游明朝','Yu Mincho',YuMincho,'Hiragino Mincho Pro',serif!important;
  padding: 20px 0 10px 0.5em;
}

#wrapText #articleBody h3:after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  content: '';
  background-image: repeating-linear-gradient(-45deg, #000, #000 1px, transparent 2px, transparent 5px);
  background-size: 7px 7px;
}

@media (max-width: 600px) {
  #wrapText #articleBody h3:after {
    height: 4px;
  }
}


/* -----------------------------------------
   h4（コラム専用：補足タイトル）
----------------------------------------- */
#wrapText #articleBody h4 {
  margin: 1.2em 0 0.6em 0;
  padding-left: 0.6em;
  font-size: 1.4rem;
  font-weight: normal;
  color: #333;
  line-height: 1.5em;
  font-family: '游明朝','Yu Mincho',YuMincho,'Hiragino Mincho Pro',serif!important;
  border-left: 3px solid #ccc;
  background:#fff;
}

@media screen and (min-width: 600px) {
  #wrapText #articleBody h4 {
    font-size: 1.8rem;
    padding-left: 0.8em;
  }
}

/* -----------------------------------------
   ★ 注意書き（note）
----------------------------------------- */
.note-box {
  background: #fff8e6;
  border-left: 5px solid #e6b800;
  padding: 1em 1.2em;
  margin: 2em 0;
  border-radius: 6px;
  font-size: 1em;
  line-height: 1.7;
  color: #444;
}

.note-box strong {
  color: #b8860b;
  font-weight: bold;
}


/* -----------------------------------------
   ★ まとめ（summary）
----------------------------------------- */
.summary-box {
  background: #f0f7ff;
  border-left: 5px solid #3a7bd5;
  padding: 1.2em 1.4em;
  margin: 2.5em 0;
  border-radius: 6px;
  font-size: 1.05em;
  line-height: 1.8;
  color: #333;
}

.summary-box h4 {
  font-size: 1.3em;
  margin-bottom: 0.5em;
  color: #003366;
  font-family: "Noto Serif JP", serif;
}


/* -----------------------------------------
   ★ CTA（来院予約・メール相談）
----------------------------------------- */
.cta-box {
  background: #003366;
  color: #fff;
  padding: 1.8em 1.4em;
  margin: 3em 0;
  border-radius: 8px;
  text-align: center;
}

.cta-box h4 {
  font-size: 1.6em;
  margin-bottom: 0.8em;
  font-family: "Noto Serif JP", serif;
}

.cta-box a {
  display: inline-block;
  background: #fff;
  color: #003366;
  padding: 0.8em 1.6em;
  border-radius: 6px;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  margin-top: 1em;
}

.cta-box a:hover {
  background: #e6e6e6;
}


/* -----------------------------------------
   ★ 表（table）
----------------------------------------- */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 1em;
}

.article-body table th,
.article-body table td {
  border: 1px solid #ccc;
  padding: 0.8em;
  text-align: left;
}

.article-body table th {
  background: #f5f5f5;
  font-weight: bold;
  color: #333;
}


/* -----------------------------------------
   ★ 箇条書き（ul / ol）
----------------------------------------- */
.article-body ul,
.article-body ol {
  margin: 1em 0 1.5em 1.2em;
  line-height: 1.8;
}

.article-body li {
  margin-bottom: 0.6em;
}


/* -----------------------------------------
   ★ 関連記事（グリッド）
----------------------------------------- */
.related-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.related-item a {
  text-decoration: none;
  color: inherit;
}

.related-item .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
}

.related-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-item .title {
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .related-articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .related-articles {
    grid-template-columns: repeat(1, 1fr);
  }
}


/* ============================================================
   ★ 目次（TOC）
============================================================ */

#toc {
  background: #f8f9fa;
  border: 1px solid #e3e3e3;
  padding: 16px;
  margin: 20px 0;
  border-radius: 8px;
}

.toc-title {
  font-weight: bold;
  font-size: 1.15em;
  margin-bottom: 12px;
  border-left: 4px solid #4682b4;
  padding-left: 10px;
  color: #333;
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc-main {
  margin: 10px 0;
  font-size: 1em;
}

.toc-sub {
  margin: 6px 0 6px 18px;
  font-size: 0.95em;
  color: #555;
}

#toc a {
  text-decoration: none;
  color: #333;
  line-height: 1.4;
}

#toc a:hover {
  text-decoration: underline;
}


/* -----------------------------------------
   ★ 目次（スマホ最適化）
----------------------------------------- */
@media (max-width: 720px) {

  #toc {
    padding: 14px;
    margin: 16px 0;
  }

  .toc-title {
    font-size: 1.1em;
    margin-bottom: 10px;
  }

  .toc-main {
    margin: 8px 0;
    font-size: 0.95em;
  }

  .toc-sub {
    margin-left: 14px;
    font-size: 0.9em;
  }

  #toc a {
    padding: 4px 0;
    display: block; /* タップしやすくする */
  }
}



/* スマホも階層を維持した縦型TOCにする */
@media screen and (max-width: 600px) {

  .toc-title {
    cursor: pointer;
    padding: 12px;
    background: #f5f5f5;
    border-left: 4px solid #0070c9;
    font-weight: bold;
    font-size: 1.6rem;
  }

  .toc-list {
    display: none;
    padding: 10px 0 0 10px;
  }

  /* h2（メイン） */
  .toc-main {
    margin: 10px 0 6px;
    font-size: 1.6rem;
    font-weight: bold;
  }

  /* h3（サブ） */
  .toc-sub {
    margin-left: 1em;
    font-size: 1.4rem;
    color: #666;
  }
}
@media screen and (min-width: 601px) {

  .toc-title {
    cursor: pointer;
    padding: 12px;
    background: #f5f5f5;
    border-left: 4px solid #0070c9;
    font-weight: bold;
  }

  .toc-list {
    display: none;
    padding: 10px 0 0 10px;
  }

  .toc-main {
    margin: 8px 0;
    font-size: 1.8rem;
    font-weight: bold;
  }

  .toc-sub {
    margin-left: 1em;
    font-size: 1.6rem;
    color: #666;
  }
}




/* -----------------------------------------
   記事対象のテキストリンク（ページ最下部に固定）
----------------------------------------- */


.category-link-box {
  margin: 40px 0 20px;
  text-align: center;
}


.category-link-btn {
  display: inline-block;
  padding: 14px 24px;
  background: #0070c9;
  color: #fff !important;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: bold;
  font-size: 16px;
}

.category-link-btn:hover {
  background: #005fa3;
color:#fff;
}
