/* ============================================================
   Kotobuki Dental Clinic — Common styles (all pages)
   - design pattern: pop（大きな丸 / 大胆な色面 / サンセリフ大見出し）
   - theme: theme-clinic（sky blue + vivid yellow）
   - _shared/tokens.css + _shared/components.css の後に読み込む
   ============================================================ */

/* ページ全体の背景色を白に上書き（_shared/tokens.css の既定はオフホワイト #fdfbf8） */
:root { --color-bg: #ffffff; }

/* 横スクロール抑止（ヒーロー装飾の bleed を許容するため） */
html, body { overflow-x: clip; }

/* ============================================================
   テーマカラー：このサイトは sky blue + vivid yellow に上書き
   - 共通の theme-clinic（青緑）→ sky blue ベースへ
   - すべての CSS 変数経由スタイルが自動で反映される
   ============================================================ */
body.theme-clinic {
  --color-accent: #4cb6e0;        /* sky blue（明るく彩度高め） */
  --color-accent-soft: #d8edf7;   /* pale sky */
  --color-accent-dark: #1f7fa8;   /* deeper sky blue */

  /* セカンダリアクセント：彩度高めの vivid yellow（青の補色） */
  --color-highlight: #ffcd1f;       /* vivid yellow（高彩度・黄寄り） */
  --color-highlight-soft: #fff4cc;  /* pale butter */
  --color-highlight-dark: #8c6210;  /* deep mustard（白背景でコントラスト確保） */

  /* テキスト・罫線は青系に馴染む cool gray ベースへ */
  --color-text: #2a323a;          /* cool dark slate */
  --color-text-soft: #6c7682;     /* cool gray */
  --color-text-mute: #a8b1bb;     /* cool light gray */
  --color-line: #e2e7ed;          /* cool light border */
  --color-line-strong: #cdd5de;   /* cool stronger border */
}

/* --- セカンダリアクセント（イエロー）の適用箇所 ------------ */
/* 英字サブタイトル系はすべて deep gold で統一 */
.section-title__sub,
.hero__eyebrow,
.cta-band__eyebrow,
.cta-foot__eyebrow {
  color: #e0b417;
}

/* セクション見出し下の小さなマリーゴールド アンダーライン */
.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-highlight);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto var(--space-1);
}

/* --- グラデーション禁止：プライマリボタンを単色に ----------- */
.btn--primary {
  background: var(--color-accent);
  box-shadow: 0 6px 18px rgba(20, 80, 110, 0.14), 0 2px 4px rgba(20, 80, 110, 0.06);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  filter: none;
  box-shadow: 0 10px 24px rgba(20, 80, 110, 0.18), 0 3px 6px rgba(20, 80, 110, 0.08);
}

/* --- Header 内 padding 復帰 -------------------------------- */
/* components.css の .site-header__inner が padding shorthand で
   .container の横 padding をゼロに上書きしてしまうので、左右だけ復活 */
.site-header__inner {
  padding-inline: var(--gutter);
}

/* --- ロゴ画像（2026-07-02 差し替え：テキストブランド → 画像ロゴ） --- */
.brand--logo { display: inline-flex; align-items: center; }
.brand__logo { display: block; height: 3.5rem; width: auto; }
.site-footer .brand__logo { height: 3rem; }

/* --- Header CTA（右端の電話＋予約ボタン） ------------------ */
.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header-tel {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
}
.header-tel:hover { color: var(--color-accent-dark); opacity: 1; }
.header-tel__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--color-accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-tel__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.header-tel__text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.header-tel__label {
  font-family: var(--font-jp);
  font-size: var(--size-xs);
  font-weight: 500;
  color: var(--color-text-soft);
  letter-spacing: var(--tracking-normal);
  margin-bottom: 2px;
}
.header-tel__num {
  font-family: var(--font-en);
  font-size: var(--size-md);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--color-accent-dark);
}
.btn--small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--size-xs);
}

