/* =============================================
   front-page.css
   フロントページ（全国補助金一覧）専用スタイル
   共通ベース → hpseo-style.css
   ============================================= */

/* ── ページタイトル ── */
.fp-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 8px;
  line-height: 1.5;
}

/* ── メインコンテンツ ── */
.fp-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 0;
}

/* ── 導入テキスト ── */
.fp-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
  line-height: 2;
  font-size: 15px;
}
.fp-intro h2 {
  font-size: 1.2em;
  color: var(--primary-dark);
  margin: 20px 0 8px;
  padding: 6px 0;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* ── タイル型日本地図 ── */
.subsidy-map-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px 32px;
  margin-bottom: 40px;
}
.subsidy-map-note {
  text-align: center;
  font-size: .88rem;
  color: #777;
  margin-bottom: 20px;
}
.subsidy-tile-map {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 3px;
  max-width: 780px;
  margin: 0 auto;
  aspect-ratio: 13 / 15;
}
.subsidy-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, filter .12s;
  text-decoration: none !important;
  line-height: 1.2;
  text-align: center;
  min-height: 0;
  padding: 2px;
  overflow: hidden;
  white-space: nowrap;
}
.subsidy-tile:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
  filter: brightness(1.06);
  z-index: 2;
  position: relative;
  color: #fff !important;
}
.subsidy-tile:visited { color: #fff !important; }
.subsidy-tile-span { font-size: 1.05rem; }
.subsidy-tile-big  { font-size: 1.2rem; letter-spacing: .05em; }
.subsidy-tile-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  color: #bbb;
  letter-spacing: 2px;
  pointer-events: none;
  user-select: none;
}

/* 地方カラー */
.r-hokkaido { background: #7B50B0; }
.r-tohoku   { background: #3068B8; }
.r-kanto    { background: #2898C8; }
.r-chubu    { background: #258E78; }
.r-kinki    { background: #558B30; }
.r-chugoku  { background: #908228; }
.r-shikoku  { background: #C86820; }
.r-kyushu   { background: #C04858; }

/* 地図凡例 */
.subsidy-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 20px;
  font-size: .78rem;
  color: #666;
}
.subsidy-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.subsidy-map-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  font-style: normal;
}

@media (max-width: 767px) {
  .subsidy-map-section { display: none !important; }
}

/* ── 都道府県リスト ── */
.subsidy-section-title-wrap {
  text-align: center;
  margin-bottom: 16px;
}
.subsidy-section-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
  margin-bottom: 16px;
}
.subsidy-pref-group {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.subsidy-pref-group dt {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: 8px 16px;
  margin: 0;
}
.subsidy-pref-group .dd-wrap {
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
}
.subsidy-pref-group dd {
  margin: 0;
}
.subsidy-pref-group dd a {
  display: inline-block;
  padding: 8px 14px;
  font-size: .9rem;
  color: var(--primary-dark);
  border-radius: 4px;
  transition: background .12s;
  text-decoration: none;
}
.subsidy-pref-group dd a:hover {
  background: var(--primary-light);
}

/* ── シミュレーション誘導（既存 .cta-section / .cta-btn を流用。上下セクションとの間隔のみ調整）── */
.fp-sim-cta {
  margin: 40px 0 24px;
}
/* SP改行用（fp-title / CTA見出し 等）: PCでは改行させない */
.fp-main .sp-br {
  display: none;
}
@media screen and (max-width: 767px) {
  /* SPのみ改行を有効化（fp-title、CTA見出し） */
  .fp-main .sp-br {
    display: inline;
  }
  /* SPはリード文を左寄せ（h2・ボタンは中央のまま） */
  .fp-sim-cta p {
    text-align: left;
  }
  /* SPは導入セクションの p も左寄せ（h2は中央のまま） */
  .fp-intro p {
    text-align: left;
  }
  /* SPは fp-title のフォントサイズを調整 */
  .fp-title {
    font-size: 1.7rem;
  }
  /* SPは導入見出しを block 化＋行間調整（2行になるため） */
  .fp-intro h2 {
    display: block;
    line-height: 1.5;
    font-size: 1.4rem;
  }
  /* SPは見出しの行間を広げる（2行になるため） */
  .fp-sim-cta h2 {
    line-height: 1.5;
  }
  /* SPはCTAボタンの左右paddingを詰める（1行に収めるため） */
  .fp-sim-cta .cta-btn {
    padding: 16px 20px;
  }
}

/* フッターは hpseo-style.css の .hpseo-footer で共通管理 */
