#funeral-cost-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 60px auto;
    gap: 40px;
    background-image: url('/wp-content/themes/akitsusousai/assets/images/plan/plan_haikei_3.svg'); /* ✅ 画像パス */
    background-repeat: no-repeat;
    background-position: top right; /* ✅ 左上に表示 */
    background-size: 700px 700px; /* ✅ 画像サイズを調整 */

  }

  /* コンテンツ全体 */
  .text-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  /* 見出し */
  .funeral-plan-title {
    font-size: var(--fs__7l);
    font-weight: bold;
    margin-bottom: 20px;
  }

  /* イラスト画像 */
  .plan-illustration {
    margin-bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .plan-illustration img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
  }

/* ✅ 横並びで中央揃え */
.funeral-plan-text-boxes {
    display: flex;
    flex-wrap: wrap;         /* 折り返し可 */
    justify-content: center; /* 中央揃え */
    gap: 12px;
    margin-bottom: 20px;
  }

  /* ✅ テキストボックス */
.funeral-plan-text-box {
    padding: 10px 16px;
    border: 2px solid #333;
    border-radius: 5px;
    font-size: var(--fs__3l);
    font-weight: bold;
    text-align: center;
    white-space: nowrap;     /* 折り返し防止 */
    flex: 0 1 auto;           /* 横並びを維持しつつ最小限に収める */
  }


  /* 金額と画像部分を横並び */
  .funeral-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px; /* 左右の余白 */
  }

/* 金額部分 */
.funeral-cost {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 500px; /* 👈 最大幅はお好みで調整 */
  }

  /* 金額ボックス（全体の幅に広げる） */
  .funeral-cost-box {
    width: 100%; /* 👈 幅いっぱいに */
    padding: 20px;
    border-radius: 10px;
    font-weight: bold;
  }



  .funeral-label {
    padding: 5px;
    font-size: var(--fs__2l);
    color: #fff;
    border-radius: 5px;
    margin-bottom: 10px;
  }
  .normal-price {
    background-color: #ccc;
  }
  .member-price {
    background-color: #daa520;
  }


/* 金額と「税込価格」ラベルのコンテナ */
.funeral-price-container {
    display: flex;
    align-items: center;
    justify-content:center; /* 🔧 左寄せに変更 */
    gap: 8px;
    width: 100%; /* 🔧 親ボックスいっぱいに広げると安定 */
  }

  .funeral-price-label {
    font-size: var(--fs__s);
    color: #fff;
    background-color: #8C0085;
    display: inline-block;
    line-height: 1.2;
    text-align: center;
    padding: 5px 8px;
    border-radius: 4px;
    margin-right: 12px;
    white-space: nowrap;
  }


/* 金額の表示 */
.funeral-price {
  display: flex;
  align-items: baseline;
  font-size: var(--fs__4l);
    font-weight: bold;
    gap: 4px;
    color: #C24A57;
    text-align: left; /* 🔧 念のため追加 */
    white-space: nowrap;
  }


  /* ✅ 数字の部分 */
  .funeral-amount {
    font-size: var(--fs__4l);
    display: inline-block;
    line-height: 1;
    vertical-align: baseline;
  }

  /* ✅ 「円〜」や補足表記 */
  .funeral-yen {
    font-size: var(--fs__l);
    color: #333;
    display: inline-block;
    line-height: 1;
    vertical-align: baseline; /* 🔧 ここが大事！ */
  }

  /* ✅ 税込表記 */
  .funeral-tax {
    font-size: var(--fs__m);
    color: #999;
    margin-top: 5px;
    text-align: left;
  }

  .arrow-down {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid #C24A57;
    margin: 0 auto; /* ✅ 中央に表示させるため追加 */
  }

  /* 会員情報リンク */
  .funeral-member-info {
    margin-top: 15px;
    text-align: center;
  }
  .funeral-member-info a {
    font-size: var(--fs__m);
    color: #333;
    text-decoration: underline;
  }
  .funeral-member-info a:hover {
    color: #daa520;
  }

  .slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
  }

  .slider-notice {
    font-size: var(--fs__s);
    color: #666;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.4;
  }

  /* スライダー全体 */
