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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-body, #0a1f1a);
  color: var(--text-light);
  scroll-behavior: smooth;
  line-height: 1.5;
  overflow-x: hidden;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Premium Dark Green Theme */
:root,
[data-theme="dark"] {
  --primary: #2d6a4f;
  --primary-dark: #1b4d3e;
  --primary-light: #40916c;
  --primary-glow: rgba(64, 145, 108, 0.4);
  --secondary: #52b788;
  --accent: #c9b16b;
  --bg-dark: #071e18;
  --bg-card: #0f2c24;
  --bg-elevated: #1a3a31;
  --bg-body: #0a1f1a;
  --text-light: #f0f7f4;
  --text-muted: #bdd9cf;
  --border-glow: rgba(82, 183, 136, 0.3);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(82, 183, 136, 0.2);
  --card-radius: clamp(18px, 4vw, 28px);
  --header-h: clamp(56px, 14vw, 76px);
  --container-pad-x: clamp(1rem, 4.2vw, 2.5rem);
  --section-pad-y: clamp(2.75rem, 7vw, 4.5rem);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --navbar-bg: rgba(7, 30, 24, 0.92);
  --navbar-scroll-bg: rgba(7, 30, 24, 0.96);
}

/* Light Theme */
[data-theme="light"] {
  --primary: #2d6a4f;
  --primary-dark: #1b4d3e;
  --primary-light: #40916c;
  --primary-glow: rgba(64, 145, 108, 0.2);
  --secondary: #2d6a4f;
  --accent: #a0872e;
  --bg-dark: #f5f9f7;
  --bg-card: #ffffff;
  --bg-elevated: #eef5f2;
  --bg-body: #f8faf9;
  --text-light: #1a3a31;
  --text-muted: #4a7a6a;
  --border-glow: rgba(45, 106, 79, 0.2);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(45, 106, 79, 0.1);
  --navbar-bg: rgba(255, 255, 255, 0.92);
  --navbar-scroll-bg: rgba(255, 255, 255, 0.96);
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
  width: 100%;
}

/* Glassmorphism Navbar - Mobile First with flex wrap */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: rgba(7, 30, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-glow);
  padding: calc(10px + var(--safe-top)) 0 10px;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  position: relative;
  z-index: 1002;
}

.logo {
  flex-shrink: 0;        /* never compress the brand */
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.05em;
  line-height: 1.15;
}

.logo-title {
  display: block;
  font-size: 1.15rem;    /* fixed — always visible */
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--secondary) 80%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;   /* keep on one line */
  overflow: visible;     /* never clip */
}

.logo-sub {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  font-weight: 500;
  white-space: nowrap;
  overflow: visible;
}

@media (min-width: 480px) {
  .logo-mark { width: 50px; height: 50px; }
  .logo-title { font-size: 1.3rem; }
}

@media (min-width: 1024px) {
  .logo-mark { width: 56px; height: 56px; }
  .logo-title { font-size: 1.55rem; }
  .logo-sub   { font-size: 0.65rem; }
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links li a {
  font-weight: 500;
  font-size: 0.8rem;
  transition: 0.3s;
  color: var(--text-light);
  position: relative;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--secondary);
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: 0.3s;
  border-radius: 2px;
}

.nav-links a:hover::before {
  width: 100%;
}

.nav-links a.nav-active {
  color: var(--secondary);
}

.nav-links a.nav-active::before {
  width: 100%;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-light);
  z-index: 1002;
  position: relative;
  margin-left: auto;
}

.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle::before {
  transform: translateY(-7px);
  box-shadow: 0 7px 0 currentColor;
}

.nav-toggle::after {
  transform: translateY(7px);
}

.nav-toggle.is-open::before {
  transform: translateY(0) rotate(45deg);
  box-shadow: none;
}

.nav-toggle.is-open::after {
  transform: translateY(0) rotate(-45deg);
}

