/*
Theme Name: Hojokin Navi
Theme URI: https://hojokin-kaigyo.com
Author: DK
Description: 補助金開業ナビ専用オリジナルテーマ。補助金DB(jGrants週次同期)搭載。ミラサポPlus系の「濃いティール×黄色マーカー×角丸カード」で親しみやすく。Article/Person構造化データ内蔵の軽量テーマ。
Version: 3.1.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: hojokin-navi
*/

:root {
  --teal: #10556C;
  --teal-deep: #0C4457;
  --teal-light: #E9F3F6;
  --yellow: #F7C948;
  --orange: #E8762D;
  --green: #2E7D4F;
  --purple: #6B4FA0;
  --red: #D95B43;
  --ink: #23333A;
  --ink-soft: #5A6E77;
  --line: #CFE0E6;
  --gothic: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--gothic);
  color: var(--ink);
  background: #fff;
  line-height: 1.9;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ===== ヘッダー ===== */
.site-header { background: #fff; }
.header-inner { padding: 20px 20px 12px; text-align: center; }
.site-title {
  display: inline-block;
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: .04em;
  background: linear-gradient(transparent 74%, var(--yellow) 74%);
  padding: 0 6px 2px;
}
.site-tag { font-size: .82rem; color: var(--ink-soft); margin-top: 6px; letter-spacing: .06em; }
.site-logo { width: 44px; height: 44px; border-radius: 10px; vertical-align: -10px; margin-right: 10px; }
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 22px; font-weight: 800; color: #fff; font-size: .95rem;
}
.footer-brand img { border-radius: 8px; }

.site-nav { background: var(--teal); }
.nav-list { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; }
.nav-list li a {
  display: block;
  padding: 14px 26px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  border-bottom: 4px solid transparent;
}
.nav-list li a:hover { background: var(--teal-deep); border-bottom-color: var(--yellow); }

/* ===== マーカー ===== */
.marker { background: linear-gradient(transparent 68%, var(--yellow) 68%); padding: 0 2px; }

/* ===== ヒーロー(トップ) ===== */
.hero { background: var(--teal-light); }
.hero-inner { max-width: 1080px; margin: 0 auto; padding: 44px 20px; display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.hero-copy { flex: 1 1 420px; }
.hero-copy h1 { font-size: 1.8rem; line-height: 1.6; margin-bottom: 14px; color: var(--teal); font-weight: 800; }
.hero-copy p { color: var(--ink-soft); font-size: .98rem; }
.hero-card {
  flex: 0 1 350px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 4px 0 var(--line);
}
.hero-card .who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hero-card .avatar {
  flex: 0 0 54px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; line-height: 1;
  border: 3px solid var(--yellow);
}
.hero-card .who strong { font-size: 1.05rem; }
.hero-card .who .role { display: block; font-size: .78rem; color: var(--orange); font-weight: 700; }
.hero-card p { font-size: .86rem; line-height: 1.8; color: var(--ink-soft); }

/* ===== セクション見出し ===== */
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--teal);
  margin: 44px 0 22px;
  text-align: center;
}
.section-title span {
  display: inline-block;
  background: linear-gradient(transparent 72%, var(--yellow) 72%);
  padding: 0 8px 2px;
}
.section-note { text-align: center; font-size: .82rem; color: var(--ink-soft); margin: -14px 0 20px; }

/* ===== 記事カード ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}
.card {
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  position: relative;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--teal); }
.card a.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--teal-light); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .card-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.card .cat {
  align-self: flex-start;
  background: var(--teal); color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: 4px 12px; letter-spacing: .06em;
  border-radius: 999px;
  margin-bottom: 10px;
}
.cat.cat-shikin { background: var(--green); }
.cat.cat-mujin { background: var(--purple); }
.cat.cat-taiken { background: var(--red); }
.card h2, .card h3 { font-size: 1.02rem; line-height: 1.55; font-weight: 700; margin-bottom: 8px; }
.card .excerpt { font-size: .85rem; color: var(--ink-soft); line-height: 1.7; flex: 1; }
.card .date { font-size: .76rem; color: #8fa3ac; margin-top: 12px; }
.card .card-body::after {
  content: "→";
  position: absolute;
  right: 14px; bottom: 12px;
  width: 30px; height: 30px;
  background: var(--yellow); color: var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem;
}

/* ===== 記事ページ ===== */
.breadcrumb { font-size: .8rem; color: var(--ink-soft); padding: 16px 0 0; }
.breadcrumb a { color: var(--ink-soft); }
.single-article { max-width: 780px; margin: 0 auto; padding: 10px 0 40px; }
.single-article .cat-badge {
  display: inline-block; background: var(--teal); color: #fff;
  font-size: .78rem; font-weight: 700; padding: 5px 16px;
  letter-spacing: .06em; border-radius: 999px;
  margin: 18px 0 12px; text-decoration: none;
}
.single-article h1.entry-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.55;
  margin-bottom: 12px;
}
.entry-meta { font-size: .82rem; color: var(--ink-soft); margin-bottom: 18px; }
.entry-meta .updated-date { color: var(--orange); font-weight: 700; }
.eyecatch { border: 2px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 8px; }
.eyecatch img { display: block; width: 100%; }

