/* 医院・設備紹介（page-clinic.php）のページの CSS
   元：医院\nishinippori-scratch\HTML\医院・設備紹介_PC_1604-212701\公開用\css\style.css の base・s01（FV・パンくず）・s02（目次・本文・医院概要・提携病院・施設紹介）。
   ヘッダー・固定ボタン・TOP ボタン・予約の帯（s03）・フッター（s04）は共通の部品なので、ここには書かない */

.nn-main--clinic {
  --c-text: #514c46;
  --c-bg: #fbf7f4;
  --c-white: #ffffff;
  --c-accent: #e8a477;
  --c-accent-deep: #e88f54;
  --c-gray: #939393;
  --font-sans: "Noto Sans JP", sans-serif;
  --font-serif: "Shippori Mincho B1", "Noto Serif JP", serif;
  --font-en: "Source Serif 4", "Noto Serif JP", serif;
  --gutter: clamp(16px, 4vw, 40px);
  --inner: 1120px;

  display: block;
  width: 100%;
  overflow-x: clip;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-spacing-trim: space-all;
}
:where(.nn-main--clinic) *, :where(.nn-main--clinic) *::before, :where(.nn-main--clinic) *::after { box-sizing: border-box; }
:where(.nn-main--clinic) img { max-width: 100%; height: auto; display: block; }
:where(.nn-main--clinic) a { color: inherit; }
.nn-main--clinic .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===== s01 FV・パンくず ===== */
.s01 { position: relative; }
.s01 ul, .s01 ol { list-style: none; margin: 0; padding: 0; }
.s01 p { margin: 0; }
.s01 a { text-decoration: none; }

.s01-hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 500px;
  margin-top: 25px;
  overflow: hidden;
}
.s01-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 63.5%;
}
.s01-hero::after { content: ""; position: absolute; inset: 0; background: rgba(102, 80, 65, 0.2); }
.s01-hero-text {
  position: relative;
  z-index: 1;
  margin-left: max(var(--gutter), 50% - 560px);
  color: var(--c-white);
  text-shadow: 0 0 7.6px #715a5a;
}
.s01-hero-en { font-family: var(--font-en); font-size: 24px; font-weight: 400; line-height: 1; letter-spacing: 0.05em; }
.s01-hero-title {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
}
.s01-hero-dot { margin-inline: -0.27em; }

.s01-crumb-wrap {
  position: relative;
  z-index: 1;
  height: 135px;
  margin-top: -52px;
  padding-top: 20px;
  border-radius: 30px 30px 0 0;
  background: var(--c-bg);
}
.s01-crumb { width: min(var(--inner), 100% - var(--gutter) * 2); margin-inline: auto; }
.s01-crumb-list { display: flex; align-items: center; gap: 10px; height: 64px; }
.s01-crumb-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px;
  transition: opacity 0.3s ease-out;
}
.s01-crumb-sep { display: flex; }
.s01-crumb-list span {
  color: var(--c-gray);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
}
@media (hover: hover) {
  .s01-crumb-home:hover { opacity: 0.7; }
}
@media (max-width: 767px) {
  .s01-hero { height: 235px; margin-top: 0; }
  .s01-hero-en { font-size: 16px; }
  .s01-hero-title { margin-top: 10px; font-size: 26px; }
  .s01-crumb-wrap { height: 90px; margin-top: -20px; padding-top: 7px; border-radius: 20px 20px 0 0; }
  .s01-crumb-list { height: 48px; gap: 8px; }
  .s01-crumb-home img { width: 20px; height: 20px; }
  .s01-crumb-list span { font-size: 12px; }
}

