/* ヘッダー / フッターなど全ページ共通のレイアウト。
   数値は Figma「PC_TOP_0624」を 100% 表示した画面から採寸したもの。 */

/* ===== ヘッダー ===== */
.l-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
}
.l-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 100px;
  /* 1920 でも 1280 でも間延び・詰まりが出ないよう、余白は画面幅に追従させる */
  padding-inline: clamp(20px, 5vw, 90px) clamp(20px, 2.5vw, 40px);
  max-width: 1920px;
  margin-inline: auto;
}

/* ロゴはシンボルマークを含むロックアップ（assets/img/logo.png・401x111）。
   Figma の menu コンポーネント（node 133:158）に合わせて 150px 幅で置く。 */
.l-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: clamp(16px, 1.8vw, 30px);
  line-height: 0;
}
.l-header__logo img {
  display: block;
  width: clamp(40px, 3.3vw, 48px);
  height: auto;
}
/* 病院名はフッター（.l-footer__logo）と同じ明朝体・字詰めにそろえる。 */
.l-header__logo-text { font-family: var(--font-serif); color: var(--c-green-deep); line-height: 1.2; }
.l-header__corp { display: block; font-size: 10px; letter-spacing: .08em; }
.l-header__name { display: block; margin-top: 3px; font-size: clamp(17px, 1.4vw, 20px); font-weight: 700; letter-spacing: .22em; }

/* ===== グローバルナビ =====
   親項目はすべてホバーで下層を開く。対応疾患と診療案内は項目数が多いので、
   ヘッダー幅いっぱいのパネルに段組みで並べる（診療案内は 3 階層目まで出す）。 */
.l-gnav { margin-left: auto; }
.l-gnav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 30px);
}
.l-gnav__item { position: relative; }
.l-gnav__item > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 38px 0;
  font-family: var(--font-gothic);
  font-size: clamp(13px, 1.02vw, 15px);
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--c-green-deep);
  white-space: nowrap;
}
.l-gnav__item.is-current > a { color: var(--c-green-sns); }
.l-gnav__caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: 45deg;
  translate: 0 -2px;
  opacity: .7;
}

/* 下層パネル */
.l-gnav__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% 0;
  z-index: 20;
  padding: 10px 0;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(8, 76, 38, .12);
  border-radius: 0 0 6px 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.l-gnav__item--has-child:hover .l-gnav__panel,
.l-gnav__item--has-child:focus-within .l-gnav__panel { opacity: 1; visibility: visible; }

.l-gnav__child { min-width: 210px; }
.l-gnav__child > li + li { border-top: 1px solid rgba(144, 144, 144, .28); }
.l-gnav__child a {
  display: block;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--c-green-deep);
}
.l-gnav__child a:hover { background: rgba(131, 182, 145, .16); }
.l-gnav__all a { font-weight: 700; }
.l-gnav__all a::after { content: " →"; font-size: 12px; opacity: .7; }

/* 項目数が多い親は、ヘッダー幅いっぱいの段組みパネルにする */
.l-gnav__panel--wide {
  width: min(1040px, calc(100vw - 64px));
  padding: 22px 28px 26px;
  border-radius: 0 0 8px 8px;
}
.l-gnav__panel--wide .l-gnav__child {
  columns: 3;
  column-gap: 30px;
  min-width: 0;
}
.l-gnav__panel--wide .l-gnav__child > li {
  break-inside: avoid;
  border-top: 0;
  margin-bottom: 2px;
}
.l-gnav__panel--wide .l-gnav__child > li > a {
  padding: 7px 10px;
  border-radius: 4px;
}
.l-gnav__panel--wide .l-gnav__all { column-span: all; margin-bottom: 10px; }
.l-gnav__panel--wide .l-gnav__all a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--c-green-mid);
  border-radius: 999px;
  font-size: 13px;
}
/* 3 階層目（外来 > 一般外来 など） */
.l-gnav__grand { margin: 0 0 6px 14px; border-left: 1px solid rgba(131, 182, 145, .5); }
/* 4 階層目（一般外来の下の精神科・心療内科）。3 階層目と並んで見えないよう、
   さらに一段下げて線も細くする。 */
.l-gnav__great { margin: 2px 0 4px 14px; border-left: 1px dotted rgba(131, 182, 145, .6); }
.l-gnav__great a { padding: 4px 12px; font-size: 12px; color: #4c7a5c; }
.l-gnav__grand a {
  padding: 5px 12px;
  font-size: 13px;
  color: #3c6b4e;
}

/* ===== ヘッダー右の CTA ===== */
/* ===== ヘッダー 2 段目 =====
   Figma の menu コンポーネント（node 133:158）は、ナビの下の帯に SNS を置いている。
   ヘッダーが sticky なので、この帯ごとスクロールに付いてくる。 */
.l-header__sub {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 34px);
  height: 42px;
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 90px) clamp(20px, 2.5vw, 40px);
  border-top: 1px solid rgba(144, 144, 144, .22);
}
.l-header__tel {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--c-green-deep);
  white-space: nowrap;
}
.l-header__tel-icon {
  width: 15px;
  height: 15px;
  translate: 0 2px;
  color: var(--c-green-sns);
}
.l-header__tel-note { font-size: 11px; letter-spacing: .02em; color: var(--c-grey); }
.l-header__tel-num {
  font-family: var(--font-num);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .02em;
}
.l-header__sns { display: flex; align-items: center; gap: 10px; }
.l-header__sns img { display: block; width: 30px; height: 30px; }
.l-header__sns a { display: block; transition: opacity .2s; }
.l-header__sns a:hover { opacity: .75; }
.l-header__contact {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: clamp(12px, 1.4vw, 24px);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--c-green-deep);
  color: var(--c-wh);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .2s;
}
.l-header__contact:hover { background: #0a6432; }

/* キーボード操作で本文へ飛べるようにする */
.c-skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 0 0 6px 6px;
  background: var(--c-green-deep);
  color: var(--c-wh);
  font-size: 14px;
  transition: top .2s;
}
.c-skip:focus { top: 0; }

