/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f7f7f7;
  padding-top: 5rem; /* 80px */
}


/* =========================
   HEADER
========================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5rem; /* 80px */
  background: #a6d608;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 1000;
}

.header-logo img {
  height: 3.75rem; /* 60px */
  width: auto;
  object-fit: contain;
}

.header-logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
}

.nav-links li a {
  color: #000;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  letter-spacing: 0.03rem;
  transition: text-shadow 0.25s ease, color 0.25s ease;
}

/* hover */
.nav-links li a:hover {
  color: #000;
  text-shadow:
    0 0 0.25rem #fff,
    0 0 0.5rem #fff,
    0 0 0.75rem #b6ff6d,
    0 0 1.1rem #9aff4f;
  text-decoration: underline;
}

/* active */
.nav-links li a.active {
  color: #000;
  font-weight: 700;
  text-shadow:
    0 0 0.35rem #fff,
    0 0 0.75rem #fff,
    0 0 1.1rem #b6ff6d,
    0 0 1.6rem #9aff4f,
    0 0 2.1rem #7aff2f;
  text-decoration: underline;
}


/* =========================
   MAIN
========================= */
main {
  max-width: auto;
  margin: 0 auto;
  padding: 1.25rem 3rem 3.75rem;
  background: #fff;
}

hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0.5rem 0;
}

.page-title { 
  font-size: 24px; 
  margin-bottom: 20px; 
  border-bottom: 2px solid #2e7d32; 
  padding-bottom: 5px; 
}



/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  font-size: 0.75rem;
  color: #666;
  padding: 1.25rem 0;
}

/* =========================
   HERO SLIDER
========================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: 23.75rem; /* 380px */
  overflow: hidden;
  border-radius: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slider .slide.active {
  opacity: 1;
}

.hero-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
}


/* =========================
   SECTION TITLES / NOTICE
========================= */
.section-title {
  font-size: 1.25rem;
  margin: 1.25rem 0 0.6rem;
  border-left: 0.3rem solid #2e7d32;
  padding-left: 0.6rem;
}

.notice-box {
  max-height: 7.5rem;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 0.6rem;
  background: #fafafa;
}


/* =========================
   CLASS CARDS（アコーディオン）
========================= */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.class-card {
  background: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 0.5rem;
  padding: 1.25rem 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.3s;
}

.class-card:hover {
  box-shadow: 0 0.25rem 0.6rem rgba(0,0,0,0.15);
}

.class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.class-card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 0.6rem;
  color: #2e7d32;
}

.toggle-icon {
  font-size: 1.4rem;
  font-weight: bold;
  color: #2e7d32;
  transition: transform 0.3s;
}

.class-card-desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  margin-top: 0.6rem;
}

.class-card.open .class-card-desc {
  max-height: 2000px;
}

/* p の上下余白も揃える（特に class-card 内） */
.class-card-desc p,
.fade-in-up {
  margin: 0 0 1rem;
}

/* 開講日だけ中央に来るように調整 */
p.opening-day {
  margin: 0.4rem 0 0; /* hr と同じ余白 */
}


/* =========================
   Q&A
========================= */
.qa-section {
  margin-top: 1.25rem;
}

.qa-item {
  border-bottom: 1px solid #ccc;
  padding: 0.6rem 0;
}

.qa-question {
  font-weight: bold;
  cursor: pointer;
  padding: 0.6rem;
  background: #f1f8e9;
  border-radius: 0.4rem;
  transition: background 0.3s;
}

.qa-question:hover {
  background: #e4f5d4;
}

.qa-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 0.6rem;
  font-size: 0.9rem;
}

.qa-question.open {
  background: #dff3c4;
}


/* =========================
   RESULT CARDS & SCHOOL CARDS
========================= */
.result-section {
  margin-bottom: 2.5rem;
}

.result-card {
  background: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 0.625rem; /* 10px */
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.result-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.result-card.latest {
  border: 3px solid #a6d608;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transform: translateY(-0.125rem);
}

.result-year {
  font-size: 1.25rem;
  font-weight: bold;
  color: #2e7d32;
  margin-bottom: 0.6rem;
}

.result-card.latest .result-year {
  font-size: 1.375rem;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(166,214,8,0.4);
}

.result-card ul {
  padding-left: 1.25rem;
}

.result-card li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.year-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: #2e7d32;
  margin: 2.5rem 0 1.25rem;
  letter-spacing: 0.06rem;
  text-shadow: 0 0 8px rgba(166,214,8,0.4);
  border-bottom: 3px solid #a6d608;
  padding-bottom: 0.4rem;
}

/* 合格校グリッド */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14.375rem, 1fr)); /* 230px */
  gap: 1.25rem;
}

/* 学校カード */
.school-card {
  position: relative;
  background: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 0.75rem; /* 12px */
  width: auto;
  height: 6.25rem; /* 100px */
  padding: 0.875rem; /* 14px */
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.school-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.school-card.latest {
  border: 3px solid #a6d608;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.school-name {
  font-size: 1.125rem;
  font-weight: bold;
  color: #2e7d32;
  margin-bottom: 0.4rem;
}

.school-from {
  font-size: 0.88rem;
  color: #4a4a4a;
}

/* 桜バッジ */
.sakura-badge {
  position: absolute;
  top: -0.5rem;   /* -8px */
  right: -0.625rem; /* -10px */
  width: 5rem;    /* 80px */
  height: 4.0625rem; /* 65px */
}

.sakura-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  text-shadow: 2px 4px 6px rgba(2,1,0.8,0.5);
}

