/* =====================
   ベース
===================== */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.magi-lp {
  font-family:
    "Inter",
    "MotoyaMaru",
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    "Segoe UI",
    system-ui,
    sans-serif;
  color: #2b2b2b;
  line-height: 1.7;
  font-size: 16px;
  background: linear-gradient(180deg, #f5f7fa 0%, #f9fbfc 40%, #f5f7fa 100%);
}

.magi-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.magi-section {
  padding: 72px 0;
  background: transparent;
  position: relative;
}

.magi-section::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72%;
  max-width: 760px;
  height: 1px;
  background: linear-gradient(90deg, rgba(214, 227, 228, 0), rgba(214, 227, 228, 0.9), rgba(214, 227, 228, 0));
  transform: translateX(-50%);
}

.magi-section-alt {
  background: #eef3f6;
}

.magi-section-highlight {
  background: #e5f2f2;
}

.magi-section-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
  color: #1c374f;
  position: relative;
}

.magi-section-title::before {
  content: "";
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6fb8b1, #4a7c8c);
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
}

/* 左寄せ見出し用（基本） */
.magi-section-title-left {
  text-align: left;
}

.magi-section-title-left::before {
  left: 0;
  transform: none;
}

.magi-kicker {
  font-weight: 600;
  margin-bottom: 12px;
  color: #4a7c8c;
}

.magi-section-body {
  max-width: 760px;
  margin: 0 auto 24px;
}

.magi-section-body-small {
  max-width: 520px;
  margin: 20px 0 0;
}

.magi-text-center {
  text-align: center;
}

.magi-small {
  font-size: 14px;
  color: #4b5b68;
}

/* グリッド共通 */

.magi-two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: flex-start;
}

/* =====================
   ボタン
===================== */

.magi-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.magi-btn-primary {
  background: #1c374f;
  color: #ffffff;
  border-color: #1c374f;
  box-shadow: 0 8px 20px rgba(28, 55, 79, 0.28);
}

.magi-btn-primary:hover {
  background: #152739;
  border-color: #152739;
  box-shadow: 0 10px 26px rgba(28, 55, 79, 0.4);
  transform: translateY(-1px);
}

.magi-btn-outline {
  background: transparent;
  border-color: #1c374f;
  color: #1c374f;
}

.magi-btn-outline:hover {
  background: #1c374f;
  color: #ffffff;
}

/* ヒーロー内だけ少し仕様を変える */
.magi-btn-outline-hero {
  background: rgba(255, 255, 255, 0.9);
  border-color: #1c374f;
  color: #1c374f;
}

.magi-btn-outline-hero:hover {
  background: #1c374f;
  color: #ffffff;
}

.magi-btn-outline-hero-alt {
  border-color: #1c374f;
  color: #1c374f;
}

/* 春期講習・説明会のメインCTAを少し大きく */
#spring .magi-btn-primary,
#orientation .magi-btn-outline-hero-alt {
  font-size: 17px;
  padding: 14px 28px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(28, 55, 79, 0.28);
}

#spring .magi-btn-primary:hover,
#orientation .magi-btn-outline-hero-alt:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(28, 55, 79, 0.38);
}

/* ハイライト */

.magi-highlight {
  position: relative;
  display: inline-block;
  z-index: 0;
  font-weight: 600;
  color: #1c374f;
  padding: 0 2px;
}

.magi-highlight::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1em;
  height: 45%;
  background: rgba(255, 229, 128, 0.8);
  border-radius: 6px;
  z-index: -1;
}

/* Benefit内だけ、フォントサイズは親に従い太字のみ */
.magi-highlight-benefit {
  font-weight: 700;
}

.magi-mobile-logo {
  display: none;
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 10000;
}

.magi-mobile-logo img {
  height: 28px;
  width: auto;
}

@media (max-width: 1024px) {
  .magi-mobile-logo {
    display: block;
  }
}

/* ハンバーガー共通（PCでは非表示） */
.magi-hamburger {
  display: none;
  position: fixed;
  top: 6px;
  right: 16px;
  padding: 8px;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  z-index: 10000;
}

.magi-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  border-radius: 999px;
  background: #1c374f;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* モバイルナビ */
.magi-mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.28);
  border-bottom: 1px solid rgba(214, 227, 228, 0.9);
  z-index: 9999;
}