.image-slider {
  position: relative;
  width: 100%;
  max-width: 550px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* スライドトラック */
.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  touch-action: pan-y;
  width: 100%;
  height: 100%;
}

/* 📌 各スライド画像 */
.slider-track img {
  width: 100%;
  height: auto; /* 🔁 ここを auto に変更 */
  object-fit: contain; /* 🔁 cover だと切り取られる */
  object-position: center;
  flex: 0 0 100%;
}


/* 📌 ドットナビゲーション */
.slider-dots {
  text-align: center;
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.slider-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.slider-dots .dot.active {
  background-color: #e63946;
}

  @media screen and (max-width: 1024px) {
    #funeral-cost-container {
      background-size: 500px 500px; /* 背景画像を少し小さく */
      padding: 40px 3%;
    }

    .funeral-content-wrapper {
      flex-direction: column-reverse;
      gap: 30px;
    }

    .funeral-image img {
      max-width: 100%;
      min-width: auto;
    }

    .funeral-plan-text-boxes {
      flex-wrap: wrap;
      justify-content: center;
    }

    .funeral-plan-text-box {
      font-size: var(--fs__2l);
    }

    .funeral-cost {
      max-width: 100%;
    }
  }

  @media screen and (max-width: 768px) {
    #funeral-cost-container {
      background-size: 350px 350px; /* スマホではさらに小さく */
      background-position: top center;
      gap: 30px;
    }

    .funeral-content-wrapper {
      flex-direction: column-reverse;
      gap: 30px;
    }

    .plan-illustration img {
      max-width: 220px;
    }

    .funeral-plan-title {
      font-size: var(--fs__5l);
    }

    .funeral-plan-text-box {
      font-size: var(--fs__l);
      padding: 8px 12px;
    }

    .funeral-price-container {
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      gap: 6px;
    }

    .funeral-price-label {
      white-space: nowrap;
      font-size: var(--fs__xs);
      padding: 4px 6px;
      line-height: 1.2;
    }
    .funeral-price {
      display: flex; /* 念のため明示 */
      flex-direction: row; /* ✅ 横並び */
      align-items: baseline; /* ✅ 数字と円の高さを自然に揃える */
      gap: 4px;
      font-size: var(--fs__3l);
    }


    .funeral-amount {
      font-size: var(--fs__3l);
    }

    .funeral-yen {
      font-size: var(--fs__s);
    }

    .funeral-tax {
      font-size: var(--fs__s);
    }

    .slider-wrapper {
      max-width: 100%;
      padding: 0 10px;
    }

    .funeral-image img {
      max-width: 100%;
      min-width: unset;
    }

    .slider-dots {
      margin-top: 10px;
      gap: 6px;
    }

    .slider-dots .dot {
      width: 9px;
      height: 9px;
    }
  }


/* プラン訴求セクション */
#plan-promotion {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    margin-top: 50px;
    gap: 40px; /* 画像とテキストの間隔 */
}

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

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

/* 見出し（横書きに戻す） */
.promotion-title {
    font-size: var(--fs__5l);
    font-weight: bold;
    margin-bottom: 20px;
    text-align: left;
}

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


/*  funeral-flow セクション */
#funeral-flow {
  display: flex;
  justify-content: center;
  padding: 60px 5%;
}

