/* 交通アクセス（page-access.php）のページの CSS
   元：医院\nishinippori-scratch\HTML\交通アクセス_PC_1604-212783\公開用\css\style.css の base（箱・見出し）・s01（FV・パンくず・所在地と交通機関）・s02（道のり案内）。
   ヘッダー・固定ボタン・予約の帯（s03）・フッター（s04）は共通の部品なので、ここには書かない */

.nn-main--access {
  --c-text: #514c46;
  --c-white: #ffffff;
  --c-accent: #e8a477;
  --c-accent-dark: #e88f54;
  --c-line: #ece5dc;
  --c-gray: #939393;
  --c-en: #f3d0b8;
  --c-panel: #f7ece4;
  --c-bg: #fbf7f4;
  --c-gold-light: #f0e2c4;
  --c-link: #6bbde3;
  --ff-sans: "Noto Sans JP", sans-serif;
  --ff-mincho: "Shippori Mincho B1", "Noto Serif JP", serif;
  --ff-en: "Source Serif 4", "Noto Serif JP", serif;
  --gutter: clamp(20px, 4vw, 40px);
  --w-inner: 1120px;
  --w-panel: 1232px;

  display: block;
  width: 100%;
  overflow-x: clip;
  color: var(--c-text);
  background: var(--c-bg);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.6;
  text-spacing-trim: space-all;
}
:where(.nn-main--access) *, :where(.nn-main--access) *::before, :where(.nn-main--access) *::after { box-sizing: border-box; }
:where(.nn-main--access) img { max-width: 100%; height: auto; display: block; }
:where(.nn-main--access) :is(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; }
:where(.nn-main--access) :is(ul, ol) { padding: 0; list-style: none; }
:where(.nn-main--access) li { margin: 0; }
:where(.nn-main--access) a { color: inherit; }
.nn-main--access .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ベージュの大きな箱（1440px で x=104・幅 1232px） */
.nn-main--access .panel {
  width: min(var(--w-panel), 100% - var(--gutter) * 2);
  margin-inline: auto;
  padding: 80px 56px;
  background: var(--c-panel);
  display: flex;
  flex-direction: column;
  gap: var(--panel-gap, 80px);
}
.nn-main--access .sec-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-weight: 400;
}
.nn-main--access .sec-title-ja {
  font-family: var(--ff-mincho);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--c-text);
}
.nn-main--access .sec-title-en {
  font-family: var(--ff-en);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--c-en);
}
.nn-main--access .sub-title {
  position: relative;
  border-top: 1px solid var(--c-gray);
  padding-top: 18px;
  font-family: var(--ff-mincho);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  color: var(--c-accent-dark);
}
.nn-main--access .sub-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--c-accent-dark);
  border-radius: 0 0 50px 50px;
}
.nn-main--access .card { background: var(--c-white); border-radius: 10px; }
@media (max-width: 1024px) {
  .nn-main--access .panel { padding: 64px 40px; }
}
@media (max-width: 767px) {
  .nn-main--access .panel { padding: 60px 20px; gap: var(--panel-gap-sp, 48px); }
  .nn-main--access .sec-title { gap: 4px; }
  .nn-main--access .sec-title-ja { font-size: 30px; line-height: 1.2; }
  .nn-main--access .sec-title-en { font-size: 20px; }
  .nn-main--access .sub-title { font-size: 18px; }
}

/* ===== s01 FV・パンくず・所在地と交通機関 ===== */
html:has(.nn-main--access) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html:has(.nn-main--access) { scroll-behavior: auto; }
}

.s01-hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 500px;
  overflow: hidden;
  container-type: size;
}
.s01-hero-photo {
  position: absolute;
  inset: 0;
  background: var(--img-a20e971a2523e1aa) no-repeat;
  background-size: 129.2cqw auto;
  background-position: -24.1cqw 0;
}
.s01-hero-photo::after { content: ""; position: absolute; inset: 0; background: rgba(143, 80, 39, .2); }
.s01-hero-text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: max(var(--gutter), 50% - 560px);
  color: var(--c-white);
  text-shadow: 0 0 7.6px #715a5a;
}
.s01-hero-en { font-family: var(--ff-en); font-size: 24px; line-height: 1; letter-spacing: 0.05em; }
.s01-hero-title {
  font-family: var(--ff-mincho);
  font-weight: 800;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0.1em;
}

.s01-main {
  position: relative;
  margin-top: -51px;
  padding-bottom: 35px;
  border-radius: 30px 30px 0 0;
  background: var(--c-bg);
}

