/* =========================
   /css/story.css
   夢幻庵 - "夢幻庵とは" ページ用（iOS対応版）
   ========================= */

:root{
  --text: #222222;
  --muted: #666666;
  --accent-green: #0b3d2e;
  --accent-gold: #cfa94a;
  --soft-bg: #fafaf7;
  --section-pad: 72px;
  --max-width: 1100px;
  --radius: 10px;
  --headerHeight: 120px; /* ヘッダー高さを変える場合ここで */
}

/* ページ全体リセット */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  background: #ffffff;
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.8;
  margin: 0;
  padding: 0;
}

/* コンテナ */
.wrapper {
  width: 92%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 12px;
}

/* -----------------------
   ヒーロー（トップ見出し）
----------------------- */
.story-hero {
    background-color: var(--soft-bg);
    padding: calc(var(--section-pad) * 0.85 + 80px) 0 72px 0;
    text-align: center;
    border-bottom: 1px solid #efefef;
    margin-top: 0; /* マイナス余白を消す */
    padding-top: calc(var(--headerHeight) - 80px); /* ヘッダー高さ＋任意余白 */
}

/* トップ見出し補正用 */
.top-heading {
    display: block;
    position: relative;
}

/* アンカーリンク対策（iOS Safari 安定版） */
.top-heading::before {
  content: "";
  display: block !important;
  height: 90px !important;
  margin-top: -90px !important;
  visibility: hidden !important;
}

/* 見出しと本文 */
.story-hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin: 0 0 12px;
  color: #111;
  letter-spacing: 0.02em;
}

.story-hero p {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--muted);
  margin: 0;
}


/* CTAボタン共通 */
.btn-gold {
    display: inline-block;
    background: linear-gradient(135deg, #cfa94a, #e7c86a);
    color: #1f1f1f;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(199,155,50,0.12);
    transition: transform .18s ease, box-shadow .18s ease;
    margin-right: 12px; /* ボタン間の余白 */
}

.btn-gold:hover,
.btn-gold:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(199,155,50,0.18);
}

/* CTAグループ全体を中央揃え */
.cta-group {
  display: flex;
  justify-content: center; /* 中央に揃える */
  flex-wrap: wrap;         /* スマホでは縦に並べる */
  gap: 16px;               /* ボタン間の余白 */
  margin: 40px auto;
  max-width: 100%;
  text-align: center;
}

/* CTA内のボタン調整 */
.cta-group .btn-gold {
  display: inline-block;
  min-width: 180px;
  max-width: 220px;
  padding: 12px 20px;
  font-size: 1rem;
  text-align: center;
}




/* 画像と動画を統一した見た目にする */
.story-section img,
.story-section iframe,
.story-section video {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* 動画を16:9で統一表示 */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9比率 */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;      /* 角丸 */
  box-shadow: 0 8px 20px rgba(0,0,0,0.08); /* 影 */
}

/* すべての figure 内の画像を統一 */
.story-section figure img {
  width: 100%;         /* 親要素いっぱいに広げる */
  max-width: 1200px;    /* 他の画像と同じ最大幅 */
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: cover;
}


/* -----------------------
   レスポンシブ補正
----------------------- */
@media (max-width: 900px) {
  :root { --section-pad: 48px; }
  .wrapper { width: 94%; }

  /* ===== 上部余白を程よく設定 ===== */
  .story-hero {
    padding-top: 20px !important; /* ←ここで余白量を調整（40〜60pxがおすすめ） */
    margin-top: 0px !important;
    padding-bottom: 36px !important; /* スマホ下部余白を少し小さく */
  }

  /* .story-hero 直前の要素の余白リセット */
  .story-hero + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* ヘッダーやスペーサーは無効化 */
  .scroll-spacer {
    display: none !important;
    height: 0 !important;
  }

  .story-section { padding: 48px 12px; }
  .story-hero h1 { font-size: 1.9rem; }
  .story-section h2 { font-size: 1.4rem; }

  .top-heading::before {
    height: 0 !important;
    margin-top: 0 !important;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
  }

  .cta-group {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  .cta-group .btn-gold {
    width: auto;
    max-width: 220px;
    padding: 12px 20px;
    white-space: nowrap;
  }


}
