/* 固定背景エリア */
.header-banner {
  background-image: url('../images/soudan.png'); /* 背景画像を指定 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #333; /* テキストカラー */
  text-align: center;
  padding: 100px 20px; /* 上下の余白を調整 */
}

/* 固定背景内のテキスト */
.header-banner .urgent-content h1 {
  font-size: 2.4rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.header-banner .urgent-content p {
  font-size: 1.6rem;
  line-height: 1.6;
}

/* 事前相談セクション */
#jizen-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin-top: 50px;
}

/* セクションのレイアウト */
.jizen-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px; /* 画像とテキストの間隔 */
  max-width: 1000px;
  margin-bottom: 60px;
}

/* 左側のテキストコンテナ */
.jizen-content {
  max-width: 600px;
}


/* 右側の画像コンテナ */
.jizen-image img {
  width: 200px; /* 画像の幅 */
  height: auto;
  border-radius: 10px;
}

/* セクションヘッダー（中央寄せ） */
.jizen-header-center {
  width: 100%;
  max-width: 1000px;
  text-align: center; /* 中央寄せ */
  margin: 0 auto;
  box-sizing: border-box;
  }

/* 見出し */
.jizen-header {
  font-size: var(--fs__5l);
  font-weight: bold;
  margin-bottom: 20px;
  text-align: left;
}

/* テキストのスタイル */
.jizen-content p {
  font-size: var(--fs__l);
  font-weight: bold;
  line-height: 1.8;
  text-align: left;
  margin-bottom: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .jizen-container {
    flex-direction: column; /* スマホでは縦並び */
    text-align: center;
  }

  .jizen-content {
    max-width: 100%;
  }

  /* 見出し */
.jizen-header {
  font-size: var(--fs__3l);
  font-weight: bold;
  margin-bottom: 20px;
  text-align: left;
}

  .jizen-image img {
    width: 150px; /* スマホでは小さく */
    margin-top: 20px;
  }
}

/* ✅ ポップアップ表示の親（背景） */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1000;
}
.popup-overlay.show {
  display: flex;
  opacity: 1;
}

/* ✅ ポップアップ本体にズームイン効果 */
.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);

  transform: scale(0.8) translateY(40px);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease;
}
.popup-overlay.show .popup-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}


/* 閉じるボタン */
.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
}

/* 押した感のあるアニメーション */
.btn-popup {
  transition: transform 0.1s ease, background-color 0.3s ease;
}
.btn-popup.clicked {
  transform: scale(1.05);
  background-color: #004d67;
  color: #fff;
}


/* 特徴レイアウト */
.popup-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 50px; /* ✅ タイトル分の余白を確保 */
  padding-top: 50px; /* ✅ タイトル分の余白を確保 */
}

/* 見出し */
.popup-jizen-header {
  font-size: var(--fs__5l);
  font-weight: bold;
  margin-bottom: 10px;
  text-align: left;
}

/* 画像を囲むコンテナ */
.popup-feature-img-wrapper {
  position: relative;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 画像 */
.popup-feature-img-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

.popup-feature-title {
  width: 90px; /* ✅ サイズ調整 */
  height: 90px;
  background-color: #004d67;
  color: #fff;
  font-size: var(--fs__m);
  font-weight: bold;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0; /* ✅ タイトルの大きさを一定に保つ */
}

/* ✅ 「ポイント」の文字を小さく */
.popup-feature-title span {
  font-size: var(--fs__s);
  display: block;
  margin-bottom: 2px;
}

.popup-text-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1; /* ✅ 残りのスペースを占める */
}

/* ✅ `.popup-subtitle` の調整 */
.popup-subtitle {
  font-size: var(--fs__1l);
  margin: 8px 0; /* ✅ 上下の余白を調整 */
}


/* ✅ 右側のコンテンツ */
.popup-feature-content {
  display: flex;
  align-items: flex-start; /* ✅ 縦方向の中央揃え */
  gap: 15px; /* ✅ タイトルと見出しの間隔 */
  width: 100%;
  text-align: left;
  padding: 20px;
  position: relative;
}