/* ===== s02 目次・本文・医院概要・提携病院・施設紹介 ===== */
.s02 { padding: 49px 0 120px; }
.s02 p { margin: 0; }
.s02 ul { list-style: none; margin: 0; padding: 0; }
.s02 a { text-decoration: none; }
.s02-inner {
  display: flex;
  flex-direction: column;
  gap: 80px;
  width: min(var(--inner), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.s02-block { display: flex; flex-direction: column; scroll-margin-top: 20px; }

.s02-head {
  position: relative;
  margin: 0 0 32px;
  padding-top: 18px;
  border-top: 1px solid var(--c-gray);
  color: var(--c-accent-deep);
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
}
.s02-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 2px;
  border-radius: 0 0 50px 50px;
  background: var(--c-accent-deep);
}

.s02-index {
  padding: 18px 40px 38px;
  border-radius: 10px;
  background: var(--c-white);
  box-shadow: 0 0 10px rgba(109, 97, 61, 0.15);
}
.s02-index-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.s02-index-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 56px;
  padding: 7px 14px 7px 3px;
  border-bottom: 1px dashed var(--c-accent);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  transition: color 0.3s ease-out;
}
.s02-index-item img {
  flex: none;
  box-sizing: content-box;
  width: 16px;
  height: 16px;
  padding: 2px;
  border-radius: 50%;
  background: var(--c-white);
  transition: background-color 0.3s ease-out;
}

.s02-lead { display: flex; align-items: flex-start; gap: 56px; padding-inline: 3px; }
.s02-lead-text { display: flex; flex-direction: column; gap: 12px; flex: 1 1 658px; min-width: 0; }
.s02-lead-p { font-size: 16px; line-height: 2; letter-spacing: 0.1em; }
.s02 .s02-lead-p--body { line-height: 1.6; }
.s02-lead-photo {
  position: relative;
  flex: 0 1 400px;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  overflow: hidden;
  container-type: size;
}
.s02-lead-img {
  position: absolute;
  left: 0;
  top: -7cqh;
  width: 100%;
  height: 107.7cqh;
  max-width: none;
  object-fit: cover;
  object-position: 31.8% 50%;
}

.s02-table {
  width: 960px;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 1px;
  border-radius: 5px;
  background: #f7ece4;
  table-layout: fixed;
  text-align: left;
}
.s02-table th,
.s02-table td { vertical-align: top; border: 0; }
.s02-table th {
  width: 250px;
  padding: 16px 16px 12px;
  background: #f3d0b8;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.05em;
}
.s02-table td {
  padding: 12px 16px;
  background: var(--c-white);
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0.05em;
}
.s02-table tr:first-child th { border-top-left-radius: 5px; }
.s02-table tr:first-child td { border-top-right-radius: 5px; }
.s02-table tr:last-child th { border-bottom-left-radius: 5px; }
.s02-table tr:last-child td { border-bottom-right-radius: 5px; }

.s02-partner-text { font-size: 16px; line-height: 2; letter-spacing: 0.1em; }
.s02-partner-box {
  width: 980px;
  max-width: 100%;
  margin-top: 32px;
  padding: 40px;
  border-radius: 10px;
  background: var(--c-white);
}
.s02-partner-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
/* 紹介先リンク（注意書き：ホバーで名前とアイコンをオレンジに、下線を点線から実線に。0.3秒） */
.s02-partner-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  margin-top: -7px;
  padding: 8px 0 15px;
  border-bottom: 1px dashed #f3d0b8;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  transition: color 0.3s ease-out, border-color 0.3s ease-out;
}
.s02-partner-item svg { flex: none; width: 13px; height: 13px; margin-top: 3px; }

