/* 医師紹介（page-doctors.php）のページの CSS
   元：医院\nishinippori-scratch\HTML\医師紹介_PC_1604-212669\公開用\css\style.css の base・s01（FV・パンくず・目次・院長あいさつ）・s02（医師紹介）。
   ヘッダー・固定ボタン・予約の帯（s03）・フッター（s04）は共通の部品なので、ここには書かない。
   base は .nn-main--doctors の中に閉じ込めた */

.nn-main--doctors {
  --c-text: #514c46;
  --c-bg: #fbf7f4;
  --c-white: #ffffff;
  --c-line: #ece5dc;
  --c-line-soft: #d9d9d9;
  --c-accent: #e8a477;
  --c-accent-deep: #e88f54;
  --c-accent-pale: #f3d0b8;
  --c-accent-bg: #f7ece4;
  --c-gray: #939393;
  --c-gold: #d7b56d;
  --shadow-card: 0 0 10px rgb(109 97 61 / 0.15);
  --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(20px, 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.1em;
  text-spacing-trim: space-all;
}
/* 下の節の書き方が勝つように、base は :where で弱くする */
:where(.nn-main--doctors) *, :where(.nn-main--doctors) *::before, :where(.nn-main--doctors) *::after { box-sizing: border-box; }
:where(.nn-main--doctors) img { max-width: 100%; height: auto; display: block; }
:where(.nn-main--doctors) a { color: inherit; }
.nn-main--doctors .inner { width: min(var(--inner), 100% - var(--gutter) * 2); margin-inline: auto; }

/* 節の見出し（院長あいさつ・医師紹介） */
.nn-main--doctors .sec-title {
  position: relative;
  margin: 0;
  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;
}
.nn-main--doctors .sec-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--c-accent-deep);
  border-radius: 0 0 50px 50px;
}
@media (max-width: 767px) {
  .nn-main--doctors .sec-title { padding-top: 10px; font-size: 18px; }
}

/* ===== s01 FV・パンくず・目次・院長あいさつ ===== */
.s01 { position: relative; }
.s01 ul, .s01 ol { margin: 0; padding: 0; list-style: none; }
.s01 p { margin: 0; }
.s01 a { text-decoration: none; }

.s01-hero { position: relative; height: clamp(240px, 34.72vw, 500px); overflow: hidden; }
.s01-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 48.7%;
}
.s01-hero::after { content: ""; position: absolute; inset: 0; background: rgb(102 80 65 / 0.2); }
.s01-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 100%;
  color: var(--c-white);
  text-shadow: 0 0 7.6px #715a5a;
}
.s01-hero-en { font-family: var(--font-en); font-size: 24px; line-height: 1; letter-spacing: 0.05em; }
.s01-hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
}

.s01-main {
  position: relative;
  z-index: 1;
  margin-top: -40px;
  padding: 20px 0 37px;
  border-radius: 30px 30px 0 0;
  background: var(--c-bg);
}

.s01-bread-list {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  color: var(--c-gray);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
}
.s01-bread-home {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  margin: 0 -10px;
  transition: opacity 0.3s ease-out;
}
.s01-bread-home img { width: 24px; height: 24px; }
.s01-bread-sep img { width: 13px; height: 26px; }