.magi-mobile-nav ul {
  list-style: none;
  margin: 64px 0 12px;
  padding: 12px 20px 18px;
}

.magi-mobile-nav li + li {
  margin-top: 4px;
}

.magi-mobile-nav a {
  display: block;
  padding: 10px 4px;
  text-decoration: none;
  color: #1c374f;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px dashed rgba(28, 55, 79, 0.4);
  padding-bottom: 6px;
}

.magi-mobile-nav a:hover {
  border-bottom-color: #1c374f;
}

/* is-open 状態 */
/* is-open 状態 */
.magi-mobile-nav.is-open {
  display: block;
  animation: mobileFade 0.25s ease-out;
  padding-top: 20px;
}

/* ---------------------
   PC（1025px以上）は従来のサブナビのみ表示
---------------------- */
@media (min-width: 1025px) {
  .magi-subnav {
    display: block;
  }
  .magi-hamburger,
  .magi-mobile-nav {
    display: none;
  }
}

/* 〜1024px でハンバーガー表示 */
@media (max-width: 1024px) {
  .magi-hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

/* =====================
   ファーストビュー
===================== */

.magi-hero {
  position: relative;
  display: flex;
  padding: 64px 0 72px;
  color: #1c374f;
  background-color: #f5f7fa;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url("images/kv.jpg");
  background-image: image-set(url("images/kv.webp") type("image/webp"), url("images/kv.jpg") type("image/jpeg"));
  min-height: 320px;
}

.magi-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* 右上の淡いアクセント */
.magi-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(161, 227, 216, 0.45) 0%, rgba(161, 227, 216, 0) 65%);
  z-index: 0;
}

.magi-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Hero 内カード */
.magi-hero-photo {
  display: none; /* PCではキービジュアル内の画像は非表示 */
}

.magi-hero-text {
  max-width: 560px;
  margin-left: auto;
  padding-right: 48px;
}

/* ラベル */
.magi-hero-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.magi-hero-label {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #1c374f;
  font-weight: 600;
  border: 1px solid rgba(214, 227, 228, 0.9);
}

.magi-hero-label-light {
  background: #ffd55c;
  color: #1c374f;
  border-color: transparent;
}

/* タイトルまわり */

.magi-hero-title {
  font-size: 32px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #1c374f;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 16px rgba(255, 255, 255, 0.9),
    0 0 28px rgba(255, 255, 255, 0.85);
}

.magi-hero-title span {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.magi-hero-title span::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 40%;
  background: rgba(255, 229, 128, 0.8);
  z-index: -1;
  border-radius: 4px;
}

.magi-hero-lead {
  font-size: 16px;
  margin-bottom: 18px;
  color: #2b4e64;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(255, 255, 255, 0.8);
}

/* =====================
   サブナビ
===================== */

.magi-subnav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #ffffff;
  border-bottom: 1px solid #d6e3e4;
}

.magi-subnav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 10px 16px;
  margin: 0;
  list-style: none;
  font-size: 14px;
}

.magi-subnav a {
  text-decoration: none;
  color: #4b5b68;
}

.magi-subnav a:hover {
  color: #1c374f;
}

/* サブナビ内ロゴ */
.magi-subnav-logo {
  margin-right: 12px;
}

.magi-subnav-logo img {
  height: 28px;
  width: auto;
  display: block;
}

/* =====================
   指導方針エリア（promise）
===================== */

#promise {
  padding-top: 110px;
}

#promise::before {
  content: "";
  position: absolute;
  height: 60px;
  width: 100%;
  clip-path: polygon(50% 100%, 100% 0%, 0% 0%);
  background-color: #eef3f6;
  left: 0;
  top: 0;
}

.magi-feature-wrap {
  margin-top: 28px;
}

#promise .magi-section-body {
  letter-spacing: 1.1;
  line-height: 2;
}

.magi-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 22px 24px 18px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(214, 227, 228, 0.9);
}

/* 各カード本体 */
.magi-feature-card {
  border-radius: 14px;
  padding: 10px 10px 6px;
}

.magi-feature-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.magi-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #f3f6f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.magi-feature-icon i {
  font-size: 18px;
  color: #1c374f;
}

