@import url("https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap");

.future-page {
  font-family: "Google Sans", "Kaisei Tokumin", sans-serif;
  background-color: var(--pale-marron);
  color: var(--text-main);
  /* 他のセクションと共通の余白を設定 */
  padding: var(--section-top-padding) var(--side-gutter) 0;
}

/* 画像を枠いっぱいに表示 */
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.future-header {
  position: relative;
  z-index: 10;
}

/* ws-futureセクション内のh1だけに限定する */
.ws-future h1 {
  text-transform: uppercase;
  font-size: clamp(3rem, 5vw, 7rem);
  font-weight: 400;
  line-height: 1;
}

/* introとoutro内のpだけに限定する */
.ws-intro p, .ws-outro p {
  /* 調整方法: 
     1. 固定にする場合: font-size: 2rem; 
     2. 可変にする場合: clamp(最小サイズ, 推奨サイズ, 最大サイズ) */
  font-size: clamp(2rem, 5vw, 4rem); 
  font-weight: 500;
  line-height: 1.25;
}

.ws-future {
  position: relative;
  width: 100%;
  margin: 0 auto;
  height: 100svh;
  overflow: hidden;
}

.ws-intro {
  position: relative;
  width: 100%;
  margin: 0 auto;
  height: 50svh; /* 100svhから任意の高さ（例: 50svh）に変更 */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ws-outro {
  position: relative;
  z-index: 10; /* 重なり順を上げて前面に表示 */
  width: 100%;
  margin: 0vh auto 0; /* 数値を小さく（例: 60vh → 10vh）すると、画像終了後すぐに表示されます */
  height: 50vh; /* photo10終了後のスクロール量を50vhに設定 */
  overflow: visible; /* 内容がはみ出しても表示されるように変更 */
  display: flex;
  justify-content: center;
  align-items: center; /* 垂直方向の中央揃え。位置を下げたい場合は flex-end に変更可能 */
  text-align: center;
  padding-bottom: 25vh;
}

/* 番号表示の位置(元コードは要素があるだけなので位置を補完) */
.ws-future-index {
  position: absolute;
  left: 2rem;
  top: 2rem;
  z-index: 2;
}

/* 中央の画像列 */
.ws-future-images {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;              /* デスクトップ時 */
  padding: 50svh 0;
  display: flex;
  flex-direction: column;
  gap: 10svh;              /* 調整：1000px以上の時の画像間の隙間 */
  z-index: 0;
}

/* 1枚分の画像枠 */
.ws-project-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  overflow: hidden;
  border-radius: 4px;
}

/* 右下の名前列 */
.ws-future-names {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 2;
}

.ws-future-names p {
  color: #4a4a4a;
  font-size: 40px;
  transition: color 0.3s ease;
}

/* transform を多用するので最適化ヒント(元CSSの意図を踏襲) */
.ws-future-index h1,
.ws-future-images,
.ws-future-names p {
  will-change: transform;
}

@media (max-width: 1024px) {
  .future-page {
    padding-left: 0;
    padding-right: 0;
  }
  .ws-future-images {
    width: 100%;  /* 画面いっぱいに変更 */
    gap: 5svh;
  }
  .ws-project-img {
    border-radius: 0; /* 画面端まで表示するため角丸を解除 */
  }

  .ws-future-names p {
    color: #d25b3f !important;
    font-size: 20px;
  }

  /* セクションの幅をモバイルで全幅にする */
  .ws-intro, .ws-future, .ws-outro {
    width: 100%;
  }

  /* モバイル時のintro/outroのサイズを微調整したい場合 */
  .ws-intro p, .ws-outro p {
    font-size: 2.5rem;
  }
}

/* Future セクションのスマホ最適化 */
@media (max-width: 788px) {

  /* ① セクション全体の高さを安定化 */
  .ws-future {
    height: auto;
    min-height: 100vh;
    overflow: visible; /* 内容がはみ出しても表示されるように変更 */
  }

  /* ② 中央画像列のズレを修正 */
  .ws-future-images {
    width: 100%;
    padding: 20vh 0;
    gap: 5vh;
  }

  /* ③ outro の空白を縮める */
  .ws-outro {
    height: auto;
    padding-bottom: 10vh;
    margin-top: 10vh;
  }

  /* ④ テキストサイズの最適化（任意） */
  .ws-intro p,
  .ws-outro p {
    font-size: clamp(1.6rem, 6vw, 3rem);
  }

  /* ⑤ 名前リストのサイズ調整 */
  .ws-future-names p {
    font-size: 24px;
  }
}

