/* =========================================================
   ヒアリングフォーム（hf-*） ステップ式ウィザード
   ========================================================= */

/* ページ上部リード（緑地・幾何学柄・見出し＋ゴールド帯）
   ※ <body class="has-hero"> のフローティングヘッダー（およそ70px）の下に
     コンテンツが隠れないよう、上部 padding を厚めに確保しています。 */
.hearing-form-intro {
  --hearing-intro-bg: #1d9e75;
  --hearing-intro-pattern-size: 140px;
  --hearing-intro-pattern-opacity: 0.5;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: 116px 24px 56px;
  text-align: center;
  background: var(--hearing-intro-bg);
}

/* Memphis 風パターン（hero.css と同一 SVG） */
.hearing-form-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--hearing-intro-pattern-opacity);
  background-repeat: repeat;
  background-size: var(--hearing-intro-pattern-size) var(--hearing-intro-pattern-size);
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='white' fill-opacity='0.28'%3E%3Ccircle cx='22' cy='34' r='5'/%3E%3Ccircle cx='128' cy='100' r='3.5'/%3E%3Ccircle cx='88' cy='16' r='2.5'/%3E%3Ccircle cx='48' cy='112' r='2.5'/%3E%3Ccircle cx='140' cy='50' r='2'/%3E%3Cpolygon points='118,130 130,148 106,148'/%3E%3C/g%3E%3Cg fill='none' stroke='white' stroke-opacity='0.28' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='104' cy='30' r='8'/%3E%3Cpath d='M 18 84 q 6 -8 12 0 t 12 0 t 12 0'/%3E%3Cpath d='M 72 70 v 12 M 66 76 h 12'/%3E%3Cpath d='M 148 118 l -8 8 M 140 118 l 8 8'/%3E%3Cpolygon points='150 80, 158 90, 150 100, 142 90'/%3E%3Cpath d='M 30 148 q 5 -5 10 0'/%3E%3C/g%3E%3C/svg%3E");
}

.hearing-form-intro-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* リード内が見出しのみ（黄色帯なし）のとき、下余白を詰める */
.hearing-form-intro-inner > .hearing-form-intro-title:last-child {
  margin-bottom: 0;
}

