/* =========================================================
   池田内科医院  静的HTML版の追加スタイル（2026.11）
   旧テーマの style.css の後に読み込む。旧テーマの見た目はそのまま、
   変えたところ・足したところだけをここに書く。
   ========================================================= */

/* ---------- TOPのFV（写真とキャッチコピー）----------
   旧：写真を全面に敷き、左下に白いカードを重ねていた → 副院長の体が隠れていた
   新：PC・タブレットは「左にキャッチコピー／右に写真」の2カラム。写真に文字を重ねない
       スマホは写真（4:3）の下にキャッチコピー                                   */
.hero-full {
  height: auto; overflow: hidden;
  display: grid; grid-template-columns: minmax(400px, 37%) 1fr; align-items: stretch;
  background: linear-gradient(160deg, #f3f9f9 0%, #e9f4f4 60%, #e2efef 100%);
}
.hero-full::before { /* 左下のうすい丸（飾り） */
  content: ""; position: absolute; left: -120px; bottom: -160px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(81,176,178,.10), rgba(81,176,178,0) 70%);
  pointer-events: none;
}
.hero-visual {
  grid-column: 2; grid-row: 1; position: relative; overflow: hidden;
  height: clamp(460px, 41vw, 720px);
  border-radius: 0 0 0 56px;
}
.hero-full .hero-img-slide { background-size: cover; }
.hero-card {
  grid-column: 1; grid-row: 1; position: relative; left: auto; bottom: auto; z-index: 2;
  align-self: center; max-width: none;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0;
  padding: 40px clamp(28px, 3.4vw, 64px) 40px max(48px, calc((100vw - 1680px) / 2 + 48px));
}
.hero-card .hero-label { position: relative; padding-left: 40px; }
.hero-card .hero-label::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 28px; height: 1px; background: var(--accent);
}
.hero-card h1, .hero-card h2 {
  font-size: clamp(27px, 2.35vw, 38px); line-height: 1.6; color: var(--heading); letter-spacing: .06em;
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", serif; font-weight: 400;
}
.hero-card .hero-sub { font-size: clamp(14px, 1.05vw, 16px); }
.hero-foot { display: flex; align-items: center; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.hero-card .hero-dots { margin-top: 0; }
.hero-sched {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .06em;
  padding: 12px 22px 12px 24px; border-radius: 40px; box-shadow: 0 6px 18px rgba(61,138,140,.22);
  transition: background .2s, transform .2s;
}
.hero-sched::after { content: "→"; font-weight: 400; }
.hero-sched:hover { background: var(--accent-deep); color: #fff; transform: translateY(-1px); }

@media (min-width: 861px) and (max-width: 1200px) {
  .hero-full { grid-template-columns: 44% 1fr; }
  .hero-card { padding-left: 32px; padding-right: 28px; }
  .hero-card .hero-sub br { display: none; }
  .hero-visual { height: clamp(420px, 48vw, 560px); border-radius: 0 0 0 40px; }
  .page-top .hero-visual { height: calc(clamp(420px, 48vw, 560px) + 96px); }
}

/* ---------- ヘッダー（2026.11.16 追加） ----------
   ・右上の電話番号：画面の角にくっついた四角 → 角から離した角丸のBOXに（全ページ共通）
   ・TOPだけ：一番上ではヘッダーを透明にして写真をヘッダーの裏まで伸ばす。
     スクロールしてヘッダーが追いかけてくるときは半透明の白（main.js が .is-scrolled を付ける） */
.h-tel-block {
  top: 50%; right: 16px; bottom: auto; transform: translateY(-50%); padding: 10px 22px 9px;
  border-radius: 12px; background: rgba(81,176,178,.94);
  box-shadow: 0 6px 18px rgba(61,138,140,.22);
}
.sub-header .header-nav a.h-tel-num { flex-direction: row; gap: 0; padding: 0; }
.sub-header { transition: background-color .3s, border-color .3s, box-shadow .3s; }
.page-top .sub-header {
  background: rgba(255,255,255,0); border-bottom-color: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.page-top .sub-header.is-scrolled {
  background: rgba(255,255,255,.72); border-bottom-color: var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(0,0,0,.04);
}
@media (min-width: 1201px) and (max-width: 1360px) {
  .h-tel-block { right: 12px; padding: 9px 16px 8px; }
}

/* TOPのFVをヘッダーの裏（画面の一番上）から始める */
.page-top .hero-full { margin-top: 0; }
.page-top .hero-visual { height: calc(clamp(460px, 41vw, 720px) + 96px); }
.page-top .hero-card { padding-top: 136px; }
/* 写真の上の方を少し白くして、ヘッダーの文字を読みやすく */
.hero-visual::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 150px; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.6), rgba(255,255,255,0));
}