.popup-feature-content::after {
  content: "";
  display: block;
  width: calc(100% - 5px); /* 右端の余白を確保 */
  height: 3px; /* 下線の太さ */
  background-color: #00384e; /* 下線の色 */
  position: absolute;
  bottom: 0;
  left: 0;
}
.popup-feature-content::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 3px;
  height: 3px;
  background-color: #004d67;
  display: block;
}


/* テキスト */
.popup-feature-content p {
  font-size: var(--fs__l);
  line-height: 1.6;
}


/* 見出し */
.popup-jizen-title {
  font-size: var(--fs__3l);
  font-weight: bold;
  margin-bottom: 40px;
  text-align: left;
  position: relative;
  padding-bottom: 5px; /* 下線との間隔 */
  display: inline-block; /* 文字幅に合わせる */
}

/* 下線（文字幅に合わせて可変） */
.popup-jizen-title::after {
  content: "";
  display: block;
  width: calc(100% - 5px); /* 右端の余白を確保 */
  height: 3px; /* 下線の太さ */
  background-color: #00384e; /* 下線の色 */
  position: absolute;
  bottom: 0;
  left: 0;
}

/* 下線の終わりの区切り */
.popup-jizen-title::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 3px;
  height: 3px;
  background-color: #004d67;
  display: block;
}

/* ポップアップが中央に表示されるように修正 */
@media (min-width: 1025px) {
  .popup-overlay {
      left: 260px;
      width: calc(100% - 260px);
  }
}

/* ✅ 1024px以下でレイアウト変更 */
@media screen and (max-width: 1024px) {
  .popup-overlay {
    left: 0;
    width: 100%;
}

  /* ✅ 閉じるボタンをタイトルより上に配置 */
  .popup-close {
    top: 5px; /* ✅ 上部に固定 */
    right: 10px;
    font-size: 5rem; /* ✅ ボタンを少し小さく */
  }

.popup-jizen-title {
  font-size: var(--fs__2l); /* ✅ フォントサイズを縮小 */
  margin-bottom: 30px; /* ✅ 余白を調整 */
}
  .popup-feature {
    flex-direction: column; /* ✅ 画像を上、テキストを下に配置 */
    align-items: center;
    text-align: center;
    padding-top: 20px; /* ✅ 余白を縮小 */
    margin-bottom: 30px; /* ✅ 間隔を調整 */
  }

  .popup-feature-img-wrapper {
    width: 60%; /* ✅ 画像の幅を調整 */
    margin-bottom: 15px;
  }

  .popup-feature-title {
    width: 80px; /* ✅ タイトルサイズを調整 */
    height: 80px;
    font-size: var(--fs__s);
  }

  .popup-feature-content {
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding: 15px;
  }

  .popup-subtitle {
    text-align: left;
  }
}

/* ✅ 600px以下でさらに最適化 */
@media screen and (max-width: 600px) {
  .popup-content {
    max-width: 90%;
    padding: 15px;
  }

  .popup-close {
    font-size: 4rem;
    top: 3px;
    right: 8px;
  }

  .popup-jizen-title {
    font-size: var(--fs__1l); /* ✅ さらにコンパクトに */
    margin-bottom: 20px;
  }

  .popup-feature-img-wrapper {
    width: 80%; /* ✅ 画像の幅を広げる */
  }

  .popup-feature-content {
    width: 100%;
    padding: 10px;
  }

  .popup-feature-title {
    width: 70px; /* ✅ さらにコンパクトに */
    height: 70px;
    font-size: var(--fs__s);
  }

  .popup-feature-content p {
    font-size: var(--fs__m);
    line-height: 1.4;
  }
}


/* PC〜タブレット：1025px以上〜769pxまではこのまま縦書きで表示される */
#merit-section {
  margin: 40px auto;
  padding: 40px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url("/wp-content/themes/akitsusousai/assets/images/common/image02.svg");
}


.merit-container {
  max-width: 1200px;
  display: flex;
  flex-direction: row;
  gap: 70px;
  justify-content: flex-end;
}

.merit-title {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: var(--fs__5l);
  font-weight: bold;
  padding: 0 30px;
  border-radius: 8px;
  flex-shrink: 0;
  right: 0;
}

