@charset "utf-8";
/*
 * 見出し階層の再設計(2026-07-25 / 2026-07-26 Codexレビュー反映)
 *   旧: ヘッダーロゴ=h1 / タイトル=h2 / 本文 大=h3・中=h4・小=h5
 *   新: ロゴ=div.sitelogo / タイトル=h1 / 本文 大=h2・中=h3・小=h4
 * 値はすべて原本の getComputedStyle 実測に基づく(推測で書かない)。
 * legacy CSS には手を入れず、このファイルを後から読み込んで上書きする。
 * ブレークポイントは legacy に合わせて 480px(767px ではない)。
 */

/* ---- ヘッダーロゴ: 旧 #header h1 の体裁・余白を div.sitelogo に引き継ぐ ----
 * h1 → div にしたことで legacy の #header h1 に付いていた padding / margin / line-height が
 * 外れ、下の「形成外科/美容外科」がロゴに寄ってしまうため、同じ値を明示的に与える。
 * 値は legacy の定義そのまま(PC: padding 15px 0 10px、SP: padding 60px 0 0 / font-size 24px)。
 */
#header .sitelogo {
  padding: 0 0 10px;   /* 上余白は原本(h1)では効いていないため 0。下10pxのみ引き継ぐ */
  margin: 0;
  line-height: 1;
  font-size: 16px;
  font-weight: normal;
}
#header .sitelogo a { text-decoration: none; }

/* ============ PC(481px 以上) ============ */
/* タイトル h1 ← 旧 h2 */
#main article h1 {
  font-size: 30px;
  line-height: 30px;
  font-weight: 500;
  color: #417571;
  text-align: center;
  margin: 0 0 40px;
  padding: 0;
  border-bottom: 0;
  font-family: "Noto Sans JP", sans-serif;
}
.page_weverysub #main article h1 { margin-top: 60px; }
/* 記事・一覧のタイトルも原本は中央揃え(実測)。個別の左寄せ指定は行わない */

/* 大見出し h2 ← 旧 h3(下線3px + ティールのアクセント線180px) */
#main article .subpagecontents h2 {
  position: relative;
  font-size: 26px;
  line-height: 36.4px;
  font-weight: 500;
  color: #424242;
  text-align: left;
  margin: 52px 0 26px;
  padding: 10px 0;
  background-color: transparent;
  border-bottom: 3px solid #dddddd;
  clear: both;
  font-family: inherit;
}
#main article .subpagecontents h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  display: block;
  width: 180px;
  height: 3px;
  background: #499A94;
}
/* 中見出し h3 ← 旧 h4 */
#main article .subpagecontents h3 {
  position: static;
  font-size: 24px;
  line-height: 33.6px;
  font-weight: 500;
  color: #424242;
  text-align: left;
  margin: 48px 0 24px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
  clear: both;
}
/* 先方希望(2026-07-26): 中見出しが太字だけで本文に埋もれるため、色付きの下線を足す。
   大見出し(h2)は下線3px+アクセント180px なので、中見出しは細めにして階層差を残す。 */
#main article .subpagecontents h3 {
  position: relative;
  padding-bottom: 8px;
  border-bottom: 2px solid #e3ded2;
}
#main article .subpagecontents h3::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 120px;
  height: 2px;
  background: #499A94;
}
/* 小見出し h4 ← 旧 h5(先頭に四角マーカー) */
#main article .subpagecontents h4 {
  position: relative;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  color: #424242;
  text-align: left;
  margin: 30px 0 14px;
  padding: 0;
  border-bottom: 0;
}
#main article .subpagecontents h4::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 0.5em 0.1em 0;
  background: #499A94;
}

/* ---- よくある質問(qa_list)の見出しも1段繰り上げる(Codex指摘1) ---- */
#main article .subpagecontents .qa_list h2 {
  margin: 30px 0;
  padding: 0 0 0 45px;
  border: none;
  color: #499A94;
  font-size: 20px;
  line-height: 1.4;
}
#main article .subpagecontents .qa_list h2::after { display: none; content: none; }