/* ---------- 検査日カレンダー（calendar.js が作る） ---------- */
.mini-cal td.hol { color: #d4a8a8; }
.mini-cal td.exam.hol { color: #fff; }
.mini-cal td.today { box-shadow: inset 0 0 0 2px rgba(81,176,178,.55); }
.mini-cal td.exam.today { box-shadow: 0 2px 6px rgba(108,181,173,.25), inset 0 0 0 2px rgba(255,255,255,.7); }
.mini-cal td.past { opacity: .45; }
.mini-cal td.exam.past { background: #a9cfd0; box-shadow: none; }
.mini-cal { position: relative; }
.mini-cal.undecided table { opacity: .35; }
.mini-cal .cal-undecided {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 18px;
  font-size: 14px; color: var(--text-light); white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.cal-fallback { grid-column: 1 / -1; text-align: center; color: var(--text-light); font-size: 15px; }
.schedule-legend .dot.hol { background: none; color: #d4a8a8; width: auto; height: auto; font-size: 13px; }
.schedule-legend .sep { margin: 0 8px; opacity: .4; }

/* ---------- お知らせ（news.js） ---------- */
.news-list li.news-fallback { display: block; text-align: center; border-bottom: none; }
.news-cat:empty { display: none; }
.news-article { scroll-margin-top: 120px; }
.news-article-body a { text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.news-article-body strong { color: var(--heading); }
.news-imgs { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.news-imgs img { max-width: min(100%, 640px); height: auto; border: 1px solid var(--border); border-radius: 4px; }
.news-imgs figure { margin: 0; }
.news-imgs figcaption { font-size: 13px; color: var(--text-light); margin-top: 6px; }
.news-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.news-files a {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700;
  border: 1px solid var(--accent); color: var(--accent-deep); background: #fff;
  padding: 9px 18px; border-radius: 30px; text-decoration: none;
}
.news-files a::before {
  content: "PDF"; font-size: 10px; letter-spacing: .04em; color: #fff; background: #d9534f;
  border-radius: 3px; padding: 1px 5px;
}
.news-files a:hover { background: var(--accent-pale); }
.news-filter { margin: 0 0 32px; font-size: 15px; color: var(--text-light); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.news-filter a { font-size: 14px; }
.news-empty { padding: 40px 0; text-align: center; color: var(--text-light); }

/* ---------- 施設基準・院内掲示ページ ---------- */
.kijun { scroll-margin-top: 110px; }
.kijun-lead { font-size: 17px; color: var(--heading); margin: 8px 0 28px; line-height: 2; }
.kijun-block { padding: 26px 0; border-top: 1px dashed var(--border); }
.kijun-block:first-of-type { border-top: none; padding-top: 0; }
.kijun-block h3 {
  font-size: 18px; font-weight: 700; color: var(--heading); margin-bottom: 12px; line-height: 1.6;
  padding-left: 16px; border-left: 4px solid var(--accent);
}
.kijun-block p, .kijun-dl dd, .kijun-items dd, .kijun-num li { font-size: 16px; color: var(--text-light); line-height: 2; }
.kijun-cols { list-style: none; columns: 2; column-gap: 40px; }
.kijun-cols li { break-inside: avoid; font-size: 15.5px; padding: 6px 0 6px 18px; position: relative; line-height: 1.7; color: var(--text); }
.kijun-cols li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.kijun-dots { list-style: none; }
.kijun-dots li { font-size: 16px; color: var(--text-light); line-height: 2; padding-left: 18px; position: relative; }
.kijun-dots li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.kijun-dl dt { font-weight: 700; color: var(--heading); font-size: 16px; margin-top: 14px; }
.kijun-dl dt:first-child { margin-top: 0; }
.kijun-dl dd { margin-left: 1.3em; }
.kijun-more { margin-top: 10px; font-size: 15px !important; }
.kijun-items { border-top: 1px solid var(--border); }
.kijun-item { padding: 18px 4px; border-bottom: 1px solid var(--border); }
.kijun-items dt { font-weight: 700; color: var(--heading); font-size: 16.5px; line-height: 1.7; }
.kijun-items dt .pt {
  display: inline-block; margin-left: 12px; font-size: 13px; font-weight: 700; color: var(--accent-deep);
  background: var(--accent-pale); border-radius: 20px; padding: 1px 12px; vertical-align: 2px; white-space: nowrap;
}
.kijun-items dd { margin-top: 6px; }
.kijun-kana { list-style: none; margin: 4px 0 8px; }
.kijun-kana li { display: flex; gap: 10px; }
.kijun-kana li span { flex: 0 0 auto; font-weight: 700; color: var(--accent-deep); }
.kijun-num { list-style: none; counter-reset: k; }
.kijun-num li { counter-increment: k; position: relative; padding: 14px 0 14px 46px; border-bottom: 1px dashed var(--border); }
.kijun-num li::before {
  content: counter(k); position: absolute; left: 0; top: 16px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; line-height: 30px; text-align: center;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.kijun-date { text-align: right; margin-top: 20px; font-size: 15px; color: var(--text-light); }
.kijun-date a { color: inherit; }

/* ---------- フッター下・スマホメニューの「施設基準・院内掲示」 ---------- */
.footer-copy-bar { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer .footer-copy-bar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a.fi-tel { text-decoration: none; }
.mobile-menu a.mm-small { font-size: 14px !important; opacity: .8; }
a.mm-tel { text-decoration: none; }

/* ---------- スマホ（旧テーマの切り替え幅 860px に合わせる） ---------- */
@media (max-width: 860px) {
  .hero-full { display: block; margin-top: 60px; height: auto; background: #f3f9f9; }
  .hero-full::before { display: none; }
  .hero-visual { height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
  /* スマホも写真を上のバーの裏から（バーの高さ60px分を足す） */
  .page-top .hero-full { margin-top: 0; }
  .page-top .hero-visual { aspect-ratio: auto; height: calc(75vw + 60px); }
  .hero-visual::after { height: 90px; }
  .page-top .hero-card { padding-top: 26px; }
  .hero-card {
    display: grid !important; position: relative; left: auto; right: auto; bottom: auto;
    margin: -24px 16px 0; padding: 26px 22px 22px; border-radius: 16px;
    background: #fff; box-shadow: 0 8px 28px rgba(61,138,140,.12);
  }
  .hero-card .hero-label { font-size: 10.5px; letter-spacing: .2em; margin-bottom: 10px; padding-left: 30px; }
  .hero-card .hero-label::before { width: 20px; }
  .hero-card h1, .hero-card h2 { font-size: clamp(21px, 6vw, 25px); }
  .hero-card .hero-sub { font-size: 14px; margin-top: 10px; line-height: 1.9; }
  .hero-card .hero-sub br { display: none; }
  .hero-foot { margin-top: 18px; gap: 16px; justify-content: space-between; }
  .hero-sched { font-size: 14px; padding: 10px 18px; }
  .hero-full + .appeal { padding-top: 40px; }
  /* TOP「胃がん・大腸がんの早期発見のために」の写真はスマホでは出さない（すぐ下の内視鏡検査のカードに同じ写真があるため） */
  .appeal-photo { display: none; }

  /* 日程が未定の月は、スマホでは表を出さずに案内だけ（縦に長くなりすぎないように） */
  .mini-cal.undecided table { display: none; }
  .mini-cal .cal-undecided { position: static; transform: none; display: block; text-align: center; font-size: 13px; white-space: normal; box-shadow: none; }
  /* フッターの診療時間表が画面からはみ出していた（旧テーマのまま）→ 文字と余白を詰める */
  .footer-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .site-footer table.hours th, .site-footer table.hours td { padding: 10px 2px; }
  .site-footer table.hours thead th { font-size: 13px; padding-bottom: 12px; }
  .site-footer table.hours tbody th { font-size: 13px; white-space: normal; line-height: 1.4; padding-right: 4px; }
  .site-footer .mark-on, .site-footer .mark-exam { font-size: 20px; }
  .site-footer .mark-off { font-size: 14px; }
  /* 「診療時間・アクセス」の時間表・内視鏡の費用表も画面幅を超えていた → 詰める */
  .access-hours-table th, .access-hours-table td { padding: 10px 2px; }
  .access-hours-table thead th { padding: 10px 2px 8px; font-size: 13px; }
  .access-hours-table tbody th, .access-hours-table .exam-row th { font-size: 13px; white-space: normal; line-height: 1.4; padding-right: 4px; }
  .access-hours-table .on, .access-hours-table .exam { font-size: 20px; }
  .endo-cost-table thead th { padding: 12px 8px; font-size: 14px; letter-spacing: 0; }
  .endo-cost-table tbody th, .endo-cost-table tbody td { padding: 16px 8px; }
  .endo-cost-table .price { font-size: 22px; }
  /* ページ内メニュー：長い名前は1列で */
  .page-shisetsu-kijun .page-nav { grid-template-columns: 1fr; }
  .page-nav a { min-width: 0; overflow-wrap: anywhere; }
  .news-article { scroll-margin-top: 80px; }
  .kijun { scroll-margin-top: 76px; }
  .kijun-cols { columns: 1; }
  .kijun-block h3 { font-size: 17px; }
  .kijun-items dt .pt { margin-left: 0; margin-top: 4px; display: table; }
  .kijun-block p, .kijun-dl dd, .kijun-items dd, .kijun-num li, .kijun-dots li { font-size: 15px; }
  .kijun-dl dd { margin-left: 0; }
  .footer-copy-bar { flex-direction: column; gap: 6px; padding-bottom: 90px; }
}
@media (max-width: 380px) {
  .hero-foot { flex-direction: column; align-items: flex-start; }
}

/* 「内視鏡検査日」へのリンク（右のタブ・FVのボタン・スマホ下のボタン）で飛んだとき、固定ヘッダーに見出しが隠れないように */
#schedule { scroll-margin-top: 112px; }
@media (max-width: 860px) { #schedule { scroll-margin-top: 72px; } }