.s01-crumb { width: min(var(--w-inner), 100% - var(--gutter) * 2); margin: 0 auto 100px; padding-top: 20px; }
.s01-crumb ol { display: flex; align-items: center; gap: 10px; height: 64px; }
.s01-crumb li { display: flex; align-items: center; }
.s01-crumb-home { display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; margin: -10px; transition: opacity .3s ease-out; }
.s01-crumb-home img { width: 24px; height: 24px; }
.s01-crumb-sep img { width: 13px; height: 26px; }
.s01-crumb span { font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: 0.1em; color: var(--c-gray); }

.s01-lead { display: flex; flex-direction: column; gap: 80px; }
.s01-map {
  height: 530px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  container-type: size;
  background: #e4e4e4;
}
.s01-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--img-8cc73623e5951a30) no-repeat;
  background-size: 149cqw auto;
  background-position: -38.8cqw -47.3cqh;
}
.s01-map iframe { position: relative; display: block; width: 100%; height: 100%; border: 0; }

.s01-info { padding-top: 20px; }
.s01-info-name { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 0 12px; line-height: 1; letter-spacing: 0.1em; }
.s01-info-corp { font-size: 14px; padding-bottom: 1px; }
.s01-info-clinic { font-size: 22.5px; font-weight: 500; }
.s01-info-addr {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 24px;
  margin-top: 12px;
  line-height: 1;
  letter-spacing: 0.1em;
}
.s01-info-addr address { display: flex; flex-wrap: wrap; gap: 4px 12px; font-style: normal; font-size: 16px; }
.s01-info-street { display: flex; flex-wrap: wrap; gap: 4px 2px; }
.s01-info-street span:first-child::after { content: " "; }
.s01-info-tel { font-size: 14px; padding-top: 2px; }
/* 「Googleマップで開く」（Figma に無い。共通の注意書き「Googleマップ」の遷移先。別タブ）。押せる所は 44px */
.s01-info-map {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -15px;
  margin-left: auto;
  color: var(--c-link);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .3s ease-out;
}

.s01-block { display: flex; flex-direction: column; gap: 32px; }
.s01-stations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.s01-station { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; }
.s01-station-row { display: flex; justify-content: center; gap: 16px; }
.nn-main--access .s01-icon { display: block; flex: none; width: 64px; height: 64px; }
.s01-station-text { display: flex; flex-direction: column; }
.s01-station-line { font-family: var(--ff-mincho); font-weight: 700; font-size: 14px; line-height: 1.2; letter-spacing: 0.05em; }
.s01-station-name { margin-top: 4px; font-family: var(--ff-mincho); font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: 0.05em; }
.s01-station-walk { margin-top: 8px; font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: 0.05em; }

.s01-route { display: flex; align-items: center; height: 44px; margin: -8px 0; text-decoration: none; }
.s01-route-pill {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 244px;
  height: 28px;
  padding: 0 22px 0 28px;
  border-radius: 5px;
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--ff-mincho);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background-color .3s ease-out;
}
.s01-route-pill svg { width: 22px; height: 11px; flex: none; }

.s01-bus { display: flex; align-items: center; width: min(960px, 100%); min-height: 129px; padding: 24px 60px; }
.s01-bus-list { display: flex; align-items: center; }
.s01-bus-list li { padding: 0 40px; white-space: nowrap; }
.s01-bus-list li:first-child { width: 380px; }
.s01-bus-list li + li { border-left: 1px solid var(--c-gray); padding-left: 41px; }

.s01-photos { display: grid; grid-template-columns: 1fr 1fr; border-radius: 10px; overflow: hidden; }
.s01-photo { position: relative; aspect-ratio: 560 / 450; overflow: hidden; container-type: size; }
.nn-main--access .s01-photo img { position: absolute; max-width: none; height: auto; }
.nn-main--access .s01-photo--1 img { width: 156cqw; left: -30.4cqw; top: 0; }
.nn-main--access .s01-photo--2 img { width: 132cqw; left: -27.1cqw; top: -4.3cqh; }

@media (hover: hover) {
  .s01-crumb-home:hover { opacity: .7; }
  .s01-route:hover .s01-route-pill { background: var(--c-accent-dark); }
  .s01-info-map:hover { opacity: .7; }
}

