/* =====================================
   TOPページ専用レイアウト / セクション別スタイル
   - HERO（キービジュアル）
   - ギフトコード入力フォーム
   - ご利用の流れ（steps）
   - カタログコース / 店舗情報 / FLEXについて / FAQ
   ===================================== */

/* ================================
   HERO レイアウト（左：コピー / 右：パネル）
   - index.html 内の #hero セクションに対応
   ================================ */
#hero .hero-inner {
  position: relative;
  padding-right: 520px; /* 右側のカード分だけ余白を確保してテキストが潜り込まないようにする */
}

#hero .hero-panel {
  display: flex;
  justify-content: flex-end;
  position: absolute;
  top: 50%;
  right: 16px; /* コンテナのパディングに揃える */
  transform: translateY(-50%);
}

/* HERO 内のテキスト幅調整（PC時は左側に収まるように） */
#hero .hero-inner .tagline,
#hero .hero-inner h1,
#hero .hero-inner .lead,
#hero .hero-inner .small-note {
  max-width: 560px;
}

/* ※現在は未使用だが、将来的なビジュアルカード表示用のスタイル */
#hero .hero-image {
  max-width: 340px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  background-color: #f2eee7;
  aspect-ratio: 3 / 2;
}

#hero .hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #fff; /* 背景となじませるための白枠 */
}

/* ギフトカード等を見せるカードUI（現状レイアウトでは未使用） */
#hero .hero-card {
  background: linear-gradient(145deg, #ffffff, #f2eee7);
  border-radius: 20px;
  padding: 20px 18px;
  max-width: 320px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}

#hero .badge {
  position: absolute;
  top: 14px;
  right: 18px;
  background-color: #222;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.16em;
  padding: 3px 10px;
  border-radius: 999px;
}

#hero .hero-card-title {
  font-size: 17px;
  font-weight: 600;
  margin: 6px 0 6px;
}

#hero .hero-card-text {
  font-size: 14px;
  color: #555;
  margin: 0;
}

/* ================================
   背景画像セクション用ベース
   - 背景画像を設定する場合の共通プロパティ
   ================================ */
#code {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#about {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ================================
   ご利用の流れ（steps）
   - index.html 内の #howto セクションに対応
   ================================ */
#howto .steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin-top: 24px;
}

#howto .step-card {
  background-color: #fafafa;
  border-radius: 12px;
  padding: 1.5em 2em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#howto .step-number {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background-color: #222;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

#howto .step-card h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

#howto .step-card p {
  font-size: 16px;
  margin: 0;
  color: #555;
}

/* ================================
   ギフトコード入力フォーム周り
   ================================ */
.code-section {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    circle at top,
    #f2f3ff 0,
    #ffffff 45%,
    #f7f7f7 100%
  );
}

.code-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.code-inner {
  position: relative;
  z-index: 1; /* 前景のフォームを背景装飾より上に表示 */
  display: flex;
  justify-content: center;
}

.code-form-panel {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 30px 28px 32px;
  box-shadow: 0 14px 34px rgba(31, 31, 70, 0.2);
  width: 50%;
  max-width: 520px;
  margin: 0 auto;
}

.hero-panel .code-form-panel {
  width: 100%;
  max-width: 460px;
  margin: 0;
}

/* 960px以上でギフトコード入力ブロックの上下に余白を追加 */
@media (min-width: 961px) {
  .hero-panel .code-form-panel {
    margin-top: 24px;
    margin-bottom: 24px;
  }
}

.code-form {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.course-links .btn {
  flex: 1;
  min-width: 100px;
}

/* フォーム内ラベル／フィールド */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-inline {
  max-width: 220px;
}

.field-label {
  font-size: 14px;
  color: #555;
}

.form-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: #777;
}

/* ================================
   カタログコース一覧
   - index.html 内の #catalog セクションに対応
   ================================ */
#catalog .course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}

#catalog .course-card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 1.5em 2em;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#catalog .course-card-image {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

#catalog .course-card-image img {
  display: block;
  width: 100%;
  height: auto;
}

#catalog .course-card h3 {
  margin: 0;
  font-size: 18px;
}

#catalog .course-price {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  color: #7b715d;
}

/* ================================
   店舗情報
   - index.html 内の #stores セクションに対応
   ================================ */
#stores .store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-top: 16px;
}

#stores .store-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5em 2em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 16px;
}

#stores .store-logo {
  display: block;
  max-width: 120px;
  margin-bottom: 8px;
}

#stores .store-photo {
  display: block;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 8px;
}

#stores .store-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

#stores .store-meta {
  margin: 0;
  color: #555;
}

/* ================================
   FLEXについてセクション
   - index.html 内の #about セクションに対応
   ================================ */
#about .about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: flex-start;
}

#about .about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

#about .text-link {
  font-size: 16px;
  color: #1d3a8a;
  border-bottom: 1px solid rgba(29, 58, 138, 0.4);
}

#about .text-link:hover {
  border-bottom-color: transparent;
}

#about .about-side h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

#about .definition-list {
  margin: 0;
  font-size: 16px;
}

#about .definition-list dt {
  font-weight: 600;
  margin-top: 6px;
}

#about .definition-list dd {
  margin: 0;
  color: #555;
}

/* ================================
   FAQ
   - index.html 内の #faq セクションに対応
   ================================ */
#faq .faq-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

#faq .faq-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5em 2em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-size: 16px;
}

#faq .faq-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

#faq .faq-item p {
  margin: 0;
  color: #555;
}

/* ================================
   レスポンシブ調整
   ================================ */
@media (max-width: 960px) {
  #hero .hero-inner {
    padding: 0 6%;
  }

  #hero .hero-panel {
    position: static;
    transform: none;
    margin-top: 24px;
    margin-bottom: 32px; /* ギフトコード入力ブロックの下に余白を追加 */
    justify-content: center;
  }

  #hero .hero-inner .tagline,
  #hero .hero-inner h1,
  #hero .hero-inner .lead,
  #hero .hero-inner .small-note {
    max-width: none;
    text-align: center;
  }

  #howto .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .code-inner {
    display: block;
  }

  .code-form-panel {
    width: 100%;
    max-width: 100%;
  }

  #catalog .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #stores .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #about .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  /* スマホ: sp-hide クラスは非表示 */
  .sp-hide {
    display: none;
  }

  /* スマホ: 横スクロール防止 */
  html,
  body {
    overflow-x: hidden;
  }

  /* スマホ: HERO 右側切れ防止・説明文左揃え */
  #hero {
    overflow-x: hidden;
  }

  #hero .hero-inner {
  }

  #hero .hero-panel {
    width: 90%;
    max-width: 90%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
  }

  #hero .hero-panel .code-form-panel {
    min-width: 0;
    box-sizing: border-box;
  }

  #hero .hero-inner .tagline {
    font-size: 80%;
    text-align: left;
  }

  #hero .hero-inner h1,
  #hero .hero-inner .lead,
  #hero .hero-inner .small-note {
    text-align: left;
  }

  #howto .steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #catalog .course-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #stores .store-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-inline {
    max-width: 100%;
  }
}


