/* ============================================================
   森接骨院 — 共通スタイル
   設計: BEM準拠 / モバイルファースト
   TODO: カラースキーム・フォントは先方確認後に差し替え
   ============================================================ */

/* ---- CSS変数（カラー・フォント） ---- */
:root {
  /* TODO: 先方希望カラーへ差し替え */
  --color-primary:      #1a5276;   /* ネイビーブルー */
  --color-primary-dark: #154360;
  --color-accent:       #1abc9c;   /* ティール */
  --color-accent-dark:  #17a589;
  --color-text:         #333333;
  --color-text-sub:     #666666;
  --color-bg:           #f8fafb;
  --color-bg-section:   #eef5f9;
  --color-white:        #ffffff;
  --color-border:       #dde3e9;

  /* バッジ */
  --color-badge-important: #e74c3c;
  --color-badge-campaign:  #e67e22;
  --color-badge-news:      #7f8c8d;

  /* タイポグラフィ */
  /* TODO: Google Fontsのフォントへ差し替え（先方と確認） */
  --font-base: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.75;

  /* スペーシング */
  --section-padding: 4rem 1.25rem;
  --container-max:   1100px;

  /* ヘッダー高さ */
  --header-h: 64px;

  /* シャドウ */
  --shadow-card: 0 2px 12px rgba(0,0,0,.09);
  --shadow-btn:  0 2px 6px rgba(0,0,0,.15);

  /* 角丸 */
  --radius-card: 8px;
  --radius-btn:  4px;
}

/* ---- リセット & ベース ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: var(--line-height-base);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

/* ============================================================
   レイアウト
   ============================================================ */

/* コンテナ */
.l-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* セクション */
.l-section {
  padding: var(--section-padding);
}
.l-section--gray {
  background: var(--color-bg-section);
}

/* ============================================================
   ヘッダー
   ============================================================ */
.l-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.l-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* ロゴ */
.l-header__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-white);
  font-size: 1.15rem;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: .05em;
}
.l-header__logo:hover { text-decoration: none; opacity: .88; }

/* ナビゲーション（PC） */
.l-nav {
  display: none;
}
.l-nav__list {
  display: flex;
  gap: 0;
}
.l-nav__link {
  display: block;
  color: rgba(255,255,255,.88);
  font-size: .9rem;
  padding: .5rem 1rem;
  transition: background .2s, color .2s;
  border-radius: 4px;
}
.l-nav__link:hover,
.l-nav__link.is-current {
  background: rgba(255,255,255,.15);
  color: var(--color-white);
  text-decoration: none;
}

/* ハンバーガーボタン */
.l-header__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.l-header__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.l-header__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.l-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.l-header__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ドロワーメニュー（SP） */
.l-drawer {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26,82,118,.97);
  z-index: 99;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: 0;
}
.l-drawer.is-open { transform: translateX(0); }
.l-drawer__link {
  display: block;
  color: var(--color-white);
  font-size: 1.1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,.15);
  text-decoration: none;
}
.l-drawer__link:hover { opacity: .8; }

/* PC表示 */
@media (min-width: 768px) {
  .l-nav { display: block; }
  .l-header__hamburger { display: none; }
  .l-drawer { display: none; }
}

/* ============================================================
   フッター
   ============================================================ */
.l-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.85);
  padding: 2.5rem 1.25rem 1.5rem;
  font-size: .875rem;
}
.l-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
.l-footer__name {
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-white);
  margin-bottom: .5rem;
}
.l-footer__info p { margin-bottom: .3rem; }
.l-footer a { color: rgba(255,255,255,.8); }
.l-footer a:hover { color: var(--color-white); text-decoration: underline; }
.l-footer__copy {
  margin-top: 2rem;
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1rem;
}
@media (min-width: 768px) {
  .l-footer__inner { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   コンポーネント
   ============================================================ */

/* セクション見出し */
.c-section-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: .5rem;
  letter-spacing: .04em;
}
.c-section-title__sub {
  display: block;
  font-size: .85rem;
  font-weight: normal;
  color: var(--color-text-sub);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-align: center;
}

/* ボタン */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 2rem;
  border-radius: var(--radius-btn);
  font-size: .95rem;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
  box-shadow: var(--shadow-btn);
}
.c-btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.c-btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  text-decoration: none;
}
.c-btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.c-btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}
.c-btn--tel {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  font-size: 1.3rem;
  padding: .8rem 2.5rem;
  letter-spacing: .05em;
}
.c-btn--tel:hover {
  background: var(--color-accent-dark);
  text-decoration: none;
}

/* バッジ */
.c-badge {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
  color: var(--color-white);
}
.c-badge--important { background: var(--color-badge-important); }
.c-badge--campaign  { background: var(--color-badge-campaign); }
.c-badge--news      { background: var(--color-badge-news); }

/* カード */
.c-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.c-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.c-card__body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.c-card__title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: .5rem;
}
.c-card__text {
  font-size: .875rem;
  color: var(--color-text-sub);
  flex: 1;
}

/* ============================================================
   ヒーローセクション
   ============================================================ */
