﻿/* =========================================
   PAGE: CLASSES
   ========================================= */
.classes-page .bg-cream {
  background: var(--cream);
}

.classes-page .eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.classes-page .stage-block {
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 2px solid rgba(8, 63, 73, 0.08);
}

.classes-page .stage-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.classes-page .subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}

.classes-page .subject-list li {
  background: rgba(8, 63, 73, 0.04);
  border: 1px solid rgba(8, 63, 73, 0.1);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--base-deep);
  margin-bottom: 0;
}

.classes-page .group-heading {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid rgba(8, 63, 73, 0.08);
  font-family: "Archivo Black", sans-serif;
  font-size: 2rem;
  color: var(--base-deep);
  text-align: center;
}

.classes-page .groups-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.classes-page .group-card {
  background: var(--white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(5, 43, 52, 0.08);
  border-top: 4px solid var(--accent);
}

.classes-page .group-card h4 {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.4rem;
  color: var(--maroon);
  margin: 0 0 16px 0;
}

.classes-page .group-card p {
  font-size: 0.95rem;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .classes-page .groups-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   CLASSES — COMPLETE ACADEMIC JOURNEY
   ========================================= */
.classes-page .classes-intro .content-wrapper,
.classes-page .classes-stages .content-wrapper,
.classes-page .classes-higher .content-wrapper {
  width: var(--container);
  max-width: 1240px;
  margin-inline: auto;
}

.classes-page .classes-intro {
  background:
    radial-gradient(circle at 92% 14%, rgba(242, 170, 43, 0.12), transparent 24%),
    var(--paper);
}

.classes-page .classes-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(430px, 0.96fr);
  gap: clamp(52px, 7vw, 96px);
  align-items: center;
}

.classes-page .classes-intro-copy p,
.classes-page .stage-content > p,
.classes-page .classes-higher .content-wrapper > p,
.classes-page .group-card > p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.86;
  text-align: justify;
  text-justify: inter-word;
}

.classes-page .classes-intro-visual {
  position: relative;
  min-height: 520px;
  isolation: isolate;
}

.classes-page .classes-intro-visual::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 48px;
  right: -18px;
  width: calc(100% - 62px);
  height: 425px;
  border: 2px solid rgba(142, 25, 53, 0.16);
}

.classes-page .classes-intro-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 16px;
  left: 25px;
  width: 38px;
  height: 120px;
  border-radius: 3px;
  background: var(--accent-bright);
}

.classes-page .classes-main-image,
.classes-page .classes-inset-image {
  position: absolute;
  overflow: hidden;
  margin: 0;
  border: 7px solid var(--white);
  background: var(--white);
  box-shadow: 0 22px 52px rgba(5, 43, 52, 0.18);
}

.classes-page .classes-main-image {
  z-index: 1;
  top: 0;
  right: 0;
  width: calc(100% - 54px);
  height: 445px;
  border-radius: 4px 74px 4px 4px;
}

