@charset "UTF-8";

/* =========================================================
   トップページ 固有スタイル（index.html）
   共通パーツは common.css を参照
   ========================================================= */

/* ---------- ヒーロー（3事業のブランドスライダー） ---------- */
/* 事業ごとのブランドカラー（サムネの現在地オーバーレイに使用） */
:root {
  --brand-freeschool: #00aeef; /* NOAVIAブルー（施設詳細ページと統一） */
  --brand-postnatal: var(--color-accent-gold);
  --brand-work: var(--color-primary);
}

.top-hero {
  position: relative;
  padding-bottom: 30px;
}
/* h1 は視覚的に隠してサイトの主題を保持（見出しはスライド側が h2） */
.top-hero__srtitle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* スライド本体 */
.top-hero__stage {
  position: relative;
  height: clamp(420px, 43vw, 560px);
  overflow: hidden;
}
.top-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}
.top-hero__slide.is-current {
  opacity: 1;
  visibility: visible;
}
.top-hero__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 8s linear;
}
/* 現在のスライドだけゆっくりズーム（Ken Burns） */
.top-hero__slide.is-current .top-hero__img {
  transform: scale(1.06);
}
/* 下方向の黒グラデ：文字の可読性確保 */
.top-hero__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0) 100%);
}

/* スライド内・ナビ共通の中央寄せコンテナ */
.top-hero__inner {
  width: min(100% - 40px, var(--max-width));
  margin-inline: auto;
}
.top-hero__slide .top-hero__inner {
  position: absolute;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  padding-bottom: 100px;
}

/* スライド内のブランド名＋キャッチ */
.top-hero__info {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--color-white);
  /* 切り替え時に前後のテキストが重ならないよう、退場は速く */
  opacity: 0;
  transition: opacity 0.4s ease;
}
.top-hero__slide.is-current .top-hero__info {
  opacity: 1;
  /* 登場は画像のフェードが進んでから */
  transition: opacity 0.6s ease 0.4s;
}
/* FC募集LP が公開済みのブランドは、この枠ごとリンクになる（front-page.php）。
   LP が無いブランドは div のままでリンクにしない。 */
.top-hero__info--link {
  color: var(--color-white);
  text-decoration: none;
}
.top-hero__info--link:hover .top-hero__catch,
.top-hero__info--link:focus-visible .top-hero__catch {
  text-decoration: underline;
  text-underline-offset: 6px;
}
/* ブランド枠：ロゴ画像・テキストどちらでも同じ寸法に収める */
.top-hero__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 78px;
  padding: 12px 16px;
  background: var(--color-white);
  border-radius: 5px;
  color: var(--color-navy);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.02em;
}
.top-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 小見出し＋メインコピーの2段。min-width:0 で長い小見出しの横はみ出しを防ぐ */
.top-hero__text {
  min-width: 0;
}
.top-hero__lead {
  margin-bottom: 10px;
  font-weight: 700;
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.top-hero__catch {
  font-weight: 700;
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* サムネイルナビ（スライドに重なる白いバー） */
.top-hero__inner--nav {
  position: relative;
  z-index: 2;
  margin-top: -49px;
}
.top-hero__nav {
  display: inline-block;
  max-width: 100%;
  padding: 16px;
  background: var(--color-white);
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.top-hero__thumbs {
  display: flex;
  gap: 18px;
  list-style: none;
}
.top-hero__thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 166px;
  height: 78px;
  overflow: hidden;
  border: none;
  border-radius: 4px;
  background: var(--thumb-img) center / cover no-repeat;
  color: var(--color-white);
  text-align: center;
  cursor: pointer;
}
/* 既定は黒オーバーレイ、選択中はブランド色オーバーレイ */
.top-hero__thumb::before,
.top-hero__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease;
}
.top-hero__thumb::before {
  background: rgba(0, 0, 0, 0.4);
}
.top-hero__thumb::after {
  background: var(--thumb-color);
  opacity: 0;
}
.top-hero__thumb:hover::before {
  opacity: 0.65;
}
.top-hero__thumb.is-current::before {
  opacity: 0;
}
.top-hero__thumb.is-current::after {
  opacity: 0.8;
}
.top-hero__thumb-cat,
.top-hero__thumb-name {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.top-hero__thumb-cat {
  font-size: 11px;
  line-height: 1.6;
}
.top-hero__thumb-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.33;
}

/* 動きを抑える設定の環境ではズーム・フェードを無効化 */
@media (prefers-reduced-motion: reduce) {
  .top-hero__slide,
  .top-hero__img,
  .top-hero__info,
  .top-hero__slide.is-current .top-hero__info {
    transition: none;
  }
  .top-hero__slide.is-current .top-hero__img {
    transform: none;
  }
}

/* ---------- 共通：全幅セクション帯 ---------- */
.section {
  padding: 80px 0;
}
.section--gray {
  background: #f4f4f4;
}
.section--beige {
  background: var(--color-base);
}

/* ---------- イントロ（ミッション） ---------- */
.intro {
  padding: 40px 0 80px;
}
.intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  text-align: center;
}
.intro__title {
  font-weight: 700;
  /* 下限 22px は「受け皿が足りない社会を、」が 320px 幅で1行に収まる上限
     （12文字 × 22px = 264px ≤ 280px）。これ以上大きいと塊の中で折り返す */
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.5;
}
/* 句読点で区切った塊（meshbe_phrase_html）。この境目で折り返させる */
.intro__title .phrase {
  display: inline-block;
}
.intro__body {
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-weight: 700;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 2.2;
}
.intro__accent {
  color: var(--color-primary);
}