.merit-wrapper {
  display: flex;
  flex-direction: row;
  gap: 70px;
  flex: 1;
}

.merit {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: #eeefef;
  padding: 20px;
  border-radius: 8px;
  flex: 1;
  writing-mode: vertical-rl;
  text-orientation: upright;
  text-align: left;
}

.merit-icon {
  font-size: var(--fs__l);
  font-weight: bold;
  color: #ffffff;
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background-color: #7faaaa;
  margin-bottom: 5px;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.merit-content {
  flex: 1;
  gap: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.merit-title-3 {
  font-size: var(--fs__3l);
  font-weight: bold;
  margin-bottom: auto;
}

.merit-content p {
  font-size: var(--fs__l);
  color: #666;
  line-height: 1.6;
  margin-top: 30px;
}

@media screen and (max-width: 1200px) {
  .merit-container {
    max-width: 100%; /* 🔥 固定幅を解除して、#main-areaいっぱいにフィット */
    gap: 25px;
    padding: 0 40px; /* gapを保つための左右paddingだけ維持 */
  }
  .merit-wrapper {
    gap: 60px;
  }
  .merit {
    padding: 17px;
  }
}

@media screen and (max-width: 1100px) {
  .merit-container {
    max-width: 100%; /* 🔥 固定幅を解除して、#main-areaいっぱいにフィット */
    gap: 15px;
    padding: 0 10px; /* gapを保つための左右paddingだけ維持 */
  }

  .merit {
    padding: 15px;
  }
}

@media screen and (max-width: 1024px) {
  .merit-container {
    max-width: 100%; /* 🔥 固定幅を解除して、#main-areaいっぱいにフィット */
    gap: 30px;
    padding: 0 20px; /* gapを保つための左右paddingだけ維持 */
  }
  .merit-wrapper {
    gap: 50px;
  }
}

@media screen and (max-width: 890px) {
  .merit-container {
    max-width: 100%; /* 🔥 固定幅を解除して、#main-areaいっぱいにフィット */
    gap: 15px;
    padding: 0 20px; /* gapを保つための左右paddingだけ維持 */
  }

  .merit-wrapper {
    gap: 40px;
  }

  .merit {
    padding: 10px;
  }
}

/* 🔥ここが新しいスマホ用メディアクエリ🔥 */
@media screen and (max-width: 768px) {
  .merit-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .merit-title {
    font-size: var(--fs__3l);
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    text-align: center;
    position: static;
    margin-bottom: 10px;
    order: -1;
  }

  .merit-wrapper {
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
  }

  .merit {
    flex: 1 1 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    padding: 20px;
  }

  .merit-content {
    align-items: center;
    text-align: center;
  }

  .merit-title-3 {
    font-size: var(--fs__1l);
    font-weight: bold;
    margin-bottom: auto;
  }

  .merit-content p {
    text-align: left;
    margin-top: 15px;
  }

}


  /* レスポンシブ：576px以下 */
  @media screen and (max-width: 576px) {
    .merit-title {
      font-size: var(--fs__2l);
    }

    .merit-title-3 {
      font-size: var(--fs__l);
    }

    .merit-content p {
      font-size: var(--fs__m);
      margin-top: 10px;
    }
  }

  /* レスポンシブ：480px以下 */
  @media screen and (max-width: 480px) {
    .merit-title {
      font-size: var(--fs__1l);
    }
  }



/* ✅ 事前相談の流れ セクション */
#consultation-flow {
  padding: 40px 20px;
}


/* ✅ コンテナ */
.flow-container {
  max-width: 900px;
  padding: 0 20px;
  margin: 0 auto;
}

/* ✅ h2（左寄せ） */
.flow-title {
  font-size: var(--fs__5l);
  font-weight: bold;
  margin-bottom: 40px;
  text-align: left;
}

/* ✅ タイムライン */
.flow-timeline {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* ✅ 左寄せ */
  position: relative;
}

/* ✅ タイムラインアイテム */
.flow-item {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 900px;
  border-radius: 8px;
  padding: 20px 0;
  position: relative;

}

/* ✅ アイコンと縦線のコンテナ */
.flow-icon-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 20px;
}