.s01-index {
  margin-top: 100px;
  padding: 18px 40px 38px;
  border-radius: 10px;
  background: var(--c-white);
  box-shadow: var(--shadow-card);
}
.s01-index-list { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.s01-index-item {
  display: flex;
  align-items: center;
  gap: 6px;
  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: opacity 0.3s ease-out;
}
.s01-index-arrow {
  display: flex;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  margin-left: auto;
  border-radius: 10px;
  background: var(--c-white);
}
.s01-index-arrow img { width: 16px; height: 16px; }

.s01-greeting { margin-top: 80px; scroll-margin-top: 20px; }
.s01-card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 32px;
  padding: 40px;
  border-radius: 20px;
  background: var(--c-white);
}
.s01-photo { position: relative; margin: 0; }
.s01-photo-box {
  position: relative;
  aspect-ratio: 1040 / 600;
  overflow: hidden;
  border-radius: 10px;
  container-type: size;
}
.s01-photo-box img {
  position: absolute;
  top: 0;
  left: -11.2cqw;
  width: 111.2cqw;
  max-width: none;
  height: auto;
}
.s01-caption {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 31px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--c-white);
  text-align: center;
  text-shadow: 0 0 7px #969188, 0 0 3px #595754;
}
.s01-caption-org { font-size: 16px; font-weight: 500; line-height: 1.6; letter-spacing: 0.1em; }
.s01-caption-name {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  padding-top: 12px;
  line-height: 1;
  letter-spacing: 0.1em;
}
.s01-caption-role { padding-bottom: 2px; font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.s01-caption-ja { padding-bottom: 2px; font-family: var(--font-serif); font-size: 36px; font-weight: 700; white-space: nowrap; }
.s01-caption-en { font-family: var(--font-en); font-size: 20px; white-space: nowrap; }

.s01-body { display: flex; flex-direction: column; gap: 12px; }
.s01-body p { font-size: 16px; line-height: 2; letter-spacing: 0.1em; }
.s01-cols { display: flex; align-items: flex-start; gap: 56px; padding: 0 3px; }
.s01-cols-text { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; }
.s01-cols-img {
  position: relative;
  flex: none;
  width: 400px;
  height: 300px;
  overflow: hidden;
  border-radius: 5px;
  container-type: size;
}
.s01-cols-img img {
  position: absolute;
  top: -8cqh;
  left: -28.5cqw;
  width: 135.3cqw;
  max-width: none;
  height: auto;
}

.s01-career {
  display: flex;
  padding: 20px 40px;
  border-radius: 10px;
  background: var(--c-accent-bg);
}
.s01-career-col { flex: 1; min-width: 0; }
.s01-career-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.1em;
}
.s01-career-title::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--c-gold);
}
.s01 .s01-career-list { padding-left: 40px; font-size: 16px; line-height: 1.6; letter-spacing: 0.1em; }
.s01-career-list li { position: relative; }
.s01-career-list li::before { content: "•"; position: absolute; left: -15px; }

@media (hover: hover) {
  .s01-bread-home:hover { opacity: 0.7; }
  .s01-index-item:hover { opacity: 0.7; }
}

@media (max-width: 1024px) {
  .s01-cols { gap: 32px; }
  .s01-cols-img { width: 40%; height: auto; aspect-ratio: 4 / 3; }
  .s01-caption { bottom: 20px; }
}
@media (max-width: 900px) {
  .s01-caption-org { font-size: 14px; }
  .s01-caption-ja { font-size: 28px; }
  .s01-caption-role, .s01-caption-en { font-size: 16px; }
  .s01-index { padding-inline: 24px; }
  .s01-index-list { gap: 24px; }
  .s01-card { padding: 32px; }
  .s01-career { padding: 20px 24px; }
}
@media (max-width: 767px) {
  .s01-hero { height: 240px; }
  .s01-hero-inner { justify-content: flex-start; padding-top: 92px; }
  .s01-hero-en { font-size: 16px; }
  .s01-hero-title { font-size: 26px; font-weight: 700; line-height: 1.2; }

  .s01-main { margin-top: -25px; padding: 20px 0 36px; border-radius: 20px 20px 0 0; }
  .s01-bread-list { gap: 8px; height: 22px; }
  .s01-bread-sep img { width: 10px; height: 20px; }

  .s01-index { margin-top: 80px; padding: 12px 16px 18px; }
  .s01-index-list { grid-template-columns: 1fr; gap: 0; }
  .s01-index-item { height: 44px; padding: 7px 4px 7px 3px; font-size: 14px; }

  .s01-greeting { margin-top: 72px; }
  .s01-card { gap: 24px; padding: 32px 20px; }
  .s01-photo-box { aspect-ratio: 1; }
  .s01-photo-box img { left: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65.4% 50%; }
  .s01-caption {   /* SP のデザインでは写真の上に名前を出さない（読み上げには残す） */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .s01-body p { font-size: 14px; }
  .s01-cols { flex-direction: column; gap: 24px; }
  .s01-cols-img { width: 100%; height: auto; aspect-ratio: 304 / 228; }
  .s01-career { flex-direction: column; gap: 12px; padding: 24px 20px; }
  .s01-career-title { font-size: 14px; }
  .s01-career-title::before { margin-top: 7px; }
  .s01 .s01-career-list { padding-left: 36px; font-size: 14px; }
  .s01-career-list li::before { left: -13px; }
}

/* ===== s02 医師紹介（診療科の絞り込み・医師の一覧） ===== */
.s02 { padding: 43px 0 71px; scroll-margin-top: 20px; }
.s02 p { margin: 0; }
.s02 ul { margin: 0; padding: 0; list-style: none; }

.s02-filter {
  display: flex;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 56px;
  padding: 8px 20px;
  border: 1px solid var(--c-accent-pale);
  border-radius: 10px;
  background: var(--c-white);
}
.s02-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  margin: -11px 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-accent);
  font: inherit;
  cursor: pointer;
}
.s02-tag[hidden] { display: none; }
.s02-tag-in {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: background-color 0.3s ease-out, color 0.3s ease-out;
}
.s02-ic { width: 13px; height: 13px; }
.s02-ic--on { display: none; }
.s02-tag.is-active .s02-tag-in { border-radius: 5px; background: var(--c-accent); color: var(--c-white); }
.nn-main--doctors .s02-tag.is-active .s02-ic--on { display: block; }
.s02-tag.is-active .s02-ic--off { display: none; }
@media (hover: hover) {
  .s02-tag:hover .s02-tag-in { border-radius: 5px; background: var(--c-accent); color: var(--c-white); }
  .nn-main--doctors .s02-tag:hover .s02-ic--on { display: block; }
  .s02-tag:hover .s02-ic--off { display: none; }
}

