/* School Life page styles */

.ng-schoolLifeHero{
  width:100%;
  height:520px;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}

.ng-schoolLifeBody{
  padding:120px 0 160px;
  background:var(--white);
}

.ng-schoolLifeGrid{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:94px;
  align-items:start;
}

/* Left index */
.ng-schoolLifeIndex__sticky{
  position:sticky;
  top:160px;
  align-self:start;
}
.ng-schoolLifeIndex__title{
  font-family:"Open Sans",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  font-weight:700;
  font-size:18px;
  line-height:1.2;
  color:var(--accent);
  margin:0 0 24px;
}
.ng-schoolLifeIndex__list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:0}
.ng-schoolLifeIndex__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px;
}
.ng-schoolLifeIndex__label{
  margin:0;
  font-weight:500;
  font-size:16px;
  line-height:1.4;
  color:var(--text);
}
.ng-schoolLifeIndex__rule{height:1px;background:var(--border)}
.ng-schoolLifeIndex__chev{
  width:18px;height:18px;
  display:inline-block;
  flex:0 0 auto;
  background-image:url("../images/icon/under-arrow.svg");
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
}

/* Section headings */
.ng-schoolLifeSection{display:flex;flex-direction:column;gap:32px}
.ng-schoolLifeSection + .ng-schoolLifeSection{margin-top:120px}

.ng-schoolLifeH2{display:flex;flex-direction:column;gap:20px}
.ng-schoolLifeH2__title{
  margin:0;
  font-weight:500;
  font-size:32px;
  line-height:1.2;
  color:var(--accent);
}
.ng-schoolLifeH2__rule{height:1px;background:var(--border)}

.ng-schoolLifeLead{
  margin:0;
  font-size:18px;
  line-height:2;
  color:var(--text);
}
.ng-schoolLifeSubhead{
  margin:0 0 16px;
  display:flex;
  align-items:center;
  gap: 12px;
  font-size: 24px;
  line-height:1.2;
  font-weight:700;
  color:var(--text);
}
.ng-schoolLifeSubhead::before{
  content:"";
  width:4px;
  height: 16px;
  background:var(--accent);
  flex:0 0 auto;
}
.ng-schoolLifeClubGrid + .ng-schoolLifeSubhead{margin-top:48px}
.ng-schoolLifeSubhead + .ng-schoolLifeLead{margin-top:0}

