/**
 * ヒーロー（トップ・汎用）
 */

/* ==========================================================================
   ヒーロー（トップページ上部·Figma 313-10026 / TB 571-4005 / SP 548-3696+558-1902）
   - PC・タブレット（601px 以上）: 全面背景＋コピーは画像上（下寄せ）— 571-4005 は PC に近いオーバーレイ
   - スマホ（600px 以下）のみ: 画像ブロック＋下にコピー帯（548-3688 — 画像高さ 340px・上寄せ）
   ========================================================================== */
.senmon-school-hero {
  background-color: var(--senmon-color-primary-5);
}

/* トップヒーロー（--top）は上ゼロ。ベースの汎用パディングは他バリアントのみ */
.senmon-school-hero:not(.senmon-school-hero--top) {
  padding: 2rem 0;
}

/* --- Hero ズームアウトアニメーション --- */
@keyframes senmon-hero-zoom-out {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

/* トップ用ヒーロー PC／TB 共通土台（Figma 313-10026 系オーバーレイ）— 二段積みは max-width:600 のみ */
.senmon-school-hero--top {
  height: calc(100vh - 90px);
  padding: 0 0 24px;
  background-color: var(--senmon-color-gray-10);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.senmon-school-hero--top__visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.senmon-school-hero--top__visual-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: center center;
  animation: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.senmon-school-hero--top__visual-bg.is-active {
  opacity: 1;
  animation: senmon-hero-zoom-out 5s ease-out forwards;
}

.senmon-school-hero--top__copy {
  position: relative;
  z-index: 1;
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
}

.senmon-school-hero--top .senmon-school-hero__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  padding-left: 0;
  box-sizing: border-box;
}

.senmon-school-hero__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

/* バッジ（NIPPON DESIGNERS SCHOOL / MALAYSIA COLLEGE）白背景・Brand Color・Barlow 26px・左余白なし */
.senmon-school-hero__badge {
  margin: 0;
  padding: 8px 24px 8px 40px;
  background-color: var(--senmon-color-white);
  font-family: var(--senmon-font-hero);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--senmon-color-primary);
  white-space: nowrap;
}

/* 見出し（白フレーム内にグラデーション文字）Barlow 48px・黄→緑・左余白なし */
.senmon-school-hero__headline {
  margin: 0;
  padding: 8px 40px;
  background-color: var(--senmon-color-white);
  font-family: var(--senmon-font-hero);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.senmon-school-hero__headline-text {
  background-image: var(--senmon-hero-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.senmon-school-hero__headline--sp {
  display: none;
}

/* タブレット（601–959px · Figma 571-4005）: PC と同じオーバーレイのまま、幅に合わせてタイポのみやや縮小 */
@media (min-width: 601px) and (max-width: 959px) {
  .senmon-school-hero--top {
    padding: 0 0 20px;
  }

  .senmon-school-hero__content {
    gap: 8px;
  }

  .senmon-school-hero__badge {
    font-size: 14px;
    padding: 4px 16px;
  }

  .senmon-school-hero__headline {
    font-size: 26px;
    padding: 4px 16px;
  }
}

/* ヒーロー SP（Figma 548-3688 / 548-3696 画像 + 558-1902 テキスト帯）— のみ二段積み */
@media (max-width: 600px) {
  .senmon-school-hero--top {
    height: calc( 100vh - 90px - 150px );
    padding: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .senmon-school-hero--top__visual {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    width: 100%;
    z-index: 0;
  }

  /* 上基準ズーム（PC と同一 keyframes）。縦位置: calc(0% + Npx) の N だけ下へシフト（例 4px）。横も要なら calc(50% + Npx) center の形で */
  .senmon-school-hero--top__visual-bg {
    background-position: center calc(0% + 0px);
    background-size: cover;
    background-repeat: no-repeat;
    transform-origin: top center;
  }

  .senmon-school-hero--top__copy {
    margin-top: 0;
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    background: var(--senmon-courses-section-gradient);
  }

  .senmon-school-hero--top .senmon-school-hero__inner {
    max-width: none;
    margin: 0;
    padding-top: 24px;
    padding-bottom: 24px;
    padding-left: 0;
    padding-right: var(--senmon-page-gutter-x);
    box-sizing: border-box;
  }

  .senmon-school-hero__headline--desktop {
    display: none;
  }

  .senmon-school-hero__headline--sp {
    display: block;
  }

  .senmon-school-hero__content {
    gap: 8px;
    align-items: flex-start;
  }

  .senmon-school-hero__badge {
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    padding: 4px 16px;
    text-align: center;
    align-self: flex-start;
  }

  .senmon-school-hero__headline {
    font-size: 24px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    padding: 4px 16px;
    white-space: normal;
    max-width: 100%;
  }

  .senmon-school-hero--top__copy .senmon-school-hero__headline--sp .senmon-school-hero__headline-text {
    background-image: var(--senmon-courses-hero-title-gradient);
  }
}

@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .senmon-school-hero--top__visual-bg {
    animation: none;
    transform: none;
  }
}

/* 汎用ヒーロー（他ページ用） */
.senmon-school-hero__title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--senmon-color-primary-90);
}

.senmon-school-hero__lead {
  margin: 0;
  color: var(--senmon-color-gray-70);
}