.magi-feature-card h3 {
  font-size: 17px;
  margin: 0;
  color: #1c374f;
}

/* カード本文との間に少し余白 */
.magi-feature-card p {
  font-size: 14px;
  margin-top: 6px;
}

/* =====================
   Program / Orientation / Spring card ベース
===================== */

.magi-program-card,
.magi-orientation-card,
.magi-spring-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(214, 227, 228, 0.9);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.magi-program-card:hover,
.magi-orientation-card:hover,
.magi-spring-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  border-color: #c6d6de;
}

.magi-program-card h3,
.magi-orientation-card h3,
.magi-spring-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
  margin-top: 0;
  color: #1c374f;
}

.magi-program-card ul,
.magi-schedule {
  padding-left: 20px;
  margin: 0;
}

.magi-program-card li,
.magi-schedule li {
  margin-bottom: 6px;
}

.magi-schedule span {
  background: rgba(28, 55, 79, 0.06);
  padding: 0 6px;
  border-radius: 4px;
}

/* Program 内の写真 */
.magi-program-photo {
  position: relative;
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
}

.magi-program-photo::before {
  content: "";
  display: block;
  padding-top: 50%;
}

.magi-program-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =====================
   Worries エリア
===================== */

/* 共通の細いボトムラインは worries セクションには出さない */
#worries.magi-section {
  padding-bottom: 10px;
}

#worries.magi-section::after {
  display: none;
}

#worries .magi-section-body {
  letter-spacing: 1.1;
  line-height: 2;
}

/* PC 基本レイアウト：画像＋テキストの 2 カラム */
.magi-worries-inner {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 32px;
  align-items: center;
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

/* 画像ブロック（PC・タブレット共通のベース） */
.magi-worries-visual {
  position: relative;
  max-width: 320px;
}

.magi-worries-visual-bg {
  position: absolute;
  inset: 10% 0 0 0;
  border-radius: 24px;
  background: radial-gradient(circle at top left, #a1e3d8 0%, transparent 60%);
  opacity: 0.6;
}

.magi-worries-img {
  position: relative;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  border-radius: 0;
  box-shadow: none;
}

/* テキスト側 */
.magi-worries-content {
  position: relative;
  z-index: 1;
}

/* 吹き出し 3つ（PCは横並び 3カラム） */
.magi-worries-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* 吹き出しカード */
.magi-card {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 50px;
  padding: 12px 18px;
  font-size: 15px;
  border: 1px solid rgba(214, 227, 228, 0.9);
}

.magi-card::after,
.magi-card::before {
  content: "";
  position: absolute;
  left: 45px;
  bottom: -9px;
  width: 0;
  height: 0;
  border-style: solid;
}

/* 白い吹き出し部分 */
.magi-card::after {
  border-width: 9px 8px 0 8px;
  border-color: #ffffff transparent transparent transparent;
  z-index: 2;
}

/* 枠線用（三角の縁取り） */
.magi-card::before {
  bottom: -10px;
  border-width: 10px 9px 0 9px;
  border-color: rgba(214, 227, 228, 0.9) transparent transparent transparent;
  z-index: 1;
}

.magi-card p {
  margin-top: 7px;
  margin-bottom: 7px;
}

/* =====================
   GDM 3ポイント
===================== */

#gdm .magi-two-col {
  align-items: stretch;
}

/* 見出し調整 */
.magi-gdm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* 右カラム全体（3つのポイントカード） */
.magi-gdm-steps-grid {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 各ポイントカード */
.magi-gdm-step-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(214, 227, 228, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

/* 見出し行：チップ＋タイトル */
.magi-gdm-step-card h4 {
  font-size: 15px;
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #1c374f;
}

/* 「POINT 1」などの小さなラベル */
.magi-gdm-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: #eef3f6;
  color: #4a7c8c;
}

/* 本文テキスト */
.magi-gdm-step-card p {
  font-size: 13px;
  color: #4b5b68;
  margin: 0;
}

/* =====================
   春期講習（Spring）
===================== */

#spring {
  position: relative;
  overflow: hidden;
}

/* 春期講習背景画像 */
#spring::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/spring_bg.png") center/contain no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

#spring .magi-container {
  position: relative;
  z-index: 1;
}

.magi-spring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.magi-note {
  font-size: 13px;
  color: #4b5b68;
  margin-top: 8px;
}