.s02-box {
  margin-top: 32px;
  padding: 40px;
  border-radius: 10px;
  background: var(--c-white);
}
.s02-h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
}
.s02-h3::before {
  content: "";
  flex: none;
  width: 4px;
  height: 28px;
  border-radius: 1px;
  background: var(--c-accent);
}
.s02-empty { padding: 56px 0; font-size: 16px; line-height: 1.6; }
.s02-empty[hidden] { display: none; }

.s02-doc {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  padding: 56px 0;
  border-bottom: 1px dashed var(--c-line-soft);
}
.s02-doc[hidden] { display: none; }
.s02-photo {
  position: relative;
  flex: none;
  width: 300px;
  aspect-ratio: 1;
  overflow: hidden;
  container-type: size;
}
.nn-main--doctors .s02-photo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100cqw;
  max-width: none;
  height: auto;
}
.s02-photo--sakurai { background: #fefcfa; }
.nn-main--doctors .s02-photo--sakurai img { top: 7.67cqh; left: 6.33cqw; width: 88cqw; }
.s02-photo--kobori { background: #fbfbfb; }
.nn-main--doctors .s02-photo--kobori img { left: 6.67cqw; width: 84cqw; }

.s02-text { flex: 1; min-width: 0; }
.s02-name {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 12px;
  color: var(--c-text);
  line-height: 1;
  letter-spacing: 0.1em;
}
.s02-name-main { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 1px; }
.s02-role { padding-bottom: 1px; font-family: var(--font-serif); font-size: 16px; font-weight: 700; white-space: nowrap; }
.s02-ja { font-family: var(--font-serif); font-size: 24px; font-weight: 700; white-space: nowrap; }
.s02-en { font-family: var(--font-en); font-size: 16px; white-space: nowrap; }
.s02 .s02-subj { margin-top: 12px; font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0.1em; }
.s02 .s02-msg { margin-top: 24px; font-size: 16px; line-height: 2; letter-spacing: 0.1em; }

@media (max-width: 1024px) {
  .s02-filter { padding-block: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .s02-tag { margin: 0; scroll-snap-align: start; }
  .s02-doc { gap: 32px; }
  .s02-photo { width: 240px; }
  .s02 .s02-subj { line-height: 1.6; }
}
@media (max-width: 900px) {
  .s02-box { padding: 32px; }
  .s02-photo { width: 200px; }
}
@media (max-width: 767px) {
  .s02 { padding: 36px 0 40px; }
  .s02-filter { gap: 4px; margin-top: 32px; padding: 0 16px; }
  .s02-tag-in { gap: 4px; height: 16px; padding: 2px 4px; font-size: 12px; }
  .s02-ic { width: 10px; height: 10px; }

  .s02-box { padding: 32px 20px; }
  .s02-h3 { height: 19px; font-size: 16px; }
  .s02-h3::before { height: 19px; }

  .s02-doc { flex-direction: column; align-items: stretch; gap: 16px; padding: 30px 0; }
  .s02-doc:first-child { padding: 16px 0; }
  .s02-photo { width: min(300px, 100%); margin-inline: auto; }
  .s02-name { flex-direction: column; align-items: flex-start; gap: 8px; }
  .s02-name-main { padding-bottom: 0; }
  .s02-role { padding-bottom: 0; font-size: 14px; }
  .s02-ja { font-size: 22px; }
  .s02-en { padding-left: 44px; font-size: 14px; }
  .s02 .s02-subj { line-height: 1; }
  .s02 .s02-msg { font-size: 14px; }
}
