/* セクションのスタイル */
.sogi-cases {
    padding: 60px 20px;
    text-align: center;
}
.arhcive-sogi-cases {
    margin-bottom: 20px;
    text-align: center;
}

.arhcive-sogi-cases h2 {
    font-size: var(--fs__5l);
    font-weight: bold;

}


/* 葬儀事例の詳細ページのスタイル */
#funeral-case {
    max-width: 800px; /* ページ全体の最大幅 */
    margin: 0 auto;
    padding: 20px;
    background: #fff;

}

/* タイトルと合計金額を囲むコンテナ */
.case-header-container {
    text-align: center; /* タイトルと合計金額を中央寄せ */
    margin-bottom: 30px; /* 下のコンテンツとの余白 */
}

/* タイトルのスタイル */
.case-header-container h2 {
    font-size: var(--fs__4l);
    font-weight: bold;
    margin-bottom: 10px; /* タイトルと金額の間隔 */
}

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

/* 合計金額のスタイル */
.total-cost {
    font-size: var(--fs__5l);
    font-weight: bold;
}


/* case-img と case-info を横並びにする */
.case-header {
    display: flex;
    align-items: stretch; /* 高さを揃える */
    justify-content: space-between;
    gap: 20px; /* 画像と情報の間隔 */
}

/* 画像のスタイル */
.single-case-img {
    flex: 1; /* 左側で均等に配置 */
    max-width: 50%;
    text-align: center;
}

.single-case-img img {
    width: 100%;
    height: auto;

    display: block;
}

/* 基本情報のスタイル */
.case-info {
    flex: 1; /* 右側で均等配置 */
    max-width: 50%;
    background: #f8f8f8;
    padding: 15px;

    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 内容を中央揃え */
}

/* フォントサイズを大きくし、行間を調整 */
.case-info p {
    font-size: var(--fs__2l); /* フォントサイズを大きく */
    line-height: 1.6; /* 行間を広げる */
    margin-bottom: 16px; /* 各情報の間隔を広げる */
}


.section-header__title {
    font-size: var(--fs__4l);
    color: #333;
    font-weight: bold;
    margin: 0 0 20px;
  }

  /* 説明文 p */
  .section-header__text {
    font-size: var(--fs__l);
    color: #666;
  }

  /* レスポンシブ：1024px以下 */
  @media screen and (max-width: 1024px) {
    .case-header-container h2 {
      font-size: var(--fs__4l);
    }
  }

  /* レスポンシブ：768px以下 */
  @media screen and (max-width: 768px) {
    .case-header-container h2 {
      font-size: var(--fs__3l);
      margin-bottom: 25px;
    }
  }

  /* レスポンシブ：576px以下 */
  @media screen and (max-width: 576px) {
    .case-header-container h2 {
      font-size: var(--fs__2l);
      margin-bottom: 20px;
    }

  }

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


/* テーブルのコンテナ */
.case-table-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 40px; /* ✅ 左右に内側余白を追加して詰まりを防ぐ */
    box-sizing: border-box;
  }

  /* テーブルのスタイル */
  .case-table {
    width: 100%;
    border-collapse: collapse;
    background: #f9f9f9;
    overflow: hidden;
    font-size: var(--fs__l);
  }

  /* ヘッダー */
  .case-table th {
    text-align: left;
    padding: 30px 15px;
    width: 30%;
    border-bottom: 1px solid #ddd;
  }

  /* データセル */
  .case-table td {
    padding: 30px 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
  }



  @media screen and (max-width: 768px) {
    .case-header {
        flex-direction: column;
        align-items: center;
    }

    .single-case-img,
    .case-info {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .single-case-img {
        padding: 0; /* 🔸画像に余白を入れないことで横幅を揃える */
    }

    .case-info {
        background-color: transparent;
        padding: 0 16px;
        border-radius: 8px;
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        box-sizing: border-box;
    }

    .case-info p {
        width: 100%;
        padding: 8px 12px; /* ← 内容だけ左右に余白を */
        font-size: 18px;
        line-height: 1.8;
        margin-bottom: 10px;
        background-color: transparent;
        border: 1px solid #ddd;
        border-radius: 6px;
        box-sizing: border-box;
    }

    .case-table-container {
        margin-top: 5px;
        background-color: transparent;
        padding: 0 16px;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .case-table-container h2 {
        display: none;
    }

    .case-table {
        background: transparent;
      }

    .case-table th {
        display: none; /* スマホではthも非表示 */
    }

    .case-table td {
        display: block;
        width: 100%;
        text-align: left;
        font-size: 18px;
        line-height: 1.8;
        padding: 8px 12px;
        border: 1px solid #ddd;
        background-color: transparent;
        margin-bottom: 10px;
        border-radius: 6px;
        box-sizing: border-box;
    }

    .case-table tr {
        display: block;
        margin-bottom: 10px;
        padding: 0;
        background: transparent;
    }

    /* 不要なtdを非表示 */
    .case-table .hide-on-mobile {
        display: none;
    }

    /* 必要な項目だけ表示 */
    .case-table td:not(.stay-fee):not(.flower-fee):not(.gift-price-total):not(.meal-price-total):not(.additional-costs) {
        display: none;
    }

    /* 表示するtdだけ統一スタイル */
    .stay-fee,
    .flower-fee,
    .gift-price-total,
    .meal-price-total,
    .additional-costs {
        display: block;
    }
}

@media screen and (max-width: 576px) {
    .case-info p,
    .case-table td {
      font-size: 16px; /* 🔥 少しだけ文字サイズ縮小 */
      padding: 10px;
      margin-bottom: 10px;
    }

    .stay-fee,
    .flower-fee,
    .gift-price-total,
    .meal-price-total,
    .additional-costs {
      font-size: 16px; /* 金額だけ微妙に目立たせる */
    }
  }