/* --- Nav Toggle（ハンバーガー） --------------------------- */
.nav-toggle {
  display: none;          /* デスクトップでは非表示 */
  order: 1;               /* flex 内で常に末尾（右端） */
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.nav-toggle:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
/* アイコン切替（クラス単位で display 管理） */
.nav-toggle__open { display: block; }
.nav-toggle__close { display: none; }
body.nav-open .nav-toggle__open { display: none; }
body.nav-open .nav-toggle__close { display: block; }

/* タブレット以下：電話エリアをアイコンボタン1つに切り替え */
@media (max-width: 880px) {
  .header-tel {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #fff;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(20, 80, 110, 0.18);
    transition: background var(--transition), box-shadow var(--transition);
  }
  .header-tel:hover {
    background: var(--color-accent-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(20, 80, 110, 0.24);
    opacity: 1;
  }
  .header-tel__icon {
    width: 22px;
    height: 22px;
    color: #fff;
  }
  .header-tel__text { display: none; }
}

/* 768px 未満：ナビをハンバーガー化（ドロップダウンメニュー） */
@media (max-width: 767px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; margin-left: var(--space-3); }
  .header-cta { margin-left: auto; }

  body.nav-open .nav {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: var(--space-3) var(--gutter);
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow-md);
    z-index: 50;
    gap: 0;
    font-size: var(--size-base);
  }
  body.nav-open .nav a {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-line);
    border-bottom-width: 1px;
  }
  body.nav-open .nav a:last-child { border-bottom: none; }
  body.nav-open .nav a.is-active {
    color: var(--color-accent-dark);
    border-bottom-color: var(--color-line);
  }
  /* body ではなく html 側でロック（body.nav-open { overflow:hidden } は
     sticky ヘッダーの祖先にオーバーフローの制約を作ってしまい、
     position: sticky / 連動するドロップダウンの位置がずれる原因になるため） */
  html.nav-open { overflow: hidden; }
}

/* --- 共通：プレースホルダ表示 ----------------------------- */
.placeholder-label {
  font-size: var(--size-xs);
  color: var(--color-text-mute);
  letter-spacing: var(--tracking-wide);
}
[role="img"] {
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  min-height: 200px;
  position: relative;
  overflow: hidden;
}
[role="img"] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   キッズスペース紹介（index + clinic で使用）
   ============================================================ */
.kids {
  background: var(--color-bg);
  padding: var(--space-8) 0;
  position: relative;
  overflow: hidden;
}
.kids__circle {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  opacity: 0.10;
  bottom: -160px;
  right: -120px;
  pointer-events: none;
}
.kids__inner {
  display: grid;
  gap: var(--space-6);
  position: relative;
  z-index: 1;
}
.kids__photo {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--radius-lg);
}
.kids__text h2 {
  font-size: var(--size-2xl);
  letter-spacing: var(--tracking-tight);
  margin: var(--space-2) 0 var(--space-5);
  line-height: var(--leading-tight);
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: grid;
  gap: var(--space-3);
}
.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--color-text);
  font-size: var(--size-base);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  transform: translateY(-50%);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-50%) rotate(-45deg);
  transform-origin: center;
}

@media (min-width: 880px) {
  .kids { padding: var(--space-9) 0; }
  .kids__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
  }
}

/* --- Check list 中央寄せ版（clinic / reservation で使用） -- */
.check-list--center {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   アクセス & 診療時間（index + reservation で使用）
   ============================================================ */
.access {
  display: grid;
  gap: var(--space-6);
}
.access__map {
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-lg);
  min-height: 280px;
}
.access__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* 白枠を使わないクリーンな key-value レイアウト */
.access__details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4) var(--space-6);
  margin: 0 0 var(--space-5);
  padding: 0;
}
.access__details dt {
  font-size: var(--size-sm);
  font-weight: 700;
  color: var(--color-text-soft);
  letter-spacing: var(--tracking-wide);
  padding-top: 2px;
  white-space: nowrap;
}
.access__details dd {
  margin: 0;
  font-size: var(--size-base);
  color: var(--color-text);
  line-height: var(--leading-normal);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-line);
}
.access__details > dt {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-line);
}
.access__details > dt:last-of-type,
.access__details > dd:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.access__details a { color: var(--color-accent-dark); font-weight: 700; }
.access__cta { align-self: flex-start; }