.entry-content { font-size: 1rem; }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
  background: var(--teal);
  margin-top: 2.2em;
  padding: 12px 18px;
  border-radius: 10px;
  border-left: 10px solid var(--yellow);
}
.entry-content h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--teal);
  margin-top: 1.8em;
  padding-bottom: 4px;
  border-bottom: 4px solid var(--yellow);
  display: inline-block;
}
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content li { margin: .3em 0; }
.entry-content a { color: var(--teal); font-weight: 600; }
.entry-content strong { background: linear-gradient(transparent 68%, #FBE9A8 68%); }

/* ===== 関連記事・ページネーション ===== */
.related { max-width: 1080px; margin: 24px auto 40px; }
.navigation.pagination { margin: 36px 0; text-align: center; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.nav-links .page-numbers {
  display: inline-block; padding: 8px 16px;
  border: 2px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink); font-weight: 700;
}
.nav-links .page-numbers.current { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ===== フッター ===== */
.site-footer { background: var(--teal); color: #DCEBF1; margin-top: 60px; border-top: 6px solid var(--yellow); }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 34px 20px 26px; }
.footer-note { font-size: .8rem; line-height: 1.9; opacity: .9; }
.footer-copy { font-size: .78rem; margin-top: 16px; opacity: .75; text-align: center; letter-spacing: .06em; }
.site-footer a { color: #fff; }

/* ===== アーカイブ ===== */
.archive-header { background: var(--teal-light); padding: 30px 0; margin-bottom: 30px; }
.archive-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--teal); }
.archive-header p { font-size: .88rem; color: var(--ink-soft); margin-top: 6px; }

/* ===== ヒーロー内: 実績チップ・イラスト・検索カード ===== */
.stat-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; }
.stat-chip {
  background: #fff; border: 2px solid var(--line); border-radius: 999px;
  padding: 6px 16px; font-size: .82rem; color: var(--ink-soft);
}
.stat-chip strong { color: var(--teal); }
.hero-art { max-width: 460px; margin-top: 10px; }
.hero-art svg { width: 100%; height: auto; display: block; }

.search-card {
  flex: 0 1 360px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 4px 0 var(--line);
}
.search-title { font-weight: 800; color: var(--teal); font-size: 1.05rem; margin-bottom: 6px; }
.search-count { font-size: .8rem; color: var(--ink-soft); margin-bottom: 12px; }
.search-count strong { color: var(--orange); font-size: 1.25rem; }
.search-card label, .shindan-form label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 10px; }
.search-card select, .shindan-form select, .filter-bar select {
  display: block; width: 100%; margin-top: 4px;
  padding: 10px 12px; font-size: .95rem;
  border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.btn-primary {
  display: block; width: 100%;
  background: var(--teal); color: #fff;
  border: none; border-radius: 999px;
  padding: 13px 26px; font-size: 1rem; font-weight: 800;
  cursor: pointer; text-align: center; text-decoration: none;
  margin-top: 6px;
}
.btn-primary:hover { background: var(--teal-deep); }
.btn-orange { background: var(--orange); }
.btn-orange:hover { background: #C9611E; }

/* ===== 診断・特集バナー ===== */
.banner-row { display: flex; gap: 18px; margin: 26px 0 4px; flex-wrap: wrap; }
.banner {
  flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px;
  border-radius: 14px; padding: 18px 22px; text-decoration: none; color: #fff;
}
.banner-orange { background: linear-gradient(120deg, var(--orange), #F0964C); }
.banner-green { background: linear-gradient(120deg, var(--green), #4C9E71); }
.banner-label { font-size: .75rem; font-weight: 800; background: rgba(255,255,255,.25); border-radius: 999px; padding: 2px 12px; align-self: flex-start; }
.banner-text { font-size: 1.05rem; font-weight: 800; }
.banner:hover { opacity: .92; }

/* ===== 補助金カード ===== */
.hojokin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.hcard {
  border: 2px solid var(--line); border-radius: 16px; background: #fff;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s ease;
  display: flex; flex-direction: column;
}
.hcard:hover { transform: translateY(-4px); border-color: var(--teal); }
.hcard-head {
  position: relative; overflow: hidden;
  padding: 18px 18px; min-height: 96px;
  display: flex; flex-direction: column; justify-content: center;
}
.hcard-deco {
  position: absolute; right: -4px; top: 0; height: 100%; width: 130px;
  pointer-events: none;
}
.hcard-agency { color: #fff; opacity: .85; font-size: .72rem; margin-top: 4px; position: relative; }
.hcard-amount { color: #fff; font-size: 1.55rem; font-weight: 800; line-height: 1.2; position: relative; }
.hcard-amount span { font-size: .8rem; font-weight: 700; opacity: .9; margin-right: 8px; }
.hcard-body { padding: 14px 18px 16px; flex: 1; }
.hcard-body h3 { font-size: 1rem; line-height: 1.5; margin-bottom: 8px; }
.hcard-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); font-weight: 700; }
.hcard-tags { font-size: .78rem; color: var(--teal); margin-top: 8px; }
.hcard-tags a { text-decoration: none; }
.more-link { text-align: center; margin: 18px 0 6px; }
.more-link a { font-weight: 800; color: var(--teal); }

/* ===== 診断 ===== */
.shindan-card {
  background: var(--teal-light); border: 2px solid var(--line); border-radius: 16px;
  padding: 26px 28px; max-width: 640px; margin: 0 auto;
}
.shindan-lead { font-weight: 700; text-align: center; margin-bottom: 14px; }
.shindan-note { font-size: .76rem; color: var(--ink-soft); margin-top: 12px; text-align: center; }

/* ===== ご利用の流れ ===== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.step { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 20px 18px; text-align: center; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 8px;
}
.step-t { font-weight: 800; margin-bottom: 4px; }
.step-d { font-size: .82rem; color: var(--ink-soft); line-height: 1.7; }

/* ===== FAQ ===== */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: #fff; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq summary {
  cursor: pointer; padding: 14px 18px; font-weight: 800; color: var(--teal);
  list-style: none; position: relative; padding-left: 46px;
}
.faq summary::before {
  content: "Q"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: var(--teal);
  display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
}
.faq details p { padding: 0 18px 16px 46px; color: var(--ink-soft); font-size: .92rem; }

/* ===== 都道府県 ===== */
.pref-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pref-grid a {
  border: 2px solid var(--line); border-radius: 999px; padding: 6px 16px;
  font-size: .84rem; font-weight: 700; text-decoration: none; color: var(--ink-soft);
}
.pref-grid a:hover { border-color: var(--teal); color: var(--teal); }

/* ===== 補助金 詳細・一覧 ===== */
.hojokin-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin: 14px 0 10px;
}
.hs-item { background: var(--teal-light); border-radius: 12px; padding: 12px 14px; text-align: center; }
.hs-label { display: block; font-size: .74rem; font-weight: 700; color: var(--ink-soft); }
.hs-value { font-weight: 800; color: var(--teal); }
.hs-big { font-size: 1.3rem; }
.official-btn-wrap { max-width: 420px; margin: 24px auto; }
.hojokin-caution { font-size: .8rem; color: var(--ink-soft); background: #FFF6E0; border: 2px solid #F2E3C8; border-radius: 10px; padding: 12px 16px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; align-items: end; }
.filter-bar select { width: auto; min-width: 160px; }
.filter-bar .btn-primary { width: auto; padding: 11px 28px; margin: 0; }
.empty-state { text-align: center; padding: 40px 0; color: var(--ink-soft); }

/* ===== 運営者について(プリフッター) ===== */
.prefooter { background: var(--teal-light); padding: 10px 0 40px; margin-top: 60px; }
.prefooter-card {
  background: #fff; border: 2px solid var(--line); border-radius: 16px;
  padding: 24px 28px; display: flex; gap: 20px; align-items: flex-start;
  max-width: 860px; margin: 0 auto;
}
.prefooter-card .avatar {
  flex: 0 0 60px; width: 60px; height: 60px; border-radius: 50%;
  background: var(--teal); color: #fff; border: 3px solid var(--yellow);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; line-height: 1;
}
.pf-name { font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }
.pf-name .role { display: block; font-size: .78rem; color: var(--orange); font-weight: 700; }
.pf-text { font-size: .88rem; color: var(--ink-soft); line-height: 1.9; }
.site-footer { margin-top: 0; }

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .site-title { font-size: 1.45rem; }
  .nav-list li a { padding: 11px 13px; font-size: .85rem; }
  .hero-inner { padding: 30px 20px; }
  .hero-copy h1 { font-size: 1.4rem; }
  .single-article h1.entry-title { font-size: 1.4rem; }
  .entry-content h2 { font-size: 1.18rem; }
}