.p-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--color-primary);
}
.p-hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: .4;
}
.p-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(26,82,118,.7) 0%, rgba(21,67,96,.85) 100%);
}
.p-hero__content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  padding: 2rem 1.25rem;
}
.p-hero__catch {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.p-hero__sub {
  font-size: 1rem;
  opacity: .9;
  margin-bottom: 2rem;
}
.p-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

@media (min-width: 768px) {
  .p-hero { min-height: 620px; }
}

/* ============================================================
   お知らせセクション
   ============================================================ */
.p-news__list { display: flex; flex-direction: column; gap: .75rem; }
.p-news__item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow .2s;
}
.p-news__item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.14); text-decoration: none; }
.p-news__meta { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; flex-shrink: 0; }
@media (min-width: 768px) {
  .p-news__meta { flex-direction: row; align-items: center; gap: .5rem; }
}
.p-news__date { font-size: .8rem; color: var(--color-text-sub); white-space: nowrap; }
.p-news__title { font-size: .95rem; line-height: 1.5; }
.p-news__empty { color: var(--color-text-sub); text-align: center; padding: 1rem; }
.p-news__more { text-align: center; margin-top: 1.5rem; }

/* ============================================================
   当院についてセクション（トップ内）
   ============================================================ */
.p-about-top {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.p-about-top__img {
  width: 100%;
  border-radius: var(--radius-card);
  object-fit: cover;
  aspect-ratio: 16/9;
}
.p-about-top__title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.p-about-top__text {
  color: var(--color-text-sub);
  margin-bottom: 1.5rem;
  line-height: 1.85;
}
@media (min-width: 768px) {
  .p-about-top { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   施術メニューカードグリッド
   ============================================================ */
.p-menu-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ============================================================
   アクセスセクション
   ============================================================ */
.p-access__map {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius-card);
  display: block;
  background: #e0e7ef;
}
.p-access__info { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
.p-access__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.p-access__table th,
.p-access__table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.p-access__table th {
  background: var(--color-bg-section);
  font-weight: bold;
  width: 7em;
  white-space: nowrap;
}
@media (min-width: 768px) {
  .p-access__info { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   インスタグラムセクション
   ============================================================ */
.p-instagram {
  text-align: center;
  padding: 3rem 1.25rem;
  background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
}
.p-instagram__title { color: var(--color-white); font-size: 1.3rem; margin-bottom: .5rem; }
.p-instagram__sub { color: rgba(255,255,255,.85); margin-bottom: 1.5rem; font-size: .9rem; }
.p-instagram__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-white);
  color: #dc2743;
  border: 2px solid var(--color-white);
  padding: .7rem 2rem;
  border-radius: 999px;
  font-weight: bold;
  font-size: .95rem;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.p-instagram__btn:hover {
  background: transparent;
  color: var(--color-white);
  text-decoration: none;
}

/* ============================================================
   院長挨拶（about.html）
   ============================================================ */
.p-greeting {
  display: grid;
  gap: 2rem;
  align-items: flex-start;
}
.p-greeting__img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  display: block;
  box-shadow: var(--shadow-card);
}
.p-greeting__name { font-size: 1.1rem; font-weight: bold; margin-top: .75rem; text-align: center; }
.p-greeting__title-sub { font-size: .85rem; color: var(--color-text-sub); text-align: center; }
.p-greeting__body { line-height: 1.9; }
@media (min-width: 768px) {
  .p-greeting { grid-template-columns: 220px 1fr; }
  .p-greeting__img { margin: 0; }
  .p-greeting__name, .p-greeting__title-sub { text-align: left; }
}

/* ギャラリー */
.p-gallery__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .p-gallery__grid { grid-template-columns: repeat(3, 1fr); }
}
.p-gallery__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-card);
}

/* ============================================================
   症例・メニュー（menu.html）
   ============================================================ */
.p-symptom__grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) {
  .p-symptom__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .p-symptom__grid { grid-template-columns: repeat(4, 1fr); }
}
.p-symptom__item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: .9rem .75rem;
  text-align: center;
  font-size: .9rem;
  font-weight: bold;
  color: var(--color-primary);
}

/* 料金テーブル */
.p-price__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.p-price__table th,
.p-price__table td {
  padding: .75rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}
.p-price__table th {
  background: var(--color-primary);
  color: var(--color-white);
}
.p-price__table tr:nth-child(even) td { background: var(--color-bg-section); }

/* ============================================================
   FAQ（faq.html）
   ============================================================ */
.p-faq__list { display: flex; flex-direction: column; gap: .75rem; }
.p-faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.p-faq__question {
  width: 100%;
  background: var(--color-white);
  border: none;
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.p-faq__question::after {
  content: '＋';
  font-size: 1.2rem;
  transition: transform .3s;
  flex-shrink: 0;
}
.p-faq__question[aria-expanded="true"]::after { content: '－'; }
.p-faq__answer {
  display: none;
  padding: 1rem 1.25rem;
  background: var(--color-bg-section);
  font-size: .95rem;
  line-height: 1.85;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}
.p-faq__answer.is-open { display: block; }

/* ============================================================
   ユーティリティ
   ============================================================ */
.u-text-center { text-align: center; }
.u-mt-1 { margin-top: 1rem; }
.u-mt-2 { margin-top: 2rem; }
.u-mb-2 { margin-bottom: 2rem; }
