:root {
  --primary: #0052cc;
  --primary-dark: #003d99;
  --accent: #f6b800;
  --bg: #f5f7fb;
  --text-main: #222222;
  --text-muted: #666666;
  --white: #ffffff;
  --border-radius: 8px;
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Fix layout shift when pages with scrollbars are opened */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- MODERN HEADER + NAV --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.92)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
}

/* full-width header container */
.site-header .container {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* Spread logo and nav to left/right */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 4vw;
  gap: 1.5rem;
  min-height: 64px; /* keep header height fixed */
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
}

/* BIGGER name, keep on one line */
.logo-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f9fafb;
  white-space: nowrap;
}

.logo-text .tagline {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* tighter nav pills */
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
}

.main-nav li {
  position: relative;
}

/* BASE: lock dimensions for all states (no shifting) */
.main-nav a,
.main-nav a:visited,
.main-nav a:hover,
.main-nav a.active {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.3rem 0.8rem;
  border-radius: 999px;

  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;

  font-weight: 500;
  line-height: 1;
  height: 28px; /* same for all states */

  text-decoration: none;
  box-sizing: border-box;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

/* default state */
.main-nav a {
  color: #e5e7eb;
  background: transparent;
}

/* hover state – only color/background change, no move */
.main-nav a:hover {
  color: #ffffff;
  background: rgba(248, 250, 252, 0.09);
}

/* active tab – same size as normal so no shifting */
.main-nav a.active {
  color: #f9fafb;
  background: linear-gradient(135deg, var(--primary), #22c55e);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.5);
}

/* ------------ HERO ------------ */

.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 3rem 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.hero .hero-text h2 {
  font-size: 3rem;
  line-height: 1.1;
}

.hero .hero-text p {
  font-size: 1.5rem;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  min-height: 260px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero-slide img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.hero-slide.active {
  opacity: 1;
  position: relative;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent);
  color: #000;
}

.btn-outline {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

/* Sections */

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* VMV + QUICKLINKS BACKGROUND */

.vmv-quicklinks-bg {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.vmv-quicklinks-bg-image {
  position: absolute;
  inset: 0;
  background-image: url("../images/BACK1.jpg");
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  transform: scale(1.05);
  z-index: 0;
}

.vmv-quicklinks-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0.5;
}

.vmv-quicklinks-content {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
}

.vmv {
  padding: 0 0 3rem;
}

.vmv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.vmv-card {
  background-color: rgba(0, 0, 0, 0.25);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

.vmv .section-title {
  color: #ffffff;
}

.vmv .vmv-card h3,
.vmv .vmv-card p,
.vmv .vmv-card li {
  color: #ffffff;
}

.vmv-card h3 {
  margin-bottom: 0.75rem;
}

.vmv-card ul {
  margin-left: 1rem;
}

/* HIGHLIGHTS */

.highlights {
  padding: 2rem 0 3rem;
}

.highlights .section-title {
  color: #ffffff;
}

.highlights .highlight-card h3,
.highlights .highlight-card p {
  color: #ffffff;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.highlight-card {
  background-color: rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

/* Global hover lift on cards */

.highlight-card,
.news-item,
.programme-card,
.class-card,
.staff-card,
.admissions-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.highlight-card:hover,
.news-item:hover,
.programme-card:hover,
.class-card:hover,
.staff-card:hover,
.admissions-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

/* PROGRAMMES OFFERED */

.programmes-offered {
  padding: 0 0 3rem;
  text-align: center;
}

.programmes-offered .section-title {
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-block;
  padding: 0.6rem 2rem;
  margin: 0 auto 1.5rem;
  border: 2px solid #000000;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.9),
    0 10px 18px rgba(0, 0, 0, 0.8);
  text-shadow:
    0 2px 0 #000000,
    0 4px 6px rgba(0, 0, 0, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.programmes-offered .section-title:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.9),
    0 14px 24px rgba(0, 0, 0, 0.9);
}

.programmes-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

@media (min-width: 992px) {
  .programmes-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 991.98px) {
  .programmes-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.programme-card {
  background-color: rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.programme-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
}

.programme-card h3 {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.programmes-section {
  padding: 2rem 0 3rem;
}

.programmes-section h3 {
  margin-bottom: 0.75rem;
}

.programmes-section p {
  margin-bottom: 1.5rem;
}

.programme-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Class buttons / modal */

.class-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.class-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  opacity: 0.95;
}

.class-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1200;
}

.class-modal.is-open {
  display: flex;
}

.class-modal-dialog {
  background: #fff;
  max-width: 480px;
  width: 90%;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.class-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.class-modal h3 {
  margin-bottom: 0.5rem;
}

.class-modal h4 {
  margin: 0.75rem 0 0.5rem;
}

#classModalSubjects {
  padding-left: 1.25rem;
}

#classModalSubjects li {
  margin-bottom: 0.25rem;
}

/* NEWS PREVIEW */

.news-preview {
  padding: 3rem 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.news-item {
  background-color: var(--white);
  padding: 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

.news-item h3 {
  margin-bottom: 0.5rem;
}

.news-date {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section-cta {
  margin-top: 1.5rem;
  text-align: center;
}

/* -------------------------------------------------- */
/* ADMISSIONS POSTS GRID                              */
/* -------------------------------------------------- */

.admissions-section {
  padding: 2rem 0 3rem;
}

.admissions-section .section-title {
  text-align: center;
  margin-bottom: 1.75rem;
}

/* 4 cards in a row on large screens */
.admissions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.admissions-card {
  background-color: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.admissions-card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.admissions-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.admissions-card-body h3 {
  font-size: 1.05rem;
  margin: 0;
}

.admissions-card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admissions-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.admissions-card-btn {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.85rem;
  padding: 0.45rem 1.1rem;
}

/* Admissions grid responsiveness: 4 → 3 → 2 → 1 */

@media (max-width: 1200px) {
  .admissions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admissions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .admissions-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------- */
/* GENERIC PAGE LAYOUT                                */
/* -------------------------------------------------- */

.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero.hero-blur-background {
  position: relative;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
  padding: 3.5rem 0 2.5rem;
}

.page-hero.hero-blur-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/CAM1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px);
  transform: scale(1.08);
  z-index: 0;
}

.page-hero.hero-blur-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0.5;
}

.page-hero.hero-blur-background .container {
  position: relative;
  z-index: 1;
}

.page-hero.hero-blur-background h2 {
  font-size: 2.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.page-hero.hero-blur-background p {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-section {
  padding: 2rem 0 3rem;
}

.two-column-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.class-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

.class-header h4 {
  margin-bottom: 0.25rem;
}

.class-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.form-master-profile {
  display: flex;
  gap: 0.75rem;
}

.form-master-profile img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.teacher-name {
  font-weight: 600;
}

.teacher-role {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FOOTER */

.site-footer {
  background-color: #0f172a;
  color: #e5e7eb;
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.footer-grid h3,
.footer-grid h4 {
  margin-bottom: 0.75rem;
}

.footer-grid a {
  color: #e5e7eb;
}

.footer-grid a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Footer admin login button */
.site-footer .footer-admin{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap: .8rem;
}
.site-footer .footer-login-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #0b1220;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transition: transform .18s ease, filter .18s ease;
}
.site-footer .footer-login-btn:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
}
@media (max-width: 700px){
  .site-footer .footer-admin{ align-items:flex-start; }
}


/* HEADER / NAV RESPONSIVE */

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: flex-start;
    background: rgba(15, 23, 42, 0.9);
  }
}

/* GALLERY */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.gallery-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

/* STAFF GRID */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.staff-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  text-align: center;
}

.staff-card img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
}

.staff-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.staff-title {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ABOUT PAGE – BLURRED BACKGROUND */

body.about-page main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #ffffff;
}

body.about-page main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/about.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px);
  transform: scale(1.05);
  z-index: 0;
}

body.about-page main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0.5;
}

body.about-page main > * {
  position: relative;
  z-index: 1;
}

body.about-page .two-column-inner {
  background-color: rgba(0, 0, 0, 0.35);
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

body.about-page .vmv-card {
  background-color: rgba(0, 0, 0, 0.35);
}

/* GALLERY PAGE – BLURRED BACKGROUND */

body.gallery-page main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

body.gallery-page main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/CAM1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px);
  transform: scale(1.05);
  z-index: 0;
}