/* Voice */
.ng-schoolLifeVoiceGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:24px;
}
.ng-schoolLifeVoiceCard{
  border:1px solid var(--border);
  background:var(--white);
  overflow:hidden;
}
.ng-schoolLifeVoiceCard__trigger{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  padding:28px 28px 24px;
  border:0;
  background:transparent;
  cursor:pointer;
  text-align:left;
  font:inherit;
}
.ng-schoolLifeVoiceCard__trigger:hover{opacity:.9}
.ng-schoolLifeVoiceCard__trigger:focus-visible{
  outline:3px solid rgba(2,103,58,.35);
  outline-offset:2px;
}
.ng-schoolLifeVoiceCard__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.ng-schoolLifeVoiceCard__title{
  margin:0;
  font-size:20px;
  font-weight:600;
  color:var(--accent);
  flex:1;
  min-width:0;
}
.ng-schoolLifeVoiceCard__toggle{
  flex:0 0 auto;
  width:32px;
  height:32px;
  background:var(--accent);
  position:relative;
  display:block;
}
.ng-schoolLifeVoiceCard__toggle::before,
.ng-schoolLifeVoiceCard__toggle::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:14px;
  height:2px;
  background:var(--white);
  transform:translate(-50%,-50%);
}
.ng-schoolLifeVoiceCard__toggle::after{
  transform:translate(-50%,-50%) rotate(90deg);
  transition:opacity .2s ease;
}
.ng-schoolLifeVoiceCard.is-open .ng-schoolLifeVoiceCard__toggle::after{opacity:0}
.ng-schoolLifeVoiceCard__meta{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.ng-schoolLifeVoiceCard__name{
  font-size:14px;
  color:var(--accent);
}
.ng-schoolLifeVoiceCard__pill{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  background:#F2F2F2;
  color:var(--text);
}
.ng-schoolLifeVoiceCard__excerpt{
  margin:0;
  font-size:14px;
  line-height:1.8;
  color:var(--text);
}
.ng-schoolLifeVoiceCard.is-open .ng-schoolLifeVoiceCard__excerpt{display:none}
.ng-schoolLifeVoiceCard__expand{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .35s ease;
}
.ng-schoolLifeVoiceCard.is-open .ng-schoolLifeVoiceCard__expand{
  grid-template-rows:1fr;
}
.ng-schoolLifeVoiceCard__expandInner{
  overflow:hidden;
}
.ng-schoolLifeVoiceCard__text{
  margin:0;
  font-size:14px;
  line-height:1.8;
  color:var(--text);
  padding:0 28px 24px;
}

/* Timeline */
.ng-schoolLifeTimeline{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:48px;
  margin-top:8px;
}
.ng-schoolLifeTimeline__col{
  display:flex;
  flex-direction:column;
  gap:24px;
}
.ng-schoolLifeTimeline__item{
  display:flex;
  align-items:center;
  gap:22px;
  height:44px;
  position:relative;
}
a.ng-schoolLifeTimeline__item{
  text-decoration:none;
  color:inherit;
  cursor:pointer;
}
a.ng-schoolLifeTimeline__item:hover{opacity:.92}
.ng-schoolLifeTimeline__item:not(:last-child)::after{
  content:"";
  position:absolute;
  left:40px;
  top:40px;
  width:1px;
  height: 35px;
  border-left:2px dashed rgba(2,103,58,.5);
}
.ng-schoolLifeTimeline__pill{
  min-width:80px;
  padding:6px 14px;
  border:2px solid var(--accent);
  border-radius:999px;
  font-weight:600;
  font-size:14px;
  line-height:1;
  color:var(--accent);
  background:var(--white);
  text-align:center;
}
.ng-schoolLifeTimeline__text{
  margin:0;
  font-size:14px;
  line-height:1.9;
  color:var(--text);
  max-width:220px;
}

/* Club */
.ng-schoolLifeClubGrid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:28px 24px;
}
.ng-schoolLifeClubCard{
  display:flex;
  flex-direction:column;
  gap:12px;
  text-decoration:none;
  color:inherit;
}
a.ng-schoolLifeClubCard:hover{opacity:.92}
.ng-schoolLifeClubCard__thumb{
  width:100%;
  height: 173px;
  aspect-ratio: 4 / 3;
  background:#d9d9d9;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
}
.ng-schoolLifeClubCard__thumb img{width:100%;height:100%;object-fit:cover}
.ng-schoolLifeClubCard__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.ng-schoolLifeClubCard__name{
  margin:0;
  font-size:12px;
  color:var(--accent);
}
.ng-schoolLifeClubCard__icon{
  width:16px;height:16px;
}

@media (max-width: 1024px){
  .ng-schoolLifeHero{height:420px}
  .ng-schoolLifeGrid{grid-template-columns:1fr;gap:40px}
  .ng-schoolLifeIndex__sticky{position:relative;top:auto}
  .ng-schoolLifeTimeline{grid-template-columns:1fr;gap:32px}
  .ng-schoolLifeClubGrid{grid-template-columns:repeat(3, minmax(0, 1fr))}
}

