/* ============================================================
 * 小池整骨院 HTMLモックアップ v2 共通CSS
 * 全12ページ共通レイアウト / ヘッダー / フッター / プレースホルダー
 * 2026-06-01 デザイナーロール作成
 * ============================================================ */

/* === デザイントークン === */
:root {
  /* 配色（契約3.1(2)：ライトグリーン基調 + 温かみオレンジアクセント。配色はクライアント確認後に確定） */
  --color-primary:        #7CB342;       /* ライトグリーン（メイン） */
  --color-primary-dark:   #558B2F;
  --color-primary-light:  #E8F5E9;
  --color-accent:         #FF9800;       /* アクセント（温かみ） */
  --color-accent-dark:    #F57C00;
  --color-accent-light:   #FFF3E0;

  --color-bg:             #FAFAFA;
  --color-card:           #FFFFFF;
  --color-text:           #2C3E2D;
  --color-text-sub:       #5A6C5B;
  --color-text-mute:      #888888;
  --color-border:         #E0E0E0;
  --color-border-light:   #F0F0F0;

  --color-footer-bg:      #4E7C3E;       /* ライトグリーン濃 ※ライトグリーン基調と整合 */

  --color-warning:        #FFC107;
  --color-warning-bg:     #FFF8E1;
  --color-info:           #2196F3;
  --color-info-bg:        #E3F2FD;

  /* タイポグラフィ */
  --font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;

  /* スペーシング（8pxグリッド） */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  --transition: 200ms ease;
}

/* === リセット === */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  font-size: 16px;
  letter-spacing: 0.03em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === アクセシビリティ === */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
}
.skip-link:focus { top: 0; }

/* === 仮版バナー（ページ冒頭1個のみ） === */
.tentative-banner {
  background: var(--color-warning-bg);
  border-bottom: 2px solid var(--color-warning);
  padding: 10px 24px;
  text-align: center;
  font-size: 13px;
  color: #6B5817;
  line-height: 1.6;
}
.tentative-banner strong { color: #5C4D14; }

/* === ヘッダー === */
.header {
  background: white;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 18px;
  color: var(--color-primary-dark);
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
}
.logo small {
  display: block;
  font-size: 10px;
  color: var(--color-text-sub);
  font-weight: normal;
  letter-spacing: 0.15em;
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav a {
  display: inline-block;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--color-text);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav a:hover { color: var(--color-primary-dark); }
.nav a.current {
  border-bottom-color: var(--color-primary);
  font-weight: bold;
  color: var(--color-primary-dark);
}

.header-cta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tel-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  font-size: 15px;
  padding: 6px 10px;
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.tel-link small { display: block; font-size: 9px; color: var(--color-text-sub); font-weight: normal; }

/* ハンバーガー（モバイル用） */
.hamburger {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
}

/* === ボタン === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  min-height: 44px;
  cursor: pointer;
  transition: var(--transition);
}
.btn--primary {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}
.btn--primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }
.btn--secondary {
  background: white;
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
}
.btn--secondary:hover { background: var(--color-primary-light); }
.btn--ghost {
  background: transparent;
  color: white;
  border-color: white;
}
.btn--ghost:hover { background: rgba(255,255,255,0.15); }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

/* === パンくず === */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  font-size: 12px;
  color: var(--color-text-sub);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li::after { content: '›'; margin-left: 6px; color: var(--color-text-mute); }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--color-text-sub); text-decoration: underline; }

/* === セクション === */
.section {
  padding: 64px 24px;
}
.section--alt { background: var(--color-primary-light); }
.section--card { background: white; }
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-size: 26px;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 700;
}
.section-title small {
  display: block;
  font-size: 13px;
  color: var(--color-primary-dark);
  font-weight: normal;
  letter-spacing: 0.2em;
  margin-bottom: 6px;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: var(--color-accent);
  margin: 14px auto 0;
  border-radius: 2px;
}
.section-sub {
  text-align: center;
  color: var(--color-text-sub);
  margin-bottom: 32px;
  font-size: 14px;
}

/* === ページヒーロー（下層共通） === */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent-light) 100%);
  padding: 56px 24px;
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.page-hero h1 {
  font-size: 30px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.page-hero h1 small {
  display: block;
  font-size: 13px;
  color: var(--color-primary-dark);
  letter-spacing: 0.2em;
  margin-bottom: 4px;
  font-weight: normal;
}
.page-hero .lead {
  font-size: 15px;
  color: var(--color-text-sub);
  max-width: 800px;
  margin-bottom: 16px;
}

/* === プレースホルダー（再発防止ルール#3：CSSで視覚化） === */
.placeholder {
  display: block;
  background: repeating-linear-gradient(
    45deg,
    #FAFAFA,
    #FAFAFA 8px,
    #F0F0F0 8px,
    #F0F0F0 16px
  );
  border: 2px dashed #B0B0B0;
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 12px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.7;
  text-align: center;
}
.placeholder::before {
  content: '＊ プレースホルダー';
  display: inline-block;
  background: #B0B0B0;
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.placeholder--inline {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 2px;
  vertical-align: middle;
  font-size: 12px;
}
.placeholder--inline::before { display: none; }
.placeholder--img {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--color-text-mute);
  flex-direction: column;
}
.placeholder--img::before {
  content: '＊ 写真プレースホルダー';
  margin-bottom: 8px;
}
.placeholder--card {
  text-align: left;
  padding: 20px;
}

/* === ヒアリング後確定項目テーブル（ページ末尾） === */
.pending-items {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 32px auto;
  max-width: 900px;
}
.pending-items h3 {
  font-size: 14px;
  color: #6B5817;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pending-items ul {
  list-style: disc;
  margin-left: 24px;
  font-size: 13px;
  color: #6B5817;
}
.pending-items li { margin-bottom: 4px; }

/* === カードグリッド === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}
.card--clickable { cursor: pointer; }
.card--clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--color-primary-dark);
}
.card p { font-size: 13px; color: var(--color-text-sub); }

/* 症状カード */
.symptom-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition);
}
.symptom-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.symptom-card-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}
.symptom-card h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--color-primary-dark);
}
.symptom-card p {
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.6;
}

