/* ============================================================
   top.css — Webサイトトップページ専用スタイル
   依存：common.css（先に読み込むこと）

   ■ z-index 管理表（衝突防止のためここで一元管理）
     200  : .top-nav（sticky ヘッダーナビ）
     9999 : .floating-bar（固定CTAバー）
    10001 : .menu-trigger（ハンバーガーボタン）
    10002 : .sp-nav（全画面メニューオーバーレイ）

   ■ ブランドカラー
     #623ca8 : メインブランドカラー（紫）
     #05a346 : LINE・予約CTAカラー（緑）
     #fdfbf7 : ページ背景・ボックス背景（ベージュ白）

   ============================================================ */

/* ============================================================
   1. 基本設定
   ============================================================ */

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.75;
  color: #333;
  background-color: #fff;
  padding-bottom: 80px; /* floating-barがコンテンツを隠さないための余白 */
}

/* メインコンテンツ幅（最大850px・流動化） */
.container {
  width: clamp(320px, 95%, 850px);
  padding: 16px;
  margin: 0 auto;
}

/* セクション内コンテンツ幅（最大750px・中央揃え） */
.center-content {
  width: clamp(320px, 95%, 750px);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* ============================================================
   2. タイポグラフィ
   ============================================================ */

/* セクション見出し
   構造：<h2><small>ラベル</small>タイトル本文</h2>
   smallはセクションの文脈ラベル、h2本文は読み手への主張 */
h2 {
  font-size: 19px;
  font-weight: bold;
  border-left: 3px solid #623ca8;
  padding: 2px 0 2px 12px;
  margin-top: 60px;
  text-align: left;
  line-height: 1.5;
}
h2::before {
  content: none; /* common.css等で::before が付く場合の無効化保険 */
}
h2 small {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: #623ca8;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

/* ブランドカラーで強調するテキスト（引用・小見出し等） */
.message-highlight {
  text-align: center;
  font-weight: bold;
  color: #623ca8;
}

/* 注記・補足テキスト系 */
.mail-note {
  margin-top: 24px;
  text-align: center;
  color: #777;
  font-size: 12.5px;
}
.mail-link {
  color: #555;
  text-decoration: none;
  font-weight: normal;
}
.tel-note {
  margin-top: 24px;
  font-size: 13px;
  color: #666;
  text-align: center;
}
.tel-link {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}

/* ============================================================
   3. 汎用ボックス
   ============================================================ */

/* 共通パディング・角丸 */
.box,
.box-outline {
  padding: 24px 20px;
  margin-top: 30px;
  margin-bottom: 40px;
  border-radius: 24px;
}
/* 塗りつぶしボックス（コンテンツ系） */
.box {
  background: #fdfbf7;
  border: 1px solid #eee;
}
/* 枠線ボックス（強調・引用系） */
.box-outline {
  background: #fffdfb;
  border: 2px solid #f9f6f0;
}

/* 画像の最大幅制限・中央寄せ（.box内での使用が主） */
.img-fluid {
  max-width: min(500px, 100%);
  height: auto;
  border-radius: 24px;
  display: block;
  margin: 5px auto;
}

/* ============================================================
   4. KV（キービジュアル）
   ============================================================ */

/* KVコンテナ：背景画像＋overlayを重ねる基盤 */
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #fffdfb; /* 画像読み込み前のフォールバック */
}

/* 背景画像レイヤー（pictureタグを全面に敷く） */
.hero-visual {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* テキストオーバーレイ（背景画像の上に半透明パネルで表示）
   SP版では position:absolute + bottom固定に切り替わる（@media参照） */
.hero-overlay {
  position: relative;
  z-index: 2;
  width: clamp(320px, 90%, 600px);
  padding: 32px 0;
  background: rgba(255, 252, 248, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.hero-overlay p {
  margin-bottom: 12px;
  color: #333;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.8;
}
/* overlay内のstrongはブランドカラーで強調 */
.hero-overlay strong {
  font-weight: bold;
  color: #623ca8;
}

/* ============================================================
   5. sticky ナビゲーション（PC用）
   SP（max-width:480px）では display:none で非表示
   ============================================================ */

.top-nav {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 200; /* ※z-index管理表参照 */
  background: rgba(253, 251, 247, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid #eee;
  justify-content: center;
  gap: 0;
}
.top-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 30px;
  color: #623ca8;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  border-right: 1px solid #eee;
  transition: background 0.2s;
  line-height: 1.3;
}
.top-nav a:last-child {
  border-right: none;
}
.top-nav a small {
  /* ナビ項目のサブテキスト（例：「オーナーについて」） */
  font-size: 13px;
  color: #888;
  font-weight: normal;
  margin-top: 3px;
}
.top-nav a:hover {
  background: #f9f6ff;
}

/* ============================================================
   6. 症状カード（symptom-grid）
   メインLPへの導線。ボーダー＋矢印でタップ可能を明示
   ============================================================ */

/* グリッドレイアウト：1列最小200px・自動折り返し */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 32px;
}

/* カード本体：左揃え・右側に矢印スペースを確保 */
.symptom-card {
  background: #fff;
  border: 1.5px solid #623ca8;
  padding: 14px 40px 14px 16px; /* 右40pxは::after矢印のスペース */
  border-radius: 16px;
  text-align: left;
  text-decoration: none;
  color: #333;
  position: relative;
  transition:
    transform 0.2s,
    background 0.2s;
}
/* 右矢印（タップ可能シグナル） */
.symptom-card::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #623ca8;
  font-size: 24px;
  line-height: 1;
}
.symptom-card:hover,
.symptom-card:active {
  background: #f9f6ff;
  transform: translateY(-1px);
}

/* カード内の症状名タグ（例：「腰痛」） */
.card-symptom-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  background: #f3efe6;
  color: #623ca8;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}
/* カード内の説明文 */
.card-symptom-desc {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: #444;
}

/* ============================================================
   7. 特長リスト（top_features）
   ============================================================ */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  margin: 8px 0 32px 0;
  padding-left: 0;
  text-align: left;
}
/* 各特長の小見出し */
.feature-title {
  display: block;
  color: #623ca8;
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 8px;
}

/* ============================================================
   8. アクセスセクション
   ============================================================ */

.access-note {
  font-size: 14px;
  margin: 0;
}

/* 店舗外観写真ブロック */
.access-photo {
  background: #f4f2f8;
  margin: 1.6rem 0;
  padding: 20px;
  text-align: center;
  border-radius: 6px;
}
.access-photo img {
  margin: 0 auto;
  border-radius: 10px;
  display: block;
}
.access-small {
  font-size: 13px;
  color: #555;
  margin-top: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

/* Googleマップ埋め込みコンテナ */
.map-container {
  width: 100%;
  margin-top: 20px;
}
.map-iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 12px;
}
.map-link {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background: #f0f0f0;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

/* 営業時間テーブル
   ※月曜列（最終列）を休業日として赤表示 */
.business-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.business-table th,
.business-table td {
  border: 1px solid #eee;
  padding: 8px;
  text-align: center;
}
.business-table th {
  background: #fdfbf7;
}
.business-table th:last-child,
.business-table td:last-child {
  /* 月曜（定休日）列 */
  background: #fff5f5;
  color: #cc0000;
  font-weight: bold;
}

/* ============================================================
   9. CTAセクション（top_contact）
   ============================================================ */

/* CTA縦並びコンテナ */
.cta-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 48px auto;
  max-width: 360px;
}

/* CTAボタン共通スタイル（デフォルトは緑＝LINE） */
.cta-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 330px;
  max-width: 100%;
  margin: 16px auto;
  padding: 16px 20px;
  box-sizing: border-box;
  background-color: #05a346;
  color: #ffffff;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 50px;
  border: 1.5px solid #ffffff;
  outline: 2px solid #05a346;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
}
.cta-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}
.cta-button:active {
  transform: translateY(0);
}
/* ボタン内のサブテキスト */
.cta-button .cta-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: normal;
  margin-top: 4px;
}