.classes-page .classes-inset-image {
  z-index: 3;
  bottom: 0;
  left: 0;
  width: 54%;
  height: 170px;
  border-radius: 8px;
  transform: rotate(-1.2deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.classes-page .classes-main-image img,
.classes-page .classes-inset-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.classes-page .classes-main-image img {
  object-position: center 35%;
}

.classes-page .classes-inset-image img {
  object-position: center 42%;
}

.classes-page .classes-ribbon {
  position: absolute;
  z-index: 4;
  top: 76px;
  left: 0;
  min-height: 180px;
  padding: 18px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
  background: var(--base-deep);
  box-shadow: 0 12px 28px rgba(5, 43, 52, 0.2);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.classes-page .classes-stage-badge {
  position: absolute;
  z-index: 5;
  right: -10px;
  bottom: -12px;
  width: 116px;
  height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 6px solid var(--accent-bright);
  border-radius: 50%;
  color: var(--white);
  background: var(--maroon);
  box-shadow: 0 14px 32px rgba(142, 25, 53, 0.28);
  text-align: center;
}

.classes-page .classes-stage-badge strong {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.55rem;
  line-height: 1;
}

.classes-page .classes-stage-badge span {
  max-width: 76px;
  margin-top: 7px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-transform: uppercase;
}

.classes-page .classes-intro-visual:hover :is(.classes-main-image img, .classes-inset-image img) {
  transform: scale(1.045);
}

.classes-page .classes-intro-visual:hover .classes-inset-image {
  box-shadow: 0 27px 48px rgba(5, 43, 52, 0.25);
  transform: rotate(0) translateY(-5px);
}

body.classes-page .classes-stages.inner-page-section {
  background:
    radial-gradient(circle at 7% 8%, rgba(142, 25, 53, 0.07), transparent 23%),
    var(--cream);
}

.classes-page .stage-block,
.classes-page .stage-block:last-child {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  min-height: 445px;
  margin: 0 0 32px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(8, 63, 73, 0.09);
  border-radius: 28px 28px 7px 28px;
  background: var(--white);
  box-shadow: 0 20px 46px rgba(5, 43, 52, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.classes-page .stage-block:last-child {
  margin-bottom: 0;
}

.classes-page .stage-block:nth-child(even) {
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
}

.classes-page .stage-block:nth-child(even) .stage-image {
  grid-column: 2;
  grid-row: 1;
}

.classes-page .stage-block:nth-child(even) .stage-content {
  grid-column: 1;
  grid-row: 1;
}

.classes-page .stage-block:hover {
  box-shadow: 0 28px 62px rgba(5, 43, 52, 0.17);
  transform: translateY(-6px);
}

.classes-page .stage-image {
  position: relative;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--base);
}

.classes-page .stage-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(5, 43, 52, 0.76));
  pointer-events: none;
}

.classes-page .stage-image img {
  width: 100%;
  height: 100%;
  min-height: 445px;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.classes-page #pre-primary .stage-image img {
  object-position: 48% center;
}

.classes-page .stage-image figcaption {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 4px 14px 14px 14px;
  color: var(--white);
  background: rgba(142, 25, 53, 0.92);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(7px);
}

.classes-page .stage-image figcaption i {
  color: var(--accent-bright);
  font-size: 1rem;
}

.classes-page .stage-block:hover .stage-image img {
  transform: scale(1.055);
}

.classes-page .stage-content {
  padding: clamp(34px, 4.8vw, 62px);
}

body.classes-page .stage-content h2 {
  position: relative;
  display: block;
  max-width: none;
  margin-bottom: 22px;
  padding-left: 62px;
  color: var(--base-deep);
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
}

.classes-page .stage-content h2::before {
  content: "\f1ae";
  position: absolute;
  top: -8px;
  left: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 4px 14px;
  color: var(--white);
  background: var(--maroon);
  font-family: "Font Awesome 6 Free";
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 9px 20px rgba(142, 25, 53, 0.2);
}

.classes-page #primary .stage-content h2::before { content: "\f518"; }
.classes-page #middle-school .stage-content h2::before { content: "\f5da"; }
.classes-page #high-school .stage-content h2::before { content: "\f19d"; }

.classes-page .stage-content h3 {
  width: fit-content;
  margin: 24px 0 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--maroon);
  background: rgba(142, 25, 53, 0.08);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.classes-page .stage-content > p strong {
  color: var(--base-deep);
}

.classes-page .subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.classes-page .subject-list li {
  position: relative;
  margin: 0;
  padding: 9px 14px 9px 34px;
  border: 1px solid rgba(8, 63, 73, 0.08);
  border-radius: 11px 11px 3px 11px;
  color: var(--base-deep);
  background: var(--cream);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  transition: color 0.28s ease, background 0.28s ease, transform 0.28s ease;
}

.classes-page .subject-list li::before {
  content: "\f02d";
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--maroon);
  font-family: "Font Awesome 6 Free";
  font-size: 0.65rem;
  font-weight: 900;
  transform: translateY(-50%);
}

body.classes-page main .subject-list li:hover {
  color: var(--base-deep) !important;
  background: #fff1d3 !important;
  border-color: rgba(142, 25, 53, 0.5) !important;
  box-shadow: 0 8px 18px rgba(142, 25, 53, 0.12);
  transform: translateY(-3px);
}

body.classes-page main .subject-list li:hover::before {
  color: var(--maroon) !important;
}

body.classes-page .classes-higher.inner-page-section {
  color: var(--white);
  background:
    radial-gradient(circle at 92% 10%, rgba(242, 170, 43, 0.12), transparent 25%),
    var(--base);
}

body.classes-page .classes-higher .content-wrapper > .eyebrow {
  display: flex;
  width: fit-content;
  margin-right: auto;
  margin-left: auto;
  color: var(--accent-bright);
}

body.classes-page .classes-higher .content-wrapper > h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 1.8vw, 26px);
  max-width: none;
  color: var(--white) !important;
  text-align: left;
}