/* === 共感ブロック（こんなお悩みありませんか） === */
.troubles-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}
.troubles-list li {
  background: white;
  padding: 16px 20px 16px 44px;
  border-radius: var(--radius-md);
  position: relative;
  font-size: 14px;
  border: 1px solid var(--color-border);
}
.troubles-list li::before {
  content: '✓';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
}

/* === 比較表 === */
.compare-table {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  line-height: 1.6;
}
.compare-table thead th {
  background: var(--color-primary);
  color: white;
  text-align: center;
}
.compare-table thead th.col-us { background: var(--color-primary-dark); }
.compare-table tbody th {
  background: var(--color-primary-light);
  width: 28%;
  font-weight: bold;
}
.compare-table .cell-us { background: #FFF8E1; font-weight: bold; }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

/* === CTAブロック === */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  text-align: center;
  padding: 64px 24px;
}
.cta-section .section-title { color: white; }
.cta-section .section-title::after { background: white; }
.cta-section .section-title small { color: rgba(255,255,255,0.9); }
.cta-section .section-sub { color: rgba(255,255,255,0.95); }
.cta-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 32px auto 0;
}
.cta-option {
  background: rgba(255,255,255,0.10);
  padding: 24px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.30);
  display: flex;
  flex-direction: column;
}
.cta-option h3 { font-size: 17px; margin-bottom: 8px; }
.cta-option p { font-size: 12px; margin-bottom: 16px; opacity: 0.92; line-height: 1.6; }
.cta-option .btn {
  background: white;
  color: var(--color-primary-dark);
  border-color: white;
  width: 100%;
  margin-top: auto;
}
.cta-option .btn:hover { background: var(--color-accent-light); }
.cta-option-tel {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 6px;
}

/* === FAQ === */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}
.faq-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}
.faq-q {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 10px;
  padding-left: 32px;
  position: relative;
}
.faq-q::before {
  content: 'Q.';
  position: absolute;
  left: 0;
  color: var(--color-primary-dark);
  font-weight: bold;
  font-size: 16px;
}
.faq-a {
  font-size: 13px;
  color: var(--color-text-sub);
  padding-left: 32px;
  position: relative;
  line-height: 1.8;
}
.faq-a::before {
  content: 'A.';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
  font-size: 16px;
}

/* === フッター === */
.footer {
  background: var(--color-footer-bg);
  color: white;
  padding: 48px 24px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer h4 {
  font-size: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.30);
  padding-bottom: 8px;
}
.footer ul { list-style: none; }
.footer li { font-size: 12px; margin-bottom: 8px; opacity: 0.95; }
.footer li a:hover { opacity: 1; text-decoration: underline; }
.footer-clinic h4 { font-size: 18px; border-bottom: none; padding-bottom: 0; }
.footer-clinic p { font-size: 12px; opacity: 0.95; margin-bottom: 6px; line-height: 1.7; }
.footer-bottom {
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.30);
  font-size: 11px;
  opacity: 0.85;
  text-align: center;
}

/* === モバイル固定下部CTA === */
.mobile-bottom-cta { display: none; }

/* === レスポンシブ === */
@media (max-width: 1199px) {
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .header-inner { padding: 10px 16px; gap: 12px; }
  .logo { font-size: 15px; }
  .logo-mark { width: 32px; height: 32px; font-size: 12px; }
  .header-cta .btn { display: none; }
  .tel-link { font-size: 13px; padding: 5px 8px; }
  .section { padding: 48px 20px; }
  .page-hero { padding: 36px 20px; }
  .page-hero h1 { font-size: 23px; }
  .section-title { font-size: 22px; }
  .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
  .cta-options { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: 10px 8px; }

  /* モバイル下部固定CTA */
  .mobile-bottom-cta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--color-border);
    z-index: 999;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.10);
  }
  .mobile-bottom-cta a {
    padding: 12px 6px;
    text-align: center;
    color: var(--color-text);
    font-size: 11px;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-weight: bold;
  }
  .mobile-bottom-cta a:last-child { border-right: none; }
  .mobile-bottom-cta a.primary {
    background: var(--color-accent);
    color: white;
  }
  body { padding-bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