/* 診療時間テーブル（アクセス内 / フッター内 で共通） */
.hours {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--size-sm);
}
.hours th,
.hours td {
  padding: var(--space-3) var(--space-2);
  text-align: center;
  border-bottom: 1px solid var(--color-line);
}
.hours tr:last-child th,
.hours tr:last-child td { border-bottom: none; }
.hours thead th {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: var(--size-xs);
  letter-spacing: var(--tracking-wide);
}
.hours tbody th {
  text-align: left;
  padding-left: var(--space-4);
  font-size: var(--size-xs);
  color: var(--color-text-soft);
  font-weight: 600;
  white-space: nowrap;
}
.hours td { color: var(--color-accent-dark); font-weight: 700; }
.hours__off { color: var(--color-text-mute) !important; font-weight: 400 !important; }
.hours__sat { color: var(--color-accent-dark); }
.hours__note {
  margin-top: var(--space-3);
  font-size: var(--size-xs);
  color: var(--color-text-soft);
}

/* アクセス節での前余白 */
.access .hours { margin-top: var(--space-5); }

/* フッター内ではコンパクトに */
.site-footer .hours {
  font-size: var(--size-xs);
}
.site-footer .hours th,
.site-footer .hours td {
  padding: var(--space-2) var(--space-1);
}
.site-footer .hours tbody th {
  padding-left: var(--space-3);
  font-size: 11px;
}
.site-footer .hours__note {
  font-size: 11px;
}

@media (min-width: 880px) {
  .access {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
    align-items: start;
  }
}

/* ============================================================
   CTA フッター帯（全ページ共通：cta-foot）
   ============================================================ */
.cta-foot {
  background: var(--color-accent-soft);
  padding: var(--space-8) 0;
  text-align: center;
}
.cta-foot + .site-footer { margin-top: 0; }
.cta-foot__eyebrow {
  font-family: var(--font-en);
  font-size: var(--size-xs);
  letter-spacing: var(--tracking-wider);
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
  font-weight: 600;
}
.cta-foot h2 {
  font-size: var(--size-2xl);
  margin: 0 0 var(--space-6);
  letter-spacing: var(--tracking-tight);
}
@media (min-width: 880px) {
  .cta-foot { padding: var(--space-9) 0; }
}

/* ============================================================
   CTA 2カラム版（全ページ共通）
   - 左:画像エリア / 右:テキスト＋ボタン
   - モバイルは縦並び（画像 → テキスト）
   - 既存 .cta-foot の中央1カラム既定を打ち消して 2カラムに上書き
   ============================================================ */