body.gallery-page main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0.5;
}

body.gallery-page main > * {
  position: relative;
  z-index: 1;
}

body.gallery-page .page-hero h2,
body.gallery-page .page-hero p,
body.gallery-page .page-section h3,
body.gallery-page .page-section p {
  color: #ffffff;
}

body.gallery-page .gallery-item {
  background-color: rgba(255, 255, 255, 0.92);
}

.gallery-item img {
  transition: transform 0.25s ease;
  transform: scale(1.05);
}

.gallery-item:hover img {
  transform: scale(0.95);
}

/* IMAGE MODAL */

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  padding-top: 60px;
}

.image-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

#image-modal-caption {
  margin: 1rem auto 0;
  text-align: center;
  color: #f1f1f1;
  max-width: 80%;
  font-size: 0.95rem;
}

.image-modal-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #ffffff;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
}

/* GALLERY / STAFF PAGE HERO */

body.gallery-page .page-hero,
body.staff-page .page-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
}

body.gallery-page .page-hero .container,
body.staff-page .page-hero .container {
  width: 100%;
}

body.gallery-page .page-hero h2,
body.staff-page .page-hero h2 {
  font-size: 4.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

body.gallery-page .page-hero p,
body.staff-page .page-hero p {
  font-size: 1.3rem;
  letter-spacing: 0.08em;
}

/* PROGRAMMES PAGE – BLURRED BACKGROUND */

body.programmes-page main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

body.programmes-page main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/BACK1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(16px);
  transform: scale(1.07);
  z-index: 0;
}

