/* Hero background — a layered navy gradient with a faint dot grid,
   built to read as a serious ed-tech brand rather than a decorative effect. */

.hero-gradient {
  position: relative;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(46,125,215,0.35), transparent 60%),
    radial-gradient(700px 400px at -5% 110%, rgba(242,169,59,0.16), transparent 55%),
    linear-gradient(160deg, #0B1F3A 0%, #123262 55%, #0B1F3A 100%);
  overflow: hidden;
}

.hero-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 80% at 60% 20%, black 20%, transparent 75%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Section backgrounds used across pages instead of flat white everywhere */
.section-mist {
  background: linear-gradient(180deg, #F5F7FA 0%, #FFFFFF 100%);
}

.card-shadow {
  box-shadow: 0 1px 2px rgba(11,31,58,0.04), 0 12px 32px -12px rgba(11,31,58,0.12);
}

.card-shadow:hover {
  box-shadow: 0 1px 2px rgba(11,31,58,0.06), 0 20px 40px -12px rgba(11,31,58,0.18);
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* Hero image slider — cycles through programme images with fade transitions,
   plus arrow/dot controls. Falls back gracefully to a static first slide if
   JS doesn't run. */

.hero-slider {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 50px -15px rgba(0,0,0,0.45);
}

.hero-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
  display: block;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem;
  background: linear-gradient(0deg, rgba(11,31,58,0.92) 0%, rgba(11,31,58,0) 100%);
}

.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-slider-arrow:hover {
  background: rgba(255,255,255,0.3);
}

.hero-slider-arrow.left { left: 12px; }
.hero-slider-arrow.right { right: 12px; }

.hero-slider-dots {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.4rem;
}

.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-slider-dot.is-active {
  background: #F2A93B;
  width: 20px;
  border-radius: 9999px;
}

/* Newsletter popup */

.newsletter-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 31, 58, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.newsletter-overlay.is-visible {
  opacity: 1;
}

.newsletter-overlay[hidden] {
  display: none;
}

.newsletter-card {
  position: relative;
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 30px 60px -15px rgba(11,31,58,0.4);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.25s ease;
}

.newsletter-overlay.is-visible .newsletter-card {
  transform: translateY(0) scale(1);
}

.newsletter-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #64748B;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  transition: background 0.2s ease;
}

.newsletter-close:hover {
  background: #F5F7FA;
  color: #1F2937;
}

/* ---- Mobile navigation: three bars that morph into an X ---- */
.nav-toggle { position: relative; width: 2.5rem; height: 2.5rem; margin-right: -0.5rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; }
.nav-toggle:hover { background: #F5F7FA; }
.nav-toggle:focus-visible { outline: 2px solid #2E7DD7; outline-offset: 2px; }
.nav-bar { position: absolute; display: block; width: 1.25rem; height: 2px; border-radius: 2px; background: #0B1F3A; transition: transform .25s ease, opacity .2s ease; }
.bar-top { transform: translateY(-6px); }
.bar-bot { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .bar-top { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar-mid { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar-bot { transform: translateY(0) rotate(-45deg); }

@media (max-width: 767px) {
  #nav-menu { max-height: calc(100vh - 4.5rem); overflow-y: auto; }
  #nav-menu .nav-link { padding: 0.75rem 0; border-bottom: 1px solid rgba(100, 116, 139, 0.12); }
}
