/* =========================================================
   たかお歯科医院  style.css
   ブランドカラー: 看板の緑 + あたたかいクリーム
   ========================================================= */
:root {
  --green: #2f8f5b;
  --green-dark: #216b43;
  --green-light: #e6f3ec;
  --green-pale: #f3f9f5;
  --cream: #fbf8f2;
  --sand: #f1ebe0;
  --ink: #2b2b2b;
  --ink-soft: #5b5b5b;
  --line: #e2ddd3;
  --white: #ffffff;
  --accent: #e8a33d;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(43, 43, 43, 0.08);
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.4; margin: 0; }
p { margin: 0 0 1em; }
p, li, dd, h1, h2, h3, figcaption { line-break: strict; word-break: auto-phrase; }
h1, h2, h3 { text-wrap: balance; }
/* 句読点までを1つのまとまりにし、行の途中で切れにくくする */
.ph { display: inline-block; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: 88px 0; }
.section-alt { background: var(--white); }
.section-green { background: var(--green-pale); }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head .en {
  display: inline-block;
  font-family: var(--font-head);
  color: var(--green);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head h2::after {
  content: "";
  display: block;
  width: 48px; height: 4px;
  background: var(--accent);
  border-radius: 4px;
  margin: 14px auto 0;
}
.section-head .lead { color: var(--ink-soft); margin-top: 18px; max-width: 640px; margin-inline: auto; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.04em; }
.logo-text small { display: block; font-size: 0.65rem; color: var(--green); letter-spacing: 0.2em; font-weight: 500; }

.nav ul { display: flex; gap: 26px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--green); transform: scaleX(0); transition: transform .2s; transform-origin: left;
}
.nav a:hover::after { transform: scaleX(1); }

.tel-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(47, 143, 91, 0.3);
  transition: background .2s, transform .2s;
}
.tel-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.tel-btn svg { width: 18px; height: 18px; }
.tel-btn small { font-size: 0.7rem; font-weight: 500; display: block; line-height: 1; opacity: .9; }

.menu-btn {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.menu-btn span { display: block; width: 26px; height: 3px; background: var(--green-dark); margin: 5px 0; border-radius: 3px; transition: .25s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(520px, 78vh, 760px); display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(251,248,242,0.95) 0%, rgba(251,248,242,0.75) 45%, rgba(251,248,242,0.1) 100%);
}
.hero-inner { position: relative; padding: 80px 0; }
.hero-badge {
  display: inline-block; background: var(--white); color: var(--green-dark);
  border: 1px solid var(--green); border-radius: 999px; padding: 4px 16px;
  font-size: 0.85rem; font-weight: 700; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); line-height: 1.5; letter-spacing: 0.02em; }
.hero h1 .accent { color: var(--green); }
.hero p { font-size: 1.05rem; color: var(--ink-soft); margin: 22px 0 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(47,143,91,.3); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-outline { background: var(--white); color: var(--green-dark); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green-light); transform: translateY(-2px); }

/* ---------- Quick info strip ---------- */
.info-strip { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-strip .container { display: grid; grid-template-columns: repeat(3, 1fr); }
.info-item { padding: 22px 20px; display: flex; gap: 14px; align-items: flex-start; }
.info-item + .info-item { border-left: 1px solid var(--line); }
.info-item .icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--green-light); color: var(--green); display: grid; place-items: center; }
.info-item .icon svg { width: 24px; height: 24px; }
.info-item h3 { font-size: 0.85rem; color: var(--green); letter-spacing: .1em; }
.info-item p { margin: 2px 0 0; font-weight: 500; }
.info-item p small { display: block; color: var(--ink-soft); font-weight: 400; font-size: .85rem; }