.nav-panel {
  position: fixed;
  inset: 0;
  top: 0;
  padding: calc(var(--header-h) + var(--safe-top) + 12px) var(--container-pad-x)
    calc(24px + var(--safe-bottom));
  padding-left: calc(var(--container-pad-x) + var(--safe-left));
  padding-right: calc(var(--container-pad-x) + var(--safe-right));
  background: rgba(7, 30, 24, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.nav-panel.is-open {
  transform: translateX(0);
}

.nav-backdrop {
  display: none;
}

@keyframes navBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Mobile / tablet: slide-out drawer + backdrop */
@media (max-width: 1023px) {
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.52);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: navBackdropIn 0.22s ease;
  }

  .navbar--menu-open {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  }

  .nav-panel {
    width: min(100%, 22rem);
    max-width: 100vw;
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    height: 100dvh;
    min-height: -webkit-fill-available;
    box-shadow: -10px 0 36px rgba(0, 0, 0, 0.4);
    border-left: 1px solid var(--border-glow);
  }

  .nav-panel:not(.is-open) {
    pointer-events: none;
  }

  .nav-panel.is-open {
    pointer-events: auto;
  }

  .nav-panel .nav-links {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    gap: 0.15rem;
  }

  .nav-panel .nav-links > li {
    width: 100%;
    max-width: 100%;
  }

  .nav-panel .nav-links > li > a:not(.btn-outline) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.35rem 0;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  }

  .nav-auth {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(82, 183, 136, 0.15);
  }

  .nav-auth .btn-outline {
    min-height: 44px;
    padding: 10px 20px;
    width: 100%;
    max-width: 100%;
  }

  .nav-toggle,
  .nav-dropdown-trigger {
    touch-action: manipulation;
  }
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 44px;
  border: none;
  background: none;
  font: inherit;
  font-weight: 500;
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem 0;
  text-align: left;
  transition: color 0.3s;
}

.nav-dropdown-trigger:hover {
  color: var(--secondary);
}

.nav-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-muted);
  margin-left: 2px;
  transition: transform 0.25s ease;
}

.nav-dropdown.is-open .nav-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  padding: 0.65rem 0 0.65rem 1rem;
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  color: var(--text-muted);
  border-radius: 8px;
  min-height: 44px;
}

.dropdown-menu li a:hover {
  color: var(--secondary);
  background: rgba(82, 183, 136, 0.08);
}

.nav-dropdown.is-open .dropdown-menu {
  max-height: 480px;
  opacity: 1;
  padding: 0.35rem 0 0.75rem;
}

.nav-auth {
  margin-top: 0.5rem;
}

.nav-auth .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1024px) {
  .navbar {
    padding: calc(14px + var(--safe-top)) 0 14px;
  }

  /* logo-title size handled in responsive rules above */

  .nav-toggle {
    display: none;
  }

  .nav-panel {
    position: static;
    inset: auto;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    transform: none;
    overflow: visible;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    visibility: visible;
    height: auto;
    min-height: 0;
    width: auto;
    max-width: none;
    box-shadow: none;
    border: none;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 1.8rem);
  }

  .nav-links li a {
    font-size: 0.9rem;
  }

  .btn-outline {
    padding: 8px 22px;
    font-size: 0.85rem;
  }

  .nav-dropdown-trigger {
    width: auto;
    padding: 0;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .nav-chevron {
    border-top-color: var(--text-muted);
  }

  .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 220px;
    max-height: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    padding: 10px 8px !important;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .dropdown-menu li a {
    padding: 0.55rem 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    min-height: 0;
    display: block;
  }

  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nav-dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nav-auth {
    margin-top: 0;
    margin-left: 0.25rem;
  }
}

.btn-outline {
  border: 1.5px solid var(--secondary);
  padding: 6px 16px;
  border-radius: 40px;
  background: transparent;
  font-weight: 600;
  transition: all 0.3s;
  color: var(--secondary);
  font-size: 0.8rem;
}

.btn-outline:hover {
  background: var(--secondary);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(82, 183, 136, 0.4);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
  box-sizing: border-box;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.55) saturate(1.1);
  animation: slowZoom 20s ease-in-out infinite alternate;
}