.funeral-flow-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1000px;
  width: 100%;
}


 .flow-header {
  max-width: 1000px;
  margin: 0 auto;         /* セクション中央配置 */
  width: 100%;
  text-align: left;
  }

  .flow-title {
    font-size: var(--fs__4l);
    font-weight: bold;
    margin-bottom: 40px;
    text-align: left;
  }

  .flow-timeline {
    display: flex;
    flex-direction: column;
    align-items: center; /* ← これをflex-startからcenterに変更！ */
    position: relative;
    gap: 40px;
  }


  .timeline-item {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 1000px;
    border-radius: 8px;
    padding: 20px 0;
    position: relative;
    gap: 15px;
    margin-bottom: 40px;
  }

  /* 番号部分 */
  .timeline-header {
    flex-shrink: 0;
  }

  .timeline-number {
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    font-weight: bold;
    font-size: var(--fs__l);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    z-index: 1;
  }

/* 縦線 */
.timeline-line {
  width: 1px;
  height: 80px; /* 長さは調整可 */
  background-color: #333;
  margin: 0 auto 0; /* 中央寄せ & 上に少し余白 */
}

/* 最後のタイムラインには縦線非表示にしたい場合 */
.timeline-item:last-child .timeline-line {
  display: none;
}

  /* コンテンツ部分（見出し、本文、画像） */
  .timeline-content {
    flex-grow: 1;
  }

  /* 見出しと本文を左揃え */
  .timeline-heading {
    font-size: var(--fs__2l);
    font-weight: bold;
    margin-bottom: 15px;
    margin: 0 0 10px;
    text-align: left;
  }

  .timeline-content p {
    margin: 0 0 15px;
    font-size: var(--fs__l);
    text-align: left;
    line-height: 1.6;
  }


  .timeline-images {
    display: flex;
    flex-wrap: wrap;
    margin: 40px 0 10px 0;
    gap: 40px;
  }

  .timeline-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
  }

  .timeline-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
  }

  .timeline-image-label {
    margin-top: 5px;
    font-size: var(--fs__xxs);
    text-align: center;
    line-height: 1.2;
  }


  @media screen and (max-width: 1024px) {
    #funeral-flow {
      padding: 50px 3%;
    }

    .flow-header {
      text-align: center;
    }

    .flow-title {
      font-size: var(--fs__5l);
      text-align: center;
    }

    .timeline {
      align-items: center;
    }

    .timeline-item {
      text-align: center;
    }

    .timeline-header {
      justify-content: center;
    }

    .timeline-heading {
      font-size: var(--fs__3l);
    }

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

    .timeline-images {
      justify-content: center;
    }

    .timeline-images img {
      max-width: 100px;
    }
  }

  @media screen and (max-width: 768px) {
    .flow-title {
      font-size: var(--fs__3l);
    }

    .timeline-heading {
      font-size: var(--fs__2l);
    }

    .timeline-content p {
      font-size: var(--fs__s);
    }

    .timeline-images img {
      max-width: 80px;
    }
  }

  @media screen and (max-width: 768px) {
    .flow-title {
      font-size: var(--fs__3l);
    }

    .timeline-heading {
      font-size: var(--fs__2l);
    }

    .timeline-content p {
      font-size: var(--fs__s);
    }

    .timeline-images img {
      max-width: 80px;
    }
  }


  @media screen and (max-width: 576px) {
    .flow-title {
      font-size: var(--fs__2l);
    }
    .timeline-heading {
      font-size: var(--fs__1l);
    }
  }

    /* レスポンシブ：480px以下 */
    @media screen and (max-width: 480px) {
      .flow-title {
        font-size: var(--fs__1l);
      }
    }
/* セクション全体 */
#additional-costs {
  padding: 40px 20px;
  text-align: left;
}

.additional-costs-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #eeefef; /* 🔥 リスト部分は白背景 */
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* 🔥 軽い影で浮かせる */
  display: flex;
  flex-direction: column;
  gap: 20px; /* 🔥 各pタグの間隔 */
  box-sizing: border-box;
}

.additional-costs-list p {
  margin: 0;
  font-size: var(--fs__l);
  line-height: 1.8;
  color: #333;
}