/* ---------- News ---------- */
.news-box {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 300px 1fr; overflow: hidden;
}
.news-box .poster { background: var(--sand); }
.news-box .poster img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 40px 44px; }
.news-body .date { color: var(--green); font-weight: 700; font-size: .9rem; letter-spacing: .1em; }
.news-body h3 { font-size: 1.5rem; margin: 8px 0 16px; }
.news-body .names { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.news-body .names span {
  background: var(--green-light); color: var(--green-dark); border-radius: 999px;
  padding: 6px 18px; font-weight: 700;
}
.news-body .quote {
  border-left: 4px solid var(--accent); padding: 6px 16px; color: var(--ink-soft);
  background: var(--cream); border-radius: 0 10px 10px 0; margin-top: 20px;
}

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .25s;
}
.feature:hover { transform: translateY(-4px); }
.feature img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.feature-body { padding: 26px 26px 30px; }
.service-details { display: grid; gap: 22px; margin-top: 22px; }
.service-details .feature { box-shadow: none; border: 1px solid var(--line); }
.service-details .feature:hover { transform: none; }
.service .service-text p + p, .service p + p { margin-top: .6em; }
.feature-wide { grid-column: 1 / -1; flex-direction: row; }
.feature-wide .feature-photos { flex: 0 0 52%; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.feature-wide .feature-photos img { aspect-ratio: auto; height: 100%; min-height: 300px; }
.feature-wide .feature-body { padding: 34px 36px; align-self: center; }
.feature-wide .feature-body p + p { margin-top: .9em; }
.feature-one .feature-photos { flex-basis: 46%; grid-template-columns: 1fr; }
.feature-one .feature-photos img { min-height: 0; aspect-ratio: 3 / 2; }
.feature-single { flex-direction: row-reverse; }
.feature-single .feature-photos { grid-template-columns: 1fr; align-self: center; }
.feature-single .feature-photos img { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
.feature .feature-note { font-size: .85rem; padding-top: .9em; border-top: 1px solid var(--line); }
.feature .num { font-family: var(--font-head); color: var(--accent); font-weight: 700; font-size: .9rem; letter-spacing: .15em; }
.feature h3 { font-size: 1.2rem; margin: 4px 0 10px; }
.feature p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.service {
  background: var(--white); border-radius: var(--radius); padding: 30px 30px 26px;
  border: 1px solid var(--line); display: flex; gap: 20px; align-items: flex-start;
}
.service-full { grid-column: 1 / -1; }
.service > div:last-child { flex: 1; min-width: 0; }
.service .feature-note { font-size: .85rem; margin-top: .9em; padding-top: .9em; border-top: 1px solid var(--line); }
.service-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; max-width: 760px; }
.service-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.service-photos.single { grid-template-columns: 1fr; max-width: 560px; }
.service-photos.single img { aspect-ratio: 3 / 2; }
.service-photos.natural img { aspect-ratio: auto; height: auto; object-fit: contain; }
.service .icon { width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--green-light); color: var(--green); display: grid; place-items: center; }
.service .icon svg { width: 30px; height: 30px; }
.service h3 { font-size: 1.15rem; margin-bottom: 8px; }
.service p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ---------- Doctor / Staff ---------- */
.doctor { max-width: 760px; margin: 0 auto; background: var(--cream); border-radius: var(--radius); padding: 40px 44px; border-left: 6px solid var(--green); }
.doctor .role { color: var(--green); font-weight: 700; letter-spacing: .1em; font-size: .9rem; }
.doctor h3 { font-size: 1.55rem; margin: 4px 0 2px; white-space: nowrap; }
.doctor h3 small { font-size: 1rem; color: var(--ink-soft); font-weight: 500; margin-left: 12px; }
.doctor-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 28px; }
.doctor-list li { display: flex; flex-direction: column; }
.doctor .univ { color: var(--ink-soft); font-size: .92rem; }
.doctor .message { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.doctor .message p { margin-bottom: .8em; }

.staff-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin: 60px auto 0; max-width: 760px; }
.staff-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.staff-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.staff-grid figcaption { padding: 14px 18px; font-size: .9rem; color: var(--ink-soft); text-align: center; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 14px; }
.gallery figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; }
.gallery { grid-auto-flow: dense; }
.gallery figure.wide, .gallery figure.wide-pc { grid-column: span 2; }
.gallery figure.tall { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }

/* ---------- Hours / Access ---------- */
.access { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.card { background: var(--white); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.2rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.card h3::before { content: ""; width: 8px; height: 26px; border-radius: 4px; background: var(--green); }

.hours { width: 100%; border-collapse: collapse; text-align: center; font-size: .95rem; }
.hours th, .hours td { padding: 12px 6px; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 700; color: var(--ink-soft); font-size: .85rem; }
.hours td:first-child, .hours th:first-child { text-align: left; white-space: nowrap; font-weight: 700; }
.hours .on { color: var(--green); font-weight: 700; font-size: 1.1rem; }
.hours .off { color: #c9c3b8; }
.hours .tri { color: var(--accent); }
.hours .sun, .hours .hol { color: #d0605c; }
.hours .sat { color: #3b7dd8; }
.hours-note { margin-top: 14px; font-size: .88rem; color: var(--ink-soft); }
.hours-note li { padding-left: 1.2em; text-indent: -1.2em; }
.hours-note li::before { content: "※ "; }

.dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px 16px; font-size: .95rem; }
.dl dt { color: var(--green); font-weight: 700; }
.dl dd { margin: 0; }
.map { margin-top: 22px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 300px; border: 0; display: block; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%); color: #fff; text-align: center; padding: 70px 0; }
.cta h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 8px; }
.cta p { opacity: .9; margin-bottom: 26px; }
.cta .tel { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; letter-spacing: .04em; }
.cta .tel svg { width: 36px; height: 36px; }
.cta .hours-inline { font-size: .95rem; opacity: .9; margin-top: 10px; }

/* ---------- Footer ---------- */
.footer { background: #2b332e; color: #d5dbd7; padding: 50px 0 30px; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer .logo-text { color: #fff; }
.footer .logo-text small { color: #9ad1b1; }
.footer address { font-style: normal; margin-top: 12px; line-height: 1.8; }
.footer nav ul { display: flex; gap: 20px; flex-wrap: wrap; }
.footer nav a { color: #d5dbd7; text-decoration: none; }
.footer nav a:hover { color: #fff; }
.copyright { text-align: center; margin-top: 36px; font-size: .8rem; color: #9aa39e; }

/* ---------- Mobile fixed tel bar ---------- */
.mobile-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--green); color: #fff; padding: 12px 16px;
  box-shadow: 0 -6px 20px rgba(0,0,0,.15);
}
.mobile-bar a { color: #fff; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.mobile-bar svg { width: 22px; height: 22px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .features, .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-wide { flex-direction: column; }
  .feature-wide .feature-photos { flex: none; }
  .feature-wide .feature-photos img { min-height: 0; aspect-ratio: 4 / 3; height: auto; }
  .feature-single .feature-photos img { aspect-ratio: 3 / 2; }
  .feature-one .feature-photos img { aspect-ratio: 3 / 2; }
  .access { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  /* backdrop-filter があると fixed の基準がヘッダーになりメニュー背景が欠けるため、スマホでは無効化 */
  .header { backdrop-filter: none; background: var(--cream); }
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    height: calc(100vh - 72px); height: calc(100dvh - 72px);
    background: var(--cream); transform: translateX(100%); transition: transform .3s;
    padding: 30px 8% 100px; overflow-y: auto; z-index: 70;
  }
  .menu-open { overflow: hidden; }
  .menu-open .nav { transform: none; }
  .nav ul { flex-direction: column; gap: 6px; }
  .nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a::after { display: none; }
  .header .tel-btn { display: none; }
  .menu-btn { display: block; }
  .hero { min-height: auto; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(251,248,242,0.74) 0%, rgba(251,248,242,0.60) 55%, rgba(251,248,242,0.22) 100%); }
  .hero-bg img { object-position: 42% 30%; }
  .hero h1 { font-size: clamp(1.4rem, 7.1vw, 1.9rem); text-shadow: 0 0 14px rgba(251,248,242,.95), 0 0 4px rgba(251,248,242,.9); }
  .hero p { color: var(--ink); font-weight: 500; text-shadow: 0 0 10px rgba(251,248,242,1), 0 0 3px rgba(251,248,242,1); }
  .hero-inner { padding: 60px 0 50px; }
  .info-strip .container { grid-template-columns: 1fr; width: 100%; }
  .info-item + .info-item { border-left: 0; border-top: 1px solid var(--line); }
  .news-box { grid-template-columns: 1fr; }
  .news-box .poster img { max-height: 420px; object-position: top; }
  .news-body { padding: 28px 24px; }
  .features, .services, .staff-grid { grid-template-columns: 1fr; }
  .service { flex-direction: column; gap: 14px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery figure.tall { grid-row: span 1; }
  .gallery figure.wide-pc { grid-column: span 1; }
  .card { padding: 24px 20px; }
  /* スマホでは句読点ごとの改行をやめ、文章を枠の幅いっぱいに流す（右側の空きと不自然な折り返しを防ぐ） */
  p .ph, li .ph, small .ph { display: inline; }
  p, li, dd, small { text-wrap: wrap; word-break: normal; }
  .ph { text-wrap: wrap; }
  h1 .ph, h2 .ph, h3 .ph { text-wrap: balance; }
  .feature-wide .feature-body { padding: 26px 26px 30px; }
  .doctor { padding: 28px 22px; }
  .doctor-list { grid-template-columns: 1fr; }
  .hours { font-size: .85rem; }
  .hours th, .hours td { padding: 10px 3px; }
  .mobile-bar { display: block; }
  body { padding-bottom: 62px; }
  .footer-inner { flex-direction: column; }
}

/* ---------- hero-mobile-v2: スマホのトップ（写真をはっきり見せ、文字は上、ボタンは下に横並び） ---------- */
@media (max-width: 560px) {
  .hero { min-height: 132vw; align-items: stretch; background: #f6f1e8; }
  .hero-bg img { position: absolute; left: 0; bottom: 0; width: 100%; height: 86.7vw; object-position: 43% 50%; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(246,241,232,1) 0%, rgba(246,241,232,1) 33.5%, rgba(246,241,232,0.6) 38%, rgba(246,241,232,0) 46%); }
  .hero-inner { display: flex; flex-direction: column; padding: 16px 0 16px; }
  .hero-badge { align-self: flex-start; margin-bottom: 10px; font-size: .78rem; padding: 3px 14px; }
  .hero h1 { line-height: 1.38; }
  .hero p { font-size: .9rem; line-height: 1.7; margin: 10px 0 0; }
  .hero p .ph { display: inline-block; }
  .hero-actions { margin-top: auto; flex-wrap: nowrap; gap: 10px; }
  .hero-actions .btn { flex: 1 1 0; padding: 13px 6px; font-size: .88rem; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
  .hero-actions .btn-primary { background: var(--green-dark); }
}
