/* ============================================================
   税理士紹介比較ナビ - 共通CSS
   ============================================================ */

:root {
  --color-primary: #1e4fa0;
  --color-primary-dark: #163a7a;
  --color-primary-light: #3a6dc8;
  --color-accent: #2a7de1;
  --color-accent-hover: #1d65c0;
  --color-text: #1a2035;
  --color-text-secondary: #4a5568;
  --color-text-light: #718096;
  --color-bg: #f7f9fc;
  --color-bg-white: #ffffff;
  --color-border: #dce3ee;
  --color-success: #2d9e6b;
  --color-cta: #2563eb;
  --color-cta-hover: #1d4ed8;
  --font-base: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --max-width: 960px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   ヘッダー
   ============================================================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.site-header__trust {
  background: #f0f4fb;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 4px 24px;
  font-size: .75rem;
  color: var(--color-text-secondary);
}

.site-header__trust span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  gap: 24px;
}

.site-header__logo {
  flex-shrink: 0;
}

.site-header__logo img {
  height: 36px;
  width: auto;
}

.site-header__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.site-header__nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

.site-header__nav a {
  display: block;
  padding: 8px 12px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.site-header__nav a:hover {
  background: #eef3fb;
  color: var(--color-primary);
  text-decoration: none;
}

.site-header__cta {
  flex-shrink: 0;
}

.btn-cta {
  display: inline-block;
  background: var(--color-cta);
  color: #fff !important;
  font-size: .875rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .15s, transform .1s;
  text-decoration: none !important;
  line-height: 1.4;
}

.btn-cta:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
}

/* ハンバーガー */
.site-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  background: none;
  border: none;
}

.site-header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all .25s;
}

/* SPドロワー */
.sp-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.sp-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
}

.sp-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 320px);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sp-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.sp-drawer__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  line-height: 1;
}

.sp-drawer__nav {
  flex: 1;
  padding: 8px 0;
}

.sp-drawer__nav a {
  display: block;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid #f0f4fb;
}

.sp-drawer__nav a:hover {
  background: #f7f9fc;
  text-decoration: none;
}

.sp-drawer__footer {
  padding: 20px;
  border-top: 1px solid var(--color-border);
}

.sp-drawer__footer .btn-cta {
  display: block;
  text-align: center;
  padding: 14px;
  font-size: 1rem;
}

/* SP固定CTA */
.sp-fixed-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-cta);
  z-index: 150;
  padding: 12px 16px;
}

.sp-fixed-cta a {
  display: block;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
}

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
  background: #1a2035;
  color: #c8d3e8;
  padding: 48px 24px 24px;
  margin-top: 80px;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer__top {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.site-footer__logo img {
  height: 32px;
  width: auto;
  opacity: .9;
}

.site-footer__desc {
  margin-top: 12px;
  font-size: .8rem;
  color: #8899bb;
  line-height: 1.7;
}

.site-footer__nav-title {
  font-size: .75rem;
  font-weight: 700;
  color: #8899bb;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}

.site-footer__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__nav-list a {
  font-size: .85rem;
  color: #c8d3e8;
  text-decoration: none;
}

.site-footer__nav-list a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer__cta {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer__cta-text {
  font-size: .9rem;
  color: #c8d3e8;
}

.site-footer__bottom {
  text-align: center;
  padding-top: 24px;
  font-size: .75rem;
  color: #6677aa;
}

/* ============================================================
   パンくず
   ============================================================ */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}

.breadcrumb__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: .8rem;
  color: var(--color-text-light);
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: '>';
  color: var(--color-border);
}

.breadcrumb__item a {
  color: var(--color-text-secondary);
}

.breadcrumb__item a:hover {
  color: var(--color-primary);
}

/* ============================================================
   メインコンテンツ
   ============================================================ */
.site-main {
  min-height: 60vh;
}

.content-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.content-section {
  padding: 48px 0;
}

.content-section + .content-section {
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   見出し
   ============================================================ */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 8px;
}

.section-title--lg {
  font-size: 1.75rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

h2.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--color-accent);
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: middle;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--color-accent);
}

/* ============================================================
   CTA
   ============================================================ */
.cta-box {
  background: linear-gradient(135deg, #1e4fa0 0%, #2563eb 100%);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  margin: 48px 0;
  color: #fff;
}

.cta-box__title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.cta-box__text {
  font-size: .9rem;
  color: #fff;
  opacity: .9;
  margin-bottom: 24px;
  line-height: 1.7;
}

.cta-box__button {
  display: inline-block;
  background: #fff;
  color: var(--color-cta) !important;
  font-size: 1rem;
  font-weight: 800;
  padding: 14px 36px;
  border-radius: var(--radius);
  text-decoration: none !important;
  transition: transform .15s, box-shadow .15s;
}

.cta-box__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.cta-box__tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cta-box__tag {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .78rem;
}

/* ============================================================
   図解
   ============================================================ */
.content-figure {
  margin: 32px 0;
}

.content-figure__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
}

.content-figure__image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.content-figure__caption {
  text-align: center;
  font-size: .8rem;
  color: var(--color-text-light);
  margin-top: 8px;
}

/* ============================================================
   比較表
   ============================================================ */
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  background: #fff;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: .875rem;
  vertical-align: top;
}

.comparison-table th {
  background: #1e4fa0;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:nth-child(even) td {
  background: #f7f9fc;
}

.comparison-table td:first-child {
  font-weight: 700;
  white-space: nowrap;
}

.comparison-table--highlight td {
  background: #eef6ff !important;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item__question {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  margin: 0;
  line-height: 1.5;
  border-left: none;
}

.faq-item__question::before {
  content: 'Q';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
}

.faq-item__answer {
  padding: 0 20px 20px 60px;
  font-size: .9rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ============================================================
   関連記事カード
   ============================================================ */
.related-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px 0;
}

.related-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color .15s, box-shadow .15s;
  text-decoration: none !important;
  display: block;
}

.related-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.related-card__label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.related-card__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.related-card__text {
  font-size: .78rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ============================================================
   定義ボックス
   ============================================================ */
.definition-box {
  background: #eef3fb;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.definition-box p {
  font-size: .95rem;
  line-height: 1.8;
}

/* ============================================================
   インフォボックス
   ============================================================ */
.info-box {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
}

/* ============================================================
   テキスト
   ============================================================ */
p {
  margin-bottom: 16px;
  font-size: .95rem;
  line-height: 1.85;
  color: var(--color-text-secondary);
}

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 16px;
}

li {
  font-size: .9rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

strong { color: var(--color-text); }

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 768px) {
  .site-header__nav,
  .site-header__cta,
  .site-header__trust {
    display: none;
  }

  .site-header__hamburger {
    display: flex;
  }

  .sp-fixed-cta {
    display: block;
  }

  body {
    padding-bottom: 64px;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .related-links {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 32px 0;
  }

  .cta-box {
    padding: 28px 20px;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .section-title--lg {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .content-inner {
    padding: 0 16px;
  }
}

/* ページヒーロー共通：サブテキスト・バッジの文字色保証 */
.page-hero__sub,
.comparison-hero__lead,
.comparison-hero__badge {
  color: #fff;
}
