/* ==========================================================================
   Snowboard School STEP7 Custom Portal CSS
   ========================================================================== */

/* 1. 変数定義 (CSS Custom Properties) */
:root {
  /* 共通カラー */
  --bg-main: #f3f7fa;
  --bg-gradient: linear-gradient(135deg, #eef5fc 0%, #e2ebf5 100%);
  --text-main: #2c3e50;
  --text-muted: #64748b;
  --white: #ffffff;
  
  /* スクール別の指定カラー */
  --color-step7: #0a2540;      /* ネイビーブルー */
  --color-kids: #e11d48;       /* 赤 */
  --color-kids-plus: #2563eb;  /* 青 */
  --color-athlete: #111111;    /* 黒 */
  --color-maiko: #0284c7;      /* 舞子校 (スカイブルー/雪山ブルー) */
  --color-education: #475569;  /* 教育機関 (グレー) */

  /* 装飾用 */
  --card-shadow: 0 10px 30px rgba(10, 37, 64, 0.05);
  --hover-shadow: 0 20px 40px rgba(10, 37, 64, 0.12);
  --border-radius-lg: 16px;
  --border-radius-md: 8px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 2. リセット & ベーススタイル */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Noto Sans JP', "游ゴシック体", "Yu Gothic", YuGothic, "メイリオ", sans-serif;
  color: var(--text-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 3. ヘッダーエリア */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo img {
  height: 54px;
  width: auto;
  transition: var(--transition);
}

.logo img:hover {
  opacity: 0.85;
}

/* 右上の脇に配置する求人・お問合せメニュー */
.sub-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sub-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sub-link:hover {
  color: var(--color-step7);
  background-color: rgba(10, 37, 64, 0.05);
}

/* お問合せを目立たない程度に少し強調 */
.sub-link.highlight {
  border: 1px solid rgba(10, 37, 64, 0.15);
  color: var(--color-step7);
}

.sub-link.highlight:hover {
  background-color: var(--color-step7);
  color: var(--white);
  border-color: var(--color-step7);
}

/* 4. ヒーロー・スポットライトセクション */
.portal-main {
  padding: 40px 0 80px 0; /* ヒーローがなくなったため、上の余白を詰めます */
}

/* メインアピール：STEP7 カード (ヒーロー仕様) */
.main-spotlight {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 80px;
  transition: var(--transition);
}

.hero-spotlight {
  max-width: 100%; /* 横幅いっぱいに広げる */
  margin-bottom: 0; /* 下の文字枠と重ねるためマージンを0にする */
}

.main-spotlight:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(10, 37, 64, 0.2);
}

/* 派生矢印コネクター (PC用) */
.program-connector-pc {
  display: block;
  width: 100%;
  height: 120px;
  margin-top: -10px; /* タイトルの枠線の底から滑らかに矢印を出す */
  margin-bottom: 40px;
  position: relative;
  z-index: 5;
}

.program-connector-pc svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr; /* 写真エリアを広く確保 */
  align-items: stretch;
}

.spotlight-image {
  position: relative;
  overflow: hidden;
  min-height: 420px; /* テキストが重なっても余裕のある高さ */
}

/* 写真に重ねる暗めのグラデーションマスク */
.spotlight-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 37, 64, 0.85) 0%, rgba(10, 37, 64, 0.2) 60%, rgba(10, 37, 64, 0.1) 100%);
  z-index: 1;
}

.spotlight-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.main-spotlight:hover .spotlight-bg {
  transform: scale(1.03);
}

/* 画像の上のテキストオーバーレイ */
.image-text-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  z-index: 2;
  color: var(--white);
  text-align: left;
}



.overlay-logo-center {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  max-height: 140px; /* 前回のサイズから20%縮小 */
  max-width: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.4)); /* ロゴの輪郭に合わせた美しい影 */
  display: block;
}

.overlay-tagline {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--color-maiko);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.image-text-overlay h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.image-text-overlay p {
  font-size: 15px;
  opacity: 0.95;
  font-weight: 300;
  line-height: 1.6;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.badge-brand {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 16px;
  border-radius: 50px;
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 3; /* マスクやテキストの上に配置 */
}

.theme-step7 { background-color: var(--color-step7); }
.theme-kids { background-color: var(--color-kids); }
.theme-maiko { background-color: var(--color-maiko); }
.theme-athlete { background-color: var(--color-athlete); }
.theme-education { background-color: var(--color-education); }

.spotlight-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-brand-label {
  font-size: 13px;
  color: var(--color-step7);
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.title-step7 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-step7);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 12px;
}

.title-step7::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--color-step7);
  border-radius: 2px;
}

.spotlight-content .description {
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 24px;
  line-height: 1.8;
}

.category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.category-badges .badge {
  background-color: rgba(10, 37, 64, 0.05);
  color: var(--color-step7);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 700;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-step7 {
  background-color: var(--color-step7);
  color: var(--white);
}

.btn-step7:hover {
  background-color: #1e3b60;
  transform: translateX(4px);
}

/* 6. セクションヘッダー */
.section-title {
  text-align: center;
  max-width: 540px;
  margin: -24px auto -20px auto; /* 上に-24px引き上げてSTEP7カードと少し重ねる */
  background: rgba(255, 255, 255, 0.85); /* 重なったときに文字が見やすいように白背景を強める */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(10, 37, 64, 0.12);
  border-radius: var(--border-radius-lg);
  padding: 16px 24px;
  box-shadow: 0 10px 30px rgba(10, 37, 64, 0.06); /* 重なりを際立たせるための立体的な影 */
  position: relative;
  z-index: 10; /* 矢印やカードよりも上に重ねる */
}

.section-title h2 {
  font-size: 18px; /* 小さめ */
  font-weight: 700;
  color: var(--color-step7);
  margin-bottom: 4px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 12px; /* 小さめ */
}

/* 7. サブプログラム グリッド */
.sub-programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.program-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
  background: rgba(255, 255, 255, 0.85);
}