body.programmes-page main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0.5;
}

body.programmes-page main > * {
  position: relative;
  z-index: 1;
}

body.programmes-page .page-hero p,
body.programmes-page .programmes-section h3,
body.programmes-page .programmes-section p {
  color: #ffffff;
}

body.programmes-page .page-hero {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
}

body.programmes-page .page-hero .container {
  width: 100%;
}

body.programmes-page .page-hero h2 {
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-shadow:
    0 2px 0 #002455,
    0 4px 0 #001633,
    0 6px 10px rgba(0, 0, 0, 0.55);
}

body.programmes-page .page-hero p {
  max-width: 800px;
  margin: 0.75rem auto 0;
}

/* -------------------------------------------------- */
/* CONTACT PAGE                                      */
/* -------------------------------------------------- */

body.contact-page .page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  text-align: center;
  padding: 3rem 0 2.25rem;
}

body.contact-page .page-hero h2 {
  font-size: 2.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

body.contact-page .page-hero p {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.contact-section {
  padding: 2.5rem 0 3.25rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-right {
  display: flex;
}

.contact-right > * {
  width: 100%;
}

.contact-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.75rem;
}

.contact-card h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.contact-card p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.contact-card .label {
  font-weight: 600;
  display: inline-block;
  min-width: 140px;
}

.contact-card a {
  color: var(--primary);
}

.map-card .map-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.map-card .map-header h3 {
  margin-bottom: 0;
}

.map-link {
  font-size: 0.85rem;
  color: #1a73e8;
  white-space: nowrap;
}

.map-link:hover {
  text-decoration: underline;
}

.map-embed {
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #e5e7eb;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact form */

.contact-form label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font: inherit;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
  background-color: #ffffff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #5c8df6;
  box-shadow: 0 0 0 2px rgba(92, 141, 246, 0.25);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

body.contact-page .btn-primary {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  background-color: var(--primary);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

body.contact-page .btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/* Responsive contact layout */

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------- */
/* NEWS FILTER FORM – search + category              */
/* -------------------------------------------------- */

.news-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.news-filter-form input[type="text"],
.news-filter-form select {
  font: inherit;
  background-color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.news-filter-form .btn {
  white-space: nowrap;
}

/* -------------------------------------------------- */
/* ADMISSIONS TOGGLE SWITCH (ADMIN DASHBOARD)        */
/* -------------------------------------------------- */

.toggle-form .toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* Outer wrapper of the switch */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

/* Hide the default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The pill / track */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db; /* gray when OFF */
  transition: 0.4s;
  border-radius: 999px;
}

/* The round knob */
.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background-color: #ffffff;
  transition: 0.4s;
  border-radius: 50%;
}

/* Rounded style */
.slider.round {
  border-radius: 999px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Checked (ON) state */
.switch input:checked + .slider {
  background-color: #22c55e; /* green when ON */
}

/* Move knob to the right when ON */
.switch input:checked + .slider:before {
  transform: translateX(24px);
}

/* Optional focus outline */
.switch input:focus + .slider {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* -------------------------------------------------- */
/* ADMISSIONS PAGE – FULL BLURRED BACKGROUND         */
/* -------------------------------------------------- */

body.admissions-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

body.admissions-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../images/admissions-bg.jpg"); /* change if needed */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(10px);
  transform: scale(1.08);
  z-index: -2;
}

body.admissions-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: -1;
}

/* make sure content sits above background */
body.admissions-page .site-header,
body.admissions-page .page-main,
body.admissions-page .site-footer {
  position: relative;
  z-index: 1;
}

/* Admissions hero text in white (when using hero-blur-background) */
body.admissions-page .page-hero.hero-blur-background h2,
body.admissions-page .page-hero.hero-blur-background p {
  color: #ffffff;
}




/* ===================================================== */
/* PAGE VERTICAL STABILITY FIX (Stop pages moving up/down) */
/* ===================================================== */
/* Lock header height and give every page the same top spacing under the sticky header */
:root{
  --header-height: 64px; /* must match .header-inner min-height */
}

/* Ensure header never changes height between pages */
.site-header{
  min-height: var(--header-height);
}
.header-inner{
  min-height: var(--header-height);
}

/* Add consistent breathing space below sticky header so pages align like Home */
main{
  padding-top: 18px;
}

/* If any page sets main/hero to start at the very top, keep it consistent */
.page-hero{
  margin-top: 0;
}

/* ===================================================== */
/* NAV STABILITY FIX – PREVENT TAB REARRANGEMENT (FINAL) */
/* ===================================================== */

/* Lock nav to a single row on desktop so tabs never reorder */
@media (min-width: 769px) {
  .main-nav ul {
    flex-wrap: nowrap;
  }
}

/* Ensure active tab never changes size */
.main-nav a,
.main-nav a.active {
  min-width: max-content;
  box-sizing: border-box;
}

/* Ensure page-specific body classes NEVER affect header/nav */
body.about-page .site-header,
body.programmes-page .site-header,
body.gallery-page .site-header,
body.staff-page .site-header,
body.contact-page .site-header,
body.news-page .site-header,
body.parents-students-page .site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}



/* ===== REMOVE LOGIN BUTTON FROM FOOTER (ABOUT, STAFF, GALLERY) ===== */
body.about-page footer .login-btn,
body.about-page footer .login-button,
body.about-page footer .admin-login,

body.staff-page footer .login-btn,
body.staff-page footer .login-button,
body.staff-page footer .admin-login,

body.gallery-page footer .login-btn,
body.gallery-page footer .login-button,
body.gallery-page footer .admin-login {
  display: none !important;
}

/* -------------------------------------------------- */
/* HOME: LATEST POST (Unified feed cards)             */
/* -------------------------------------------------- */
.latest-posts-grid-auto{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1000px){
  .latest-posts-grid-auto{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .latest-posts-grid-auto{ grid-template-columns: 1fr; }
}

.latest-card-auto{
  background:#ffffff;
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 12px 28px rgba(15,23,42,.10);
  border: 1px solid rgba(148,163,184,.35);
  display:flex;
  flex-direction:column;
}

.latest-card-img img{
  width:100%;
  height: 180px;
  object-fit: cover;
  display:block;
  background:#f1f5f9;
}

/* tighter white space below image */
.latest-card-body{
  padding: 10px 12px 12px;
}

.latest-card-title{
  margin: 2px 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  color:#0f172a;
}

.latest-card-date{
  font-size: .88rem;
  color:#64748b;
  margin-bottom: 6px;
}

/* clamp text so the white area stays small */
.latest-card-snippet{
  font-size:.92rem;
  color:#475569;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-card-footer{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.latest-card-chip{
  display:inline-flex;
  padding: 6px 10px;
  border-radius:999px;
  background: rgba(0,82,204,.08);
  color:#1d4ed8;
  font-size:.72rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight: 900;
}

.latest-card-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent);
  color:#111827;
  text-decoration:none;
  font-weight: 900;
}
.latest-card-btn:hover{
  filter: brightness(1.03);
  text-decoration: none;
}


/* HOME PAGE: floating footer login button (shows only when footer is visible) */
.footer-login-float{
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 2000;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 18px;
  border-radius: 999px;

  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #0b1220;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;

  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 44px rgba(0,0,0,.35);

  text-decoration: none;

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}
.footer-login-float.is-visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.footer-login-float:hover{
  filter: brightness(1.05);
  text-decoration: none;
}
@media (max-width: 520px){
  .footer-login-float{
    right: 16px;
    bottom: 16px;
    padding: 10px 14px;
    letter-spacing: .12em;
  }
}