.magi-cta-center {
  text-align: center;
  margin-top: 24px;
}

#spring .magi-section-body {
  margin-top: 1.5em;
}

/* =====================
   Benefit（早期特典）
===================== */

.magi-benefit-card {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 34px 24px 26px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid #d6e3e4;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

/* 上のリボン */
.magi-benefit-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd55c;
  color: #1c374f;
  padding: 4px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(28, 55, 79, 0.18);
}

/* タイトル */
.magi-benefit-title {
  font-size: 22px;
  color: #1c374f;
  font-weight: 700;
  margin-bottom: 12px;
}

.magi-benefit-title span {
  color: #d9480f;
}

/* リスト */
.magi-benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  z-index: 1;
}

.magi-benefit-list li {
  font-size: 15px;
  margin-bottom: 6px;
  color: #2b4e64;
}

/* =====================
   Orientation（説明会）
===================== */

.magi-orientation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

/* 説明会ヘッダー */
.magi-orientation-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.magi-orientation-body {
  margin-bottom: 0;
}

/* 説明会フッター：画像＋注意書き 2カラム */
.magi-orientation-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
}

.magi-orientation-footer-img {
  width: 160px;
  max-width: 40vw;
}

.magi-orientation-footer-img img {
  display: block;
  width: 100%;
  height: auto;
}

.magi-orientation-footer-text {
  margin: 0;
}

/* =====================
   Voices（受講生・保護者の声）
===================== */

#voices .magi-container {
  position: relative;
}

.magi-voice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* 受講生イラスト */
.magi-voices-visual {
  margin: 24px auto 8px;
  width: 160px;
}

.magi-voices-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ベースパネル */
.magi-panel {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #d6e3e4;
  padding: 18px 20px 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

/* 上部の細いライン */
.magi-panel::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6fb8b1, #4a7c8c);
  opacity: 0.7;
}

/* ヘッダー部：クラス名＋属性 */
.magi-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.magi-panel-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1c374f;
  background: #eef3f6;
}

.magi-panel-tag-accent {
  background: #ffeb99;
  color: #1c374f;
}

.magi-panel-role {
  font-size: 13px;
  color: #4b5b68;
}

/* 本文 */
.magi-panel-body {
  font-size: 14px;
  color: #2b2b2b;
}

/* 引用マーク */
.magi-panel-voice::after {
  content: "“";
  position: absolute;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 60px;
  line-height: 1;
  color: rgba(134, 161, 173, 0.25);
  right: 18px;
  bottom: -10px;
}

/* 横長バージョン */
.magi-panel-voice-wide {
  margin-top: 20px;
}

/* =====================
   FAQ
===================== */

.magi-faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.magi-faq-item + .magi-faq-item {
  margin-top: 10px;
}

.magi-faq-question {
  width: 100%;
  text-align: left;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d6e3e4;
  padding: 10px 14px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #2b2b2b;
}

.magi-faq-toggle {
  font-size: 18px;
  color: #4b5b68;
  margin-left: 10px;
}

.magi-faq-answer {
  display: none;
  padding: 10px 14px 4px;
  font-size: 14px;
}

/* =====================
   Profile / Map
===================== */

/* テキスト少し小さく＆読みやすく */
#profile .magi-section-body {
  font-size: 15px;
  line-height: 1.8;
  max-width: 520px;
  margin-left: 0;
}

/* プロフィール全体 */
.magi-profile-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 丸い講師画像（ベース） */
.magi-profile-img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

/* TEL / MAIL リンク */
.magi-contact-link {
  color: #1c374f;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.magi-contact-link:hover {
  color: #0f2535;
  border-bottom-color: #1c374f;
}

/* Map 埋め込みラッパー */
#access .magi-two-col {
  align-items: stretch;
}

.magi-map-placeholder {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  padding: 0;
  border: none;
}

.magi-map-embed {
  width: 100%;
  max-width: 480px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
  border: 1px solid #d6e3e4;
}

.magi-map-embed iframe {
  width: 100%;
  height: 280px;
  display: block;
}

/* =====================
   Contact（フォーム）
===================== */

.magi-contact-section {
  background: #f9fafb;
}

