/* ─── Curriculum page base ─────────────────────────────────── */

.curriculum-page {
  max-width: 62rem;
  margin: 5rem auto 2rem;
  padding-bottom: 15rem;
}

body.curriculum-index-body {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.curriculum-index-body .curriculum-page {
  width: min(100%, 62rem);
  margin: 0 auto;
  padding: clamp(4.25rem, 8vh, 5.2rem) 1.25rem clamp(1rem, 3vh, 2rem);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding-bottom: clamp(7rem, 13vh, 9rem);
}

.curriculum-header {
  text-align: center;
  padding: 2rem 1rem 2.75rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(184, 180, 255, 0.18);
}

body.curriculum-index-body .curriculum-header {
  padding: 0 1rem 1.5rem;
  margin-bottom: clamp(1rem, 2.2vh, 1.6rem);
  border-bottom: 1px solid rgba(184, 180, 255, 0.18);
}

.curriculum-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.03em;
  margin: 0 0 1rem;
  color: #fff;
}

.curriculum-header > p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.62);
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.75;
}

/* ─── GSAP button-driven slide carousel ───────────────────── */

.cwrap {
  position: relative;
  margin-bottom: 3.5rem;
}

body.curriculum-index-body .cwrap {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cstage {
  position: relative;
  height: min(70vw, 32rem);
  overflow: hidden;
  list-style: none;
  padding: 0;
  margin: 0;
}

body.curriculum-index-body .cstage {
  height: clamp(16rem, 42vh, 24rem);
  min-height: 14rem;
}

.cslide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cslide .category-card {
  width: min(56%, 22rem);
  min-height: 22rem;
  margin: 0;
  text-decoration: none;
}

body.curriculum-index-body .cslide .category-card {
  width: min(56%, 22rem);
  min-height: min(18rem, 26vh);
}

.cslide .category-name {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.cslide .category-count {
  line-height: 1.45;
  max-width: 92%;
}

/* Prev / Next arrow buttons */
.cnav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 0.4rem;
  pointer-events: none;
  z-index: 10;
}

.cprev,
.cnext {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(120, 153, 225, 0.3);
  background-color: rgba(20, 25, 40, 0.7);
  background-size: 1rem 1rem;
  background-repeat: no-repeat;
  background-position: center center;
  cursor: pointer;
  pointer-events: all;
  font-size: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(6px);
}

.cprev:hover,
.cnext:hover {
  background-color: rgba(55, 50, 173, 0.85);
  border-color: #7899e1;
  box-shadow: 0 0 16px rgba(120, 153, 225, 0.6), 0 0 32px rgba(55, 50, 173, 0.4);
}

.cprev {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,50 80,100 80,0' fill='%23fff'/%3E%3C/svg%3E");
}

.cnext {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='100,50 20,100 20,0' fill='%23fff'/%3E%3C/svg%3E");
}

/* Navigation dots */
.cdots {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.75rem;
}

.cdot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: #7884a9;
  background-clip: content-box;
  border: 0.2rem solid transparent;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.cdot--active,
.cdot:hover {
  background-color: #b8b4ff;
}

.cdot--active {
  box-shadow: 0 0 12px rgba(55, 50, 173, 0.9), 0 0 28px rgba(255, 215, 80, 0.7);
  background-color: #ffffff;
}

.curriculum-empty {
  margin-top: 1.5rem;
  text-align: center;
  opacity: 0.9;
}

.curriculum-detail-page {
  max-width: 68rem;
  padding: 0 1.5rem;
}

.curriculum-back-link--top {
  /* Positioned to sit to the right of the ☰ menu button */
  position: fixed;
  top: 21px;
  left: 80px;
  z-index: 1200;

  /* Visually identical to .menu-toggle second definition in style.css */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, #3732ad 0%, #4c76c8 100%);
  border: 1px solid #7c77ff;
  border-radius: 6px;
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(55, 50, 173, 0.3);
  transition: all 0.3s ease;
  font-family: 'Adobe Jenson Pro', 'Crimson Text', 'Times New Roman', serif;
}

.curriculum-back-link--top:hover {
  background: linear-gradient(135deg, #4c76c8 0%, #6b8dd6 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 141, 214, 0.5);
  border-color: #ffffff;
  color: #ffffff;
  text-decoration: none;
}

.curriculum-works-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 4rem;
}

.curriculum-work-row {
  display: flex;
  align-items: center;
  padding: 1.1rem 0;
  color: inherit;
}

.curriculum-work-main {
  flex: 0 0 auto;
  max-width: 38%;
}

/* Dotted leader line connecting title to description */
.curriculum-work-leader {
  flex: 1;
  min-width: 1rem;
  height: 2px;
  margin: 0 clamp(0.4rem, 1.5vw, 1.2rem);
  background-image: radial-gradient(circle, rgba(184, 180, 255, 0.2) 1px, transparent 1px);
  background-size: clamp(6px, 1.4vw, 14px) 2px;
  background-position: 0 center;
  background-repeat: repeat-x;
}

.curriculum-work-main h3 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  white-space: nowrap;
}

.curriculum-work-main h3 a {
  color: #7899e1;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curriculum-work-main h3 a:hover {
  color: #b8b4ff;
}

.curriculum-work-index {
  font-size: 0.72rem;
  color: rgba(184, 180, 255, 0.55);
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.curriculum-work-explanation {
  flex: 1;
  min-width: 0;
}

.curriculum-work-explanation p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.82;
  color: rgba(255, 255, 255, 0.55);
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 768px) {
  .curriculum-page {
    margin-top: 4.3rem;
  }

  /* ── Index page: lock to viewport, compact header ── */
  body.curriculum-index-body {
    overflow: hidden;
    height: 100dvh;
  }

  body.curriculum-index-body .curriculum-page {
    margin-top: 0;
    padding-top: 3.4rem;
    padding-bottom: 5.5rem;
  }

  body.curriculum-index-body .curriculum-header {
    padding: 0 1rem 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: none;
  }

  body.curriculum-index-body .curriculum-header h1 {
    font-size: clamp(1.4rem, 6vw, 2rem);
    margin-bottom: 0.35rem;
  }

  body.curriculum-index-body .curriculum-header > p {
    display: none;
  }

  /* ── Index page: gallery card size on mobile ── */
  body.curriculum-index-body .cwrap {
    justify-content: center;
  }

  body.curriculum-index-body .cstage {
    height: clamp(13rem, 34vh, 15rem);
    min-height: 13rem;
  }

  body.curriculum-index-body .cslide .category-card {
    width: min(60%, 12rem);
    min-height: clamp(11rem, 24vh, 12.8rem);
  }

  .curriculum-back-link--top {
    top: 18px;
    left: 72px;
    font-size: 16px;
    padding: 6px 10px;
  }

  /* ── Detail page work rows ── */
  .curriculum-work-main {
    max-width: 44%;
  }

  .curriculum-work-main h3,
  .curriculum-work-main h3 a {
    white-space: normal;
  }

  .curriculum-work-leader {
    margin: 0 0.4rem;
  }

  .curriculum-work-explanation {
    flex: 0 1 50%;
  }
}

/* ─── Wave graphic section ─────────────────────────────────── */

.curriculum-wave-section {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 13rem;
  z-index: 5;
  pointer-events: none;
}

.waveDiv {
  position: absolute;
  overflow: hidden;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.wave-content-wrapper {
  height: 100%;
  width: 100%;
  position: absolute;
  overflow: hidden;
  bottom: -1px;
  background-image: linear-gradient(to top, #3732ad 0%, #1a1635 55%, #0a0b12 100%);
}

.first-wave  { z-index: 3; opacity: 0.5; }
.second-wave { z-index: 2; opacity: 0.75; }
.third-wave  { z-index: 1; }

.wave-image {
  width: 200%;
  height: 100%;
  position: absolute;
  left: 0;
  background-repeat: repeat no-repeat;
  background-position: 0 bottom;
  transform-origin: center bottom;
}

.first-image  { background-size: 50% 100px; }
.second-image { background-size: 50% 120px; }
.third-image  { background-size: 50% 140px; }

.animation-wave .second-image {
  animation: curriculum-waves 10s linear infinite;
}

.animation-wave .third-image {
  animation: curriculum-waves 15s linear infinite;
}

@keyframes curriculum-waves {
  0%   { transform: translateX(0)     scaleY(1); }
  50%  { transform: translateX(-25%) scaleY(0.55); }
  100% { transform: translateX(-50%) scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .animation-wave .second-image,
  .animation-wave .third-image  { animation: none; }
}