.catchphrase {
  margin-bottom: 1rem;
}

/* =========================
   VIDEO GRID
========================= */
.youtube-wrap,
.image-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0.75rem 0.75rem 0 0;
}

.youtube-wrap iframe,
.image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem 0.75rem 0 0;
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 0.75rem 0.75rem 0 0;
}

.video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem 0.75rem 0 0
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ★ 3列固定 */
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.video-item {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.video-item p {
  margin: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}


/* =========================
   成績ページ（タブ＋カード）
========================= */
/* タブ */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tab-button {
  padding: 0.5rem 1rem;
  border: 1px solid #007acc;
  background: #fff;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: 0.2s;
}

.tab-button.active {
  background: #007acc;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* グリッド */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

/* カード */
.student-card {
  padding: 1.2rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  background: #fafafa;
  transition: box-shadow 0.2s ease;
}

.student-card:hover {
  box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.1);
}

.student-card h3 {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.student-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* 学年別色分け */
.grade-0 { border-left: 0.38rem solid #d67ab0; }
.grade-1 { border-left: 0.38rem solid #457b9d; }
.grade-2 { border-left: 0.38rem solid #e9c46a; }
.grade-3 { border-left: 0.38rem solid #f4a261; }
.grade-4 { border-left: 0.38rem solid #2a9d8f; }

/* 学年別セクションタイトル */
.section-title-grade-0{ 
  font-size: 1.25rem;
  margin: 1.25rem 0 0.6rem;
  border-left: 0.3rem solid #d67ab0;
  padding-left: 0.6rem;
}

.section-title-grade-1{ 
  font-size: 1.25rem;
  margin: 1.25rem 0 0.6rem;
  border-left: 0.3rem solid #457b9d;
  padding-left: 0.6rem;
}

.section-title-grade-2{ 
  font-size: 1.25rem;
  margin: 1.25rem 0 0.6rem;
  border-left: 0.3rem solid #e9c46a;
  padding-left: 0.6rem;
}

.section-title-grade-3{ 
  font-size: 1.25rem;
  margin: 1.25rem 0 0.6rem;
  border-left: 0.3rem solid #f4a261;
  padding-left: 0.6rem;
}

.section-title-grade-4{ 
  font-size: 1.25rem;
  margin: 1.25rem 0 0.6rem;
  border-left: 0.3rem solid #2a9d8f;
  padding-left: 0.6rem;
}

/* 教科別色分け */
.subject-eng { color: #cc3300; font-weight: 600; }
.subject-math { color: #0077cc; font-weight: 600; }
.subject-jap { color: #009103; font-weight: 600; }
.subject-sum { color: #000; font-weight: 600;}

.student-card ul {
  list-style: none;
}

.student-card li {
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
}

.exam-name {
  padding: 1.5rem 1rem 0;
}

.tab-section {
  margin-bottom: 4rem;
}

.marker {
  background: linear-gradient(transparent 60%, #ffeb3b 60%);
  font-size: 1.2em;
  font-weight: 600;
}


/* =========================
   RESPONSIVE
========================= */

/* 1100px */
@media (max-width: 68.75rem) {
html{
  font-size: 22px;
}

  main {
    padding: 1.25rem 2.5rem 3.1rem;
  }

  .result-grid {
    grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr));
  }

  .card-grid {
    flex-direction: column;
    gap: 1.25rem;
  }

  .nav-links {
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  .nav-links li a {
    font-size: 0.7rem;
  }

  .header-logo {
    font-size: 0.5rem;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 768px */
@media (max-width: 48rem) {
  html {
    font-size: 20px;
  }

  main {
    padding: 1.25rem 1.8rem 2.8rem;
  }

  .result-grid {
    grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  }

  .class-card,
  .qa-question,
  .qa-answer,
  .result-card {
    padding: 1.5rem;
  }

  .video-item {
    flex: 1 1 100%;
  }

  .nav-links li a {
    font-size: 0.7rem;
  }

  .hero-slider {
    height: 18rem;
  }
  
  .header-logo {
    font-size: 0.5rem;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* 600px */
@media (max-width: 37.5rem) {
  html {
    font-size: 20px;
  }

  main {
    padding: 1.25rem 1rem 2.5rem;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .class-card,
  .qa-question,
  .qa-answer,
  .result-card,
  .school-card {
    width: 100%;
    padding: 1.6rem;
  }

  .nav-links {
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .nav-links li a {
    font-size: 0.6rem;
    padding: 0.2rem 0.25rem;
  }

  .header-logo img {
    height: 2.5rem;
  }

  .hero-slider {
    height: 15rem;
  }
  
  .header-logo {
    font-size: 0.5rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

}

.fade { animation-name: fade; animation-duration: 1s; }
@keyframes fade { from {opacity: 0.3;} to {opacity: 1;} }

.fade-in-up { opacity: 0; transform: translateY(15px); animation: fadeInUp 0.8s ease forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }