:root {
  --navy: #08233f;
  --navy-soft: #17395c;
  --green: #13795b;
  --green-dark: #0b5f49;
  --gold: #d39a2c;
  --cream: #f7f4ed;
  --white: #ffffff;
  --ink: #14202b;
  --muted: #5f6d78;
  --line: #dde5e3;
  --shadow: 0 22px 60px rgba(8, 35, 63, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-weight: 800;
  font-size: 1rem;
}

.brand img,
.site-footer img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 36px);
  color: var(--navy-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a:hover,
.portal-link:hover {
  color: var(--green);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  gap: 4px;
  padding: 10px;
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.portal-link {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: center;
  min-height: calc(100vh - 79px);
  padding: clamp(44px, 7vw, 96px) clamp(20px, 5vw, 72px) 42px;
  overflow: hidden;
}

.hero-copy {
  max-width: 660px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--navy);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.02;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.6rem, 8vw, 7.6rem);
}

.hero-lede {
  margin-bottom: 20px;
  color: var(--green-dark);
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
  font-weight: 800;
  line-height: 1.18;
}

.hero-text,
.program-strip > div:first-child p,
.life-copy p,
.admissions-section p,
.site-footer p {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 0.93rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 14px 28px rgba(19, 121, 91, 0.24);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--navy);
  border: 1px solid var(--line);
}

.button.light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.26);
}

.hero-visual {
  position: relative;
  min-height: 560px;
}

.photo-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(8, 35, 63, 0.18), transparent 45%),
    linear-gradient(25deg, #e9f2ee, #ffffff 45%, #f6e8c8);
  box-shadow: var(--shadow);
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: 8%;
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(8, 35, 63, 0.1) 16% 17%, transparent 17% 33%, rgba(8, 35, 63, 0.1) 33% 34%, transparent 34%),
    linear-gradient(#cde2da 0 18%, #f8fbf9 18% 72%, #d7b36b 72%);
  border-radius: 6px;
}

.photo-frame img {
  position: relative;
  z-index: 2;
  width: min(46%, 270px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 10px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 26px 55px rgba(8, 35, 63, 0.24);
}

.photo-card {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 2px;
  width: 148px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(8, 35, 63, 0.15);
}

.photo-card strong {
  color: var(--navy);
  font-size: 1.02rem;
}

.photo-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.card-one {
  left: 30px;
  bottom: 84px;
}

.card-two {
  right: 28px;
  top: 82px;
}

.program-strip {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  padding: 72px clamp(20px, 5vw, 72px);
  background: var(--cream);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.3rem, 4vw, 4rem);
}

.program-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.program-list article {
  padding: 24px;
  background: var(--white);
  border: 1px solid rgba(8, 35, 63, 0.08);
  border-radius: 8px;
}

.program-list span {
  color: var(--gold);
  font-weight: 900;
}

h3 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 1.35rem;
}