/* LINE用（緑）：デフォルトと同色のため現状は実質エイリアス
   将来色を変える場合のために維持 */
.cta-line {
  background-color: #05a346;
  outline-color: #05a346;
}
.cta-line .cta-sub {
  color: rgba(255, 255, 255, 0.9);
}

/* 予約ボタン用（ソフトベージュ）：セカンダリーアクション */
.cta-reserve-soft {
  background-color: #f3efe6;
  color: #333;
  border: 1px solid #e4dfd5;
  outline: 2px solid #623ca8;
}
.cta-reserve-soft:hover {
  background-color: #efe9dc;
}
.cta-reserve-soft .cta-sub {
  color: #666;
}

/* ============================================================
   10. フローティングバー
   スクロール量に応じてJSで .is-visible を付与して表示
   表示タイミング：top_contactセクションが画面50%以内に入ったとき
   ============================================================ */

.floating-bar {
  position: fixed;
  bottom: calc(1px + env(safe-area-inset-bottom)); /* iPhoneのホームバー対応 */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 16px);
  max-width: 420px;
  z-index: 9999; /* ※z-index管理表参照 */

  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  padding: 5px 12px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  /* 初期状態は非表示（JSで.is-visibleを付与） */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.floating-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
}
/* バー上部のリード文 */
.floating-bar-intro {
  font-size: 11px;
  font-weight: bold;
  color: #623ca8;
  text-align: center;
  margin: 0;
}
/* バー内ボタン */
.floating-bar-button {
  pointer-events: auto;
  display: block;
  width: 90%;
  max-width: 400px;
  margin: 0 auto;
  padding: 14px 0;
  background-color: #623ca8;
  color: #ffffff;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 24px;
  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
}
.floating-bar-button:hover,
.floating-bar-button:active {
  opacity: 0.9;
  transform: scale(0.98);
}

/* ============================================================
   11. ハンバーガーメニュー（SP用）
   PC（769px以上）では .menu-trigger を display:none で非表示。
   SP（480px以下）で display:flex に切り替え（@media参照）
   ============================================================ */