/* A YouTube <iframe> background can't use object-fit, so use the classic
   full-bleed "cover" trick: oversize it to 16:9 and centre it. */
iframe.video-background {
  width: 100vw;
  height: 100vh;
  min-width: 177.78vh;   /* 16:9 — stays wide enough to cover */
  min-height: 56.25vw;   /* 16:9 — stays tall enough to cover */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  animation: none;
}

/* Invisible layer over the hero video: swallows all clicks/taps so the
   YouTube player controls (play / pause / next / prev) can never appear. */
.hero-video-guard {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: auto;
}

@keyframes slowZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(7, 30, 24, 0.85) 0%,
    rgba(7, 30, 24, 0.9) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(750px, 100%);
  padding: clamp(0.5rem, 3vw, 2.5rem) 0 clamp(2rem, 6vw, 3rem);
}

.hero-badge {
  display: inline-block;
  background: rgba(82, 183, 136, 0.2);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 20px;
  border: 1px solid rgba(82, 183, 136, 0.3);
}

.hero-content h2 {
  font-size: clamp(1.65rem, 6.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: clamp(12px, 3vw, 20px);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-content .highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-desc {
  font-size: clamp(0.9rem, 2.8vw, 1.05rem);
  margin: clamp(12px, 3vw, 16px) 0 clamp(20px, 4vw, 28px);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 52ch;
}

.hero-buttons {
  display: flex;
  gap: clamp(10px, 3vw, 16px);
  flex-wrap: wrap;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: min(100%, 160px);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--secondary) 100%
  );
  color: white;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 700;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 25px rgba(45, 106, 79, 0.4);
  position: relative;
  overflow: hidden;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(45, 106, 79, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  transition: 0.3s;
  color: white;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  border-color: var(--secondary);
}

.scroll-indicator {
  position: absolute;
  bottom: max(24px, var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
  cursor: pointer;
  background: none;
  border: none;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  font: inherit;
}

.scroll-indicator i {
  color: white;
  font-size: 24px;
  opacity: 0.7;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* Stats Section - fully responsive */
.stats-section {
  background: linear-gradient(135deg, var(--bg-card) 0%, #0c261f 100%);
  border-radius: clamp(20px, 5vw, 40px);
  margin-top: clamp(-36px, -8vw, -50px);
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 5vw, 2.5rem) var(--container-pad-x);
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border-glow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: center;
  gap: clamp(1rem, 4vw, 2rem);
}

@media (min-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat-item {
  min-width: 0;
}

.stat-item h3 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--accent) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.stat-item p {
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 6px;
  font-size: 0.85rem;
}

/* Section Styles */
.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-light);
  letter-spacing: -0.5px;
  padding: 0 var(--container-pad-x);
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: min(680px, 100%);
  margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  padding: 0 var(--container-pad-x);
  line-height: 1.6;
}

/* About Grid - fully responsive */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.about-text p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 16px);
  margin-top: 24px;
}

@media (max-width: 360px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(82, 183, 136, 0.2);
}

.feature-item i {
  color: var(--secondary);
  font-size: 1rem;
  min-width: 28px;
}

.feature-item span {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.9rem;
}

.about-image img {
  width: 100%;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-glow);
  transition: transform 0.5s;
  object-fit: cover;
  height: auto;
  max-height: min(380px, 55vh);
}

.about-image img:hover {
  transform: scale(1.01);
}

/* Cards Grid - responsive */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, 240px), 1fr)
  );
  gap: clamp(1rem, 3.5vw, 1.75rem);
  margin-top: 20px;
}

.program-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  border: 1px solid var(--border-glow);
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  transform: scaleX(0);
  transition: transform 0.4s;
}

.program-card:hover::before {
  transform: scaleX(1);
}

.program-card:hover {
  transform: translateY(-8px);
  border-color: var(--secondary);
  box-shadow: 0 30px 45px -20px rgba(0, 0, 0, 0.5);
}