body.classes-page .classes-higher .content-wrapper > h2::after {
  margin-right: auto;
  margin-left: auto;
}

.classes-page .classes-higher .content-wrapper > p {
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.classes-page .higher-feature-image {
  position: relative;
  height: 410px;
  margin: 38px 0 48px;
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px 80px 8px 28px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.25);
}

.classes-page .higher-feature-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 43, 52, 0.83), rgba(5, 43, 52, 0.08) 70%);
}

.classes-page .higher-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.classes-page .higher-feature-image figcaption {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(24px, 5vw, 62px);
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  color: var(--white);
  transform: translateY(-50%);
}

.classes-page .higher-feature-image figcaption span {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--base-deep);
  background: var(--accent-bright);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.classes-page .higher-feature-image figcaption i {
  margin-right: 7px;
  color: var(--maroon);
}

.classes-page .higher-feature-image figcaption strong {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.65rem);
  line-height: 1.2;
}

.classes-page .higher-feature-image:hover img {
  transform: scale(1.045);
}

body.classes-page .group-heading {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--white);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  text-align: center;
}

.classes-page .groups-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.classes-page .group-card {
  position: relative;
  grid-column: span 2;
  min-height: 390px;
  padding: 74px 28px 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 5px solid var(--accent);
  border-radius: 20px 20px 5px 20px;
  background: var(--white);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.17);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.classes-page .group-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.classes-page .group-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.classes-page .group-card::before {
  content: "\f5d2";
  position: absolute;
  top: 22px;
  left: 28px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px 13px 4px 13px;
  color: var(--maroon);
  background: rgba(142, 25, 53, 0.09);
  font-family: "Font Awesome 6 Free";
  font-size: 0.95rem;
  font-weight: 900;
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.classes-page .group-card:nth-child(2)::before { content: "\f109"; }
.classes-page .group-card:nth-child(3)::before { content: "\f0c3"; }
.classes-page .group-card:nth-child(4)::before { content: "\f201"; }
.classes-page .group-card:nth-child(5)::before { content: "\f1ec"; }

.classes-page .group-card::after {
  content: "";
  position: absolute;
  top: 41px;
  right: 28px;
  width: 58px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.75;
}

.classes-page .group-card h4 {
  margin: 0 0 17px;
  color: var(--base-deep);
  font-size: 1.28rem;
  line-height: 1.25;
}

.classes-page .group-card > p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.68;
}

.classes-page .group-card > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--maroon);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.classes-page .group-card .subject-list {
  gap: 7px;
}

.classes-page .group-card .subject-list li {
  padding: 7px 10px 7px 29px;
  background: var(--cream);
  font-size: 0.68rem;
}

.classes-page .group-card .subject-list li::before {
  left: 10px;
}

.classes-page .group-card:hover {
  border-top-color: var(--maroon);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.26);
  transform: translateY(-7px);
}

.classes-page .group-card:hover::before {
  color: var(--white);
  background: var(--maroon);
  transform: rotate(-6deg) scale(1.06);
}