/* ============ スマートフォン(480px 以下) ============ */
@media screen and (max-width: 480px) {
  /* ロゴ: 原本(h1)の上余白15pxぶんを再現(PCは0、SPのみ) */
  #header .sitelogo { padding-top: 15px; }

  /* タイトル h1 ← 旧 h2(SP): 26px / 中央 / 上余白なし・下30px */
  #main article h1 { font-size: 26px; line-height: 26px; margin: 0 0 30px; }
  .page_weverysub #main article h1 { margin-top: 0; }

  /* 大見出し h2 ← 旧 h3(SP): 20px / 太さ600 / 下線2px / アクセント80px */
  #main article .subpagecontents h2 {
    font-size: 20px; line-height: 28px; font-weight: 600;
    margin: 40px 0 24px; padding: 10px 0; border-bottom: 2px solid #dddddd;
  }
  #main article .subpagecontents h2::after { bottom: -2px; width: 80px; height: 2px; }

  /* 中見出し h3 ← 旧 h4(SP): 19px / 太さ600 */
  #main article .subpagecontents h3 {
    font-size: 19px; line-height: 26.6px; font-weight: 600; margin: 38px 0 13.3px;
  }
  /* 小見出し h4 ← 旧 h5(SP): 16px / 太さ600 / マーカー8px */
  #main article .subpagecontents h4 {
    font-size: 16px; line-height: 22.4px; font-weight: 600; margin: 32px 0 11.2px;
  }
  #main article .subpagecontents h4::before { width: 8px; height: 8px; }
}

/* ============ グローバルナビの見切れ是正 ============
 * 原因: 項目の合計幅(約1175px)が #nav の固定幅1080pxを超え、中央寄せの結果として左右にあふれる。
 * 対処: 幅を中身に合わせ、項目間の余白を画面幅に応じて詰める。
 * #gNav の min-width は解除しない(固定表示時に幅が変わるため。Codex指摘4)。
 */
@media screen and (min-width: 1200px) and (max-width: 1599px) {
  #gNav #nav { width: auto; max-width: 100%; margin-left: auto; margin-right: auto; }
  #gNav #nav > li:not(:last-child) { margin-right: 18px; }
}
@media screen and (min-width: 1200px) and (max-width: 1365px) {
  #gNav #nav > li:not(:last-child) { margin-right: 10px; }
  #gNav #nav > li > a { font-size: 14px; }
}

/* ---- 中見出し(h3)のアクセント線 ----
 * legacy の #main article h3::after(大見出し用の長いアクセント線)が残るため、
 * ここで中見出し用の短い線(120px)に上書きする。小見出し(h4)には線を出さない。
 */
#main article .subpagecontents h3::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  bottom: -2px !important;
  width: 120px !important;
  height: 2px !important;
  background: #499A94 !important;
}
#main article .subpagecontents h4::after {
  content: none !important;
  display: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ---- トップの新着ブロック(お知らせ / クリニックブログ)の間隔 ----
 * 原本は .b_news が1つで上下に 125px / 120px の余白があった。
 * 2つ並べると間が 245px 空いて離れすぎるため、内側の余白だけ詰める。
 */
#topSecID101103 .b_news { padding-bottom: 40px; }
#topSecID101103b .b_news { padding-top: 40px; }
@media screen and (max-width: 480px) {
  #topSecID101103 .b_news { padding-bottom: 24px; }
  #topSecID101103b .b_news { padding-top: 24px; }
}

/* ---- 大見出し(h2)と中見出し(h3)の差を明確にする(2026-07-26 先方指摘) ----
 * 文字サイズが 26px / 24px と近く、どちらも下線のため見分けにくかった。
 * h2 は「面(背景の帯)」、h3 は「線(色付きの下線)」と形を変えて階層を分ける。
 */
#main article .subpagecontents h2 {
  background: transparent;
  padding: 2px 0 12px;
  border-left: 0;
  border-bottom: 5px double #499A94;
}
#main article .subpagecontents h2::after { display: none !important; }
@media screen and (max-width: 480px) {
  #main article .subpagecontents h2 { padding: 2px 0 9px; border-bottom-width: 4px; }
}

/* 小見出し(h4)の先頭マークを四角から縦線にする(2026-07-26 先方指定) */
#main article .subpagecontents h4::before {
  width: 4px !important;
  height: 1em !important;
  margin: 0 0.5em -0.12em 0 !important;
  background: #499A94 !important;
}
@media screen and (max-width: 480px) {
  #main article .subpagecontents h4::before { width: 3px !important; }
}