.program-icon {
  width: 60px;
  height: 60px;
  background: rgba(82, 183, 136, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: 0.3s;
}

.program-card:hover .program-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.program-icon i {
  font-size: 1.8rem;
  color: var(--secondary);
  transition: 0.3s;
}

.program-card:hover .program-icon i {
  color: white;
}

.program-card h3 {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  margin-bottom: 10px;
  color: var(--text-light);
}

.program-card p {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

/* Gallery Swiper - touch optimized */
.gallery-swiper {
  width: 100%;
  max-width: 100%;
  padding: 20px 0 40px;
  overflow: hidden;
  box-sizing: border-box;
}

.gallery-slide {
  border-radius: clamp(16px, 3vw, 24px);
  overflow: hidden;
  height: clamp(200px, 42vw, 320px);
  min-height: 200px;
  position: relative;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.gallery-slide:hover img {
  transform: scale(1.05);
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(7, 30, 24, 0.9), transparent);
  padding: clamp(14px, 4vw, 24px) clamp(12px, 3vw, 20px);
  color: white;
}

.slide-overlay h3 {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 600;
  line-height: 1.25;
}

.slide-overlay p {
  font-size: clamp(0.75rem, 2.5vw, 0.8rem);
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* Contact CTA */
.contact-cta {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 100%
  );
  border-radius: clamp(22px, 5vw, 44px);
  padding: clamp(2rem, 6vw, 3.75rem) var(--container-pad-x);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0
    calc(1rem + var(--safe-bottom));
}

.contact-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.contact-cta h2 {
  font-size: clamp(1.35rem, 4.5vw, 1.8rem);
  margin-bottom: 16px;
  color: white;
  line-height: 1.2;
  padding: 0 4px;
}

.contact-cta p {
  margin-bottom: 28px;
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn-light {
  background: white;
  color: var(--primary-dark);
  padding: 12px clamp(1.25rem, 4vw, 2rem);
  border-radius: 40px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

.btn-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  background: var(--accent);
  color: var(--bg-dark);
}

/* Footer - mobile first */
footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-glow);
  padding: clamp(2.5rem, 6vw, 3.25rem) 0
    calc(1.75rem + var(--safe-bottom));
  margin-top: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--secondary);
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-col p,
.footer-col a {
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  transition: 0.2s;
}

.footer-col a:hover {
  color: var(--secondary);
  transform: translateX(3px);
  display: inline-block;
}

.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 1.2rem;
  transition: 0.3s;
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.newsletter-input {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.newsletter-input input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 40px;
  border: 1px solid var(--border-glow);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-family: inherit;
  min-width: 140px;
}

.newsletter-input input::placeholder {
  color: var(--text-muted);
}

.newsletter-input button {
  background: var(--secondary);
  border: none;
  border-radius: 40px;
  padding: 0 20px;
  color: var(--bg-dark);
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.newsletter-input button:hover {
  background: var(--accent);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-glow);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tablet and Desktop responsive */
@media (min-width: 768px) {
  .container {
    padding: 0 clamp(28px, 5vw, 40px);
  }
  .hero-content h2 {
    font-size: 3.2rem;
  }
  .hero-desc {
    font-size: 1.1rem;
  }
  .section-title {
    font-size: 2.4rem;
  }
  .stats-grid {
    gap: 40px;
  }
  .stat-item h3 {
    font-size: 2.5rem;
  }
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }
  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
  }
  .contact-cta h2 {
    font-size: 2rem;
  }
  .contact-cta {
    padding: 60px 40px;
  }
}

@media (min-width: 1024px) {
  .hero-content h2 {
    font-size: 4rem;
  }
  .section-title {
    font-size: 2.6rem;
  }
  .stat-item h3 {
    font-size: 2.8rem;
  }
  .cards-grid {
    gap: 32px;
  }
}