@media (max-width: 640px){
  .ng-schoolLifeHero{height:200px}
  .ng-schoolLifeBody{padding:64px 0 80px}
  .ng-schoolLifeSection + .ng-schoolLifeSection{margin-top:64px}
  .ng-schoolLifeSection{gap:24px}

  /* ページタイトル（Figma 学校生活_sp） */
  .ng-schoolLife .ng-pageTitle{padding:128px 0 32px;gap:8px}
  .ng-schoolLife .ng-pageTitle__title{font-size:48px}
  .ng-schoolLife .ng-pageTitle__kickerText{font-size:14px}
  .ng-schoolLife .ng-pageTitle__dot{width:6px;height:6px}
  .ng-schoolLife .ng-pageTitle__desc{font-size:16px;line-height:1.6;max-width:none}

  /* 目次: 横スライド形式 */
  .ng-schoolLifeIndex{overflow-x:scroll}
  .ng-schoolLifeIndex__title{display:none}
  .ng-schoolLifeIndex__list{
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    gap:8px;
    margin:0;
    padding:0;
    list-style:none;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .ng-schoolLifeIndex__list li{flex:0 0 auto;min-width:0}
  .ng-schoolLifeIndex__rule{display:none}
  .ng-schoolLifeIndex__item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:10px;
    border:1px solid var(--border);
    border-radius:4px;
    background:var(--white);
    text-decoration:none;
  }
  .ng-schoolLifeIndex__item:hover{opacity:.9}
  .ng-schoolLifeIndex__item{white-space:nowrap}
  .ng-schoolLifeIndex__label{margin:0;font-size:14px;font-weight:500;color:var(--text)}
  .ng-schoolLifeIndex__chev{
    width:16px;height:16px;
    transform:rotate(-90deg);
  }

  /* セクション見出し */
  .ng-schoolLifeH2{gap:12px}
  .ng-schoolLifeH2__title{font-size:24px}
  .ng-schoolLifeH2__rule{width:100%;max-width:335px}

  /* リード文 */
  .ng-schoolLifeLead{font-size:14px;line-height:1.8}
  .ng-schoolLifeSubhead{font-size:18px;gap:8px;margin-bottom:12px}
  .ng-schoolLifeSubhead::before{height:14px;width:4px}
  .ng-schoolLifeClubGrid + .ng-schoolLifeSubhead{margin-top:32px}

  /* タイムライン: 縦1列・均等な間隔で接続 */
  .ng-schoolLifeTimeline{grid-template-columns:1fr;gap:12px;margin-top:16px}
  .ng-schoolLifeTimeline__col{
    position:relative;
    gap:12px;
  }
  .ng-schoolLifeTimeline__col::before{
    content:"";
    position:absolute;
    left:32px;
    top:22px;
    bottom:-34px;
    border-left:2px dashed rgba(2,103,58,.5);
  }
  .ng-schoolLifeTimeline__col:last-child::before{bottom:22px}
  .ng-schoolLifeTimeline__item{
    display:grid;
    grid-template-columns:64px 1fr;
    column-gap:12px;
    align-items:center;
    min-height:56px;
    position:relative;
  }
  .ng-schoolLifeTimeline__item::after{display:none}
  .ng-schoolLifeTimeline__pill{
    min-width:auto;
    width:64px;
    padding:6px 10px;
    font-size:12px;
    position:relative;
    z-index:1;
  }
  .ng-schoolLifeTimeline__text{
    max-width:none;
    font-size:14px;
    position:relative;
    z-index:1;
  }

  /* 部活動カード: 2列 */
  .ng-schoolLifeClubGrid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px 12px;
  }
  .ng-schoolLifeClubCard__thumb{aspect-ratio:4/3}
  .ng-schoolLifeClubCard__thumb img{width:100%;height:100%}
  .ng-schoolLifeClubCard__name{font-size:14px}
  .ng-schoolLifeClubCard__icon{width:16px;height:16px}

  /* 生徒の声カード（アコーディオン） */
  .ng-schoolLifeVoiceGrid{
    grid-template-columns:1fr;
    gap:12px;
  }
  .ng-schoolLifeVoiceCard__trigger{padding:20px 20px 20px}
  .ng-schoolLifeVoiceCard__header{margin-bottom:8px;gap:8px}
  .ng-schoolLifeVoiceCard__title{font-size:18px}
  .ng-schoolLifeVoiceCard__toggle{
    width:32px;
    height:32px;
  }
  .ng-schoolLifeVoiceCard__meta{margin-bottom:8px;gap:8px}
  .ng-schoolLifeVoiceCard__name{font-size:14px}
  .ng-schoolLifeVoiceCard__pill{font-size:12px;padding:4px 10px}
  .ng-schoolLifeVoiceCard__excerpt{font-size:14px}
  .ng-schoolLifeVoiceCard__text{font-size:14px;padding:0 20px 20px}
}