.magi-form-wrapper {
  max-width: 720px;
  margin: 24px auto 0;
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px dashed #c3d1e8;
  background: #ffffff;
}

.magi-contact-form {
  max-width: 680px;
  margin: 0 auto;
}

.magi-form-row {
  margin-bottom: 16px;
}

.magi-form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1c374f;
}

.magi-form-required {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #d9480f;
  color: #ffffff;
  font-size: 11px;
  vertical-align: middle;
}

.magi-contact-form input[type="text"],
.magi-contact-form input[type="email"],
.magi-contact-form input[type="tel"],
.magi-contact-form select,
.magi-contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #c3d1e8;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.magi-form-row select + select {
  margin-top: 10px;
}

.magi-contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* 日程選択（プルダウン2つ）用の余白調整 */
.magi-contact-form .magi-form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
}

/* 2つ目のプルダウンにだけ上余白 */
.magi-contact-form .magi-form-row select + select {
  margin-top: 10px;
}

/* 小さな補助テキストが必要になった場合の余白 */
.magi-contact-form .magi-form-row .magi-form-help {
  margin-top: 6px;
  font-size: 13px;
  color: #4b5b68;
}

/* フォーカス時の視認性 */
.magi-contact-form input:focus,
.magi-contact-form select:focus,
.magi-contact-form textarea:focus {
  outline: none;
  border-color: rgba(28, 55, 79, 0.6);
  box-shadow: 0 0 0 3px rgba(28, 55, 79, 0.12);
}

.magi-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.magi-form-inline label {
  font-weight: 500;
  font-size: 14px;
}

.magi-form-inline input[type="checkbox"] {
  margin-right: 4px;
}

.magi-form-consent {
  font-size: 13px;
  font-weight: 500;
}

.magi-form-consent input[type="checkbox"] {
  margin-right: 6px;
}

.magi-form-row-submit {
  text-align: center;
  margin-top: 24px;
}

