/* ==============================
   home.css — TOP page sections
   Mobile-first. ブレークポイントは css/breakpoints.css
   ============================== */

/* ==============================
   Shared Section Utilities
   ============================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.section-header .section-title {
  font-size: var(--text-xl);
}

@media (min-width: 768px) {
  .section-header .section-title {
    font-size: var(--text-3xl);
  }
}

.section-header__icon {
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

/* 握手アイコンは画像内余白が多く見えが小さいため、メガホンと揃える */
.section-header__icon--lg {
  height: 64px;
}

@media (min-width: 768px) {
  .section-header__icon--lg {
    height: 80px;
  }
}

/* ==============================
   FV — Hero
   ============================== */
.section-fv {
  position: relative;
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .section-fv {
    height: 750px;
  }
}

/* バナー画像スライド（テキスト・CTAはオーバーレイ／Figma 170-6311, 984-4332, 170-6315） */
.fv__slides {
  position: absolute;
  inset: 0;
}

.fv__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.fv__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.fv__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 画像上の暗いオーバーレイ（Figma の radial gradient 相当） */
.fv__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 96% 54% at 50% 50%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

/* テキスト・CTA オーバーレイ */
.fv__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px;
  z-index: 1;
  pointer-events: none;
}

.fv__content .fv__cta {
  pointer-events: auto;
}

.fv__subtitle {
  font-family: var(--font-accent);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin: 0;
}

.fv__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: var(--color-text-white);
  text-align: center;
  text-shadow: var(--shadow-text);
  margin: 0;
}

.fv__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  font-size: var(--text-md);
  color: var(--color-text-white);
}

@media (min-width: 960px) {
  .fv__content {
    gap: 48px;
    padding: 24px;
  }

  .fv__subtitle {
    font-size: 48px;
    letter-spacing: 0.1em;
  }

  .fv__title {
    font-size: 48px;
  }

  .fv__cta {
    font-size: 32px;
    padding: 12px 32px;
  }

  .fv__cta .btn__chevron {
    height: 12px;
  }
}

.fv__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 960px) {
  .fv__arrow {
    width: 66px;
    height: 66px;
  }
}

.fv__arrow--prev { left: 16px; }
.fv__arrow--next { right: 16px; }

@media (min-width: 960px) {
  .fv__arrow--prev { left: 64px; }
  .fv__arrow--next { right: 64px; }
}

.fv__arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fv__dots {
  position: absolute;
  bottom: 29px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.fv__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.fv__dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.fv__dot.is-active {
  background: var(--color-white);
}



/* ==============================
   NEWS
   ============================== */
.section-news {
  background: var(--color-bg-warm);
  padding: 64px var(--container-pad-sp);
}

@media (min-width: 768px) {
  .section-news {
    padding: 120px var(--container-pad-pc);
  }
}

.section-news__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .section-news__inner {
    gap: 40px;
  }
}

.news-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* SP: 2列 */
  gap: 8px;
  width: 100%;
}

@media (min-width: 768px) {
  .news-list {
    grid-template-columns: repeat(3, 384px); /* PC: 3列・カード幅固定 */
    gap: 24px;
    justify-content: center; /* グリッド全体をセンタリング */
  }
}

/* 空・API エラー時: 1 列分だけだと幅が狭く文言が不自然に折り返すため全列に跨ぎ中央寄せ */
.section-news .news-list__empty {
  grid-column: 1 / -1;
  text-align: center;
}

.section-news .news-list__empty p {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.65;
  max-width: 40rem;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .section-news .news-list__empty p {
    font-size: var(--text-md);
  }
}

/* Grid: カード幅はグリッド列で決まる */
.news-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.news-card__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 768px) {
  .news-card__link {
    gap: 12px;
    padding: 16px;
  }
}

.news-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-placeholder);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__pin {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 21px;
  background: url('../img/icon-pin.png') no-repeat center / contain;
}