/* ✅ アイコン（番号） */
.flow-icon {
  width: 50px;
  height: 50px;
  background-color: #333;
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

/* ✅ デフォルトの縦線 */
.flow-line {
  width: 1px;
  height: 80px;
  background-color: #333;
  display: block; /* ✅ 初期状態で表示 */
}

/* ✅ 最後の `.flow-item` の後に `.flow-line` を適用 */
.flow-item:last-child .flow-line {
  display: block; /* ✅ 確実に表示 */
}



/* ✅ ステップタイトル */
.flow-subtitle {
  font-size: var(--fs__2l);
  font-weight: bold;
  margin-bottom: 15px;
  text-align: left;
}

/* ✅ ステップ説明 */
.flow-content p,
.flow-content ul {
  font-size: var(--fs__l);
  color: #333;
  text-align: left;
  line-height: 1.6;
}

/* ✅ 補足説明 */
.flow-notes {
  margin-top: 30px;
  font-size: var(--fs__m);
  color: #333;
  text-align: left;
  background: #eeefef;
  padding: 20px;
}

/* 🔥 **1024px以下のレスポンシブ調整 (中央配置 & 中央揃え)** */
@media screen and (max-width: 1024px) {
  #consultation-flow {
    padding: 50px 3%;
  }

  .flow-container {
    max-width: 90%;
    text-align: center; /* ✅ コンテンツを中央揃え */
    padding: 0 20px;
  }

  .flow-title {
    font-size: var(--fs__4l); /* ✅ フォントサイズを縮小 */
    margin-bottom: 30px;
    text-align: center; /* ✅ タイトルを中央揃え */
  }

  .flow-timeline {
    align-items: center; /* ✅ タイムラインを中央揃え */
  }

  .flow-item {
    flex-direction: column; /* ✅ 縦並びに変更 */
    align-items: center;
    text-align: center;
    padding: 15px 0;
    margin-bottom: 20px;
    width: 100%;
  }

  .flow-icon-line {
    margin-bottom: 10px;
    margin-right: 0;
  }

  .flow-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .flow-line {
    height: 50px; /* ✅ 縦線の長さを短縮 */
  }

  .flow-subtitle {
    font-size: var(--fs__3l); /* ✅ タイトルのサイズ調整 */
    margin-bottom: 20px;
    text-align: center; /* ✅ 中央配置 */
  }

  .flow-content {
    text-align: center; /* ✅ 中央揃え */
    width: 90%;
  }

  .flow-content p,
  .flow-content ul {
    font-size: var(--fs__m);
    text-align: center;
  }

  .flow-notes {
    font-size: var(--fs__s);
    text-align: center;
    margin-top: 20px;
  }
}

/* 🔥 **768px以下のスマホ対応** */
@media screen and (max-width: 768px) {
  .flow-container {
    max-width: 100%;
    padding: 40px 2%;
    text-align: center;
  }

  .flow-title {
    font-size: var(--fs__3l);
    margin-bottom: 20px;
  }

  .flow-item {
    flex-direction: column;
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
  }

  .flow-icon {
    width: 35px;
    height: 35px;
    font-size: 1.4rem;
  }

  .flow-line {
    height: 40px;
  }

  .flow-subtitle {
    font-size: var(--fs__2l);
    text-align: center;
    margin-bottom: 15px;
  }

  .flow-content {
    width: 100%;
    text-align: center;
  }

  .flow-content p,
  .flow-content ul {
    font-size: var(--fs__s);
  }

  .flow-notes {
    font-size: var(--fs__xs);
    text-align: left;
  }
}

  /* レスポンシブ：576px以下 */
  @media screen and (max-width: 576px) {
    .flow-container {
      max-width: 100%;
      padding: 20px;
      text-align: center;
    }

    .flow-title {
      font-size: var(--fs__2l);
      margin-bottom: 20px;
    }

    .flow-content p,
    .flow-content ul {
      font-size: var(--fs__m);
      text-align: left;
    }
  }

  /* レスポンシブ：480px以下 */
  @media screen and (max-width: 480px) {
    .flow-title {
      font-size: var(--fs__1l);
      margin-bottom: 20px;
    }
  }