@media (max-width: 576px) {
  .magi-form-inline {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =====================
   リンク
===================== */

.magi-link-box {
  margin-top: 16px;
}

.magi-link {
  color: #1c374f;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(28, 55, 79, 0.3);
}

.magi-link:hover {
  border-bottom-color: #1c374f;
}

/* =====================
   アニメーション（スクロール表示）
===================== */

.magi-animate {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.magi-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero 初期アニメーション */
.magi-hero-inner.magi-animate {
  transition-delay: 0.05s;
}

/* =====================
   レスポンシブ共通
===================== */

.magi-pc {
  display: inline;
}
.magi-sp {
  display: none;
}

.pc-m-none {
  display: none;
}
.pc-none {
  display: none;
}

/* 1024px 以下では SP 用表示に切り替え */
@media (max-width: 1024px) {
  .sp-m-none {
    display: none;
  }
  .pc-m-none {
    display: block;
  }
}
@media (max-width: 576px) {
  .sp-none {
    display: none;
  }
  .pc-none {
    display: block;
  }
}

/* ---------------------
   〜1024px（タブレット）
---------------------- */

@media (max-width: 1024px) {
  /* PC用のサブナビは非表示、ハンバーガーを表示 */
  .magi-subnav {
    display: none;
  }

  .magi-hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .magi-container {
    max-width: 900px;
  }

  .magi-two-col {
    grid-template-columns: 1fr;
  }

  /* プロフィールだけは横並び維持 */
  #profile .magi-two-col {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }

  .magi-feature-grid {
    grid-template-columns: 1fr;
  }

  .magi-spring-grid {
    grid-template-columns: 1fr;
  }

  .magi-orientation-grid {
    grid-template-columns: 1fr;
  }

  .magi-voice-grid {
    grid-template-columns: 1fr;
  }
  .magi-section-title-left {
    text-align: center;
  }
  .magi-section-title-left::before {
    left: 50%;
    transform: translateX(-50%);
  }

  /* --- Worries responsive (PC2カラム → 1カラム) --- */
  /* Worries 見出し中央寄せ */
  #worries .magi-section-title-left {
    text-align: center;
  }
  #worries .magi-section-title-left::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .magi-worries-inner {
    display: block;
    max-width: 100%;
  }

  .magi-worries-visual {
    margin: 0 auto;
  }

  .magi-worries-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center; /* 吹き出しを中央寄せ */
  }

  /* 吹き出し（1024px以下）：幅を少し狭く＋中央揃え */
  #worries .magi-card {
    width: 100%;
    max-width: 520px;
    padding: 6px;
    justify-content: center;
    text-align: center;
  }

  .magi-worries-visual.pc-m-none {
    max-width: 160px;
    margin: 24px auto 8px; /* 上部余白を増やす */
  }

  #worries .magi-section-body-small {
    max-width: 100%;
    margin-top: 12px;
    text-align: center; /* 画像下テキストを中央揃え */
    margin-left: auto;
    margin-right: auto;
  }

  /* ===== ヒーロー（カードなし／縦積み） ===== */
  .magi-hero {
    background: none;
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .magi-hero-photo {
    display: block;
    margin-bottom: 16px;
  }

  .magi-hero-label {
    font-size: 20px;
  }

  /* Hero image full width inside .magi-hero-inner */
  .magi-hero-photo {
    width: 100%;
    max-width: 680px; /* match inner width */
    margin-left: auto;
    margin-right: auto;
  }

  .magi-hero-photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  /* 1024px 以下：プログラム画像を通常のレスポンシブ画像として表示 */
  .magi-program-photo {
    position: relative;
  }

  .magi-program-photo::before {
    content: none; /* 疑似要素による固定アスペクト比をオフ */
  }

  .magi-program-photo img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .magi-hero-photo::before {
    padding-top: 56%;
  }

  .magi-hero::after {
    display: none;
  }

  .magi-hero-inner {
    justify-content: center;
    align-items: flex-start;
    max-width: 100%;
    padding: 0 16px;
  }

  /* Hero: 1024px以下で幅・バッジを調整 */
  .magi-hero-text {
    width: 100%;
    max-width: 680px;
    margin: 40px auto 0;
    text-align: center;
    padding: 0 16px;
  }

  .magi-hero-labels {
    justify-content: flex-start; /* バッジ左寄せ */
  }

  .magi-hero-photo {
    margin-bottom: 16px;
  }

  .magi-hero-title {
    position: absolute;
    top: 130px;
    right: 93px;
    font-size: 40px;
    line-height: 1.5;
    letter-spacing: 1.5px;
    text-align: left;
  }

  .magi-hero-lead {
    font-size: 15px;
  }

  .magi-hero-cta .magi-btn {
    display: block;
    text-align: center;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .magi-hero-cta .magi-btn + .magi-btn {
    margin-top: 8px;
  }

  /* ===============================
     Max-width constraints for cards
  =============================== */
  .magi-feature-wrap,
  .magi-gdm-steps-grid,
  .magi-panel,
  .magi-benefit-card,
  .magi-form-wrapper {
    width: 100%;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  .magi-program-card,
  .magi-spring-card,
  .magi-orientation-card {
    width: 100%;
    max-width: 680px; /* 受講生の声（.magi-panel）と同じ幅に揃える */
    margin-left: auto;
    margin-right: auto;
  }

  .magi-feature-wrap .magi-feature-grid {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  /* ========== Orientation responsive rules moved from 768px to 1024px ========== */
  .magi-orientation-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .magi-orientation-body {
    text-align: center;
  }

  .magi-orientation-footer {
    grid-template-columns: 1fr;
  }

  .magi-orientation-footer-img {
    margin: 0 auto 8px;
  }
  /* 指導方針カード：1024px以下では余白をやや小さく */
  #promise .magi-feature-grid {
    padding: 18px 18px 14px;
  }
  #promise .magi-feature-card {
    padding: 8px 10px 4px;
  }

  /* GDM：見出し中央揃え＋テキスト幅統一 */
  #gdm .magi-gdm-header {
    justify-content: center;
  }

  #gdm .magi-section-title-left {
    text-align: center;
  }
  #gdm .magi-section-title-left::before {
    left: 50%;
    transform: translateX(-50%);
  }
  #gdm .magi-section-body {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  /* プログラム：見出し中央＆テキスト幅統一 */
  #starter .magi-section-title-left,
  #a1 .magi-section-title-left {
    text-align: center;
  }
  #starter .magi-section-title-left::before,
  #a1 .magi-section-title-left::before {
    left: 50%;
    transform: translateX(-50%);
  }
  #starter .magi-section-body,
  #a1 .magi-section-body {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  /* プログラム：リンクボックス幅統一・中央揃え */
  #starter .magi-link-box,
  #a1 .magi-link-box {
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
    text-align: left;
  }

  /* プログラム：pタグ幅統一・中央揃え */
  #starter p.magi-section-body,
  #a1 p.magi-section-body,
  .magi-kicker {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  /* 春期講習：テキスト幅統一 */
  #spring .magi-section-body,
  #spring .magi-small {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  /* 説明会：全体の余白とテキスト幅・画像サイズ */
  #orientation .magi-section-body,
  #orientation .magi-small {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  #orientation .magi-section-title {
    margin-bottom: 16px;
  }

  .magi-orientation-header {
    margin-bottom: 12px;
  }

  .magi-orientation-footer {
    margin-top: 16px;
  }

  .magi-orientation-footer-img {
    width: 140px; /* 受講生の声のイラストと同程度 */
    max-width: 40vw;
  }
}

/* ---------------------
   〜768px（小タブレット／横持ちスマホ）
---------------------- */

@media (max-width: 768px) {
  .magi-container {
    max-width: 100%;
  }

  .magi-section {
    padding: 60px 0;
  }

  .magi-section::after {
    width: 86%;
  }

  .magi-section-title {
    font-size: 22px;
  }

  .magi-section-body {
    font-size: 15px;
  }

  .magi-hero-title {
    top: 140px;
    right: 9vw;
    font-size: 5.2vw;
    line-height: 1.5;
    letter-spacing: 1.5px;
  }

  /* Voicesのイラスト */
  .magi-voices-visual {
    width: 140px;
    margin: 20px auto 6px;
  }

  #spring::before {
    background: url(images/spring_bg.png) center / cover no-repeat;
  }

  /* profile / map：プロフィールは横並びのまま縮める */
  #profile .magi-two-col {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .magi-profile-img {
    width: 190px;
    height: 190px;
  }

  .magi-map-embed {
    max-width: 100%;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  }

  /* PC/SP 切り替え */
  .magi-pc {
    display: none;
  }
  .magi-sp {
    display: inline;
  }
}

/* ---------------------
   〜576px（スマホ）
---------------------- */

@media (max-width: 576px) {
  .magi-section {
    padding: 52px 0;
  }

  .magi-section-title {
    font-size: 20px;
  }

  /* 左寄せ見出しもスマホでは中央統一 */
  .magi-section-title-left {
    text-align: center;
  }
  .magi-section-title-left::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .magi-kicker {
    text-align: center;
  }

  .magi-section-body {
    font-size: 15px;
  }

  .magi-small {
    font-size: 14px;
  }

  /* ===== Hero（KV）周り ===== */
  .magi-hero {
    background-position: center top;
    background-size: contain;
  }

  .magi-hero-inner {
    align-items: flex-start;
    padding: 0;
  }

  .magi-hero-text {
    text-align: center;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .magi-hero-label {
    font-size: 16px;
  }

  .magi-hero-lead {
    font-size: 14px;
    line-height: 1.7;
  }

  /* ボタンがはみ出さないよう幅を制限 */
  .magi-hero-cta .magi-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .magi-hero-cta .magi-btn + .magi-btn {
    margin-top: 8px;
  }

  /* Programカードなどは少し影を弱めて読みやすく */
  .magi-program-card,
  .magi-orientation-card,
  .magi-spring-card,
  .magi-panel {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    padding: 18px 16px;
  }

  .magi-benefit-card {
    padding: 26px 16px 22px;
  }

  .magi-benefit-title {
    font-size: 20px;
  }

  /* voices */
  .magi-voice-grid {
    grid-template-columns: 1fr;
  }

  .magi-voices-visual {
    width: 120px;
    margin: 16px auto 6px;
  }

  /* プロフィール：SPでも横並び維持＋画像小さめ */
  #profile .magi-two-col {
    grid-template-columns: 1.3fr 0.7fr;
    align-items: center;
    gap: 16px;
  }

  .magi-profile-img {
    width: 160px;
    height: 160px;
  }
}

/* ---------------------
   〜480px（ごく小さい端末向け微調整）
---------------------- */

