/* =========================================================
 * common.css（整頓版・全文）
 * 役割：本文（.page-content）だけの最終上書き
 * - Gutenberg（ブロックエディタ）出力の文章見た目を安定させる
 * - 見出し / 段落 / 強調 / 本文リスト をここで統一
 *
 * 入れないもの：
 * - レイアウト骨格（container/hero/breadcrumb など）→ layout.css
 * - UI部品（child-page-links / tel-box / toc / table装飾 等）→ components.css
 * ======================================================= */


/* ======================================================
   Block Editor Headings adjustment (H2–H6)
====================================================== */
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6{
  text-align: left;
  text-justify: auto;
  line-height: 1.4;
  color: #1f3558;
}

/* ======================================================
   ページタイトル（h1専用・将来装飾用）
====================================================== */
/* =========================================
  見出し（参考サイト風：上に短い青ライン）
========================================= */
.page-header{
  margin: 0 0 28px;
  border-top : 2px solid #2b6cb0;
  border-bottom: 2px solid #3EA131;
  
  }



.page-header .page-title{
  position: relative;
  display: inline-block;   /* タイトル幅に追従（レイアウト安定） */
  margin: 0 0 20px;
  padding-top: 18px;       /* ラインと文字の距離 */
  font-size: 1.6rem;       /* 好みで調整（例：26px前後） */
  line-height: 1.35;
  font-weight: 600;
  color: #1f3558;
  
}

/* ======================================================
   本文エリア 上余白（ヒーローとの間隔安定）
====================================================== */
.page-content{
  padding-top: 48px;
}

/* 先頭要素のmarginをリセット（見出し二重余白防止） */
.page-content > *:first-child{
  margin-top: 0 !important;
}

.entry-content strong,
.entry-content b {
  font-weight: 700 !important;
}

.dept-wysiwyg strong,.dept-wysiwyg b {
  font-weight: 700;
}

.special-clinic-summary__lead strong,.special-clinic-summary__lead b{
font-weight: 700;
}

.special-archive-intro__lead  strong{
font-weight: 700;
}

/* ----------------------
   H2：章見出し（最重要）
---------------------- */
.page-content h2{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;

  font-size: 1.5rem;
  margin: 48px 0 18px;
}

.page-content h2::before{
  content: "";
  width: 10px;
  height: 30px;
  background: #1759A5;
  flex: 0 0 auto;
}

.page-content h2::after{
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 10px;
  height: 10px;
  border-radius: 20px 20px 0 0;
  background: #30A229;
}

/* ======================
   SPのみ見出し崩れ対策
====================== */
@media screen and (max-width: 767px){
  .page-content h2{
    display: block;
    padding-left: 22px;
    font-size: 1.875rem;
    line-height: 1.4;
  }

  .page-content h2::before{
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 10px;
    height: calc(100% - 0.2em);
    min-height: 30px;
  }

  .page-content h2::after{
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
  }
}
/* ----------------------
   H3：小見出し
---------------------- */
.page-content h3{
  font-size: 1.25rem; /* 約20px */
  margin: 32px 0 14px;
  padding-left: 9px;
  border-left: 3px solid #7aa6d8;
}

/* ----------------------
   H4：補助見出し
---------------------- */
.page-content h4{
  font-size: 1.05rem; /* 約17px */
  margin: 22px 0 10px;
  color: #333;
}

/* ----------------------
   H5：注釈レベル
---------------------- */
.page-content h5{
  font-size: 0.95rem; /* 約15px */
  margin: 16px 0 8px;
  color: #555;
}

/* ----------------------
   H6：最下位（注意書き等）
---------------------- */
.page-content h6{
  font-size: 0.85rem; /* 約13px */
  margin: 12px 0 6px;
  color: #777;
}


/*------------------------
英字見出し
-------------------------*/
.title_eng_white{
  color: #ffffff;
  font-size: 58px;
  font-family: "Nunito Sans", "Noto Sans JP", sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

.title_eng_blue{
  color: #1759A5;
  font-size: 58px;
  font-family: "Nunito Sans", "Noto Sans JP", sans-serif;
  font-weight: 700;
  line-height: 1.1;
}



/* ======================================================
   段落（p）
====================================================== */
.page-content p{
  margin: 0 0 1.0em; /* 下だけ余白（日本語本文に自然） */
  line-height: 1.7;
  text-align: justify;
  text-justify: inter-ideograph;
}

/* 連続する段落は詰める（1段落目で余白管理） */
.page-content p + p{
  margin-top: 0;
}

/* 見出し直後の本文に少し余白 */
.page-content h2 + p,
.page-content h3 + p,
.page-content h4 + p{
  margin-top: 0.6em;
}

.page-content p.has-text-align-right {
  text-align: right;
  text-justify: auto; /* 念のため解除 */
}

.page-content p.has-text-align-center {
  text-align: center;
  text-justify: auto;
}


/* ======================================================
   強調（strong / b）
====================================================== */
.page-content strong,
.page-content b{
  font-weight: var(--fw-bold); /* 700 */
}


/* ======================================================
   本文リスト（ul / ol）
   ※ Reset で list-style:none にしているため、本文だけ復活
====================================================== */
.page-content ul{
  list-style: disc;          /* ・ */
  margin: 0 0 1.2em 1.5em;
  padding: 0;
}

.page-content ol{
  list-style: decimal;       /* 1. 2. 3. */
  margin: 0 0 1.2em 1.5em;
  padding: 0;
}

.page-content li{
  margin: 0.4em 0;
  line-height: 1.7;
}

/* =========================================================
   例外：右サイド TOC（tch-toc）はリストマーカーを表示しない
   ※ TOC 自体のデザインは components.css 側
========================================================= */
.page-content .tch-toc ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-content .tch-toc li{
  margin: 0;
}


/* =========================================================
 * 本文起因の横スクロール防止（本文のみ）
 * - 1100px コンテナ制御は layout.css の責務
 * - ここでは「折り返し」「はみ出し抑制」だけ行う
====================================================== */

/* 本文の長いURLや英数字の折り返しを強化 */
.page-content{
  overflow-wrap: anywhere; /* break-word より強い */
  word-break: normal;
}

/* 画像・埋め込み・iframe */
.page-content img,
.page-content iframe,
.page-content video,
.page-content embed,
.page-content object{
  max-width: 100%;
  height: auto;
}

/* table / pre は中だけスクロールさせる（本文の横はみ出し対策） */
.page-content table,
.page-content pre{
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* インライン code をブロック化しない（文章が崩れるため） */
.page-content code{
  overflow-wrap: anywhere;
}



html {
  scroll-padding-top: 180px;
  scroll-behavior: smooth;
}

/* スマホ */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 140px;
  }
}