@media screen and (max-width: 768px) {
  #additional-costs {
    padding: 40px 20px;
  }

  .additional-costs-list {
    max-width: 100%;
    padding: 20px 15px; /* スマホでは左右paddingを少し縮める */
    gap: 16px; /* p同士の間隔も若干調整して読みやすく */
    box-sizing: border-box;
  }

  .additional-costs-list p {
    font-size: var(--fs__m); /* 🔥 スマホではやや小さめでも可読性重視 */
    line-height: 1.8; /* 🔥 行間はキープして読みやすく */
    text-align: left; /* 🔥 左揃えを保つ（中央寄せにすると読みにくい） */
  }
}





/* 葬儀プランに含まれないものセクション */
#excluded-costs {
    padding: 50px 20px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* セクションタイトル（左寄せ & cost-gridとツラを合わせる） */
.excluded-title {
    font-size: var(--fs__4l);
    font-weight: bold;
    text-align: left;
    width: 100%;
    max-width: 800px; /* cost-grid と同じ幅に揃える */
    margin-bottom: 50px;
}

/* グリッドレイアウト (2列×2行) */
.cost-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    width: 100%;
}

/* 各費用項目（斜め配置用） */
.cost-item {
  position: relative;
  min-height: 220px; /* 🔥 最低限の高さだけ設定（180px以上なら伸びる） */
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* 🔥 軽い影で浮かせる */
  padding: 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
  display: block;
  box-sizing: border-box; /* 🔥 padding込みでサイズ計算 */
  overflow: hidden; /* 🔥 必要に応じて(はみ出し防止)。長すぎるならスクロールも考慮 */
}


/* 見出しと説明（左上） */
.cost-text {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* 見出し */
.cost-heading {
  font-size: var(--fs__3l);
  font-weight: bold;
  margin-bottom: 5px;
}

/* 説明 */
.cost-description {
  font-size: var(--fs__l);
  word-wrap: break-word;
}

/* 画像（右下） */
.cost-image {
  position: absolute;
  bottom: 20px;
  right: 20px;
}

.cost-image img {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

@media screen and (max-width: 1024px) {

  .cost-item {
    flex-direction: row; /* 横並びのまま、スペース狭く */
    padding: 15px;
  }

  .cost-heading {
    font-size: var(--fs__2l);
  }

  .cost-description {
    font-size: var(--fs__m);
  }

  .cost-image img {
    width: 80px;
    height: 80px;
  }
}

@media screen and (max-width: 768px) {
  .cost-grid {
    grid-template-columns: 1fr; /* 1列表示に切り替え */
  }

  .cost-item {
    min-height: 180px;
    flex-direction: column; /* 縦並びに */
    align-items: flex-start;
    text-align: left;
  }

  .cost-image {
    margin: 15px 0 0;
    align-self: center;
  }

  .cost-image img {
    width: 100px;
    height: 100px;
  }

  .cost-heading {
    font-size: var(--fs__l);
  }

  .cost-description {
    font-size: var(--fs__s);
  }
}


@media screen and (max-width: 600px) {
  .cost-item {
    flex-direction: column; /* スマホでは縦並びに */
    align-items: flex-start;
    text-align: left;
  }

  .cost-image {
    margin: 15px 0 0 0;
    align-self: center;
  }

  .cost-image img {
    width: 100px;
    height: 100px;
  }

  .cost-heading {
    font-size: var(--fs__l);
  }

  .cost-description {
    font-size: var(--fs__s);
  }
}


/* ポップアップ全体（デフォルトで非表示） */
.popup {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* ポップアップの内容（header の 260px を考慮して中央配置） */
.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 80%;
    max-width: 400px;
    position: absolute;
    left: calc(50% + 130px); /* 260px の半分を右にずらして調整 */
    top: 50%;
    transform: translate(-50%, -50%);
}


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

#after-funeral-support {
  padding: 40px 20px;
  text-align: left;
}

.after-support-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #eeefef; /* 🔥 背景統一（薄いグレー） */
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* 🔥 軽い影で浮かせる */
  display: flex;
  flex-direction: column;
  gap: 20px; /* 🔥 要素間の間隔 */
  box-sizing: border-box;
}

