/* ==========================================
  下層ページ（葬儀・法要）重なって画像が消えるアニメーション
========================================== */

body#page_funeral {
    font-size: 16px;
    line-height: 2.0;
    color: var(--ink);
    background-color: #fff;
  }
  
  /* 1. 上のメイン画像エリア（画面上部に固定） */
  .sub-hero {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 60vh; /* 画面の高さ60%分 */
    z-index: 1; /* 背後に配置 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/funeral-card.webp') center/cover no-repeat;
    color: #ffffff;
    text-align: center;
  }
  
  .sub-hero .section-title h1 {
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: .2em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 10px;
  }
  
  .sub-hero .section-title small {
    color: #f7e2b8;
    letter-spacing: .3em;
    font-size: 14px;
  }
  
  /* 2. 画像の上に覆いかぶさってくるメインコンテンツ全体 */
  .sub-main-wrapper {
    position: relative;
    z-index: 2; /* 画像より前面に配置 */
    margin-top: 60vh; /* 画像の高さ分だけ下にずらしてスタート */
    background: #ffffff; /* 白背景で下の画像をしっかり隠す */
     /* box-shadow: 0 -15px 30px rgba(0, 0, 0, 0.15); /* 重なる部分に綺麗な陰影 */
  }
  
  /* 落ち着いた和の雰囲気を持つ横書きメッセージエリア */
.common-lead {
    padding: 40px 20px;
    background: #fff;
    display: flex;
    justify-content: center;
    text-align: center;
  }
  
  .text-wrap-horizontal {
    max-width: 700px;
    margin: 0 auto;
  }
  
  .horizontal-title {
    font-size: 30px;
    font-family: 'Noto Serif JP', serif;
    letter-spacing: .2em;
    color: var(--gold);
    margin-bottom: 25px;
    font-weight: 500;
    position: relative;
    display: inline-block;
  }
  
  .horizontal-title::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 20px auto 0;
  }
  
  .horizontal-text {
    font-size: 16.5px;
    font-family: 'Noto Serif JP', serif;
    line-height: 2.2;
    letter-spacing: .12em;
    color: var(--ink);
    margin: 0;
  }
  
  /* アンカーボタン */
  .anchor-nav-section {
    background: #f7f5ef;
    padding: 25px 20px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  
  .anchor-btn-wrap {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .anchor-btn-wrap a {
    display: block;
    padding: 16px 45px;
    background: #fff;
    border: 1px solid var(--gold);
    color: var(--ink);
    font-family: 'Noto Serif JP', serif;
    font-size: 16px;
    letter-spacing: .12em;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  
  .anchor-btn-wrap a:hover {
    background: var(--gold);
    color: #fff;
  }
  
  /* コンテナ */
  .sub-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 80px 25px;
  }
  
  .sub-section {
    margin-bottom: 100px;
    padding-top: 30px;
  }
  
  .sub-sec-title {
    font-size: 28px;
    font-family: 'Noto Serif JP', serif;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 15px;
    margin-bottom: 40px;
    letter-spacing: .15em;
  }
  
  .sub-grid-block {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 45px;
    align-items: center;
    margin-bottom: 40px;
    min-width: 0; /* ← これが文字のはみ出しを防ぐ魔法のコード！ */
  }
  
  .sec-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  }

  .sec-desc {
    min-width: 0; /* ← テキストエリアが枠からはみ出るのを防ぐよ */
  }
  .sec-desc p {
    font-size: 16.5px;
    line-height: 2.0;
    margin-bottom: 20px;
    overflow-wrap: anywhere; /* 長い文字だけ折り返す（電話番号などが途中で切れない） */
  }
  
  /* 注意事項カード */
  .notice-card {
    background: #fdfbf7;
    border-left: 5px solid var(--gold);
    padding: 28px 32px;
    margin: 40px 0;
    border-radius: 0 8px 8px 0;
  }
  
  .notice-card h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--ink);
  }
  
  .notice-card ul {
    margin: 0;
    padding-left: 22px;
    font-size: 16px;
    line-height: 1.9;
  }
  
  /* 流れステップ */
  .flow-block {
    margin: 50px 0;
    background: #f7f5ef;
    padding: 40px 35px;
    border-radius: 8px;
  }
  
  .flow-block h3 {
    font-size: 22px;
    margin-bottom: 25px;
    text-align: center;
  }
  
  .flow-list dt {
    font-weight: 600;
    font-size: 17px;
    color: var(--ink);
    margin-top: 20px;
  }
  
  .flow-list dt span {
    display: inline-block;
    width: 26px;
    height: 26px;
    background: var(--gold);
    color: #fff;
    text-align: center;
    line-height: 26px;
    border-radius: 50%;
    font-size: 13px;
    margin-right: 10px;
  }
  
  .flow-list dd {
    margin: 8px 0 20px 36px;
    font-size: 15.5px;
    color: #444;
    line-height: 1.8;
  }
  
  /* 電話CTAエリア */
  .cta-contact-box {
    background: #f4efe6;
    border: 1px solid #e2d9c8;
    padding: 45px 25px;
    text-align: center;
    margin-top: 50px;
    border-radius: 8px;
  }
  
  .cta-contact-box h3 {
    font-size: 22px;
    margin-bottom: 12px;
  }
  
  .cta-contact-box p {
    font-size: 15.5px;
    color: #555;
    margin-bottom: 25px;
  }
  
  .cta-tel-btn {
    display: inline-block;
    background: #76694f;
    color: #fff;
    font-size: clamp(24px, 3.5vw, 32px);
    font-family: 'Noto Serif JP', serif;
    padding: 16px 45px;
    border-radius: 50px;
    letter-spacing: .08em;
    transition: background 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }
  
  .cta-tel-btn:hover {
    background: #968360;
    color: #fff;
  }
  
  .cta-time {
    display: block;
    font-size: 13px;
    color: #777;
    margin-top: 14px;
  }
  
  /* FAQ */
  .faq-block {
    margin: 50px 0;
  }
  
  .faq-block h3 {
    font-size: 22px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }
  
  .faq-list dt {
    font-weight: 500;
    font-size: 16.5px;
    background: #f7f5ef;
    padding: 16px 20px;
    margin-top: 15px;
  }
  
  .faq-list dd {
    margin: 0;
    padding: 16px 20px 25px;
    font-size: 15.5px;
    line-height: 1.9;
    color: #444;
    border-bottom: 1px solid var(--line);
  }
  
  /* スマホ対応 */
  @media (max-width: 760px) {
    .sub-hero {
      height: 45vh;
    }
    .sub-main-wrapper {
      margin-top: 45vh;
    }
    .sub-grid-block {
      grid-template-columns: 1fr;
    }
    .text-wrap-vertical {
      max-height: 420px;
    }
    .anchor-btn-wrap {
      flex-direction: column;
      gap: 12px;
    }
    .anchor-btn-wrap a {
      text-align: center;
    }
    /* スマホ（760px以下）のときだけ横書きにする設定 */
@media (max-width: 760px) {
    .common-lead {
      padding: 50px 20px;
    }
    
    .text-wrap-vertical {
      display: block; /* 縦書きモードを解除 */
      writing-mode: horizontal-tb; /* 通常の横書きにする */
      max-height: none;
      text-align: center;
    }
  
    .vertical-title {
      writing-mode: horizontal-tb;
      border-left: none;
      border-bottom: 1px solid var(--line);
      padding-left: 0;
      padding-bottom: 12px;
      margin-bottom: 20px;
      font-size: 20px;
      text-align: center;
    }
  
    .vertical-text {
      writing-mode: horizontal-tb;
      font-size: 15px;
      line-height: 1.9;
      text-align: center;
    }
  }
  }

/* ===== ヒーロー文字の修正(ファイルの最後に置く) ===== */
.sub-hero .section-title {
    display: block !important;   /* 横並びをやめて縦に並べる */
    text-align: center;
    padding: 0 20px;
  }
  
  .sub-hero .section-title h1 {
    line-height: 1.5;
  }
  
  .sub-hero .section-title small {
    display: block;
  }
  
  @media (max-width: 760px) {
    .sub-hero .section-title h1 {
      font-size: 24px;
      letter-spacing: .1em;
    }
    .sub-hero .section-title small {
      letter-spacing: .2em;
      font-size: 12px;
    }
  
    /* 下の「ご遺族の心に寄り添うお見送り」も窮屈なので調整 */
    .horizontal-title {
      font-size: 22px;
      letter-spacing: .1em;
    }
    .horizontal-text {
      font-size: 15px;
      letter-spacing: .06em;
      line-height: 2;
    }
  }

/* ヘッダーを画面上部に固定（ハンバーガーが流れないように） */
body#page_funeral header.header {
  position: fixed;
  background: rgba(15, 15, 15, 0.85);
}
