/* ============================================================
   おうちで歯科 — カスタムスタイル
   ブランドカラー:
     Primary  : #1A8055  (ダークグリーン)
     Light    : #45D88E  (ライトグリーン)
     Call     : #E07845  (オレンジ ─ 電話ボタン専用)
   ============================================================ */

html { scroll-behavior: smooth; }

/* ============================================================
   タイポグラフィ基礎（デザイン4原則: コントラスト・整列）
   ============================================================ */
p { line-height: 1.85; }
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* 本文と見出しのコントラスト強化 */
h2 { color: #111827; }
h3 { color: #1f2937; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }

body {
  overflow-x: hidden;
  font-family: 'M PLUS Rounded 1c', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color: #111827;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* --- ヒーロー --- */
.hero-section {
  min-height: 70vh;
  background-color: #1A8055;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* サブページヒーロー */
.page-hero {
  min-height: 220px;
  background-color: #1A8055;
  background-size: cover;
  background-position: center;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,128,85,0.92) 0%, rgba(69,216,142,0.55) 100%);
}

/* --- カード --- */
.card-hover {
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

/* --- 画像エリア --- */
.img-area {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.img-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-area img.illust {
  object-fit: contain;
}

/* --- 診療時間テーブル --- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.hours-table th {
  background-color: #1A8055;
  color: white;
  padding: 9px 6px;
  text-align: center;
  font-weight: 600;
}
.hours-table td {
  padding: 9px 6px;
  text-align: center;
  border: 1px solid #E5E7EB;
}
.hours-table td.available { color: #1A8055; font-weight: 700; font-size: 1.1rem; }
.hours-table td.closed    { color: #D1D5DB; }

/* --- FAQ アコーディオン --- */
.faq-item { border-bottom: 1px solid #E5E7EB; }

.faq-question {
  cursor: pointer;
  padding: 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.2s;
  user-select: none;
}
.faq-question:hover { color: #1A8055; }

@media (min-width: 1024px) {
  .faq-question { padding: 22px 0; gap: 16px; }
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-item.active .faq-answer { max-height: 800px; }

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1A8055;
  color: white;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.3s ease;
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background-color: #45D88E;
}

/* --- ステップ (flow) --- */
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #1A8055;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* --- ボタン --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 50px;
  padding: 13px 28px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  white-space: nowrap;
}
.btn-primary { background-color: #1A8055; color: white; }
.btn-primary:hover { background-color: #145C3C; box-shadow: 0 4px 16px rgba(26,128,85,0.25); }
.btn-accent  { background-color: #E07845; color: white; }
.btn-accent:hover  { background-color: #C0613A; box-shadow: 0 4px 16px rgba(224,120,69,0.25); }
.btn-outline { border: 2px solid #1A8055; color: #1A8055; background: transparent; }
.btn-outline:hover { background-color: #1A8055; color: white; }

/* --- セクションラベル --- */
.section-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #1A8055;
  display: inline-block;
  margin-bottom: 12px;
}

/* --- 引用ボックス --- */
.quote-box {
  border-left: 3px solid #45D88E;
  padding: 16px 20px;
  background: #F9FAFB;
  border-radius: 0 8px 8px 0;
}
.quote-box p { font-size: 1.1rem; font-weight: 700; color: #111827; line-height: 1.6; }

/* --- アニメーション --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-up   { animation: fadeInUp 0.6s ease-out both; }
.anim-up-1 { animation-delay: 0.1s; }
.anim-up-2 { animation-delay: 0.2s; }
.anim-up-3 { animation-delay: 0.3s; }
.anim-up-4 { animation-delay: 0.4s; }

/* ページ内アンカー調整 */
:target { scroll-margin-top: 96px; }

/* ============================================================
   パフォーマンス最適化
   ============================================================ */

/* pictureタグのCLS防止 */
picture { display: block; }
picture img { display: block; width: 100%; height: auto; }
.img-area picture, .img-area picture img {
  width: 100%; height: 100%; object-fit: cover;
}
.img-area picture img.illust { object-fit: contain; }

/* フォーカスインジケーター（アクセシビリティ） */
:focus-visible {
  outline: 3px solid #45D88E;
  outline-offset: 2px;
  border-radius: 4px;
}

/* リデュースモーション対応（アクセシビリティ） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* タップターゲット最小サイズ保証 */
a, button { min-height: 44px; min-width: 44px; }
nav a { min-height: auto; }

/* 印刷 */
@media print {
  header, footer, .no-print { display: none !important; }
  body { background: white; font-size: 11pt; }
}

/* フローティングボタンがコンテンツに被らないよう余白 */
@media (max-width: 639px) {
  body { padding-bottom: 80px; }
}

/* --- エリアタグ --- */
.area-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #f0fdf4;
  color: #1A8055;
  border: 1px solid #bbf7d0;
}

/* ============================================================
   モバイル対応
   ============================================================ */
@media (min-width: 640px) {
  .hero-section { min-height: 80vh; }
}

@media (max-width: 639px) {
  /* ボタン */
  .btn { width: 100%; justify-content: center; }
  .no-mobile-full { width: auto; }

  /* フローティングボタン */
  .fixed.bottom-6.right-6 {
    bottom: 1rem;
    right: 1rem;
    padding: 10px 14px;
    font-size: 0.85rem;
    gap: 6px;
  }

  /* ヘッダーロゴ：モバイルは少し小さく */
  header img { height: 3.5rem; }
  header .h-20 { height: 4rem; }

  /* ヒーローの文字サイズ調整 */
  .hero-section h1 { font-size: 2.5rem; }

  /* フォーム入力: iOS zoom防止（16px以上必須） */
  input, select, textarea {
    font-size: 1rem !important;
  }

  /* タッチターゲット最小44px */
  .btn, a[href^="tel"] {
    min-height: 44px;
  }

  /* テーブル横スクロール */
  .hours-table { font-size: 0.78rem; }
  .hours-table th, .hours-table td { padding: 7px 4px; }

  /* ============================================================
     デザイン4原則 — モバイル最適化
     近接: セクション内の要素間隔を適正化
     整列: 見出し・本文の縦リズムを統一
     反復: 見出しサイズを一定に保つ
     コントラスト: 見出しと本文の差を明確に
     ============================================================ */

  /* 近接: セクション間のpy-20をモバイルで縮小 */
  section.py-20 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  section.py-16 { padding-top: 3rem; padding-bottom: 3rem; }

  /* 整列: 段落テキストの行間を適正化 */
  p { line-height: 1.75; }

  /* コントラスト: 本文グレーをやや濃くして読みやすく */
  .text-gray-600 { color: #4b5563; }

  /* 反復: section-labelを統一サイズに */
  .section-label { font-size: 0.65rem; margin-bottom: 8px; }

  /* 近接: カード内のgridのgapを統一 */
  .faq-answer { font-size: 0.875rem; }

  /* 整列: ページヒーローの高さをモバイルで調整 */
  .page-hero { min-height: 160px; }
}

/* タブレット対応 */
@media (max-width: 1023px) and (min-width: 640px) {
  /* ステップ番号の接続線: タブレットで適切に */
  .step-number { width: 48px; height: 48px; font-size: 1.1rem; }
}

.overflow-x-auto { -webkit-overflow-scrolling: touch; }

/* フォームフィールド: タップしやすく */
input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  -webkit-appearance: none;
  border-radius: 8px;
  font-size: 1rem;
}

/* スムーズスクロールのモバイル改善 */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ============================================================
   ウェーブ区切り（ヒーロー底部など）
   ============================================================ */
.wave-wrap {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}
.wave-wrap svg { display: block; width: 100%; }

/* ============================================================
   プレスバッジ（文藝春秋など掲載証）
   ============================================================ */
.press-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50px;
  font-size: 0.78rem;
  color: white;
  font-weight: 700;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
}

/* ============================================================
   セクションラベル — 装飾ライン付き
   ============================================================ */
.section-label-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
}
.section-label-wrap.center { align-items: center; }
.section-label-wrap .section-label { margin-bottom: 0; }
.section-label-line {
  display: block;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, #45D88E, transparent);
  margin-top: 6px;
  border-radius: 2px;
}
.section-label-wrap.center .section-label-line {
  background: linear-gradient(90deg, transparent, #45D88E, transparent);
  width: 48px;
}

/* ============================================================
   暖かみ CTAバンド
   ============================================================ */
.cta-band {
  background: linear-gradient(135deg, #155f3f 0%, #1A8055 50%, #22a06b 100%);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -8%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.cta-band::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

/* ============================================================
   信頼バッジ — アイコン付き（Aboutセクション用）
   ============================================================ */
.trust-item {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid #e5f5ec;
  border-left: 3px solid #45D88E;
  box-shadow: 0 1px 4px rgba(26,128,85,0.06);
}
.trust-item-text {
  font-size: 0.75rem;
  color: #374151;
  line-height: 1.5;
  font-weight: 500;
}

/* ============================================================
   メディア掲載バッジ
   ============================================================ */
.media-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  border-left: 3px solid #45D88E;
}
.media-item-label {
  font-size: 0.7rem;
  color: #45D88E;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.media-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
}

/* ============================================================
   カードのトップアクセントライン
   ============================================================ */
.card-accent-top {
  border-top: 3px solid #45D88E;
}

/* ============================================================
   フロー — コネクタライン（PC）
   ============================================================ */
.flow-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #45D88E 0%, #d1fae5 100%);
  align-self: center;
  margin-top: -24px;
  min-width: 20px;
}
@media (max-width: 767px) {
  .flow-connector {
    width: 2px;
    height: 20px;
    min-width: auto;
    flex: none;
    margin-top: 0;
    margin-left: 27px;
    background: linear-gradient(180deg, #45D88E, #d1fae5);
  }
}

/* ============================================================
   ヒーロー統計ピル
   ============================================================ */
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  min-width: 80px;
}
.hero-stat-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

/* ============================================================
   ページヒーロー — より洗練
   ============================================================ */
.page-hero {
  min-height: 220px;
  background-color: #1A8055;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(21,95,63,0.95) 0%, rgba(69,216,142,0.45) 100%);
}
.page-hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ============================================================
   特徴バー — アイテム改善
   ============================================================ */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: white;
  padding: 8px 12px;
  border-radius: 16px;
  transition: background 0.2s;
}
.feature-item:hover {
  background: rgba(255,255,255,0.08);
}
.feature-item + .feature-item {
  border-left: 1px solid rgba(255,255,255,0.15);
}
@media (max-width: 767px) {
  .feature-item + .feature-item { border-left: none; }
}

/* ============================================================
   引用ボックス — バリエーション（ゆるめ）
   ============================================================ */
.warm-quote {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-radius: 16px;
  padding: 20px 24px;
  border-left: 4px solid #45D88E;
  position: relative;
}
.warm-quote::before {
  content: '\201C';
  position: absolute;
  top: -4px;
  left: 20px;
  font-size: 3rem;
  color: #45D88E;
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.5;
}

/* ============================================================
   Tailwind補完ユーティリティ
   （コンパイル済み tailwind.css に含まれていないクラス）
   ============================================================ */
.w-3  { width:  0.75rem; }
.h-3  { height: 0.75rem; }
.w-9  { width:  2.25rem; }
.h-9  { height: 2.25rem; }
.mt-5 { margin-top: 1.25rem; }
.opacity-75 { opacity: 0.75; }
.opacity-80 { opacity: 0.80; }
.pt-0\.5 { padding-top:    0.125rem; }
.mb-0\.5 { margin-bottom:  0.125rem; }

@media (min-width: 640px) {
  .sm\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
}
@media (min-width: 768px) {
  .md\:w-32 { width: 8rem; }
}
@media (min-width: 1024px) {
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .lg\:mb-5     { margin-bottom: 1.25rem; }
  .lg\:mb-10    { margin-bottom: 2.5rem; }
  .lg\:mb-12    { margin-bottom: 3rem; }
  .lg\:mb-8     { margin-bottom: 2rem; }
  .lg\:p-7      { padding: 1.75rem; }
  .lg\:p-5      { padding: 1.25rem; }
}

/* ヒーロー統計ピル — モバイルで2×2グリッド */
@media (max-width: 639px) {
  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(2, auto);
    gap: 8px;
    justify-content: start;
  }
}