@media (max-width: 480px) {
  .magi-container {
    padding: 0 12px;
  }

  .magi-hero-title {
    font-size: 6.2vw;
    top: 25vw;
    right: 7vw;
  }

  .magi-hero-label {
    font-size: 14px;
  }

  .magi-hero-lead {
    font-size: 14px;
  }

  .magi-benefit-title {
    font-size: 18px;
  }
}

/* =====================
   春期講習ポップアップ
===================== */

.magi-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.magi-popup {
  position: relative;
  max-width: 420px;
  width: 90%;
  background: #ffffff;
  border-radius: 20px;
  padding: 22px 22px 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
  border: 1px solid #d6e3e4;
}

.magi-popup::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6fb8b1, #4a7c8c);
}

.magi-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #86a1ad;
}

.magi-popup-close:hover {
  color: #2b4e64;
}

.magi-popup-label {
  font-size: 12px;
  font-weight: 600;
  color: #1c374f;
  background: #ffeb99;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.magi-popup-title {
  font-size: 20px;
  margin: 4px 0 8px;
  color: #1c374f;
}

.magi-popup-text {
  font-size: 14px;
  color: #2b2b2b;
  margin-bottom: 16px;
}

.magi-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.magi-popup-btn {
  flex: 1;
  text-align: center;
  font-size: 14px;
  padding: 8px 10px;
}

@media (max-width: 480px) {
  .magi-popup {
    padding: 18px 16px 16px;
  }
  .magi-popup-title {
    font-size: 18px;
  }
  .magi-popup-text {
    font-size: 13px;
  }
}

/* =====================
   上に戻るボタン（クレイモフィズム）
===================== */

.magi-scrolltop {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 80;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: none;
  background: #f3f6fb;
  color: #1c374f;
  cursor: pointer;

  display: none;
  align-items: center;
  justify-content: center;

  box-shadow:
    10px 10px 22px rgba(12, 31, 53, 0.28),
    -8px -8px 18px rgba(255, 255, 255, 0.95);

  background-image:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9), transparent 55%),
    linear-gradient(135deg, #f8fbff, #edf2f8);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-image 0.18s ease;
}

.magi-scrolltop i {
  font-size: 18px;
}

.magi-scrolltop:hover {
  transform: translateY(-3px);
  box-shadow:
    14px 14px 26px rgba(12, 31, 53, 0.3),
    -10px -10px 20px rgba(255, 255, 255, 0.98);
  background-image:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.95), transparent 55%),
    linear-gradient(135deg, #f9fdff, #eef4fb);
}

.magi-scrolltop:active {
  transform: translateY(-1px);
  box-shadow:
    4px 4px 12px rgba(12, 31, 53, 0.35),
    -3px -3px 10px rgba(255, 255, 255, 0.95),
    inset 0 0 4px rgba(134, 161, 173, 0.35);
}

@media (max-width: 640px) {
  .magi-scrolltop {
    right: 12px;
    bottom: 16px;
    width: 46px;
    height: 46px;
  }
  .magi-scrolltop i {
    font-size: 16px;
  }
}
@media (min-width: 1400px) {
  .magi-hero {
    min-height: 480px;
  }

  .magi-hero-card {
    margin-bottom: -30px; /* カード上部だけがKVに少しかかる程度に */
  }

  .magi-hero-text {
    max-width: 680px;
  }

  .magi-hero-title {
    font-size: 38px;
    line-height: 1.45;
  }

  .magi-hero-lead {
    font-size: 18px;
    line-height: 1.8;
  }

  .magi-hero-label {
    font-size: 14px;
    padding: 6px 12px;
  }

  .magi-hero-cta .magi-btn {
    font-size: 17px;
    padding: 14px 28px;
  }
}
/* 説明会（Orientation）1024px以下レイアウト調整 */
/* 講師プロフィール：1024px以下で縦並び＆中央配置 */
@media (max-width: 1024px) {
  #profile .magi-two-col {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  #profile .magi-section-body {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  #profile .magi-profile-photo {
    justify-content: center;
  }
}

/* アクセス：1024px以下で中央配置 */
@media (max-width: 1024px) {
  #access .magi-two-col {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  #access .magi-section-body {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .magi-map-placeholder {
    margin-top: 16px;
    justify-content: center;
  }
}
@keyframes mobileFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.magi-form-row-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
