/* FAQ HEROセクション */

.guide-hero h2 {
  font-size: 28px;
  margin-bottom: 4px;
  color: #2e7d32;
}

.guide-hero .lead {
  font-size: 15px;
  color: #555;
  margin: 0;
}

:root{
  --header-total: 96px;
}

/* ── HEROセクション ───────────────────────── */
.guide-hero {
  position: relative;
  background-image: url("../img/guide.jpg");
  background-size: cover;
  background-position: center center;    
  background-repeat: no-repeat;
  padding: 200px 20px 60px;             
  text-align: center;
  overflow: hidden;
}

.guide-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  z-index: 0;
}

.guide-hero .hero-content {
  position: relative;        
  top: auto;
  left: auto;
  transform: none;
  z-index: 1;
  text-align: center;
  margin: 0 auto;
  display: block;
}

.guide-hero h2,
.guide-hero .lead {
  position: relative;
  z-index: 1;
  color: #002b7f;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.guide-hero h2 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
}

.guide-hero .lead {
  font-size: 15px;
  line-height: 1.7;
  color:#555;
}


/* カテゴリーナビ（faq-nav） */
.faq-nav {
  background-color: #2e7d32;
  padding: 15px 0;
  text-align: center;
}

.faq-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.faq-nav li {
  display: inline-block;
}

.faq-nav a {
  padding: 8px 16px;
  background-color: #2e7d32;
  color: #ffffff;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.faq-nav a:hover {
  background-color: #1b5e20;
}



/* ── FAQナビゲーション ───────────────────────── */
.faq-nav {
  background-color: #4caf50;
  padding: 12px 0;           
  margin-top: 0;             
  margin-bottom: 24px;
}

.faq-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
  height: 100%; 
}

.faq-nav li {
  display: flex;
  align-items: center; 
  height: 100%;
}

.faq-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

.faq-nav a:hover {
  text-decoration: underline;
}


/* ── FAQセクション ───────────────────────── */
.section.faq {
  margin-bottom: 60px;
}

.faq-list {
  margin-top: 20px;
  text-align: left;
}

.faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}

.faq-question {
  font-weight: bold;
  cursor: pointer;
  position: relative;
  padding-left: 25px;
  text-align: left;
}

.faq-question .faq-toggle {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 18px;
  color: #4caf50;
}

.faq-answer {
  display: none;
  margin-top: 12px;
  padding-left: 25px;
  color: #000;
  line-height: 1.7;
  font-size: 15px;
  text-align: left;
}