.news-card__category {
  display: inline-flex;
  align-items: center;
  background: var(--color-secondary);
  color: var(--color-text-white);
  font-family: var(--font-base);
  font-weight: 500;
  font-size: var(--text-sm);
  line-height: 1.1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.news-card__title {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

@media (min-width: 768px) {
  .news-card__title {
    font-size: var(--text-md);
  }
}

.news-card__date {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.4;
  margin-top: auto;
}

.section-news__more-btn {
  margin-top: 8px;
}


/* ==============================
   ABOUT + 3 REASONS
   ============================== */
.section-about {
  background: var(--color-bg);
  padding: 60px var(--container-pad-sp);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .section-about {
    padding: 200px var(--container-pad-pc);
  }
}

.section-about__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* About Intro Box */
.about-intro {
  background: var(--color-bg-primary-15);
  border-radius: var(--radius-lg);
  padding: 50px 8px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: relative;
}

.about-intro__train {
  position: absolute;
  top: -34px;
  right: 8px;
  height: 47px;
  width: auto;
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 768px) {
  .about-intro {
    padding: 50px 32px;
  }

  .about-intro__train {
    top: -81px;
    right: 0;
    height: 114px;
  }
}

.about-intro__character {
  position: absolute;
  bottom: 0;
  left: 8px;
  height: 53px;
  width: auto;
  pointer-events: none;
}

.about-intro__coin {
  position: absolute;
  bottom: 35px;
  left: 47px;
  width: 36px;
  height: auto;
  pointer-events: none;
}

.about-intro__heading {
  font-family: var(--font-display);
  font-weight: 900;
  text-align: center;
  width: 100%;
}

.about-intro__name {
  font-size: var(--text-xl);
  color: var(--color-text-white);
  -webkit-text-fill-color: var(--color-text-white);
  text-align: center;
  -webkit-text-stroke-width: 0.125em;
  -webkit-text-stroke-color: var(--color-primary);
  paint-order: stroke fill;
  font-family: var(--font-display);
  line-height: normal;
}

@media (min-width: 768px) {
  .about-intro__name {
    font-size: var(--text-48);
  }
}

.about-intro__label {
  color: var(--color-primary);
  line-height: normal;
}

.about-intro__towa {
  font-size: var(--text-xl);
  color: var(--color-primary);
  -webkit-text-fill-color: var(--color-primary);
  text-align: center;
  -webkit-text-stroke-width: 0.125em;
  -webkit-text-stroke-color: var(--color-text-white);
  paint-order: stroke fill;
  font-family: var(--font-display);
  line-height: normal;
}

@media (min-width: 768px) {
  .about-intro__towa {
    font-size: var(--text-36);
  }
}

.about-intro__desc1 {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: var(--text-md);
  color: var(--color-text);
  line-height: 1.5;
  text-align: center;
}

@media (min-width: 768px) {
  .about-intro__desc1 {
    font-size: var(--text-xl);
  }
}

.about-intro__desc2 {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.5;
  text-align: center;
}

@media (min-width: 768px) {
  .about-intro__desc2 {
    font-size: var(--text-md);
  }
}

/* 3 Reasons */
.reasons {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.reasons__title {
  font-size: var(--text-lg);
  letter-spacing: 2px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .reasons__title {
    font-size: var(--text-3xl);
    letter-spacing: 4px;
  }
}

.reasons__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .reasons__list {
    flex-direction: row;
    gap: 40px;
    padding-inline: 0;
  }
}

/* 画像にボーダー・バッジ・テキストが焼き込み済みのためCSSでの装飾は省略 */
.reason-card {
  flex: 1;
  display: flex;
}

.reason-card__img-wrap {
  width: 100%;
}

.reason-card__img {
  width: 100%;
  height: auto;
  display: block;
}


/* ==============================
   PROGRAMS
   ============================== */
.section-programs {
  position: relative;
}

.section-programs__container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-image: url('../img/programs-bg.png');
  background-size: cover;
  background-position: center;
}

.section-programs__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 60px 24px;
}

@media (min-width: 768px) {
  .section-programs__inner {
    padding: 100px 64px;
  }
}

.programs-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.programs-header__title {
  color: var(--color-primary);
  -webkit-text-fill-color: var(--color-primary);
  text-align: center;
  -webkit-text-stroke-width: 0.2em;
  -webkit-text-stroke-color: var(--color-text-white);
  paint-order: stroke fill;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: normal;
  font-weight: 900;
  letter-spacing: 2.4px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .programs-header__title {
    font-size: var(--text-3xl);
    letter-spacing: 4px;
  }
}

.programs-header__lead {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-text);
}

.programs-body__desc {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.75;
  text-align: center;
}

@media (min-width: 768px) {
  .programs-body__desc {
    font-size: var(--text-lg);
  }
}

.programs-body__highlight {
  font-family: var(--font-base);
  font-weight: 700;
  color: var(--color-primary);
  font-style: normal;
}

.program-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .program-list {
    flex-direction: row;
    gap: 100px;
    justify-content: center;
    padding-top: 30px;
  }
}

.program-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.program-card__img-wrap {
  width: 220px;
}

/* 画像にラベル・タイトルが焼き込み済みのため全体を表示（丸クロップなし）*/
.program-card__img {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 768px) {
  .program-card__img-wrap {
    width: 240px;
  }
}


/* ==============================
   GALLERY（講座の様子）— 横無限スクロール
   ============================== */
.section-gallery {
  background: var(--color-bg);
  overflow: hidden;
}

.gallery-marquee {
  display: flex;
  width: max-content;
  animation: gallery-scroll 40s linear infinite;
}

/* 縮小時の潰れ防止（flex-shrink: 0）。裁切しないよう object-fit は使わず原寸比で表示 */
.gallery-marquee__img {
  display: block;
  height: 280px;
  width: auto;
  flex-shrink: 0;
  padding-left: 60px;
}

@media (min-width: 768px) {
  .gallery-marquee__img {
    height: 420px;
  }
}

/* 4枚並び → 1枚分(-25%)ずらしてシームレスにループ */
@keyframes gallery-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-25%); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-marquee {
    animation: none;
  }
}


/* ==============================
   REQUEST
   ============================== */
.section-request {
  background: var(--color-bg-teal);
  padding: 60px var(--container-pad-sp);
  overflow: hidden;
}

@media (min-width: 768px) {
  .section-request {
    padding: 120px var(--container-pad-pc);
  }
}

.section-request__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

@media (min-width: 768px) {
  .section-request__inner {
    gap: 60px;
  }
}

.section-request__desc {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--color-text);
  text-align: center;
  line-height: 1.8;
}

@media (min-width: 768px) {
  .section-request__desc {
    font-size: var(--text-lg);
  }
}

.request-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

@media (min-width: 768px) {
  .request-list {
    flex-direction: row;
    gap: 24px;
  }
}

.request-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px;
  gap: 8px;
}

.request-card .aspect-4-3 {
  border-radius: 8px;
  overflow: hidden;
}

.request-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.request-card__title {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--color-text);
  line-height: 1.6;
  letter-spacing: 0.8px;
  padding: 8px 0 4px;
}
