@charset "UTF-8";

/* =========================================
   ベース
   ========================================= */
body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* PC表示時のみ、サイトカラー（#64B8EC）の淡いトーンでグラデーション背景 */
@media screen and (min-width: 768px) {
  body {
    background: linear-gradient(160deg, #FAFDFF 0%, #EAF5FC 45%, #D6EBF8 100%) fixed;
  }
}

/* =========================================
   メインコンテンツ（PC: 中央配置・左右余白）
   ========================================= */
.main-content {
  width: 100%;
}

.image-section {
  width: 100%;
  margin-bottom: 0;
}

/* CTAボタンを設置するセクション */
.image-section--cta {
  position: relative;
}

.image-wrapper {
  display: block;
  width: 100%;
}

/* SP画像のみ（PC表示時は480px・中央寄せ） */
.image-wrapper--sp-only {
  max-width: 480px;
  margin: 0 auto;
}

@media screen and (max-width: 767px) {
  .image-wrapper--sp-only {
    max-width: 100%;
  }
}

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

/* =========================================
   CTAボタン（セクション内）
   ========================================= */
.cta-btn {
  position: absolute;
  /* 画像下部の余白（画像幅750px基準で約320px）の中央よりやや上に配置。SPは画面幅に比例 */
  bottom: calc(12.33vw + 5px);
  left: 50%;
  z-index: 100;
  display: block;
  width: calc(100% - 40px);
  max-width: calc(480px - 40px);
  transform: translateX(-50%);
  animation: pulse 2.4s ease-in-out infinite;
}

/* 480px以上はボタン幅が440pxで頭打ちになるため、同じ位置になるよう再計算 */
@media screen and (min-width: 480px) {
  .cta-btn {
    bottom: calc(24.66vw - 55px);
  }
}

/* PCはコンテンツ幅480px固定のため、余白205px・ボタン高110pxから算出 */
@media screen and (min-width: 768px) {
  .cta-btn {
    bottom: 64px;
  }
}

.cta-btn__img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.cta-btn:hover .cta-btn__img {
  opacity: 0.7;
}

/* 拡大縮小アニメーション（中央寄せを維持。最大時が等倍＝左右20pxの余白を保つ） */
@keyframes pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(0.95);
  }

  50% {
    transform: translateX(-50%) scale(1);
  }
}

/* =========================================
   目次（PC表示時のみ・右側）
   ========================================= */
.side-nav {
  position: fixed;
  top: calc(50% - 60px); /* 右下の追従CTAボタンと重ならないよう上方向へオフセット */
  left: calc(75% + 120px); /* 480pxのメインコンテンツを除いた右側エリアの中央 */
  z-index: 1000;
  display: none;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* 左右の余白に収まる画面幅でのみ表示 */
@media screen and (min-width: 1024px) {
  .side-nav {
    display: block;
  }
}

.side-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: calc((100vw - 480px) / 2 - 40px);
  pointer-events: auto;
}

.side-nav__item {
  margin-bottom: 6px;
}

.side-nav__item:last-child {
  margin-bottom: 0;
}

.side-nav__link {
  display: flex;
  align-items: center;
  justify-content: left;
  min-width: 48px;
  height: auto;
  padding: 8px 20px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.3px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.side-nav__link:hover {
  opacity: 0.7;
}

.side-nav__link:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* =========================================
   追従CTAボタン
   SP: 画面下部中央 ／ PC: 右下の余白エリア
   表示・非表示はJS（.is-visible）で制御
   ========================================= */
.fixed-cta-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 999;
  display: block;
  width: calc(100% - 40px);
  max-width: calc(480px - 40px);
  visibility: hidden;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

@media screen and (min-width: 768px) {
  .fixed-cta-btn {
    right: 20px;
    left: auto;
    width: auto;
    /* 右側の余白エリアに収める（最大300px） */
    max-width: min(calc((100vw - 480px) / 2 - 40px), 300px);
    /* PCは常時表示（JSの表示制御はSPのみ） */
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.fixed-cta-btn.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.fixed-cta-btn__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.fixed-cta-btn:hover .fixed-cta-btn__img {
  opacity: 0.7;
}