/* トリガーボタン（固定表示） */
.menu-trigger {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #eee;
  border-radius: 8px;
  z-index: 10001; /* ※z-index管理表参照 */
  display: none; /* PCでは非表示 → SPで@mediaで display:flex に変更 */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
/* ハンバーガー3本線 */
.menu-trigger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #623ca8;
  margin: 2px 0;
}
/* 「MENU」テキスト */
.menu-trigger small {
  font-size: 9px;
  color: #623ca8;
  font-weight: bold;
}

/* 全画面メニューオーバーレイ
   初期は left:-100% で画面外。JSで .is-active を付与して表示 */
.sp-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(253, 251, 247, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10002; /* ※z-index管理表参照 */
  transition: left 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}
.sp-nav.is-active {
  left: 0;
}

/* メニュー内コンテンツ幅制御（2回定義を統合） */
.sp-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  text-align: center;
  width: 88%;
  max-width: 320px;
}

/* 各メニュー項目リンク */
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid #f0eee8;
  text-decoration: none;
  width: 100%;
  max-width: 280px;
}
/* メニュー項目メインテキスト */
.menu-main {
  font-size: 16px;
  font-weight: bold;
  color: #623ca8;
  line-height: 1.3;
}
/* メニュー項目サブテキスト */
.menu-sub {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* メニュー内CTA（予約ボタン）
   menu-itemのリンクとは分離して下部に配置 */
.menu-cta {
  display: block;
  width: 80%;
  max-width: 400px;
  margin-top: 20px;
  padding: 14px 0;
  background: #623ca8;
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 24px;
  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
}

/* メニューを閉じるボタン */
.menu-close {
  margin-top: 40px;
  background: none;
  border: 1px solid #ccc;
  padding: 8px 24px;
  border-radius: 20px;
  color: #666;
  cursor: pointer;
}

/* ============================================================
   12. Instagramセクション
   ============================================================ */

/* Instagramグラデーションボーダーボタン
   background-clipを使ったCSSテクニックで枠線をグラデーション化 */
.instagram-btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  max-width: 90%;
  margin: 20px auto;
  padding: 12px 14px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  border-radius: 50px;
  background: transparent;
  border: 2px solid transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)),
    linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  background-origin: border-box;
  background-clip: content-box, border-box;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.instagram-btn-outline:hover,
.instagram-btn-outline:active {
  opacity: 0.8;
  transform: scale(0.98);
}

/* #top_instagram内のリード文（behold-widgetの前のp要素） */
#top_instagram p.text-center {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 30px;
}
/* Instagramボタンの上マージン調整 */
#top_instagram .instagram-btn-outline {
  margin-top: 40px;
}

/* ============================================================
   13. フッター
   ============================================================ */

footer {
  margin-top: 50px;
  padding: 20px;
  border-top: 1px solid #eee;
}
footer a {
  color: #666;
}

/* ============================================================
   14. モバイル最適化（max-width: 480px）
   ============================================================ */

@media (max-width: 480px) {
  /* コンテナ横パディングを縮小 */
  .container {
    padding: 16px 12px;
  }

  /* ハンバーガーボタンをSPで表示（PCはdisplay:none） */
  .menu-trigger {
    display: flex;
  }
  /* sticky navをSPで非表示（ハンバーガーに集約） */
  .top-nav {
    display: none;
  }

  /* --- KV（SP） ---
     overlayを画像下部に絶対配置してロゴと重ならないようにする */
  .hero {
    height: 55vh;
    min-height: 380px;
  }
  .hero-overlay {
    position: absolute;
    bottom: 40px; /* ロゴが上半分にある画像でも重ならない位置 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: clamp(300px, 88%, 750px);
    padding: 20px 0;
    background: rgba(255, 252, 248, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }
  .hero-overlay p {
    font-size: 15px;
    margin-bottom: 9px;
  }

  /* 見出しサイズ縮小 */
  h2 {
    font-size: 16px;
  }

  /* 本文・リストの基準フォントサイズ */
  div,
  p,
  li {
    font-size: 14px;
    line-height: 2;
  }
  .access-small {
    font-size: 12px;
  }
  /* menu-closeのbuttonデフォルトフォントをページに合わせる */
  .menu-close {
    font-size: 14px;
    font-family: inherit;
  }

  /* CTAボタンの横余白 */
  .cta-container {
    padding: 0 12px;
  }

  /* ボックスのパディング縮小 */
  .box,
  .box-outline {
    padding: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
  }
  /* SP幅では<br>を改行としてではなくインライン扱いに */
  .box br,
  .box-outline br {
    display: inline;
  }

  /* 特長タイトルサイズ縮小 */
  .feature-title {
    font-size: 15px;
  }

  /* 営業時間テーブル：SP幅で均等レイアウト */
  .business-table {
    font-size: 11px;
    table-layout: fixed;
  }
  .business-table th,
  .business-table td {
    padding: 4px 2px;
  }
  .business-table th:last-child,
  .business-table td:last-child {
    /* SP版はbg薄めに（可読性確保） */
    background: #f9f9f9;
    color: #cc0000;
  }
}