@media (max-width: 1280px) {
  .s01-stations { gap: 24px; }
  .s01-station { padding: 24px 16px; }
}
@media (max-width: 1100px) {
  .s01-stations { grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: center; }
  .s01-stations li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 320px; }
  .s01-bus { padding: 24px 32px; }
  .s01-bus-list li { padding: 0 24px; }
  .s01-bus-list li:first-child { width: auto; }
  .s01-bus-list li + li { padding-left: 25px; }
}
@media (max-width: 900px) {
  .s01-bus { gap: 24px; }
  .s01-bus-list { flex-direction: column; align-items: flex-start; }
  .s01-bus-list li, .s01-bus-list li:first-child { width: auto; padding: 0; white-space: normal; }
  .s01-bus-list li + li { border-left: 0; padding: 8px 0 0; margin-top: 8px; border-top: 1px solid var(--c-line); }
}
@media (max-width: 767px) {
  .s01-hero { height: 240px; align-items: flex-start; }
  .s01-hero-photo { background-size: 250cqw auto; background-position: -60cqw -10cqh; }
  .s01-hero-text { margin: 92px 0 0 20px; gap: 10px; }
  .s01-hero-en { font-size: 16px; }
  .s01-hero-title { font-size: 26px; }

  .s01-main { margin-top: -25px; padding-bottom: 36px; border-radius: 20px 20px 0 0; }
  .s01-crumb { width: auto; margin: 0 20px 80px; }
  .s01-crumb ol { height: 22px; gap: 8px; }
  .s01-crumb-sep img { width: 10px; height: 20px; }
  .s01-crumb span { font-size: 12px; }

  .nn-main--access .s01-panel { width: calc(100% - 40px); }
  .s01-lead { gap: 32px; }
  .s01-lead .sec-title { margin-inline: -12px; }
  .nn-main--access .s01-lead .sec-title-ja { letter-spacing: 0; white-space: nowrap; }
  .nn-main--access .s01-lead .sec-title-en { letter-spacing: 0; white-space: nowrap; }
  .s01-map { height: auto; aspect-ratio: 1; }
  .s01-map::before { background-size: cover; background-position: center; }
  .s01-info { padding-top: 24px; }
  .s01-info-name { flex-direction: column; align-items: flex-start; gap: 4px; }
  .s01-info-corp { font-size: 12px; padding: 0; }
  .s01-info-clinic { font-size: 18px; }
  .s01-info-addr { flex-direction: column; align-items: flex-start; gap: 8px; }
  .s01-info-addr address { flex-direction: column; gap: 4px; font-size: 14px; }
  .s01-info-street { flex-direction: column; gap: 4px; }
  .s01-info-street span:first-child::after { content: none; }
  .s01-info-tel { font-size: 12px; padding: 0; }
  .s01-info-map { margin: -10px 0; font-size: 12px; }

  .s01-stations { grid-template-columns: 1fr; gap: 24px; }
  .s01-stations li:last-child:nth-child(odd) { max-width: none; }
  .s01-station { gap: 8px; padding: 16px; }
  .nn-main--access .s01-icon { width: 44px; height: 44px; }
  .s01-station-line { font-size: 10px; }
  .s01-station-name { margin-top: 2px; font-size: 14px; }
  .s01-station-walk { margin-top: 4px; font-size: 10px; }
  .s01-route { margin: -9px 0; }
  .s01-route-pill { width: 223px; height: 26px; font-size: 14px; padding: 0 16px 0 22px; }
  .s01-bus { min-height: 129px; padding: 12px 16px; gap: 19px; }
}

/* ===== s02 駅からの道のり案内 ===== */
.s02 { padding: 45px 0 148px; } /* 静的 HTML は 132px＋予約の帯の上の余白 13px。共通の予約の帯（nn-cta）には上の余白が無いので、ここで足す（Figma との高さを合わせる） */
.s02-group { display: flex; flex-direction: column; gap: 32px; scroll-margin-top: 20px; }
.s02-route { padding: 60px; }
.s02-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; max-width: 940px; margin-inline: auto; }
.s02-step { display: flex; flex-direction: column; gap: 20px; }
.nn-main--access .s02-step img { width: 100%; aspect-ratio: 450 / 293; object-fit: cover; }
.s02-step-text { display: flex; align-items: flex-start; gap: 12px; padding-right: 8px; }
.s02-num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 34px;
  border-radius: 5px;
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--ff-en);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
}
.s02-num + span {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
  text-align: justify;
}
@media (max-width: 1024px) {
  .s02-route { padding: 40px 32px; }
  .s02-steps { gap: 32px 24px; }
  .s02-num + span { font-size: 15px; }
}
@media (max-width: 767px) {
  .s02 { padding: 40px 0 60px; }
  .s02-group { gap: 20px; }
  .s02-route { padding: 20px; }
  .s02-steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .s02-step { gap: 12px; }
  .s02-step-text { gap: 8px; padding-right: 0; }
  .s02-num { width: 24px; height: 26px; border-radius: 4px; font-size: 13px; }
  .s02-num + span { padding-top: 2px; font-size: 14px; line-height: 1.6; letter-spacing: 0.1em; }
}