.s02-gallery { display: flex; flex-direction: column; gap: 12px; }
.s02-gallery-main {
  position: relative;
  margin: 0;
  aspect-ratio: 1120 / 570;
  border-radius: 2.5px;
  overflow: hidden;
  touch-action: pan-y;
}
.s02-gallery-photo,
.s02-gallery-cap { transition: opacity 0.3s ease-out; }
.s02-gallery-main.is-fading .s02-gallery-photo,
.s02-gallery-main.is-fading .s02-gallery-cap { opacity: 0; }
.s02-gallery-photo { position: absolute; inset: 0; }
.s02-gallery-img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.s02 .s02-pos-top { object-position: 50% 5.5%; }
.s02-gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  padding: 3.75px 0;
  background: rgba(232, 164, 119, 0.7);
  color: var(--c-white);
  font-family: "Zen Old Mincho", var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 35px;
  text-align: center;
}
.s02-gallery-arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 64px;
  margin-top: -32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: opacity 0.3s ease-out;
}
.s02-gallery-arrow img { width: 26px; height: 58px; }
.s02-gallery-arrow--prev { left: -4px; }
.s02-gallery-arrow--next { right: -4px; }
.s02-gallery-thumbs { display: grid; grid-template-columns: repeat(6, 180px); gap: 8px 6.8px; }
.s02-gallery-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 180 / 123;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: none;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.3s ease-out;
}
.s02-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s02-gallery-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 2px;
  transition: border-color 0.3s ease-out, background-color 0.3s ease-out;
}
.s02-gallery-thumb.is-current::after { border-color: var(--c-accent); background: rgba(255, 255, 255, 0.2); }

@media (prefers-reduced-motion: reduce) {
  .s02-gallery-photo, .s02-gallery-cap { transition: none; }
}

@media (hover: hover) {
  .s02-index-item:hover { color: var(--c-accent); }
  .s02-index-item:hover img { background: var(--c-accent); filter: brightness(0) invert(1); }
  a.s02-partner-item:hover { color: var(--c-accent); border-bottom-style: solid; border-bottom-color: var(--c-accent); }
  .s02-gallery-arrow:hover,
  .s02-gallery-thumb:hover { opacity: 0.7; }
}

@media (max-width: 1240px) {
  .s02-gallery-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .s02-index { padding-inline: 24px; }
  .s02-index-list { column-gap: 24px; }
  .s02-lead { gap: 32px; }
  .s02-partner-box { padding: 32px 24px; }
  .s02-partner-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .s02-table th { width: 180px; }
}
@media (max-width: 900px) {
  .s02-lead { flex-direction: column; gap: 24px; }
  .s02-lead-text { flex: none; }
  .s02-lead-photo { flex: none; width: 100%; max-width: 560px; }
  .s02-gallery-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .s02 { padding: 30px 0 60px; }
  .s02-inner { gap: 60px; width: calc(100% - 40px); }
  .s02-head { margin-bottom: 32px; padding-top: 14px; font-size: 18px; }

  .s02-index { padding: 4px 20px 16px; }
  .s02-index-list { grid-template-columns: 1fr; }
  .s02-index-item { min-height: 44px; padding-right: 0; font-size: 14px; line-height: 1.4; }

  .s02-lead { padding: 0; }
  .s02-lead-p,
  .s02 .s02-lead-p--body { font-size: 14px; line-height: 1.6; }
  .s02-lead-photo { max-width: none; }

  .s02-table th { width: 80px; padding: 12px 8px; font-size: 12px; line-height: 1.6; }
  .s02-table td { padding: 12px 8px; font-size: 12px; line-height: 1.6; }

  .s02-partner-text { font-size: 14px; line-height: 1.6; }
  .s02-partner-text br { display: none; }
  .s02-partner-box { margin-top: 24px; padding: 20px; }
  .s02-partner-list { grid-template-columns: 1fr; gap: 8px; }
  .s02-partner-item { align-items: center; margin-top: 0; padding: 12px 0; font-size: 16px; }
  .s02-partner-item svg { margin-top: 0; }

  .s02-gallery { gap: 8px; }
  .s02-gallery-main { aspect-ratio: 350 / 230; }
  .s02-gallery-cap { bottom: 16px; padding: 2px 0; font-size: 20px; line-height: 30px; }
  .s02-gallery-arrow img { width: 18px; height: 40px; }
  .s02-gallery-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .s02-gallery-thumb { min-height: 44px; }
}