.after-support-list h4 {
  margin: 0;
  font-size: var(--fs__l);
  line-height: 1.8;
  color: #333;
  font-weight: normal;
}

@media screen and (max-width: 1024px) {
  #after-funeral-support {
    padding: 50px 15px;
  }

  .after-support-list {
    max-width: 90%; /* 🔥 少し余白を持たせて中央寄せ */
    padding: 20px 15px;
    gap: 15px;
  }

  .after-support-list h4 {
    font-size: var(--fs__l); /* 🔥 少し小さくする */
    line-height: 1.8;
    text-align: left;
  }
}

@media screen and (max-width: 768px) {
  #after-funeral-support {
    padding: 40px 10px;
  }

  .after-support-list {
    max-width: 100%;
    padding: 20px 10px;
    gap: 12px;
  }

  .after-support-list h4 {
    font-size: var(--fs__m); /* 🔥 スマホではやや小さめでも可読性重視 */
    line-height: 1.8; /* 🔥 行間はキープして読みやすく */
    text-align: left; /* 🔥 中央揃えキープ */
    word-break: break-word; /* 🔥 長い文でも折り返して読みやすく */
  }
}



/* セクション全体 */
.horizontal-pricing {
    text-align: center;
    background-color: #f8f8f8;
    padding: 50px 20px;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

/* スライド全体 */
#pricing-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: auto;
    min-height: 250px; /* スライドの高さを一定に保つ */
}

/* 各スライドのスタイル */
.pricing-slide {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.6s ease;
  width: 100%;
}

.pricing-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 1024px) {
  .horizontal-pricing {
    padding: 40px 15px; /* 🔥 パディングを少し縮小 */
  }

  #pricing-content {
    max-width: 90%; /* 🔥 コンテンツの最大幅を90%に広げる（画面に合わせる） */
    min-height: 220px; /* 🔥 高さも少し低めに */
  }

  .pricing-slide h3 {
    font-size: var(--fs__3l); /* 🔥 タブレットでは少し小さめに */
    line-height: 1.5;
    margin: 0 auto;
  }
}

@media screen and (max-width: 768px) {
  .horizontal-pricing {
    padding: 30px 10px; /* 🔥 スマホではさらにpadding縮小 */
  }

  #pricing-content {
    max-width: 100%;
    min-height: 200px;
  }

  .pricing-slide h3 {
    font-size: var(--fs__2l); /* 🔥 スマホではもっと小さめ */
    line-height: 1.5;
    margin: 0 auto;
    word-break: break-word; /* 🔥 長い単語や文も自然に折り返す */
  }
}


/* 価格情報のスタイル */
.content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* サブタイトルのスタイル */
.pricing-subtitle {
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: #004d67;
    margin-bottom: 10px;
}

/* タイトル */
.pricing-title {
    text-align: center;
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
}

/* 特徴ボックス全体 */
.plan-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* 各ボックスのスタイル */
.feature-box {
    background: #f8f8f8;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    min-width: 100px;
    border: 2px solid #333;
}

/* 価格ボックス */
.cost-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 550px;
}

/* 価格ラベル */
.label {
    padding: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    border-radius: 5px;
    margin-bottom: 10px;
}

.normal-price {
    background-color: #ccc; /* グレー */
}

.member-price {
    background-color: #daa520; /* ゴールド */
}

/* 価格の表示 */
.price-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.amount {
    font-size: 3rem;
}

.yen, .tax {
    font-size: 1.2rem;
}

/* 会員情報リンク */
.member-info {
    margin-top: 10px;
    text-align: center;
}

.member-info a {
    font-size: 1rem;
    color: #004d67;
    text-decoration: underline;
}

.member-info a:hover {
    color: #004d67;
}