/* ---------- 事業紹介（ブランドカード） ---------- */
.brands__inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.brand-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 20px;
}
.brand-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.brand-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 100%;
}
.brand-card__media {
  height: 200px;
}
.brand-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-card__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  flex: 1;
}
.brand-card__heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-accent);
}
.brand-card__name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-navy);
}
.brand-card__catch {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.57;
  /* 3カラム時は2行に折り返すカードと1行のカードが混ざるので、
     2行分を確保して見出し下の区切り線をカード間で揃える */
  min-height: calc(1.57em * 2);
}
.brand-card__desc {
  font-size: 14px;
  line-height: 1.57;
  flex: 1;
}
.brand-card__body .btn {
  align-self: center;
  width: 200px;
}
.brand-item .text-link {
  align-self: flex-end;
}

/* ---------- 施設紹介（正方形サムネ・横スクロール） ---------- */
.facility-intro__inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.facility-thumbs {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}
.facility-thumb {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-snap-align: start;
}
.facility-thumb__media {
  width: 260px;
  height: 260px;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.facility-thumb__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.facility-thumb__cat {
  font-size: 14px;
  color: var(--color-accent);
}
.facility-thumb__name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
}
.facility-thumb__area {
  font-size: 12px;
  line-height: 1.83;
}
.facility-intro__inner > .btn {
  align-self: center;
  width: 250px;
}

/* ---------- お知らせ ---------- */
.news__inner {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 800px;
}
.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.news-item {
  display: flex;
  gap: 30px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.news-item__head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}
.news-item__date {
  font-size: 14px;
}
.news-item__cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 2px 14px;
  border-radius: 20px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
}
.news-item__title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.375;
}
.news__inner .text-link {
  align-self: flex-end;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 768px) {
  /* ヒーロー：ブランド名を上・キャッチを下の縦積みに。ナビは横スクロール */
  .top-hero {
    padding-bottom: 20px;
  }
  .top-hero__stage {
    height: 400px;
  }
  /* SP は横が大きく切れるため、写真ごとに見せたい側へ寄せる。
     フリースクールは主役の2人（男の子と女性）が写真の右側にいるので右寄せ。 */
  .top-hero__slide[data-brand="freeschool"] .top-hero__img {
    background-position: 88% center;
  }
  .top-hero__slide .top-hero__inner {
    padding-bottom: 76px;
  }
  .top-hero__info {
    display: block;
  }
  .top-hero__logo {
    width: 150px;
    height: 58px;
    padding: 8px 10px;
    margin-bottom: 12px;
    font-size: 13px;
  }
  /* 小見出しは2行に折り返してよい。メインコピーの2行構成は維持する */
  .top-hero__lead {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
  }
  .top-hero__catch {
    font-size: 20px;
    line-height: 1.5;
  }
  .top-hero__inner--nav {
    width: 100%;
    margin-top: -40px;
    padding-left: 20px;
  }
  .top-hero__nav {
    display: block;
    padding: 10px 0 10px 10px;
    border-radius: 5px 0 0 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .top-hero__thumbs {
    gap: 10px;
    width: max-content;
    padding-right: 20px;
  }
  .top-hero__thumb {
    width: 106px;
    height: 56px;
  }
  .top-hero__thumb-cat {
    font-size: 9px;
  }
  .top-hero__thumb-name {
    font-size: 12px;
  }
  .section {
    padding: 48px 0;
  }
  .intro {
    padding: 32px 0 48px;
  }
  .intro__inner {
    gap: 32px;
  }
  /* ミッション本文の <br> は PC 用の改行位置。
     SP で残すと「増え続／けていますが、」のような半端な行になるため無効化し、
     文章として自然に流す（対応ブラウザでは語句単位で折り返す） */
  .intro__body br {
    display: none;
  }
  .intro__body {
    gap: 20px;
    line-height: 1.9;
    word-break: auto-phrase; /* 対応ブラウザのみ。非対応でも従来どおり折り返すだけ */
    text-wrap: pretty;       /* 最終行が1語だけ残るのを避ける */
  }
  /* 事業紹介：3カラム → 1カラム縦積み */
  .brand-list {
    grid-template-columns: 1fr;
  }
  /* 縦積みなら行数を揃える必要がないので、空きが出ないよう解除 */
  .brand-card__catch {
    min-height: 0;
  }
  /* お知らせ：日付/カテゴリと本文を縦積み */
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