.program-list p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.feature-grid,
.news-section,
.archive-list,
.post-page,
.contact-layout,
.admin-shell {
  padding: 78px clamp(20px, 5vw, 72px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: var(--white);
}

.section-intro {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.section-intro p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.section-intro a,
.archive-list article > a {
  color: var(--green);
  font-weight: 900;
}

.feature-grid article,
.news-list article,
.archive-list article,
.admin-panel,
.enquiry-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.feature-grid article {
  padding: 24px;
}

.news-section {
  background: var(--cream);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.news-list article {
  padding: 26px;
}

.meta {
  margin-bottom: 10px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.page-hero {
  padding: 82px clamp(20px, 5vw, 72px);
  background: var(--cream);
}

.page-hero h1,
.contact-layout h1,
.post-page h1,
.admin-heading h1 {
  margin-bottom: 18px;
  color: var(--navy);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.9rem, 6vw, 5.8rem);
  line-height: 1.04;
}

.page-hero p,
.contact-layout > div > p,
.post-body {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.archive-list {
  display: grid;
  gap: 18px;
}

.archive-list article {
  padding: 28px;
}

.archive-list h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
}

.news-archive {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 36px;
  padding-bottom: 52px;
}

.news-archive article {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 14px;
}

.news-archive .post-image {
  height: 150px;
  margin: 0 0 12px;
  border-radius: 6px;
}

.news-archive .meta {
  margin-bottom: 6px;
  font-size: 0.7rem;
}

.news-archive h2 {
  margin-bottom: 7px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.news-archive article > p:not(.meta) {
  display: -webkit-box;
  margin-bottom: 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-archive article > a {
  margin-top: auto;
  font-size: 0.85rem;
}

.post-page {
  max-width: 980px;
  margin: 0 auto;
}

.post-image {
  width: 100%;
  max-height: 460px;
  margin: 18px 0 28px;
  border-radius: 8px;
  object-fit: cover;
}

.comments-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px) 78px;
}

.comments-heading,
.admin-section-heading,
.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.comments-heading {
  margin-bottom: 18px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.comments-heading h2,
.admin-section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.comments-heading > span,
.admin-section-heading > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-list,
.comment-moderation-list {
  display: grid;
  gap: 10px;
}

.comment-card,
.moderation-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.comment-meta span,
.comment-post-link {
  color: var(--muted);
  font-size: 0.78rem;
}

.comment-post-link {
  display: inline-block;
  margin-top: 5px;
  color: var(--green-dark);
  font-weight: 800;
}

.comment-rating {
  margin: 7px 0;
  color: var(--gold);
  letter-spacing: 2px;
}

.comment-card p,
.moderation-card p,
.comments-empty {
  margin: 8px 0 0;
  line-height: 1.55;
}

.comment-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.comment-form h3,
.comment-form p {
  margin: 0;
}

.comment-form > .button {
  justify-self: start;
}

.comment-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.admin-section-heading {
  margin-bottom: 14px;
}

.moderation-card {
  border-left: 4px solid var(--gold);
}

.moderation-card.status-approved {
  border-left-color: var(--green);
}

.moderation-card.status-rejected {
  border-left-color: #9d2821;
  opacity: 0.8;
}

.moderation-actions {
  margin-top: 10px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(32px, 6vw, 82px);
  align-items: start;
}

.contact-note {
  display: grid;
  gap: 8px;
  max-width: 460px;
  margin-top: 28px;
  padding: 20px;
  border-left: 5px solid var(--gold);
  background: var(--cream);
}

.contact-note span {
  color: var(--muted);
  line-height: 1.6;
}

.contact-form,
.admin-form {
  display: grid;
  gap: 16px;
}

.contact-form,
.admin-panel {
  padding: 28px;
  box-shadow: 0 18px 45px rgba(8, 35, 63, 0.08);
}

label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.notice {
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 800;
}

.notice.success {
  background: #e7f6ef;
  color: var(--green-dark);
}

.notice.error {
  background: #fdeceb;
  color: #9d2821;
}

.admin-shell {
  display: grid;
  gap: 24px;
  background: #f5f8f7;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.admin-heading p {
  color: var(--muted);
  line-height: 1.65;
}

.admin-panel h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.admin-table,
.enquiry-list {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.admin-row span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
}

.posts-admin-table {
  gap: 0;
}

.posts-admin-table .admin-row {
  min-height: 46px;
  gap: 10px;
  padding: 8px 0;
}

.posts-admin-table .admin-row strong {
  display: block;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.posts-admin-table .admin-row span {
  margin-top: 2px;
  font-size: 0.76rem;
}

.posts-admin-table .row-actions {
  gap: 8px;
  font-size: 0.82rem;
}

.row-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.row-actions a,
.row-actions button {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.enquiry-list article {
  padding: 22px;
}

.saved-reply {
  margin: 16px 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--muted);
  line-height: 1.6;
}

.reply-form {
  display: grid;
  gap: 12px;
}

.media-grid,
.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.media-grid article,
.post-gallery figure {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.media-grid img,
.post-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.compact-media {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.gallery-edit-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.post-gallery figcaption,
.media-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.life-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1fr;
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  padding: 86px clamp(20px, 5vw, 72px);
}

.life-image {
  min-height: 420px;
  border-radius: 8px;
  background: #eef6f2;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.classroom-scene {
  position: relative;
  height: 420px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.7), transparent 55%),
    linear-gradient(90deg, #f7fbf8 0 48%, #dceee8 48% 100%);
}

.classroom-scene::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 16%;
  height: 92px;
  border-radius: 6px;
  background: var(--green);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,0.14);
}

.classroom-scene::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 34%;
  background: linear-gradient(90deg, #d9b36b, #f0d28e);
  clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 100%);
}

.classroom-scene span {
  position: absolute;
  bottom: 20%;
  width: 54px;
  height: 86px;
  border-radius: 28px 28px 8px 8px;
  background: var(--navy);
}

.classroom-scene span:nth-child(1) { left: 18%; background: var(--green-dark); }
.classroom-scene span:nth-child(2) { left: 38%; }
.classroom-scene span:nth-child(3) { right: 32%; background: var(--gold); }
.classroom-scene span:nth-child(4) { right: 14%; background: var(--navy-soft); }

.life-copy {
  max-width: 650px;
}

.life-copy dl {
  display: grid;
  gap: 18px;
  margin: 30px 0 0;
}

.life-copy dl div {
  padding-left: 18px;
  border-left: 4px solid var(--gold);
}

.life-copy dt {
  margin-bottom: 6px;
  color: var(--navy);
  font-weight: 900;
}

.life-copy dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.admissions-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 64px clamp(20px, 5vw, 72px);
  background: var(--navy);
}

.admissions-section h2,
.site-footer h2 {
  color: var(--white);
}

.admissions-section p {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
}

.site-footer {
  display: grid;
  grid-template-columns: 0.7fr 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 42px clamp(20px, 5vw, 72px);
  background: #061a30;
  color: var(--white);
}

.recent-posts-dock {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 900;
  width: min(310px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid rgba(25, 135, 84, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 38px rgba(20, 53, 40, .18);
  backdrop-filter: blur(12px);
}

.recent-posts-dock__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  color: #fff;
  background: #173d2e;
  font-size: 13px;
  font-weight: 700;
}

.recent-posts-dock__heading a {
  color: #cce9db;
  font-size: 11px;
  text-decoration: none;
}

.recent-posts-dock__list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #173d2e;
  text-decoration: none;
  border-bottom: 1px solid #edf3f0;
}

.recent-posts-dock__list a:last-child { border-bottom: 0; }
.recent-posts-dock__list a:hover { background: #f3faf6; }
.recent-posts-dock__list strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-posts-dock__list small { color: #6b8177; font-size: 10px; }

@media (max-width: 600px) {
  .recent-posts-dock {
    left: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    border-radius: 13px;
  }
  .recent-posts-dock__list a:nth-child(n+3) { display: none; }
}

.site-footer > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-footer h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.site-footer p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    gap: 12px;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 14px;
    border-radius: 6px;
  }

  .site-nav a:hover {
    background: var(--cream);
  }

  .nav-toggle {
    display: grid;
  }

  .hero,
  .program-strip,
  .life-section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-visual {
    min-height: 440px;
  }

  .program-list {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .news-list,
  .news-archive,
  .contact-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admissions-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-intro,
  .admin-heading,
  .admin-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .brand span {
    max-width: 132px;
    line-height: 1.1;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .portal-link {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  h1 {
    font-size: 3.3rem;
  }

  .hero {
    padding: 34px 16px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .comments-heading,
  .admin-section-heading,
  .comment-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .comment-form > .button,
  .footer-actions {
    width: 100%;
  }

  .hero-visual {
    min-height: 360px;
  }

  .news-archive {
    padding: 24px 16px 40px;
  }

  .news-archive article {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 12px;
  }

  .news-archive .post-image {
    grid-row: 1 / span 4;
    width: 96px;
    height: 96px;
    margin: 0;
  }

  .news-archive article > a {
    margin-top: 0;
  }

  .posts-admin-table .admin-row strong {
    white-space: normal;
  }

  .photo-card {
    width: 122px;
    padding: 12px 14px;
  }

  .card-one {
    left: 14px;
    bottom: 42px;
  }

  .card-two {
    right: 12px;
    top: 38px;
  }

  .program-strip,
  .life-section,
  .admissions-section,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}
