/* 江戸川みずべ内科・ファミリークリニック LP
   カラー: primary #005a9c / accent #f5a623（小さな文字には使わない）/
   primary-light #78B4F6（1-a: 明るい水色。面・帯のみ、文字色には使わない）/
   background #ffffff・#FCFCFC / body #333 / headings #222
   Font: Noto Sans JP（システムフォント fallback） */
:root {
  --primary: #005a9c;
  --primary-dark: #004a80;
  --primary-light: #78b4f6;
  --accent: #f5a623;
  --bg: #ffffff;
  --bg-alt: #fcfcfc;
  --text: #333333;
  --heading: #222222;
  --border: #d9e2ea;
  --header-height: 56px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--heading); line-height: 1.4; }
h2 { font-size: 1.75rem; text-align: center; margin: 0 0 1.25rem; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 2-a: セクション間隔を詰める */
.section { padding: 40px 5%; background: var(--bg); }
.section:nth-of-type(even) { background: var(--bg-alt); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 100;
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  overflow: visible;
}
/* 3-e: 明るいヒーロー画像でも白文字が読めるよう、最上部だけ暗いグラデーションを敷く */
.site-header:not(.is-scrolled) {
  background: linear-gradient(rgba(0, 30, 55, 0.45), rgba(0, 30, 55, 0));
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}
/* 3-a/3-c: 左の余白15px・右の余白10px */
.header-inner {
  height: 100%;
  padding: 0 10px 0 15px;
  display: flex;
  align-items: center;
  gap: 16px;
}
/* 3-d: ロゴは360×80表示。ヘッダー高さ（56px）からはみ出してよい */
.site-logo {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 4px 8px;
  line-height: 0;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 4px;
}
.site-logo img { width: min(360px, 52vw); height: auto; max-height: 80px; object-fit: contain; }

.global-nav { display: none; margin-left: auto; }
.global-nav ul {
  display: flex; gap: 22px;
  list-style: none; margin: 0; padding: 0;
}
.global-nav a {
  color: var(--heading);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.global-nav a:hover { color: var(--primary); text-decoration: underline; }
.site-header:not(.is-scrolled) .global-nav a { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.65); }

/* 3-b: ヘッダー右の電話・WEB予約（ヒーローのボタンの省スペース版）。PCのみ表示 */
.header-cta { display: none; gap: 8px; align-items: center; flex: 0 0 auto; }
/* 1-b: 左右の余白を詰めてコンパクトに、角Rはきつめに。
   1-c: ヘッダー高さいっぱいにせず上下に余白を残す（電話は2行表示） */
.btn-small {
  white-space: nowrap;
}
/* ヘッダー内のボタンは .btn（ヒーロー用）より後に書くと負けるため、
   .header-cta .btn で強めに指定して確実にコンパクトにする */
.header-cta .btn {
  padding: 3px 12px;
  min-width: 0;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.25;
  border-radius: 7px;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  margin-left: auto;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.hamburger span { display: block; height: 2px; background: var(--heading); }

/* 4-b: 最上部（未スクロール）ではロゴとハンバーガーをコーポレートカラーの1px枠で囲み、
   スクロールして背景色が出たら枠を消す */
.site-header:not(.is-scrolled) .site-logo,
.site-header:not(.is-scrolled) .hamburger {
  outline: 1px solid var(--primary);
  outline-offset: 0;
}

/* 4-c: 全画面メニューは背景を僅かに透過＋ぼかし */
.fullscreen-menu {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0, 90, 156, 0.94);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #fff;
  padding: 80px 24px 24px;
  overflow-y: auto;
}
.fullscreen-menu[hidden] { display: none; }
.fullscreen-menu ul { list-style: none; margin: 0; padding: 0; }
.fullscreen-menu li { border-bottom: 1px solid rgba(255,255,255,0.3); }
.fullscreen-menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 16px 4px;
}
.menu-close {
  position: absolute; top: 8px; right: 12px;
  width: 48px; height: 48px;
  background: transparent; border: none;
  color: #fff; font-size: 2rem; cursor: pointer;
}
.menu-contact { margin-top: 24px; font-size: 1.05rem; }
.menu-contact a { display: inline; padding: 0; font-size: 1.25rem; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--primary);
  padding: calc(var(--header-height) + 32px) 5% 72px;
  overflow: hidden;
}
/* 5-a: 3枚をフェードで切り替え */
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.is-active { opacity: 1; }
/* 5-b: 白ベタをやめ、半透明＋ぼかしの軽いパネルに */
.hero-inner {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 720px;
  box-shadow: 0 8px 32px rgba(0, 40, 70, 0.18);
}
.hero-clinic-name { font-weight: 700; color: var(--primary); margin: 0 0 8px; }
.hero-tagline { font-size: 1.8rem; margin: 0 0 12px; }
.hero-specialties { margin: 0 0 24px; font-weight: 500; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  min-width: 260px;
  text-align: center;
}
.btn-tel { background: var(--primary); color: #fff; }
.btn-tel:hover { background: var(--primary-dark); }
.btn-web { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
/* 5-a: 現在の画像を示す半透明の小さい丸ドット（クリックで切替） */
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 6px; height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.hero-dot.is-active { background: #fff; box-shadow: 0 0 0 2px rgba(0, 90, 156, 0.55); }
/* 5-c: 診療時間オーバーレイ（PCは右下に重ねる／スマホは下に配置） */
.hero-hours {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  padding: 0 14px 10px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 8px 28px rgba(0, 40, 70, 0.2);
}
.hero-hours::before {
  content: "";
  display: block;
  height: 10px;
  margin: 0 -14px 8px;
  background: var(--primary-light);
}
.hero-hours-note { margin: 4px 0 0; font-size: 0.85rem; }
.hero { flex-direction: column; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

/* ---------- お知らせ ---------- */
.news-section { display: flex; justify-content: center; }
.news-box {
  width: 80%;
  max-width: 960px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 28px 24px;
  background: #fff;
}
/* 6-a: スマホでは左右マージン合計5%程度まで広げる */
@media (max-width: 767px) {
  .news-box { width: 95%; padding: 24px 16px; }
}
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-meta { margin: 0 0 4px; font-size: 0.9rem; }
.news-meta time { font-weight: 700; color: var(--primary); }
.news-tags { margin-left: 12px; }
.news-title { margin: 0 0 8px; font-size: 1.15rem; }
.news-summary { margin: 0 0 8px; }
.news-more {
  background: none; border: none; padding: 0;
  color: var(--primary); font: inherit; font-weight: 700;
  text-decoration: underline; cursor: pointer;
}

/* モーダル */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 12px;
  max-width: 720px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  padding: 32px 24px; position: relative;
}
.modal-close {
  position: absolute; top: 8px; right: 12px;
  width: 44px; height: 44px;
  background: none; border: none;
  font-size: 1.8rem; cursor: pointer; color: var(--heading);
}
.news-modal-date { color: var(--primary); font-weight: 700; margin: 0; }
.news-modal-date .news-tags { color: var(--text); font-weight: 500; }
.news-modal-author { font-size: 0.9rem; text-align: right; }

/* ---------- クリニック紹介 ---------- */
.intro-grid { max-width: 1100px; margin: 0 auto; }
.intro-image img { border-radius: 12px; width: 100%; }
.intro-text h2 { text-align: left; }
.intro-lead { font-size: 1.2rem; }

/* フェードイン */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 診療内容（7-a: グリッド） ---------- */
.services-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
/* スマホは1列。ただし縦に広がりすぎないよう、画像左・文右の compact カードにする */
.service-card {
  display: flex;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  padding: 12px;
  align-items: flex-start;
}
.service-card img {
  width: 110px; height: 84px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 auto;
}
.service-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.service-card p { margin: 0; font-size: 0.92rem; line-height: 1.65; }
@media (min-width: 768px) {
  /* PCは横3つ（3＋2）。カードは画像上・文下に切り替える */
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .service-card { flex-direction: column; padding: 0; gap: 0; }
  .service-card img { width: 100%; height: 150px; border-radius: 0; }
  .service-card-body { padding: 14px 18px 18px; }
  .service-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
  .service-card p { font-size: 0.95rem; }
}

/* ---------- 診療時間・アクセス ---------- */
.access-grid { max-width: 1100px; margin: 0 auto; }
.hours-table { border-collapse: collapse; width: 100%; margin-bottom: 12px; background: #fff; }
.hours-table th, .hours-table td {
  border: 1px solid var(--border);
  padding: 8px 4px; text-align: center; font-size: 0.92rem;
}
.hours-table thead th { background: var(--primary); color: #fff; }
.hours-table tbody th { background: #eef4f9; white-space: nowrap; }
.hours-table--compact { margin-bottom: 4px; }
/* 2-a: 「診療時間」の見出し文言を消した分、表の文字を少し大きく */
.hours-table--compact th, .hours-table--compact td { padding: 4px 3px; font-size: 0.86rem; }
.access-tel { font-size: 1.15rem; font-weight: 700; }
.access-list { padding-left: 1.2em; }
.map-frame { width: 100%; height: 300px; display: block; border: 0; border-radius: 10px; margin: 8px 0 12px; }

/* ---------- 院長紹介（8-a: PCでは画像を右に） ---------- */
.doctor-section { max-width: 1000px; margin-left: auto; margin-right: auto; }
.doctor-grid { display: flex; flex-direction: column; gap: 20px; }
.doctor-image { order: -1; }
.doctor-image img { border-radius: 12px; width: 100%; max-width: 420px; margin: 0 auto; }
.doctor-greeting-lead { font-size: 1.15rem; font-weight: 700; color: var(--heading); }
.doctor-name { font-weight: 700; }
.doctor-career { padding-left: 1.2em; }
@media (min-width: 768px) {
  .doctor-grid { flex-direction: row; gap: 40px; align-items: flex-start; }
  .doctor-text { flex: 1 1 auto; }
  .doctor-image { order: 0; flex: 0 0 300px; }
  .doctor-image img { margin: 0; }
}

/* ---------- フッター（9-a: PCはコーポレートカラーの20px帯＋サンプル注記のみ） ---------- */
.site-footer {
  background: var(--primary);
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.footer-sample-note {
  margin: 0;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* ---------- スマホ用固定アクションバー（10番） ---------- */
.sp-action-bar { display: none; }
@media (max-width: 1023px) {
  .sp-action-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 50px;
    background: var(--primary);
    z-index: 150;
    align-items: stretch;
  }
  .sp-action {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
  }
  .sp-action:last-child { border-right: none; }
  .sp-action svg { color: #fff; flex: 0 0 auto; }
  /* 10-c: アクセントはオレンジ #f5a623（電話ボタンの丸背景に使う） */
  .sp-action-tel svg {
    background: var(--accent);
    border-radius: 50%;
    padding: 5px;
    width: 30px; height: 30px;
    box-sizing: border-box;
  }
  body { padding-bottom: 50px; }
  /* 9-a: スマホではサンプル注記の帯は出さない */
  .site-footer { display: none; }
}

/* ---------- タブレット〜PC ---------- */
@media (min-width: 768px) {
  .section { padding: 44px 5%; }
  .hero-tagline { font-size: 2.4rem; }
  .hero-cta { flex-direction: row; justify-content: center; }
  .intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .access-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
  /* 5-c: PCでは診療時間表をヒーロー右下にオーバーレイ */
  .hero-hours {
    position: absolute;
    right: 24px;
    bottom: 24px;
    margin-top: 0;
    width: 400px;
  }
  .hero-dots { bottom: 18px; }
}

/* 4-a: スマホのロゴサイズは従来どおり（360px化はPCのみ） */
@media (max-width: 1023px) {
  .site-logo img { width: 180px; max-height: 44px; }
  .site-logo { align-self: center; margin-top: 0; }
}

@media (min-width: 1024px) {
  .global-nav { display: block; }
  .header-cta { display: flex; }
  .hamburger { display: none; }
  .fullscreen-menu { display: none !important; }
}
/* 幅の狭いPCではロゴを少し縮めてナビとボタンの場所を確保する */
@media (min-width: 1024px) and (max-width: 1180px) {
  .site-logo img { width: 280px; }
  .global-nav ul { gap: 14px; }
}
