/* サンマルコクリニック site.css
   旧サイト（ペライチ）の見た目を参考に独自に書き起こしたもの。外部フォント・外部 JS なし。 */

:root {
  --bg: #fef2ea;
  --ink: #333;
  --ink-soft: #555;
  --orange: #f47e00;
  --teal: #28c3d4;          /* 枠線・飾り用（文字や白文字の地には使わない：白文字で 2.1:1） */
  --teal-ink: #0c7a87;      /* 文字色・白文字の地。白とも生成り地とも 4.5:1 以上 */
  --orange-ink: #9a4800;    /* ヘッダーナビ（白地）の文字 */
  --teal-light: #a6e7ee;
  --teal-line: #7fd6e0;
  --green: #466600;
  --chev: var(--teal-ink);
  --red: #cc3322;
  --link: #0645ad;
  --w: 940px;
  --w-narrow: 780px;
  --header-h: 72px;
  --pad: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--link); }
a:hover { text-decoration: none; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { line-height: 1.5; }
:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }

[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 4px;
}
.skip-link:focus { top: 8px; }

.em-red { color: var(--red); }
.nw { display: inline-block; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--orange);
  color: #fff;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
  padding: 0 32px;
}
.site-logo { display: block; flex: 0 0 auto; }
.site-logo img { display: block; width: 240px; height: auto; }
.global-nav ul {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.global-nav a {
  display: block; padding: 4px 14px; border-radius: 999px;
  background: #fff; color: var(--orange-ink);
  font-weight: 700; font-size: 15px; line-height: 1.6; text-decoration: none;
}
.global-nav a:hover, .global-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- main layout ---------- */
main { display: block; padding-bottom: 48px; }
main > * {
  max-width: var(--w);
  margin-left: auto; margin-right: auto;
  padding-left: var(--pad); padding-right: var(--pad);
}
main > .hero, main > .page-banner, main > hr.dotted { max-width: none; padding-left: 0; padding-right: 0; }

/* ---------- index: top notice / quick links ---------- */
.notice-top {
  text-align: center; font-size: 19px; font-weight: 700; line-height: 1.6;
  margin-top: 40px; margin-bottom: 32px;
}
.notice-top a { color: #1a1ae6; text-decoration: none; white-space: nowrap; }
.notice-top a:hover { text-decoration: underline; }

.quick-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-bottom: 22px;
}
.quick-links a {
  display: flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 6px 8px;
  background: var(--teal-ink); color: #fff; font-weight: 700; text-decoration: none;
  border-radius: 2px;
}
.quick-links a:hover { background: #09616b; }

.hero img {
  display: block; width: 100%; height: clamp(220px, 37vw, 520px);
  object-fit: cover; object-position: center 62%;
}

/* ---------- news ---------- */
.news { margin-top: 40px; margin-bottom: 64px; }
.news-box {
  max-width: 700px; margin: 0 auto;
  background: #fff; border: 3px solid var(--teal);
  padding: 20px 22px 32px;
}
.news-box h2 {
  margin: 0 0 18px; padding-bottom: 8px;
  text-align: center; font-size: 20px;
  border-bottom: 2px solid var(--teal);
}
.news-body { font-size: 15px; }

/* ---------- headings ---------- */
.heading-marker {
  text-align: center;
  color: var(--green);
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 500;
  line-height: 1.3;
  margin-top: 0; margin-bottom: 40px;
  background: linear-gradient(transparent calc(100% - 10px), var(--teal-light) calc(100% - 10px));
  background-clip: content-box;
}
.heading-box {
  width: min(calc(var(--w) - 2 * var(--pad)), calc(100% - 2 * var(--pad)));
  text-align: center; font-size: 21px;
  margin-top: 56px; margin-bottom: 44px;
  padding: 8px 12px;
  border: 3px solid var(--teal-light);
  box-shadow: inset 0 0 0 1px #fff;
}
.heading-plain {
  text-align: center; font-size: 21px; margin: 40px auto 16px;
}
.heading-updown {
  text-align: center; font-size: 26px;
  margin-top: 40px; margin-bottom: 40px;
}
.heading-updown::before, .heading-updown::after {
  content: ""; display: block; height: 6px;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.heading-updown::before { margin-bottom: 10px; }
.heading-updown::after { margin-top: 10px; }

hr.dotted {
  border: 0; border-top: 3px dotted var(--teal);
  margin: 56px 0;
  height: 0;
}

.block-img { text-align: center; margin-bottom: 56px; }
.block-img img { max-width: 710px; width: 100%; }

/* ---------- philosophy ---------- */
.philosophy { margin-bottom: 40px; }
.phil-item {
  display: grid; grid-template-columns: 220px 1fr; gap: 0;
  margin-bottom: 44px;
}
.phil-title {
  margin: 0; color: var(--teal-ink); font-size: 26px; font-weight: 500;
  padding-top: 6px;
}
.phil-body {
  border-left: 2px solid var(--teal-light);
  padding-left: 20px;
}
.phil-sub {
  color: var(--teal-ink); font-size: 26px; line-height: 1.4; margin-bottom: .4em !important;
}

/* ---------- doctors ---------- */
.doctor {
  width: min(var(--w-narrow), calc(100% - 2 * var(--pad)));
  margin-bottom: 40px;
  padding-left: 0; padding-right: 0;
  background: #fff;
}
.doc-label {
  margin: 0; padding: 10px 16px;
  background: var(--teal-ink); color: #fff; font-size: 18px;
}
.doc-main { display: grid; grid-template-columns: 49% 1fr; }
.doc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.doc-text { padding: 14px 12px 20px 20px; font-size: 14px; }
.doc-name { font-size: 19px; margin: 0; line-height: 1.5; }
.doc-name-en {
  font-size: 21px; margin: 0 0 10px !important; line-height: 1.5;
  border-bottom: 1px solid var(--ink); padding-bottom: 2px;
}
.career { border-top: 1px solid #ddd; padding: 12px 48px 24px; font-size: 14px; }
.career h4 { text-align: center; color: var(--teal-ink); font-size: 18px; margin: 0 0 10px; }
.career ul { margin: 0; padding-left: 1.2em; }
.career li { border-bottom: 1px solid #e3e3e3; padding: 3px 0; }
.career li p { margin: 0 0 .6em; }

/* ---------- accordion (details/summary) ---------- */
.acc-heading { text-align: center; font-size: 24px; margin: 40px auto 24px; }
.acc-list { margin-bottom: 48px; }
.acc { border-bottom: 2px solid var(--ink); }
.acc > summary {
  list-style: none; cursor: pointer;
  position: relative;
  padding: 24px 56px 24px 16px;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px; margin-top: -8px;
  border-right: 3px solid var(--chev); border-bottom: 3px solid var(--chev);
  transform: rotate(45deg);
  transition: transform .2s;
}
.acc[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.acc > summary:hover .acc-title { text-decoration: underline; text-underline-offset: 4px; }
.acc-title { display: block; font-size: 17px; font-weight: 700; line-height: 1.6; }
.acc-title:empty { display: none; }
.acc-title .en { display: block; font-weight: 500; font-size: 18px; }
.acc-lead { display: block; font-size: 13px; line-height: 1.9; margin-top: 4px; color: var(--ink-soft); }
.acc-body { padding: 0 16px 28px; font-size: 14px; }
.acc-body.has-img { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.acc-figs { display: grid; gap: 12px; }
.acc-figs figure { margin: 0; }

/* ---------- access ---------- */
.access-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center;
  background: #fff; border: 3px solid var(--teal);
  padding: 28px; margin-bottom: 32px;
  width: min(calc(var(--w) - 2 * var(--pad)), calc(100% - 2 * var(--pad)));
}
.access-text { font-size: 14px; }
.access-text a[href^="tel:"] { font-size: 20px; color: #1a1ae6; text-decoration: none; }
.access-map { text-align: center; }
.gmap { margin-bottom: 40px; }
.gmap iframe { display: block; width: 100%; height: 420px; border: 0; }

/* ---------- hours ---------- */
.hours { margin-bottom: 24px; }
.hours-table-wrap {
  background: #fff; padding: 22px 20px 16px;
  overflow-x: auto;
}
.hours-table {
  width: 100%; border-collapse: collapse;
  font-size: clamp(16px, 2.6vw, 26px); font-weight: 600;
  text-align: center;
}
.hours-table th, .hours-table td {
  border: 2px solid #222; padding: .15em .3em;
}
.hours-table thead th { font-size: 1.05em; }
.hours-table tbody th { font-weight: 600; white-space: nowrap; }
.hours-table td.off { font-weight: 400; }
.hours-note { margin: 8px 0 0; font-size: clamp(14px, 2.2vw, 22px); font-weight: 600; }

.note-box {
  border: 3px solid var(--teal-line);
  background: #fff;
  padding: 10px 14px; font-size: 13px; line-height: 1.6;
  margin-bottom: 24px;
  width: min(calc(var(--w) - 2 * var(--pad)), calc(100% - 2 * var(--pad)));
}

.sns { text-align: center; margin: 32px auto; }
.sns a { display: inline-block; }

/* ---------- lower pages ---------- */
.page-banner img {
  display: block; width: 100%; height: 140px; object-fit: cover; object-position: center 30%;
  filter: brightness(.82);
}
.page-kamoku, .page-new-tech, .page-kobanashi { --chev: #5e8f12; }

.caution {
  width: min(700px, calc(100% - 2 * var(--pad))); margin: 40px auto;
  background: #fff; border: 3px solid var(--teal);
  padding: 0 0 20px; text-align: center;
}
.caution-head {
  background: var(--teal-ink); color: #fff; font-weight: 700; font-size: 18px;
  padding: 8px; margin: 0 0 16px !important;
}
.caution a { font-size: 22px; }

.sentence { margin-top: 32px; margin-bottom: 40px; }

/* ---------- footer ---------- */
.site-footer { text-align: center; font-size: 14px; }
.footer-nav { background: #fff7f1; padding: 14px var(--pad); }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.footer-nav li + li::before { content: "|"; content: "|" / ""; color: #aaa; padding: 0 1em; }
.footer-nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.footer-nav a:hover { text-decoration: underline; }
.footer-info { padding: 40px var(--pad) 56px; }
.footer-info a { color: var(--ink); }
.footer-name { margin-bottom: 1em !important; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .site-header__inner { padding: 6px 16px; }
  .site-logo img { width: 200px; }
  .global-nav ul { gap: 6px; }
  .global-nav a { font-size: 14px; padding: 3px 10px; }
  .phil-item { grid-template-columns: 1fr; }
  .phil-title { font-size: 15px; padding: 0; }
  .phil-body { border-left: 0; padding-left: 0; }
  .acc-body.has-img { grid-template-columns: 1fr 200px; }
}

/* ロゴとナビが横に並ばなくなる幅では、ナビをロゴの下に 1 行で置く */
@media (max-width: 720px) {
  :root { --header-h: 92px; }
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 16px; }
  .global-nav ul { justify-content: flex-start; }
}

@media (max-width: 640px) {
  :root { --header-h: 0px; --pad: 12px; }
  body { font-size: 15px; }
  .site-header { position: static; }
  .site-header__inner { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 12px 8px; }
  .site-logo img { width: 210px; }
  .global-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
  .global-nav a {
    display: flex; align-items: center; justify-content: center; min-height: 36px;
    font-size: 13.5px; line-height: 1.3; text-align: center;
    border-radius: 4px; padding: 4px 6px;
  }
  .footer-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .footer-nav li + li::before { content: none; }
  .footer-nav a { display: block; padding: 6px 0; }

  .notice-top { font-size: 16px; margin-top: 28px; }
  .quick-links { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .quick-links a { min-height: 44px; }
  .news-box { padding: 16px 14px 24px; }
  .news-box h2 { font-size: 17px; }

  .doc-main { grid-template-columns: 1fr; }
  .doc-photo img { height: auto; }
  .doc-text { padding: 14px 16px 18px; }
  .career { padding: 12px 16px 20px; }

  .acc > summary { padding: 18px 44px 18px 8px; }
  .acc > summary::after { right: 14px; }
  .acc-body { padding: 0 8px 22px; }
  .acc-body.has-img { grid-template-columns: 1fr; gap: 16px; }
  .acc-figs img { max-height: 420px; width: auto; display: block; margin: 0 auto; }

  .access-box { grid-template-columns: 1fr; padding: 18px; }
  .gmap iframe { height: 320px; }
  .hours-table-wrap { padding: 12px 8px 10px; }
  .hours-table th, .hours-table td { border-width: 1.5px; }
  .heading-updown { font-size: 22px; }
}