.page-main {
  padding-top: calc(var(--header-h) + var(--safe-top) + 20px);
  padding-bottom: calc(3rem + var(--safe-bottom));
  padding-left: var(--container-pad-x);
  padding-right: var(--container-pad-x);
  min-height: 50vh;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-inner {
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-inner--narrow {
  max-width: 420px;
}

/* Wide variant – removes the 720px cap for content-rich pages */
.page-wide {
  max-width: 1100px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.page-breadcrumb a {
  color: var(--secondary);
}

.page-breadcrumb a:hover {
  text-decoration: underline;
}

.page-bc-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.page-title {
  font-size: clamp(1.45rem, 4.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
  line-height: 1.2;
  word-wrap: break-word;
  background: linear-gradient(135deg, #fff 0%, var(--secondary) 90%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.page-lead {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2.6vw, 1rem);
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--card-radius);
  padding: clamp(1.15rem, 3.5vw, 1.75rem);
  line-height: 1.65;
  max-width: 100%;
}

.page-card a {
  color: var(--secondary);
}

.page-card a:hover {
  text-decoration: underline;
}

.page-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.page-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.page-muted a {
  color: var(--secondary);
}

.contact-page-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-page-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-glow);
  background: var(--bg-elevated);
  color: var(--text-light);
  font: inherit;
  resize: vertical;
  min-height: 120px;
}

.contact-form textarea:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ─── Login page ─────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(82,183,136,.18), transparent),
    var(--bg-primary, #071e18);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 40, 32, 0.85);
  border: 1px solid rgba(82, 183, 136, 0.22);
  border-radius: 1.5rem;
  padding: 2.25rem 2rem 2rem;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

.login-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.login-school {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 0%, var(--secondary, #52b788) 80%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin: 0;
  line-height: 1.2;
}

.login-school-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text-muted, #94c4b4);
  margin: 0.2rem 0 0;
  text-transform: uppercase;
}

.login-heading {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: #f0f7f4;
}

.login-sub {
  font-size: 0.88rem;
  color: var(--text-muted, #94c4b4);
  margin: 0 0 1.4rem;
}

.login-error {
  background: rgba(248,113,113,.12);
  border: 1px solid rgba(248,113,113,.4);
  color: #f87171;
  border-radius: 0.65rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 1.1rem;
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted, #94c4b4);
}

.login-field input {
  padding: 0.7rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(82,183,136,.28);
  background: rgba(7, 30, 24, 0.7);
  color: #f0f7f4;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
}

.login-field input::placeholder { color: rgba(148,196,180,.45); }

.login-field input:focus {
  outline: none;
  border-color: var(--secondary, #52b788);
  box-shadow: 0 0 0 3px rgba(82,183,136,.18);
}

.login-field input:disabled { opacity: .55; cursor: not-allowed; }

.login-btn {
  margin-top: 0.4rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2d6a4f, #52b788);
  color: #fff;
  transition: filter .18s, opacity .18s;
}

.login-btn:hover:not(:disabled) { filter: brightness(1.08); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .65s linear infinite;
  flex-shrink: 0;
}

@keyframes login-spin { to { transform: rotate(360deg); } }

.login-back {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
}

.login-back a {
  color: var(--secondary, #52b788);
  text-decoration: none;
}

.login-back a:hover { text-decoration: underline; }

/* legacy selectors kept for safety */
.login-label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.85rem; color: var(--text-muted); }
.login-label input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-glow); background: var(--bg-elevated); color: var(--text-light); font: inherit; }
.login-label input:focus { outline: 2px solid var(--secondary); outline-offset: 2px; }
.login-submit { margin-top: .5rem; border: none; cursor: pointer; width: 100%; text-align: center; justify-content: center; }

/* Fix for very small devices */
@media (max-width: 480px) {
  .hero-content h2 {
    font-size: 1.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 12px 20px;
    font-size: 0.85rem;
  }
  .stats-section {
    padding: 28px 16px;
    margin-top: -30px;
  }
  .stat-item h3 {
    font-size: 1.6rem;
  }
  .section {
    padding: 50px 0;
  }
  .program-card {
    padding: 28px 20px;
  }
  .contact-cta h2 {
    font-size: 1.5rem;
  }
  .contact-cta p {
    font-size: 0.85rem;
  }
  .btn-light {
    padding: 10px 24px;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
  }

  .newsletter-input {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-input input,
  .newsletter-input button {
    width: 100%;
    min-height: 44px;
  }

  .newsletter-input button {
    padding: 12px 20px;
  }
}

/* Short viewports (e.g. phone landscape): keep hero usable */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + var(--safe-top) + 4px);
    padding-bottom: 12px;
  }

  .hero-content {
    padding-top: 0;
    padding-bottom: 1rem;
  }

  .hero-content h2 {
    font-size: clamp(1.35rem, 5vh, 2rem);
  }

  .scroll-indicator {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .video-background {
    animation: none;
  }

  .scroll-indicator {
    animation: none;
  }

  .contact-cta::before {
    animation: none;
  }

  .nav-backdrop {
    animation: none;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-glow);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-light);
  font-size: 1rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--secondary);
  background: rgba(82, 183, 136, 0.15);
  transform: rotate(15deg);
}