/* カードごとのボーダーアクセント */
.card-kids { border-top: 4px solid var(--color-kids); }
.card-maiko { border-top: 4px solid var(--color-maiko); }
.card-athlete { border-top: 4px solid var(--color-athlete); }
.card-education { border-top: 4px solid var(--color-education); }

.card-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  background-color: #e2e8f0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.program-card:hover .card-image img {
  transform: scale(1.06);
}

/* 舞子ロゴ用の特別スタイル */
.logo-overlay-bg {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.maiko-logo-img {
  width: auto !important;
  max-height: 80px;
  object-fit: contain !important;
}

/* 教育機関の画像プレースホルダー */
.card-image-placeholder {
  height: 180px;
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.placeholder-icon {
  font-size: 48px;
  color: rgba(255, 255, 255, 0.8);
}

.card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.title-kids { color: var(--color-kids); }
.title-maiko { color: var(--color-maiko); }
.title-athlete { color: var(--color-athlete); }
.title-education { color: var(--color-education); }

.card-body .target {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-body .description {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
}

/* ヒキダスKids+のハイライトボックス (青カラー) */
.plus-course-box {
  margin-top: 16px;
  padding: 12px;
  background-color: rgba(37, 99, 235, 0.05);
  border-left: 3px solid var(--color-kids-plus);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.plus-badge {
  display: inline-block;
  background-color: var(--color-kids-plus);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.plus-course-box p {
  font-size: 11px;
  color: #1e3a8a;
  line-height: 1.4;
}

/* カードボタン */
.card-footer {
  padding: 0 24px 24px 24px;
}

.btn-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-kids {
  background-color: var(--color-kids);
  color: var(--white);
}
.btn-kids:hover {
  background-color: #be123c;
  transform: translateY(-2px);
}

.btn-maiko {
  background-color: var(--color-maiko);
  color: var(--white);
}
.btn-maiko:hover {
  background-color: #0369a1;
  transform: translateY(-2px);
}

.btn-athlete {
  background-color: var(--color-athlete);
  color: var(--white);
}
.btn-athlete:hover {
  background-color: #222222;
  transform: translateY(-2px);
}

.btn-education {
  border: 1px solid var(--color-education);
  color: var(--color-education);
  background-color: transparent;
}
.btn-education:hover {
  background-color: var(--color-education);
  color: var(--white);
  transform: translateY(-2px);
}

/* 8. フッター */
.main-footer {
  background-color: #0a192f;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 20px 0;
  margin-top: 100px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr; /* リンク列が1つに減ったため、2カラム構成に変更 */
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 13px;
  margin-top: 12px;
  margin-bottom: 20px;
}

.footer-logo {
  height: 48px;
  width: auto;
}

.sns-links {
  display: flex;
  gap: 16px;
}

.sns-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 18px;
  transition: var(--transition);
}

.sns-links a:hover {
  background-color: var(--color-maiko);
  transform: scale(1.1);
}

.footer-links h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  font-size: 13px;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
}

.footer-bottom a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* 9. レスポンシブ対応 (Media Queries) */

@media (max-width: 1024px) {
  .sub-programs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .header-container {
    height: 70px;
  }
  .logo img {
    height: 40px;
  }
  .sub-link {
    font-size: 12px;
    padding: 6px 12px;
  }

  .image-text-overlay {
    padding: 24px;
  }
  .image-text-overlay h2 {
    font-size: 22px;
  }
  .image-text-overlay p {
    font-size: 13px;
  }
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  .spotlight-image {
    height: 240px;
  }
  
  .overlay-logo-center {
    max-height: 64px; /* モバイル画面に合わせてロゴサイズを20%縮小 */
    top: 15px;
  }

  .spotlight-content {
    padding: 24px;
  }
  .title-step7 {
    font-size: 24px;
  }
  
  /* モバイル時のコネクター表示切替 */
  .program-connector-pc {
    display: none;
  }
  
  /* 各カードの上部にスクールカラーの下向き矢印と文字バッジを表示 */
  .sub-programs-grid .program-card {
    margin-top: 56px;
    position: relative;
  }
  
  .sub-programs-grid .program-card::before {
    content: '\f063';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    z-index: 5;
  }
  
  .sub-programs-grid .program-card::after {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 10px;
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 12px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.08);
    white-space: nowrap;
    z-index: 5;
  }
  
  .sub-programs-grid .card-kids::before { color: var(--color-kids); }
  .sub-programs-grid .card-kids::after { content: 'やりたい！をヒキダス'; color: var(--color-kids); border: 1px solid rgba(225, 29, 72, 0.2); }
  
  .sub-programs-grid .card-maiko::before { color: var(--color-maiko); }
  .sub-programs-grid .card-maiko::after { content: 'ゲレンデで目的別レッスン'; color: var(--color-maiko); border: 1px solid rgba(2, 132, 199, 0.2); }
  
  .sub-programs-grid .card-athlete::before { color: var(--color-athlete); }
  .sub-programs-grid .card-athlete::after { content: '夢を叶えるマンツーマン'; color: var(--color-athlete); border: 1px solid rgba(17, 17, 17, 0.2); }
  
  .sub-programs-grid .card-education::before { color: var(--color-education); }
  .sub-programs-grid .card-education::after { content: 'プロコーチを学校・団体へ'; color: var(--color-education); border: 1px solid rgba(71, 85, 105, 0.2); }
}

@media (max-width: 576px) {
  .sub-programs-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
}