/* FV 右上の SNS。トップの FV と下層ページの FV 帯で共用するのでここに置く。 */
.p-fv__sns {
  position: absolute;
  top: 28px;
  right: 100px;
  display: flex;
  gap: 15px;
  z-index: 2;
}
.p-fv__sns img { width: 35px; height: 35px; }

/* ===== フッター ===== */
.u-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.l-footer {
  padding: 0 0 60px;
  /* フッターも同じ水彩の上に乗る。薄い緑を下地にして上から重ねる。 */
  background-color: #f1f8f4;
  background-image: url("../img/pastel.jpg");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;
}
.l-footer__catch {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-top: 90px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--c-green-deep);
}
.l-footer__catch::after { content: ""; flex: 1; height: 1px; background: var(--c-green-mid); }

.l-footer__top {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 46px;
  margin-top: 36px;
}
.l-footer__logo { font-family: var(--font-serif); color: var(--c-green-deep); line-height: 1.2; }
.l-footer__corp { display: block; font-size: 10px; letter-spacing: .08em; }
.l-footer__name { display: block; margin-top: 4px; font-size: 20px; font-weight: 700; letter-spacing: .32em; }
.l-footer__addr { margin-top: 18px; font-family: var(--font-num); font-size: 17px; line-height: 1.9; letter-spacing: .03em; }
.l-footer__bus { margin-top: 16px; max-width: 455px; }
/* 外来の送迎バス案内ページへのリンク。緑地のバッジなので下線は引かず、
   右端の矢印とホバーで押せることを示す。 */
.l-footer__bus a { display: block; text-decoration: none; }
.l-footer__bus a span { position: relative; padding-right: 30px; transition: opacity .2s; }
.l-footer__bus a span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -50%;
}
.l-footer__bus a:hover span { opacity: .85; }
.l-footer__bus span {
  display: block;
  padding: 10px;
  border-radius: 4px;
  background: var(--c-green-mid);
  color: var(--c-wh);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.l-footer__table {
  width: 100%;
  max-width: 455px;
  margin-top: 16px;
  padding: 14px 16px;
  border-collapse: collapse;
  border-radius: 6px;
  background: rgba(214, 238, 221, .6);
  font-size: 14px;
}
.l-footer__table th,
.l-footer__table td { padding: 9px 4px; text-align: center; font-weight: 500; }
.l-footer__table thead th:first-child,
.l-footer__table tbody th { width: 110px; text-align: left; color: var(--c-green-deep); }
.l-footer__table tbody tr { border-top: 1px solid rgba(131, 182, 145, .5); }
.l-footer__note { margin-top: 6px; font-size: 13px; line-height: 1.8; }
.l-footer__map img { width: 100%; border-radius: 6px; }

.l-footer__nav {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr .8fr;
  gap: 40px;
  margin-top: 70px;
  padding-top: 0;
}
.l-footer__head {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--c-green-mid);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--c-green-deep);
}
.l-footer__col ul + .l-footer__head { margin-top: 32px; }
.l-footer__col li + li { margin-top: 10px; }
.l-footer__col a { font-size: 14px; color: var(--c-green-deep); }
.l-footer__list--2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.l-footer__list--2col li + li { margin-top: 0; }
.l-footer__col--last { border-left: 1px solid rgba(131, 182, 145, .5); padding-left: 40px; }

.l-footer__copy { margin-top: 60px; text-align: center; font-size: 12px; color: var(--c-grey); }

/* ===== 画面幅ごとの調整 =====
   1200px を切るとグローバルナビが 9 項目収まらないので、その手前でハンバーガーに切り替える。
   PC / タブレット / スマホのどれで見ても、はみ出しや折り返しが起きないようにする。 */
@media (max-width: 1439px) {
  .l-header__inner { height: 88px; }
  .l-gnav__item > a { padding-block: 26px; }
  .l-header__sub { height: 38px; }
  .l-header__tel-num { font-size: 18px; }
}
@media (max-width: 1319px) {
  .l-header__tel-note { display: none; }
}
@media (max-width: 1199px) {
  /* ナビ 9 項目が収まらなくなる幅。ここからはハンバーガー＋ドロワーに切り替える。
     SNS と電話はドロワーと SP 固定バーにあるので、2 段目ごと畳む。 */
  .l-gnav, .l-header__contact, .l-header__sub { display: none; }
  .l-burger { display: flex; }
  .l-header__inner { height: 76px; }
}