/* Light theme overrides for navbar */
[data-theme="light"] .navbar {
  background: var(--navbar-bg);
  border-bottom-color: rgba(45, 106, 79, 0.15);
}

[data-theme="light"] .nav-panel {
  background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .nav-dropdown-trigger {
  color: var(--text-light);
}

[data-theme="light"] .dropdown-menu {
  background: var(--bg-card);
  border-color: var(--border-glow);
}

[data-theme="light"] .hero-overlay {
  background: linear-gradient(135deg, rgba(248,250,249,0.75) 0%, rgba(245,249,247,0.8) 100%);
}

[data-theme="light"] .hero-content h2 {
  color: #1a3a31;
}

[data-theme="light"] .hero-badge {
  background: rgba(45, 106, 79, 0.12);
  color: #2d6a4f;
  border-color: rgba(45, 106, 79, 0.25);
}

[data-theme="light"] .logo-title {
  background: linear-gradient(135deg, #1a3a31 0%, #2d6a4f 80%);
  background-clip: text;
  -webkit-background-clip: text;
}

[data-theme="light"] .page-title {
  background: linear-gradient(135deg, #1a3a31 0%, #2d6a4f 90%);
  background-clip: text;
  -webkit-background-clip: text;
}

[data-theme="light"] .program-card {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

[data-theme="light"] .stats-section {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7f4 100%);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

[data-theme="light"] .stat-item h3 {
  background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

[data-theme="light"] .contact-cta {
  background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
}

[data-theme="light"] .contact-cta h2,
[data-theme="light"] .contact-cta p {
  color: white;
}

[data-theme="light"] footer {
  background: #f0f7f4;
  border-top-color: rgba(45, 106, 79, 0.15);
}

[data-theme="light"] .btn-outline {
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="light"] .btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ===========================================================================
   SHARED COMPONENTS FOR INNER PAGES (added for the PHP build)
   Reuses the same CSS variables so light/dark themes keep working.
   =========================================================================== */

/* Hero-style page banner shown at the top of every inner page */
.page-banner {
  position: relative;
  margin-top: calc(var(--header-h) + var(--safe-top));
  padding: clamp(2.5rem, 8vw, 4.5rem) var(--container-pad-x) clamp(2rem, 6vw, 3rem);
  background:
    radial-gradient(ellipse 90% 120% at 50% -20%, rgba(82, 183, 136, 0.18), transparent),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--bg-dark) 70%);
  border-bottom: 1px solid var(--border-glow);
  overflow: hidden;
  text-align: center;
}

.page-banner .container { position: relative; z-index: 2; }

.page-banner h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff 0%, var(--secondary) 90%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

[data-theme="light"] .page-banner h1 {
  background: linear-gradient(135deg, #1a3a31 0%, #2d6a4f 90%);
  background-clip: text;
  -webkit-background-clip: text;
}

.page-banner p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2.6vw, 1.05rem);
  line-height: 1.65;
}

.page-banner .page-breadcrumb {
  justify-content: center;
  margin-bottom: 1rem;
}

/* Generic content section wrapper for inner pages */
.page-section {
  padding: clamp(2rem, 6vw, 3.5rem) 0;
}

/* Responsive card grid used for news, events, staff, sports, etc. */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.info-card:hover {
  transform: translateY(-6px);
  border-color: var(--secondary);
  box-shadow: 0 24px 40px -22px rgba(0, 0, 0, 0.55);
}

.info-card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-elevated);
}