@media (max-width: 1060px) {
  .classes-page .classes-intro-layout {
    grid-template-columns: minmax(0, 1fr) minmax(370px, 0.92fr);
    gap: 44px;
  }

  .classes-page .stage-block,
  .classes-page .stage-block:last-child,
  .classes-page .stage-block:nth-child(even) {
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  }

  .classes-page .stage-block:nth-child(even) .stage-image,
  .classes-page .stage-block:nth-child(even) .stage-content {
    grid-column: auto;
    grid-row: auto;
  }

  .classes-page .groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classes-page .group-card,
  .classes-page .group-card:nth-child(4),
  .classes-page .group-card:nth-child(5) {
    grid-column: auto;
  }

  .classes-page .group-card:last-child {
    grid-column: 1 / -1;
    width: min(100%, 590px);
    justify-self: center;
  }
}

@media (max-width: 820px) {
  .classes-page .classes-intro-layout {
    grid-template-columns: 1fr;
  }

  .classes-page .classes-intro-visual {
    min-height: 490px;
  }

  .classes-page .stage-block,
  .classes-page .stage-block:last-child,
  .classes-page .stage-block:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .classes-page .stage-image,
  .classes-page .stage-block:nth-child(even) .stage-image {
    grid-column: 1;
    grid-row: 1;
    min-height: 330px;
  }

  .classes-page .stage-content,
  .classes-page .stage-block:nth-child(even) .stage-content {
    grid-column: 1;
    grid-row: 2;
  }

  .classes-page .stage-image img {
    min-height: 330px;
  }
}

@media (max-width: 640px) {
  .classes-page .classes-intro-copy p,
  .classes-page .stage-content > p,
  .classes-page .classes-higher .content-wrapper > p,
  .classes-page .group-card > p {
    text-align: left;
  }

  .classes-page .classes-intro-visual {
    min-height: 410px;
  }

  .classes-page .classes-main-image {
    width: calc(100% - 38px);
    height: 340px;
    border-radius: 4px 52px 4px 4px;
  }

  .classes-page .classes-inset-image {
    width: 58%;
    height: 130px;
  }

  .classes-page .classes-ribbon {
    top: 62px;
    min-height: 140px;
  }

  .classes-page .classes-stage-badge {
    right: 0;
    width: 92px;
    height: 92px;
    border-width: 5px;
  }

  .classes-page .stage-content {
    padding: 30px 24px;
  }

  body.classes-page .stage-content h2 {
    padding-left: 0;
    padding-top: 58px;
  }

  .classes-page .stage-content h2::before {
    top: 0;
  }

  .classes-page .higher-feature-image {
    height: 330px;
    border-radius: 22px 52px 6px 22px;
  }

  .classes-page .groups-grid {
    grid-template-columns: 1fr;
  }

  .classes-page .group-card,
  .classes-page .group-card:last-child {
    grid-column: auto;
    width: 100%;
    min-height: 0;
  }
}

@media (max-width: 430px) {
  .classes-page .classes-intro-visual {
    min-height: 350px;
  }

  .classes-page .classes-main-image {
    width: calc(100% - 28px);
    height: 280px;
    border-width: 5px;
  }

  .classes-page .classes-inset-image {
    height: 102px;
    border-width: 5px;
  }

  .classes-page .classes-ribbon {
    top: 50px;
    min-height: 115px;
    padding: 12px 8px;
    font-size: 0.57rem;
  }

  .classes-page .classes-stage-badge {
    width: 76px;
    height: 76px;
    border-width: 4px;
  }

  .classes-page .classes-stage-badge strong {
    font-size: 1.1rem;
  }

  .classes-page .classes-stage-badge span {
    margin-top: 4px;
    font-size: 0.46rem;
  }

  .classes-page .stage-image,
  .classes-page .stage-image img {
    min-height: 250px;
    height: 250px;
  }

  .classes-page .higher-feature-image {
    height: 300px;
  }

  .classes-page .higher-feature-image figcaption strong {
    font-size: 1.45rem;
  }

  .classes-page .group-card {
    padding: 70px 22px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .classes-page .classes-intro-visual *,
  .classes-page .stage-block,
  .classes-page .stage-block *,
  .classes-page .higher-feature-image *,
  .classes-page .group-card,
  .classes-page .group-card * {
    transition: none !important;
  }
}