.cta-foot--split {
  padding: 0;                              /* 余白はカラム側で持つ */
  background: var(--color-surface);
  text-align: left;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
}
/* 左カラム:画像エリア
   - placeholder は <div role="img"> + .placeholder-label
   - 実画像差し替え時は背景画像 or <img> どちらでも対応可
   - 背景画像にする例:
       <div class="cta-foot__media" style="background-image:url('../images/cta.jpg');"></div>
*/
.cta-foot__media {
  min-height: 240px;
  width: 100%;
  background-color: var(--color-accent-soft);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta-foot__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 右カラム:テキスト＋ボタン */
.cta-foot--split .cta-foot__body {
  padding: var(--space-7) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-4);
}
.cta-foot--split .cta-foot__eyebrow {
  margin: 0;
  text-align: left;
}
.cta-foot--split h2 {
  margin: 0;
  text-align: left;
  font-size: var(--size-xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.cta-foot--split .btn-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}
/* デスクトップ:2カラム横並び */
@media (min-width: 880px) {
  .cta-foot--split {
    grid-template-columns: 1fr 1fr;
    min-height: 360px;
  }
  .cta-foot--split .cta-foot__media {
    min-height: 100%;
    align-self: stretch;
  }
  .cta-foot--split .cta-foot__body {
    padding: var(--space-9) var(--space-8);
  }
  .cta-foot--split h2 {
    font-size: var(--size-2xl);
  }
}

/* ============================================================
   Misc（共通）
   ============================================================ */
.section-title__sub {
  display: block;
  text-align: center;
}
/* キッズスペース章は2カラム構成なので左寄せに */
.kids .section-title__sub { text-align: left; }

/* ============================================================
   フッター（3カラム：所在地・メニュー・診療時間）
   - components.css の .site-footer 既定（暗色＋中央寄せ）をローカル上書き
   - 明るい warm cream をベースに、テキストはダーク
   ============================================================ */
.site-footer {
  background: var(--color-surface);   /* white */
  color: var(--color-text);
  text-align: left;
  border-top: 1px solid var(--color-line);
}
.site-footer .brand { color: var(--color-text); }
.site-footer .brand small { color: var(--color-text-soft); }
.site-footer p { color: var(--color-text-soft); }

.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(60, 40, 40, 0.10);
}
@media (min-width: 768px) {
  .site-footer__cols {
    grid-template-columns: 1.2fr 1fr 1.4fr;
    gap: var(--space-8);
  }
}

.site-footer__col .brand { display: inline-block; }
.site-footer__addr {
  font-size: var(--size-xs) !important;
  color: var(--color-text-soft) !important;
  margin: var(--space-4) 0 var(--space-3) !important;
  line-height: var(--leading-normal);
}
.site-footer__tel {
  margin: 0 !important;
  font-family: var(--font-en);
  font-size: var(--size-md) !important;
  font-weight: 700;
  color: var(--color-text) !important;
}
.site-footer__tel a {
  color: var(--color-text);
  letter-spacing: var(--tracking-wide);
}
.site-footer__tel a:hover { color: var(--color-accent-dark); opacity: 1; }

.site-footer__title {
  font-size: var(--size-sm);
  color: var(--color-text);
  letter-spacing: var(--tracking-wide);
  margin: 0 0 var(--space-4);
  font-weight: 700;
}
.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--size-sm);
}
.site-footer__list a {
  color: var(--color-text-soft);
}
.site-footer__list a:hover { opacity: 1; color: var(--color-accent-dark); }


.site-footer__bottom {
  padding-top: var(--space-5);
  text-align: center;
}
.site-footer__bottom p { margin: var(--space-1) 0 0; color: var(--color-text-soft); }
.site-footer__demo-note {
  font-size: 11px !important;
  color: var(--color-text-mute) !important;
  margin-top: var(--space-2) !important;
}

/* ============================================================
   下層ページ共通（page-hero）
   ============================================================ */
.page-hero {
  position: relative;
  padding: var(--space-8) 0;
  background: var(--color-bg);
  text-align: center;
}
.page-hero__circle {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  opacity: 0.12;
  top: -160px;
  right: -120px;
  pointer-events: none;
  z-index: 0;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero__title {
  font-size: var(--size-2xl);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-3);
}
.page-hero__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-highlight);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto var(--space-1);
}
.page-hero__lead {
  color: var(--color-text-soft);
  max-width: 640px;
  margin: 0 auto;
}
@media (min-width: 880px) {
  .page-hero { padding: var(--space-9) 0; }
  .page-hero__title { font-size: var(--size-3xl); }
}

/* ============================================================
   下層 h3 共通（treatment__h3 は doctors / treatments で使用）
   ============================================================ */
.treatment__h3 {
  font-size: var(--size-md);
  margin: var(--space-6) 0 var(--space-3);
  color: var(--color-text);
}