/* ── アニメーション ───────────────────────── */
.fadein {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fadein.show {
  opacity: 1;
  transform: none;
}


/* ── アイテム ───────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  border: 1px solid #c8e6c9;
  border-radius: 6px;
  padding: 15px;
  background-color: #f1f8e9;
  transition: background-color 0.3s;
}

.faq-question {
  cursor: pointer;
  font-weight: bold;
  color: #2e7d32;
  display: flex;
  align-items: center;
}

.faq-toggle {
  margin-right: 8px;
  font-size: 18px;
}

.faq-answer {
  display: none;
  padding-top: 10px;
  color: #333;
  font-size: 14px;
}

/* ================================
   responsive
================================ */

/* <br class="sp-only"> をスマホのみ有効に */
.sp-only { 
  display: none; 
}

@media (max-width: 768px) {

  .sp-only { display: inline; }

  .guide-hero {
     margin-top: 0;
  }

  .guide-hero {
    background-position: center center;  
    padding: 120px 15px 40px;
    min-height: 300px;
  }

  .guide-hero .hero-content {
    width: 100%;
    max-width: 90%;
    padding: 0 12px;
    text-align: center;
    margin: 0 auto;
  }

  .guide-hero h2 {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 8px;
    text-wrap: balance;
    word-break: keep-all;
  }

  .guide-hero .lead {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    text-wrap: balance;
    word-break: keep-all;
  }

  .faq-nav {
    padding: 10px 0;
    margin-bottom: 16px;
  }

  .faq-nav ul {
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 10px;
    justify-content: center;
  }

  .faq-nav a {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background-color .2s ease;
  }

  .section.faq { margin-bottom: 40px; }

  .faq-item {
    padding: 12px;
    gap: 6px;
  }

  .faq-question {
    font-size: 15px;
    line-height: 1.5;
  }

  .faq-answer {
    font-size: 13px;
    line-height: 1.6;
  }

}

/* さらに小さい端末 */
@media (max-width: 420px) {

  .guide-hero {
    padding: 100px 12px 36px;
    min-height: 280px;
  }

  .guide-hero h2 { 
    font-size: 20px; 
  }

  .guide-hero .lead { 
    font-size: 13px; 
  }

}


/* ===============================
  修正
  （Guideページ専用、他ページへ非干渉）
================================ */

:root{
  --adminbar: 0px;
  --guide-hero-height-pc: 360px;  /* company相当の見た目高、必要なら微調整 */
  --guide-hero-height-sp: 240px;
}

body.page-template-page-guide-php .guide-hero{
  /* ヒーロー自体をヘッダー分だけ下げる（画像ごと下がる） */
  margin-top: var(--header-total) !important;
  padding-top: 0 !important; 

  /* 高さは固定の下限＋レイアウト維持 */
  min-height: var(--guide-hero-height-pc);

  /* 中央寄せ（縦横） */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  /* 常に画像の中央を見せる */
  background-position: center center !important;
}

/* 中身は通常フローのまま中央配置 */
body.page-template-page-guide-php .guide-hero .hero-content{
  display: block !important;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto !important;
  text-align: center !important;
  justify-content: initial !important;
  align-items: initial !important;
}

/* モバイルでも同じ思想：marginで下げ、中央寄せ */
@media (max-width: 768px){
  body.page-template-page-guide-php .guide-hero{
    margin-top: var(--header-total) !important;
    min-height: var(--guide-hero-height-sp);
    background-position: center center !important;
  }

  body.page-template-page-guide-php .guide-hero .hero-content{
    max-width: 90%;
  }
}

/* 念のため、ヒーロー直下の見出し・リードも中央起点に */
body.page-template-page-guide-php .guide-hero .hero-content > * {
  margin-left: auto;
  margin-right: auto;
}

/* 任意：<br class="sp-only"> をスマホだけ表示 */
.sp-only{ display:none; }
@media (max-width: 768px){ .sp-only{ display:inline; } }

/* =========================================================
   Guide page ヒーロー最終修正
========================================================= */
body.page-template-page-guide-php .guide-hero {
  /* ❶ ヒーロー自体を実位置で下げる（画像上端を出す） */
  margin-top: var(--fixed-top, 0px) !important;

  /* 見た目の高さは控えめに（必要なら調整） */
  min-height: clamp(320px, 42vh, 560px) !important;

  /* 画像は常に中心を見せる */
  background-position: center center !important;
  background-size: cover;
  background-repeat: no-repeat;

  /* 中央寄せ（周りの .container の影響を受けないように） */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  /* 余白は上下均等。margin 相殺の影響も受けにくい */
  padding: clamp(16px, 3vw, 28px) 20px !important;

  position: relative !important; /* 念のため基準化 */
  box-sizing: border-box;
}

/* ❷ 中身は通常フローのまま（絶対配置は不要） */
body.page-template-page-guide-php .guide-hero .hero-content {
  position: static !important;
  transform: none !important;
  width: min(1100px, 100%) !important;
  margin: 0 auto !important;
  text-align: center !important;

  /* .container が flex の場合に備えて打ち消し */
  display: block !important;
  justify-content: initial !important;
  align-items: initial !important;
}

/* 見出しの上マージンが相殺されないように0固定（安全策） */
body.page-template-page-guide-php .guide-hero h2 { margin-top: 0 !important; }

/* スマホも同様の思想（高さだけ少し控えめ） */
@media (max-width: 768px){
  body.page-template-page-guide-php .guide-hero{
    min-height: clamp(260px, 36vh, 420px) !important;
    background-position: center center !important;
  }
  body.page-template-page-guide-php .guide-hero .hero-content{
    width: min(90%, 1100px) !important;
  }
}

/* ===============================================
   Guide Page ヒーロー最終固定（他ページ非干渉）
=============================================== */

/* ❶ ヒーロー本体：画像ごと下げて、中央寄せ */
body.page-template-page-guide-php .guide-hero{
  /* ヘッダー計測のどちらかが入っていれば大きい方を採用 */
  margin-top: max(var(--fixed-top, 0px), var(--header-total, 0px)) !important;

  /* 高さと背景の見せ方 */
  min-height: clamp(320px, 42vh, 560px) !important;
  background-position: center center !important;
  background-size: cover;
  background-repeat: no-repeat;

  /* “見えている範囲”の中央に置く（上下同量パディングがコツ） */
  display: grid !important;
  place-items: center !important;
  padding-block: clamp(16px, 3vw, 28px) !important; /* 上下同量 */
  padding-inline: 20px !important;

  position: relative !important;
  box-sizing: border-box;
}

/* ❷ 中身：絶対配置や flex の影響を無効化して素直に中央へ */
body.page-template-page-guide-php .guide-hero .hero-content{
  position: static !important;
  transform: none !important;
  display: block !important;           /* 既存 .container の flex を無効化 */
  margin: 0 auto !important;
  width: min(1100px, 100%) !important;
  text-align: center !important;
}

/* 見出しの margin 相殺を封じて誤差ゼロに */
body.page-template-page-guide-php .guide-hero h2{ margin-top: 0 !important; }

/* スマホ：高さだけ控えめ（思想は同じ） */
@media (max-width: 768px){
  body.page-template-page-guide-php .guide-hero{
    min-height: clamp(260px, 36vh, 420px) !important;
    background-position: center center !important;
  }
  body.page-template-page-guide-php .guide-hero .hero-content{
    width: min(90%, 1100px) !important;
  }
}


/* ── FAQ小タイトル ───────────────────────── */
.section-subtitle{
  display:inline-block;
  margin: 0 0 6px;
  padding-left: .6em;
  border-left: 3px solid #c8a13a;   /* さりげない金色ライン */
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: .12em;
  font-weight: 700;
  color: #c8a13a;                   /* テーマの金色系に合わせる */
}

/* 小タイトルの下に来る見出しの余白を整える */
.section.faq .section-title{
  margin-top: 0;
}

/* スマホは少しだけ小さめ */
@media (max-width: 768px){
  .section-subtitle{
    font-size: 12px;
    border-left-width: 2px;
  }
}