.hearing-form-intro-title {
  margin: 0 0 22px;
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-shadow:
    0 3px 0 rgba(0, 60, 40, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

/* .hero-features と同系 */
.hearing-form-intro-highlight {
  font-size: 18px;
  font-weight: 700;
  color: #0e5e45;
  margin: 0;
  padding: 14px 24px;
  background: #f3c94a;
  border: 1px solid rgba(14, 94, 69, 0.12);
  border-radius: 8px;
  letter-spacing: 0.02em;
  line-height: 1.65;
  box-shadow: 0 6px 18px rgba(120, 80, 0, 0.25);
  max-width: 100%;
  box-sizing: border-box;
}

@media screen and (max-width: 900px) {
  .hearing-form-intro {
    padding: 96px 20px 44px;
    /* width:100% + 横パディングでビューポートを超えないように（PC未指定のまま） */
    box-sizing: border-box;
    max-width: 100%;
  }
  .hearing-form-intro-inner {
    max-width: 100%;
    box-sizing: border-box;
  }
  .hearing-form-intro-title {
    font-size: 28px;
    margin-bottom: 18px;
  }
  .hearing-form-intro-highlight {
    font-size: 15px;
    padding: 12px 18px;
  }
}

@media screen and (max-width: 600px) {
  .hearing-form-intro {
    padding: 84px 16px 36px;
    --hearing-intro-pattern-size: 120px;
  }
  .hearing-form-intro-title {
    font-size: 22px;
    margin-bottom: 16px;
  }
  .hearing-form-intro-highlight {
    font-size: 13px;
    padding: 10px 14px;
    text-align: left;
    width: 100%;
    /* width:100% + 横パディングでパネルがはみ出さないよう箱モデルを補正 */
    box-sizing: border-box;
    max-width: 100%;
  }
}

.hf-section { padding: 56px 20px; background: #f6f8f8; }
.hf-container { max-width: 840px; margin: 0 auto; }

/* ---------- 進捗バー ---------- */
.hf-progress {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 24px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.hf-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #555;
}
.hf-progress-label { font-weight: 600; }
.hf-progress-label strong { color: #1D9E75; font-size: 20px; margin: 0 2px; }
.hf-progress-time { color: #888; font-size: 13px; }

.hf-progress-track {
  height: 8px;
  background: #eef1f2;
  border-radius: 999px;
  overflow: hidden;
}
.hf-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1D9E75 0%, #2ec28f 100%);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hf-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 0;
  margin: 14px 0 0;
}
.hf-step {
  text-align: center;
  font-size: 14px;
  color: #8a8f96;
  transition: color 0.2s;
}
.hf-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef1f2;
  color: #aaa;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  position: relative;
}
.hf-step-name { display: block; line-height: 1.3; font-weight: 700; }

.hf-step.is-active { color: #1D9E75; }
.hf-step.is-active .hf-step-num {
  background: #1D9E75;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(29, 158, 117, 0.18);
}
.hf-step.is-done { color: #1D9E75; }
.hf-step.is-done .hf-step-num {
  background: #1D9E75;
  color: transparent;
}
.hf-step.is-done .hf-step-num::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 12 10 17 19 8'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

/* ---------- カード ---------- */
.hf-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 40px 36px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  display: none;
}
.hf-card.is-active {
  display: block;
  animation: hf-fadein 0.3s ease;
}
@keyframes hf-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hf-card-header { margin-bottom: 28px; }
.hf-card-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1D9E75;
  background: #e9f7f1;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hf-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
  line-height: 1.4;
}
.hf-card-desc {
  font-size: 15px;
  color: #777;
  margin: 0;
  line-height: 1.7;
}

/* ---------- フィールド ---------- */
.hf-field { margin-bottom: 26px; }
.hf-field:last-of-type { margin-bottom: 0; }

.hf-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* 必須／任意バッジ */
.hf-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.hf-badge-required { background: #fde8e7; color: #c62828; }
.hf-badge-optional { background: #eef1f2; color: #777; }

.hf-note     { font-size: 14px; color: #777; margin: 8px 0 0; line-height: 1.7; }
.hf-sub-note { font-size: 14px; color: #777; margin: -4px 0 10px; line-height: 1.7; }

/* 選択肢グループ内の補助ラベル（「その他のイメージ」など） */
.hf-sub-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin: 16px 0 8px;
}

/* ---------- 入力欄 ---------- */
.hf-input,
.hf-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #d7dbe0;
  border-radius: 10px;
  background: #fff;
  color: #222;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.hf-textarea { resize: vertical; min-height: 130px; line-height: 1.7; }
.hf-input:hover,
.hf-textarea:hover { border-color: #b8dfcd; }
.hf-input:focus,
.hf-textarea:focus {
  outline: none;
  border-color: #1D9E75;
  box-shadow: 0 0 0 4px rgba(29, 158, 117, 0.15);
  background: #fafdfb;
}

/* ---------- ラジオ／チェック ---------- */
.hf-radio-list { display: flex; flex-direction: column; gap: 10px; }
.hf-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.hf-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 2px solid #e0e3e7;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.hf-option:hover { background: #f1faf5; border-color: #b8dfcd; }
.hf-option input {
  accent-color: #1D9E75;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}
.hf-option span { flex: 1; color: #333; }

/* 選択中のハイライト */
.hf-option:has(input:checked) {
  background: #e9f7f1;
  border-color: #1D9E75;
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.10);
}
.hf-option:has(input:checked) span { color: #1D9E75; font-weight: 700; }

/* ---------- ナビゲーション（前へ／次へ／送信） ---------- */
.hf-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid #eef1f2;
}

.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 140px;
  padding: 15px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.05s, box-shadow 0.2s;
  border: 2px solid transparent;
  font-family: inherit;
  text-decoration: none;
}
.hf-btn-prev {
  background: #fff;
  color: #555;
  border-color: #d7dbe0;
}
.hf-btn-prev:hover { background: #f6f8f8; border-color: #a8afb6; color: #333; }

.hf-btn-next,
.hf-submit {
  background: #1D9E75;
  color: #fff;
  border-color: #1D9E75;
  box-shadow: 0 2px 6px rgba(29, 158, 117, 0.25);
}
.hf-btn-next:hover,
.hf-submit:hover {
  background: #178460;
  border-color: #178460;
  box-shadow: 0 4px 10px rgba(29, 158, 117, 0.35);
}
.hf-btn:active,
.hf-submit:active { transform: translateY(1px); }

.hf-submit {
  min-width: 260px;
  padding: 16px 32px;
  font-size: 17px;
  font-family: inherit;
}
.hf-submit-wrap { text-align: center; }
.hf-submit-note { font-size: 13px; color: #777; margin: 14px 0 0; }

/* 利用規約（送信直前） */
.hf-terms-box {
  margin-bottom: 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #dfe6ea;
  border-radius: 8px;
}

.hf-terms-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.75;
  color: #444;
}

.hf-terms-text a {
  color: #1d9e75;
  font-weight: 600;
  text-decoration: underline;
}

.hf-terms-text a:hover {
  text-decoration: none;
}

.hf-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  cursor: pointer;
}

.hf-terms-label input {
  margin-top: 3px;
  flex-shrink: 0;
}

/* reCAPTCHA */
.hf-recaptcha {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* 左端に prev がないときに next / submit を右寄せ */
.hf-nav.is-first { justify-content: flex-end; }

/* ---------- エラー ---------- */
.hf-error {
  border-color: #e53935 !important;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12) !important;
}
.hf-error-box {
  background: #fdecea;
  border: 1px solid #f5c2c0;
  color: #a8312d;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.hf-error-box strong { display: block; margin-bottom: 4px; }
.hf-error-box ul { margin: 0; padding-left: 18px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 600px) {
  .hf-section { padding: 24px 12px; }
  .hf-container { max-width: 100%; }
  .hf-progress { padding: 16px 14px 14px; border-radius: 12px; }
  .hf-progress-top { font-size: 12px; }
  .hf-progress-label strong { font-size: 17px; }
  .hf-steps { gap: 2px; }
  .hf-step { font-size: 10px; }
  .hf-step-name { font-size: 10px; }
  .hf-step-num { width: 26px; height: 26px; font-size: 12px; }

  .hf-card { padding: 24px 18px; border-radius: 12px; }
  .hf-card-header { margin-bottom: 22px; }
  .hf-card-title { font-size: 19px; }
  .hf-card-desc { font-size: 14px; }
  .hf-label { font-size: 15px; }
  .hf-option { padding: 14px 14px; font-size: 15px; }
  .hf-check-grid { grid-template-columns: 1fr; }

  .hf-nav {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
  }
  .hf-btn,
  .hf-submit { width: 100%; min-width: 0; padding: 14px 20px; }
  .hf-nav.is-first { justify-content: stretch; }
}