.info-card-body {
  padding: clamp(1rem, 3vw, 1.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.info-card-body h3 {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.3;
}

.info-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-card-meta {
  font-size: 0.78rem;
  color: var(--secondary);
  font-weight: 600;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.info-card-body .btn-secondary,
.info-card-body .btn-primary { margin-top: auto; align-self: flex-start; }

/* Badge / chip */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(82, 183, 136, 0.15);
  color: var(--secondary);
  border: 1px solid var(--border-glow);
}

.badge-accent { background: rgba(201, 177, 107, 0.15); color: var(--accent); }
.badge-live   { background: rgba(220, 53, 69, 0.18); color: #ff6b6b; border-color: rgba(220,53,69,.35); }

/* Data table (past papers, results, timetables) */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-glow);
  border-radius: var(--card-radius);
  background: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-glow);
}

.data-table thead th {
  background: var(--bg-elevated);
  color: var(--secondary);
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:hover { background: rgba(82, 183, 136, 0.06); }
.data-table td { color: var(--text-muted); }
.data-table td strong { color: var(--text-light); }

/* Forms (contact, application, portal login) */
.form-grid { display: grid; gap: 1rem; }

@media (min-width: 640px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border-glow);
  background: var(--bg-elevated);
  color: var(--text-light);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.18);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); opacity: 0.7; }

/* Filter bar (past papers etc.) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.filter-bar .form-group { flex: 1 1 180px; }

/* Alerts / flash notices on public pages */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
  line-height: 1.5;
}

.alert-success { background: rgba(82, 183, 136, 0.15); border-color: rgba(82, 183, 136, 0.4); color: var(--secondary); }
.alert-error   { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); color: #f87171; }
.alert-info    { background: rgba(201, 177, 107, 0.12); border-color: rgba(201, 177, 107, 0.4); color: var(--accent); }

/* Responsive 16:9 video embed (YouTube live etc.) */
.responsive-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border-glow);
  background: #000;
}

.responsive-embed iframe,
.responsive-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Full photo gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.gallery-grid figure {
  margin: 0;
  border-radius: clamp(14px, 3vw, 20px);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-glow);
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-grid figure:hover img { transform: scale(1.06); }

.gallery-grid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(to top, rgba(7, 30, 24, 0.9), transparent);
}

/* Empty-state message */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-glow);
  border-radius: var(--card-radius);
}

.empty-state i { font-size: 2.5rem; color: var(--secondary); margin-bottom: 0.75rem; display: block; }

/* Simple two-column feature layout (facilities, e-learning) */
.split-grid {
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}

@media (min-width: 860px) {
  .split-grid { grid-template-columns: 1fr 1fr; }
}

/* Icon list (requirements, scholarships) */
.icon-list { list-style: none; display: grid; gap: 0.9rem; }

.icon-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.icon-list li i {
  color: var(--secondary);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Section title left-aligned variant for inner pages */
.section-title.left { text-align: left; padding: 0; }

/* Pagination */
.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  min-width: 40px;
  padding: 0.5rem 0.75rem;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--border-glow);
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
}

.pagination a:hover { border-color: var(--secondary); color: var(--secondary); }
.pagination .is-current { background: var(--secondary); color: var(--bg-dark); border-color: var(--secondary); }

/* Buttons: block/full width helper */
.btn-block { width: 100%; }
.btn-primary.btn-block, .btn-secondary.btn-block { display: flex; }
