/* Subjects page layout inspired by the RR Academy home page. */
.subjects-page {
  --subjects-ink: #081225;
  --subjects-navy: #102a56;
  --subjects-blue: #2448bd;
  --subjects-lime: #dcfd7d;
  --subjects-muted: #68778e;
  overflow-x: hidden;
}

.subjects-page .sub_banner { overflow: hidden; background: var(--subjects-ink); }
.subjects-page .subjects-hero {
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: clamp(130px,14vh,160px) 0 45px;
  background:
    radial-gradient(ellipse at 78% 48%, rgba(36,72,189,.25), transparent 38%),
    radial-gradient(ellipse at 7% 35%, rgba(220,253,125,.07), transparent 32%),
    linear-gradient(115deg,#081225 0%,#102a56 70%,#0d1e39 100%);
}
.subjects-page .subjects-hero-row { width: 100%; row-gap: 2rem; }
.subjects-page .subjects-hero-copy { position: relative; z-index: 3; text-align: left; }
.subjects-page .subjects-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 21px;
  padding: 7px 12px;
  border: 1px solid rgba(220,253,125,.25);
  border-radius: 999px;
  background: rgba(220,253,125,.07);
  color: #e6f5b0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .075em;
}
.subjects-page .subjects-hero-kicker i { width: 3px; height: 3px; border-radius: 50%; background: var(--subjects-lime); }
.subjects-page .subjects-hero-copy h1 {
  max-width: 14ch;
  margin: 0 0 19px;
  color: #fff;
  font-size: clamp(2.8rem,4.25vw,4.25rem);
  font-weight: 300;
  line-height: .99;
  letter-spacing: -.05em;
}
.subjects-page .subjects-hero-copy h1 span { color: #fff; }
.subjects-page .subjects-hero-copy > p { max-width: 55ch; margin: 0 0 24px; color: rgba(255,255,255,.78); font-size: clamp(.98rem,1.3vw,1.1rem); text-align: left; }
.subjects-page .subjects-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 23px; }
.subjects-page .subjects-primary-link { display: inline-flex; min-height: 48px; align-items: center; gap: 18px; padding: 0 18px; border-radius: 9px; background: var(--subjects-blue); color: #fff; font-size: .88rem; font-weight: 700; box-shadow: 0 10px 26px rgba(36,72,189,.28); }
.subjects-page .subjects-primary-link:hover { transform: translateY(-2px); background: #3159d1; color: #fff; }
.subjects-page .subjects-secondary-link { color: #f5f7fb; font-size: .85rem; font-weight: 700; }
.subjects-page .subjects-secondary-link i { margin-left: 6px; color: var(--subjects-lime); font-size: .75rem; }
.subjects-page .subjects-hero-proof { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 27px; color: rgba(255,255,255,.74); font-size: .72rem; font-weight: 600; }
.subjects-page .subjects-hero-proof i { margin-right: 5px; color: var(--subjects-lime); }

/* CSS-only lesson illustration */
.subjects-page .subjects-hero-visual { position: relative; z-index: 2; }
.subjects-page .subjects-learning-art { position: relative; width: min(100%,610px); aspect-ratio: 1.22; margin: 0 auto; container-type: inline-size; }
.subjects-page .subjects-art-orbit { position: absolute; inset: 14% 7%; border: 1px solid rgba(163,187,255,.17); border-radius: 50%; transform: rotate(-18deg); }
.subjects-page .subjects-lesson-window { position: absolute; top: 19%; left: 12%; width: 76%; overflow: hidden; border: 1px solid #91a5ce; border-radius: 3cqw; background: linear-gradient(145deg,#26364f,#0b1729 64%,#142432); box-shadow: 0 26px 58px rgba(0,0,0,.4),0 0 38px rgba(112,139,230,.13); transform: perspective(1000px) rotateY(-6deg) rotateZ(-4deg); }
.subjects-page .subjects-window-top { display: flex; height: 9cqw; min-height: 30px; align-items: center; justify-content: space-between; gap: 1.5cqw; padding: 0 2.5cqw; border-bottom: 1px solid rgba(255,255,255,.1); color: #d0dbed; }
.subjects-page .subjects-window-top > span { display: flex; gap: .8cqw; }
.subjects-page .subjects-window-top > span i { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: #fa7b71; }
.subjects-page .subjects-window-top > span i:nth-child(2) { background: #f7c95b; }
.subjects-page .subjects-window-top > span i:nth-child(3) { background: #74d88a; }
.subjects-page .subjects-window-top small { color: #d0dbed; font-size: 1.8cqw; }
.subjects-page .subjects-window-top b { display: inline-flex; align-items: center; gap: .8cqw; color: #d9f29d; font-size: 1.45cqw; }
.subjects-page .subjects-window-top b i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: var(--subjects-lime); box-shadow: 0 0 8px var(--subjects-lime); }
.subjects-page .subjects-window-content { position: relative; display: flex; min-height: 43cqw; padding: 3cqw 3cqw 3cqw 11cqw; }
.subjects-page .subjects-tool-rail { position: absolute; top: 3cqw; bottom: 3cqw; left: 2.5cqw; display: flex; width: 5.5cqw; flex-direction: column; align-items: center; justify-content: space-around; border: 1px solid rgba(255,255,255,.1); border-radius: 1.6cqw; background: rgba(255,255,255,.05); color: #c5d1e5; font-size: 2cqw; }
.subjects-page .subjects-lesson-board { flex: 1; padding: 3cqw 3.5cqw; border-radius: 1.8cqw; background: #f2f3eb; color: #14223e; }
.subjects-page .subjects-lesson-board > small { display: block; margin-bottom: .7cqw; color: #596f1b; font-size: 1.6cqw; font-weight: 800; letter-spacing: .1em; }
.subjects-page .subjects-lesson-board > strong { display: block; font-family: Outfit,sans-serif; font-size: 3.6cqw; line-height: 1.05; }
.subjects-page .subjects-math-visual { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.subjects-page .subjects-math-visual svg { width: 52%; max-height: 26cqw; overflow: visible; }
.subjects-page .subjects-math-visual svg path:first-child { fill: #fbfcf7; stroke: #14223e; stroke-width: 2.7; stroke-linejoin: round; }
.subjects-page .subjects-math-visual svg .subjects-triangle-accent { fill: none; stroke: #c6e96c; stroke-width: 8; stroke-linecap: round; }
.subjects-page .subjects-math-visual svg text { fill: #14223e; font: italic 21px Georgia,serif; }
.subjects-page .subjects-math-visual > span { padding: 1.2cqw; border-radius: 1cqw; background: #e5eece; color: #263957; font-family: Georgia,serif; font-size: 1.9cqw; font-style: italic; white-space: nowrap; }
.subjects-page .subjects-window-bottom { display: flex; min-height: 7cqw; align-items: center; justify-content: center; gap: 6cqw; border-top: 1px solid rgba(255,255,255,.1); color: #c7d2e6; font-size: 1.7cqw; }
.subjects-page .subjects-window-bottom span { display: inline-flex; align-items: center; gap: 1.3cqw; }
.subjects-page .subjects-window-bottom i { font-size: 1.3cqw; }
.subjects-page .subjects-floating-tag { position: absolute; z-index: 3; display: flex; min-width: 15cqw; min-height: 15cqw; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw; border: 1px solid rgba(220,253,125,.65); border-radius: 2.8cqw; background: linear-gradient(145deg,#17243b,#0a1425); color: #f2f5ff; box-shadow: 0 16px 30px rgba(0,0,0,.3); font-size: 2cqw; font-weight: 700; text-align: center; }
.subjects-page .subjects-floating-tag i { color: var(--subjects-lime); font-size: 4cqw; }
.subjects-page .subjects-tag-maths { top: 5%; left: 5%; transform: rotate(5deg); }
.subjects-page .subjects-tag-english { top: 3%; right: 3%; border-color: rgba(177,173,255,.7); transform: rotate(-7deg); }
.subjects-page .subjects-tag-english i { color: #b6b5ff; }
.subjects-page .subjects-tag-science { bottom: 5%; left: 4%; border-color: rgba(177,173,255,.7); transform: rotate(4deg); }
.subjects-page .subjects-tag-science i { color: #b6b5ff; }
.subjects-page .subjects-tag-computing { right: 3%; bottom: 3%; transform: rotate(-4deg); }

.subjects-page .subjects-trust-strip { position: relative; z-index: 2; padding: 17px 0; border-bottom: 1px solid rgba(16,42,86,.08); background: #fff; }
.subjects-page .subjects-trust-strip .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.subjects-page .subjects-trust-strip span { display: inline-flex; align-items: center; gap: 9px; color: #28364c; font-size: .76rem; font-weight: 700; }
.subjects-page .subjects-trust-strip i { color: var(--subjects-blue); }

.subjects-page .subjects-overview { padding: clamp(4.5rem,8vw,7rem) 0; background: #fff; }
.subjects-page .subjects-overview .row { row-gap: 2rem; }
.subjects-page .subjects-visual { position: relative; max-width: 510px; margin: 0 auto; }
.subjects-page .subjects-visual::before { position: absolute; z-index: 0; inset: 5% 3% 2%; border-radius: 48% 52% 45% 55%; background: #f2fbd5; content: ""; }
.subjects-page .subjects-visual figure { position: relative; z-index: 1; }
.subjects-page .subjects-visual img { display: block; width: 100%; max-height: 440px; object-fit: contain; }
.subjects-page .subjects-copy { max-width: 570px; }
.subjects-page .subjects-copy h6, .subjects-page .subjects-grid-section h6 { display: inline-flex; margin-bottom: 12px; padding: 6px 12px; border: 1px solid rgba(36,72,189,.12); border-radius: 999px; background: #f4f6ff; color: var(--subjects-blue); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.subjects-page .subjects-copy h2, .subjects-page .subjects-grid-section h2 { margin-bottom: 15px; color: var(--subjects-ink); font-size: clamp(2.1rem,4vw,3.25rem); font-weight: 400; line-height: 1.04; letter-spacing: -.045em; }
.subjects-page .subjects-copy > p { color: var(--subjects-muted); }
.subjects-page .subjects-copy ul { margin-top: 20px; }
.subjects-page .subjects-copy ul li { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 12px; }
.subjects-page .subjects-copy ul li > i { display: grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; margin-top: 2px; border-radius: 50%; background: var(--subjects-lime); color: #496116; font-size: .65rem; }
.subjects-page .subjects-copy ul li p { color: #36465c; font-size: .9rem; }

.subjects-page .subjects-grid-section { padding: clamp(4.5rem,8vw,7rem) 0; background: #f8f9fc; }
.subjects-page .subjects-grid-section > .container > .row:first-child { margin-bottom: 28px; }
.subjects-page .subjects-grid-section .subject-lead { color: var(--subjects-muted); }
.subjects-page .subject-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 0; }
.subjects-page .subject-grid > [class*="col-"] { width: auto; max-width: none; padding: 0; margin: 0 !important; }
.subjects-page .subject-card { position: relative; display: block; min-height: 450px; overflow: hidden; border: 1px solid rgba(16,42,86,.12); border-radius: 15px; background: #081225; box-shadow: 0 12px 30px rgba(8,18,37,.1); transition: transform .2s ease,box-shadow .2s ease; isolation: isolate; }
.subjects-page .subject-card::after { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg,rgba(8,18,37,0) 8%,rgba(8,18,37,.04) 32%,rgba(8,18,37,.62) 56%,rgba(8,18,37,.96) 78%,#081225 100%); content: ""; pointer-events: none; }
.subjects-page .subject-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(8,18,37,.18); }
.subjects-page .subject-image { position: absolute; z-index: 0; inset: 0; height: 100%; overflow: hidden; background: #eaf0fb; }
.subjects-page .subject-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .45s ease; }
.subjects-page .subject-card:hover .subject-image img { transform: scale(1.04); }
.subjects-page .subject-body { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; padding: 25px 22px 22px; color: #fff; }
.subjects-page .subject-body h3 { margin-bottom: 8px; color: #fff; font-size: 1.24rem; font-weight: 650; }
.subjects-page .subject-body > p { margin-bottom: 14px; color: rgba(255,255,255,.83); font-size: .81rem; line-height: 1.55; }
.subjects-page .subject-body ul { padding: 0; margin: 0 0 17px; list-style: none; }
.subjects-page .subject-body ul li { display: flex; gap: 8px; margin-top: 7px; color: rgba(255,255,255,.9); font-size: .72rem; line-height: 1.4; }
.subjects-page .subject-body ul li i { flex: 0 0 auto; margin-top: 4px; color: var(--subjects-lime); font-size: .66rem; }
.subjects-page .subject-body .primary_btn { display: inline-flex; width: 100%; min-height: 42px; align-items: center; justify-content: center; gap: 8px; margin-top: auto; padding: 0 12px; border: 1px solid var(--subjects-lime); border-radius: 8px; background: var(--subjects-lime); color: var(--subjects-ink); font-size: .75rem; font-weight: 800; }
.subjects-page .subject-body .primary_btn:hover { border-color: #fff; background: #fff; color: var(--subjects-ink); }

@media (max-width: 991px) {
  .subjects-page .subjects-hero { padding: 112px 0 38px; }
  .subjects-page .subjects-hero-copy h1 { max-width: 13ch; font-size: clamp(2.8rem,5.5vw,4rem); }
  .subjects-page .subjects-learning-art { max-width: 540px; }
  .subjects-page .subject-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .subjects-page .subjects-hero { min-height: 100vh; min-height: 100svh; padding: 108px 0 28px; }
  .subjects-page .subjects-hero-row { row-gap: 8px; }
  .subjects-page .subjects-hero-copy h1 { max-width: 13ch; font-size: clamp(2.8rem,10vw,4rem); }
  .subjects-page .subjects-learning-art { width: 94%; max-width: 470px; }
  .subjects-page .subjects-trust-strip .container { justify-content: center; flex-wrap: wrap; }
  .subjects-page .subjects-trust-strip span { width: calc(50% - 12px); font-size: .7rem; }
}
@media (max-width: 575px) {
  .subjects-page .subjects-hero { min-height: auto; padding-top: 105px; }
  .subjects-page .subjects-hero-kicker { font-size: .57rem; }
  .subjects-page .subjects-hero-copy h1 { font-size: clamp(2.55rem,11.5vw,3.6rem); }
  .subjects-page .subjects-hero-actions { gap: 14px; }
  .subjects-page .subjects-secondary-link { font-size: .76rem; }
  .subjects-page .subjects-hero-proof { gap: 7px 12px; font-size: .65rem; }
  .subjects-page .subjects-learning-art { width: 100%; }
  .subjects-page .subjects-floating-tag { min-width: 16cqw; min-height: 16cqw; }
  .subjects-page .subjects-trust-strip span { width: 100%; }
  .subjects-page .subject-grid { grid-template-columns: 1fr; gap: 13px; }
  .subjects-page .subject-card { min-height: 430px; }
  .subjects-page .subject-body { padding: 23px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .subjects-page *, .subjects-page *::before, .subjects-page *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
