:root {
  --msl-primary: #2563eb;
  --msl-secondary: #064e9c;
  --msl-accent: #06b6d4;
  --msl-surface: rgba(15, 23, 42, 0.85);
  --msl-muted: #64748b;
  --msl-bg: #f8fafc;
  --msl-card: #ffffff;
  --msl-on-primary: #ffffff;
  /* increased nav heights so the logo "badge" can be larger and sit comfortably centered */
  --nav-height-desktop: 84px; /* previously 64px */
  --nav-height-mobile: 64px;  /* previously 56px */
  --radius-lg: 16px;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --transition-fast: 180ms ease-out;
  --transition-med: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Additional project color tokens (used to replace common hex literals) */
  --msl-dark: #0f172a;
  --msl-ink: #020617;
  --msl-ghost-text: #e5e7eb;
  --msl-accent-light: #bfdbfe;
  --msl-gray-200: #e5e7eb;
  --msl-gray-300: #cbd5f5;
  --msl-offwhite: #f9fafb;
  --msl-selection-bg: #ffd87a; /* warm gold selection */
  --msl-selection-fg: #0f172a;

  /* convenience aliases used elsewhere in the stylesheet */
  --bg: var(--msl-bg);
  --text: var(--msl-ink);
  --msl-white: #ffffff;
  --msl-ice: #ecfeff;
  --msl-sky-100: #bae6fd;
  --msl-sky-200: #e0f2fe;
  --msl-border: #d1d5db;
  --msl-slate-400: #94a3b8;
  --msl-slate-500: #475569;
  --msl-muted-400: #9ca3af;
  --msl-dark-2: #1f2937;
  --msl-cool-200: #cbd5e1;
  --msl-blue-600: #1d4ed8;
  --msl-ice-2: #eff6ff;
  --hero-shadow-width: clamp(40px,8vw,120px);
  --hero-shadow-opacity: 0.14;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
      margin: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                   Roboto, Helvetica, Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
 }

/* Project-specific selection style */
*::selection {
  background: var(--msl-selection-bg);
  color: var(--msl-selection-fg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

/* Utility */

.section {
  padding: 4rem 0;
}

@media (min-width: 1024px) {
  .section {
    padding: 5rem 0;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--msl-secondary);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--msl-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1.6rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(90deg, var(--msl-primary), var(--msl-accent));
  color: var(--msl-on-primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--msl-dark);
}

.btn-outline:hover {
  background: rgba(148, 163, 184, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--msl-muted);
  padding: 0.4rem 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.8rem;
  color: var(--msl-muted);
}

.pill-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--msl-muted);
  background: transparent;
  transition: all var(--transition-fast);
}

.pill-toggle.is-active {
  background: rgba(37, 99, 235, 0.09);
  color: var(--msl-secondary);
  border-color: rgba(37, 99, 235, 0.2);
}

/* Top announcement bar */
.topbar {
  font-size: 0.9rem;
  background: var(--msl-dark);
  color: var(--msl-ghost-text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  /* Make the topbar content slightly compact on desktop but roomy for tapping on mobile */
  padding-inline: 0.75rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-link {
  color: var(--msl-accent-light);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}
.topbar-link:hover,
.topbar-link:focus {
  color: var(--msl-white);
  border-color: var(--msl-accent-light);
  opacity: 0.95;
}

/* Make topbar links touch-friendly and visually distinct on mobile */
.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.45rem;
  border-radius: 8px;
}

@media (max-width: 767px) {
  .topbar-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
    padding-block: 0.5rem;
  }

  .topbar-left,
  .topbar-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .topbar-right {
    margin-top: 0;
  }

  /* Slight visual background on link to improve contrast on mobile */
  .topbar-link {
    background: rgba(255,255,255,0.03);
    color: var(--msl-offwhite);
  }

  .topbar-link:hover,
  .topbar-link:focus {
    background: rgba(255,255,255,0.05);
    color: var(--msl-white);
  }

  /* Hide the announcement topbar on mobile — topbar is only shown on large-screen home */
  .topbar { display: none !important; }
}

/* Virtual-tour CTA (desktop) + compact icon (mobile) */
.topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(6,182,212,0.12), rgba(37,99,235,0.08));
  color: var(--msl-white);
  border: 1px solid rgba(255,255,255,0.06);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.topbar-cta:hover,
.topbar-cta:focus {
  transform: translateY(-1px);
  background: linear-gradient(90deg, rgba(6,182,212,0.18), rgba(37,99,235,0.12));
  box-shadow: 0 6px 18px rgba(2,6,23,0.32);
  outline: none;
}

.topbar-cta-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--msl-white);
  border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  font-size: 1.05rem;
}

@media (max-width: 767px) {
  /* hide the Virtual tour CTA entirely on mobile to reduce clutter */
  .topbar-cta { display: none !important; }
  .topbar-cta-icon { display: none !important; }
}

/* Nav */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88));
  color: var(--msl-ghost-text);
}

.nav-inner {
  height: var(--nav-height-desktop);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem; /* slightly more space for the bigger badge */
  font-weight: 600;
  color: var(--msl-offwhite);
}

.nav-logo-mark {
  /* bigger logo container — keeps the blue "badge" area roomy regardless of the logo shape */
  width: 56px;
  height: 56px;
  border-radius: 10px; /* slightly rounded square looks better for mixed shapes */
  background: radial-gradient(circle at 20% 0, var(--msl-accent), var(--msl-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px; /* keeps icon comfortably inset from the badge border */
  font-size: 1rem;
  color: var(--msl-ice);
  overflow: hidden; /* ensure odd shaped icons don't bleed outside the badge */
}

.nav-logo-mark .nav-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain; /* ensure any logo shape always fits and is centered */
  border-radius: inherit;
}

/* Mobile adjustments: scale the header and badge down to save real estate */
@media (max-width: 767px) {
  :root { --nav-height-mobile: 64px; }
  .nav-inner { height: var(--nav-height-mobile); }
  .nav-logo-mark { width: 42px; height: 42px; border-radius: 8px; }
  .nav-logo { gap: 0.55rem; }
  .nav-logo-mark .nav-logo-img { object-fit: contain; }
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.9rem;
  justify-content: center;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--msl-gray-300);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), transform 200ms ease, background 200ms ease, opacity 180ms ease;
  font-weight: 400;
  padding: 6px 4px;
  border-radius: 6px;
  position: relative;
}

/* Ensure nav links never receive the browser underline (override other styles) */
.nav-center .nav-link,
.nav-center .nav-link:hover,
.nav-center .nav-link:focus,
.nav-center a,
.nav-center a:hover,
.nav-center a:focus {
  text-decoration: none !important;
}

.nav-link span.icon {
  font-size: 1rem;
  opacity: 0.9;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--msl-white);
  border-color: var(--msl-accent);
  transform: translateY(-2px);
  background: linear-gradient(90deg, rgba(6,182,212,0.06), rgba(37,99,235,0.04));
  opacity: 1;
}

/* animated underline using a pseudo-element (keeps layout stable) */
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  height: 4px;
  background: linear-gradient(90deg, var(--msl-accent-light), var(--msl-sky-200));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.2,0.9,0.2,1), opacity 180ms ease;
  border-radius: 4px;
  opacity: 0.95;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* Logo text helpers (move inline sizes into CSS) */
.site-title {
  font-size: 1.05rem; /* slightly larger now the nav is taller */
  line-height: 1;
  font-weight: 700;
}
.site-subtitle {
  font-size: 0.75rem;
  color: var(--msl-muted-400);
  line-height: 1;
}
.site-title-sm { font-size: 0.9rem; }

.nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(6,182,212,0.08);
}

.nav-right .btn-primary {
  padding-inline: 1.4rem;
  font-size: 0.9rem;
}

.nav-signin {
  font-size: 0.85rem;
  color: var(--msl-gray-300);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.16);
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast), transform 160ms ease;
}

.nav-signin:hover {
  color: var(--msl-white);
  background: rgba(255,255,255,0.03);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255,255,255,0.02);
  color: var(--msl-ghost-text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 200ms ease, opacity 200ms ease, top 200ms ease, bottom 200ms ease;
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  bottom: -5px;
}

.nav-toggle.is-open span {
  background: transparent;
}

.nav-toggle.is-open span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.is-open span::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* Offcanvas */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-med), visibility var(--transition-med);
  z-index: 30;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.offcanvas-panel {
  position: fixed;
  inset-block: 0;
  left: 0;
  width: 86%;
  max-width: 320px;
  background: var(--msl-ink);
  color: var(--msl-ghost-text);
  transform: translateX(-100%);
  transition: transform var(--transition-med);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.offcanvas-panel.is-open {
  transform: translateX(0);
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.offcanvas-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.8);
  color: var(--msl-ghost-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.offcanvas-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  flex: 1;
}

.offcanvas-link {
  padding: 0.65rem 0.85rem;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--msl-dark);
  background: var(--msl-card);
  border: 1px solid var(--msl-border);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.offcanvas-link span.icon {
  font-size: 1.2rem;
  opacity: 0.9;
}

.offcanvas-link span {
  color: inherit;
}

.offcanvas-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  background: var(--msl-offwhite);
}

.offcanvas-footer {
  padding: 0.75rem 1.1rem 1.1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.offcanvas-footer-links {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--msl-gray-300);
}

/* Beautiful Portal login inside offcanvas: full-width pill that complements the Apply CTA */
.offcanvas-panel .offcanvas-portal {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: var(--msl-white);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 8px 22px rgba(2,6,23,0.36);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.offcanvas-panel .offcanvas-portal:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 14px 30px rgba(2,6,23,0.44);
}

.offcanvas-panel .offcanvas-portal:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(6,182,212,0.06);
}

/* Offcanvas-specific tweaks: make outline/ghost buttons visible on dark panel */
.offcanvas-panel .btn-outline {
  color: var(--msl-white);
  border-color: rgba(255,255,255,0.12);
  background: transparent;
}
.offcanvas-panel .btn-outline:hover {
  background: rgba(255,255,255,0.04);
}

.offcanvas-panel .btn-ghost {
  color: var(--msl-white);
  border: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  padding: 0.45rem 0.6rem;
}

/* Make footer ghost buttons slightly more visible inside offcanvas */
.offcanvas-panel .offcanvas-footer .btn-ghost {
  background: rgba(255,255,255,0.02);
}

/* Icon badge for offcanvas menu items */
.offcanvas-link .icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--msl-ice);
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
  font-size: 1.05rem;
  flex: 0 0 36px;
}

.offcanvas-link > span:last-child {
  margin-left: 0.65rem;
  color: var(--msl-muted-400);
}

/* Minor spacing tweak so pills match screenshot proportions */
.offcanvas-body { padding-left: 1.1rem; padding-right: 1.1rem; }

/* Hero */
.hero {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.4), transparent 55%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.3), transparent 45%),
    linear-gradient(to bottom, var(--msl-ink), var(--msl-ink) 52%, var(--msl-ink) 60%, var(--bg) 100%);
    color: var(--msl-ghost-text);
  padding-bottom: 4.5rem;
}

.hero-inner {
  padding-top: 2.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  margin: 0.6rem 0 0.4rem;
  color: var(--msl-offwhite);
  line-height: 1.05;
}

.hero-title span.highlight {
  background: linear-gradient(90deg, var(--msl-accent-light), var(--msl-sky-200));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: 0.99rem;
  max-width: 32rem;
  color: var(--msl-gray-300);
  line-height: 1.6;
  margin-bottom: 0.6rem;
  margin-top: 0.6rem;
}

@media (max-width: 767px){
  .hero .hero-inner > div:first-child{ padding-right:0; }
  .hero-subtitle { text-align: center; max-width: 95%; margin-left: auto; margin-right: auto; }
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: var(--msl-muted-400);
  align-items: center;
}

.hero-meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--msl-muted);
}

.hero-stats-bar {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-stats-bar .chip {
  background: rgba(15, 23, 42, 0.7);
  color: var(--msl-gray-200);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-visual {
  position: relative;
  padding: 1.1rem;
}

/* Place the visual on the right on wide screens and keep it centered on smaller screens */
@media (min-width: 992px){
  .hero-visual { justify-self: end; align-self: center; padding: 1.6rem; }
  .hero-card { width: min(420px, 38vw); margin-left: 0; }
}
@media (max-width: 991px){
  .hero-card { width: min(92%, 380px); margin: 0 auto; }
}

/* New hero sliding background */
.hero {
  position: relative; /* create a stacking context for slides */
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  transition: transform 450ms cubic-bezier(0.2,0.8,0.2,1);
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transform: scale(1.0);
  transition: opacity 900ms ease-in-out, transform 900ms ease-in-out;
  will-change: opacity, transform;
  /* Create left and right shadows per slide using pseudo elements */
}
/* Disable extra side shadows so the image fills edge-to-edge without dark bars */
.hero-slide::before,
.hero-slide::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: var(--hero-shadow-width);
  pointer-events: none;
  z-index: 0; /* behind overlay */
  opacity: 0; /* keep pseudo elements invisible */
  transition: opacity 320ms var(--transition-med), transform 320ms var(--transition-med);
}
.hero-slide::before {
  left: 0;
  background: linear-gradient(90deg, rgba(2,6,23,var(--hero-shadow-opacity)) 0%, rgba(2,6,23,0.0) 70%);
  transform: translateX(-8px);
}
.hero-slide::after {
  right: 0;
  background: linear-gradient(270deg, rgba(2,6,23,var(--hero-shadow-opacity)) 0%, rgba(2,6,23,0.0) 70%);
  transform: translateX(8px);
}
.hero-slide.active::before,
.hero-slide.active::after {
  opacity: 0; /* don't reveal the side shadows on active slides */
  transform: translateX(0);
}

.hero-slide.active { opacity: 1; transform: scale(1.08); }
.hero-overlay {
  position: absolute;
  inset: 0;
  /* soften overlay so the image appears brighter at the edges */
  background: linear-gradient(180deg, rgba(15,23,42,0.18) 0%, rgba(15,23,42,0.28) 60%, rgba(15,23,42,0.4) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Force hide the vignette overlay completely — avoids extra darkening on edges */
.hero-vignette { display: none !important; }

/* More pronounced left-side overlay on large screens for text contrast */
@media (min-width: 992px){
  .hero-overlay{ background:
      linear-gradient(90deg, rgba(2,6,23,0.28) 0%, rgba(2,6,23,0.16) 44%, rgba(2,6,23,0.00) 70%),
      linear-gradient(180deg, rgba(15,23,42,0.12) 0%, rgba(15,23,42,0.28) 60%, rgba(15,23,42,0.4) 100%);
  }
}
/* Place content above the background */
.hero .hero-inner { position: relative; z-index: 2; }
/* Layout refinements for text/card balance */
.hero .hero-inner {
  padding-inline: 1.25rem;
}
.hero .hero-inner > div:first-child{ padding-right: 1.5rem; }
.hero-title { max-width: 44ch; }

@media (min-width: 992px){
  .hero .hero-inner{ padding-top: calc(var(--nav-height-desktop) + 16px); }
  .hero-title { font-size: clamp(2.6rem, 4vw, 3.6rem); }
  .hero-stats-bar { margin-top: 2rem; }
}

@media (max-width: 991px){
  .hero .hero-inner{ padding-top: calc(var(--nav-height-mobile) + 12px); }
  .hero-title { font-size: clamp(1.8rem, 6vw, 2.4rem); max-width: 85vw; }
}

@media (max-width: 767px){
  .hero-title { text-align: center; }
  .hero-cta-row{ justify-content:center; }
  .hero-meta{ justify-content:center; }
}
.hero-controls {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.7rem;
  align-items: center;
  /* Raise well above other hero layers to ensure controls remain clickable
     (small pages may use high z-index elsewhere; make this larger than most elements) */
  z-index: 20; /* keep controls above hero content but under offcanvas nav overlay on mobile */
  pointer-events: auto;
}
.hero-controls .hero-prev,
.hero-controls .hero-next {
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: 0;
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
}
.hero-indicators { display:flex; gap:0.45rem; align-items:center; }
.hero-indicators .indicator {
  width: 9px; height: 9px; border-radius:999px; background: rgba(255,255,255,0.35); border: 1px solid rgba(0,0,0,0.12);
}
.hero-indicators .indicator { border: 0; cursor: pointer; }
.hero-indicators .indicator:focus { outline: 2px solid rgba(99,102,241,0.25); outline-offset: 3px; }
.hero-indicators .indicator.active { background: var(--msl-accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

@media (max-width: 800px){
  .hero-controls { bottom: 0.6rem; gap:0.45rem; }
  .hero .hero-inner { padding-top: 0.5rem; }
}

@media (min-width: 992px){
  .hero-controls { bottom: 2.6rem; }

  /* On wider screens keep the controls above most elements for visual clarity */
  .hero-controls { z-index: 9999; }
}

/* Slightly zoom background images on wide screens so edges fill the viewport and avoid side bars */
@media (min-width: 1200px){
  .hero-slide { background-size: 140% auto; }
}

.hero-card {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.6), transparent 55%),
    radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.4), transparent 55%),
    var(--msl-ink);
  border-radius: 1.5rem;
  padding: 1.2rem 1.15rem 1.1rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.26);
  position: relative;
  overflow: visible;
  min-height: 260px;
  /* reserve space so floating card does not cover content - increased for wider cards */
  padding-right: 3.6rem;
  color: var(--msl-ghost-text);
}

/* 3D flip for hero card (front/back) */
.hero-card { perspective: 1200px; -webkit-perspective: 1200px; }
.hero-card-inner { position: relative; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 300ms linear; transform-origin: center; }
.hero-card-front, .hero-card-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; position: relative; }
.hero-card-front { position: relative; z-index: 2; }
.hero-card-back { position: absolute; inset: 0; z-index:1; transform: rotateY(180deg); display: flex; align-items: center; justify-content: center; transform-origin: center; }
.hero-card.is-flipped .hero-card-inner { transform: rotateY(180deg); }

.hero-card.is-flipped { box-shadow: 0 40px 120px rgba(2,6,23,0.36); }

/* Back face layout — make events popover occupy the card back */
.hero-card-back .hero-events-popover { position: relative; right: auto; bottom: auto; width: 100%; margin: 0; box-shadow: none; background: transparent; border-radius: 1rem; }
.hero-card-back .hero-events-popover .hero-events-popover-inner { background: rgba(10,14,24,0.95); padding: 1rem; border-radius: 1rem; }

/* Keep the front/back stacked visually and avoid pointer events interfering while flipped */
.hero-card-back, .hero-card-front { -webkit-transform-style: preserve-3d; transform-style: preserve-3d; }
.hero-card-back { pointer-events: auto; }
.hero-card-front { pointer-events: auto; }
.hero-card.is-flipped .hero-card-front { pointer-events: none; }
.hero-card.is-flipped .hero-card-back { pointer-events: auto; }

/* Animate the events content when the card flips */
.hero-card.is-flipped .hero-events-popover-inner { animation: ms-popIn 360ms var(--transition-med) both; }
.hero-card.is-flipped .hero-events-popover-inner .hero-floating-row { opacity: 0; transform: translateY(6px); animation: ms-fadeUp 320ms var(--transition-fast) both; }
.hero-card.is-flipped .hero-events-popover-inner .hero-floating-row:nth-child(1) { animation-delay: 80ms; }
.hero-card.is-flipped .hero-events-popover-inner .hero-floating-row:nth-child(2) { animation-delay: 140ms; }
.hero-card.is-flipped .hero-events-popover-inner .popover-close { animation: ms-popIn 300ms calc(var(--transition-med) + 240ms) both; }

/* Small screens: use a slide/fade instead of 3D flip to avoid motion or perspective artifacts */
@media (max-width: 600px){
  .hero-card { perspective: none; }
  .hero-card-inner { transform: none !important; }
  .hero-card-front, .hero-card-back { position: static; transform: none; backface-visibility: unset; }
  .hero-card-back { display: none; }
  .hero-card.is-flipped .hero-card-back { display:block; }
  .hero-card.is-flipped .hero-card-front { display:none; }
}

/* Respect reduce motion: disable 3D animations */
@media (prefers-reduced-motion: reduce){
  .hero-card-inner { transition: none !important; }
}

/* Reduced-motion: allow toggling using show-back class (no 3D transforms) */
.hero-card.show-back .hero-card-front { display:none; }
.hero-card.show-back .hero-card-back { display:block; }

/* Animations */
@keyframes ms-fadeUp {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes ms-popIn {
  0% { opacity: 0; transform: translateY(8px) scale(.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Add animation notifies only when hero gets .animated class (JS toggles it) */
.hero.animated .hero-cta-row .btn.btn-primary { animation: ms-popIn 420ms var(--transition-med) both; }
.hero.animated .hero-cta-row .btn.btn-outline { animation: ms-popIn 420ms calc(var(--transition-med) + 80ms) both; }
.hero.animated .hero-stats-bar .chip{ animation: ms-fadeUp 420ms var(--transition-med) both; }
.hero.animated .hero-stats-bar .chip:nth-child(1){ animation-delay: 80ms; }
.hero.animated .hero-stats-bar .chip:nth-child(2){ animation-delay: 160ms; }
.hero.animated .hero-stats-bar .chip:nth-child(3){ animation-delay: 240ms; }
.hero.animated .hero-stats-bar .chip:nth-child(4){ animation-delay: 320ms; }
.hero.animated .hero-card { animation: ms-popIn 420ms calc(var(--transition-med) + 160ms) both; }
.hero.animated .hero-card-main { animation: ms-fadeUp 420ms calc(var(--transition-med) + 200ms) both; }

/* indicator micro-interaction */
.hero-indicators .indicator { transition: transform 220ms ease, background 180ms ease; }
.hero-indicators .indicator:hover { transform: scale(1.15); }
.hero-indicators .indicator.active { transform: scale(1.35); }

/* subtle hover/active on chips */
.hero-stats-bar .chip { transition: transform 200ms var(--transition-fast), box-shadow 200ms var(--transition-fast); background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.95); border: 1px solid rgba(255,255,255,0.04); padding: 0.45rem 0.9rem; border-radius: 999px; cursor: pointer; font-weight: 600; }
.hero-stats-bar .chip:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 36px rgba(2,6,23,0.18); }
.hero-stats-bar .chip:focus { outline: 2px solid rgba(99,102,241,0.16); outline-offset: 3px; }

/* hero card interactions */
.hero-card { transition: transform 320ms var(--transition-med), box-shadow 320ms var(--transition-med); }
.hero-card:hover { transform: translateY(-6px); box-shadow: 0 28px 72px rgba(2,6,23,0.28); }
.hero-card.is-flipped:hover { transform: none; }
.hero.slide-change .hero-card { transform: translateY(-6px) scale(1.01); }

/* Respect reduce motion */
@media (prefers-reduced-motion: reduce){
  .hero.animated .hero-cta-row .btn,
  .hero.animated .hero-stats-bar .chip,
  .hero.animated .hero-card,
  .hero.animated .hero-card-main { animation: none !important; }
  .hero-card, .hero-stats-bar .chip, .hero-indicators .indicator { transition: none !important; }
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hero-card-tag {
  font-size: 0.75rem;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-card-pill {
  font-size: 0.7rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  color: var(--msl-accent-light);
}

.hero-card-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.hero-avatar-stack {
  display: flex;
}

.hero-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid var(--msl-ink);
  background: linear-gradient(135deg, var(--msl-sky-100), var(--msl-sky-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--msl-dark);
}

.hero-avatar+.hero-avatar {
  margin-left: -12px;
}

.hero-card-copy-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--msl-ghost-text);
  margin-bottom: 0.2rem;
}

.hero-card-copy-sub {
  font-size: 0.8rem;
  color: var(--msl-muted-400);
}

.hero-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
  font-size: 0.78rem;
}

.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-metric-label {
  color: var(--msl-slate-400);
  font-size: 0.7rem;
}

.hero-metric-value {
  color: var(--msl-ghost-text);
  font-weight: 600;
}

.hero-floating-card {
  position: absolute;
  right: 0.3rem;
  bottom: 0.15rem;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 0.9rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 200px;
}

.hero-floating-title {
  font-weight: 500;
  color: var(--msl-offwhite);
}

.hero-floating-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--msl-muted-400);
}

/* Trusted bar */
.trusted-bar {
  background: linear-gradient(135deg, var(--msl-offwhite) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-top: 1px solid var(--msl-gray-200);
  border-bottom: 1px solid var(--msl-gray-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.trusted-inner {
  padding: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Section grouping for better visual hierarchy */
.trusted-section {
  flex: 1;
  min-width: 200px;
}

/* Accreditation section styling */
.trusted-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--msl-muted);
}

.trusted-label {
  font-weight: 700;
  color: var(--msl-dark);
  margin-right: 0.4rem;
  font-size: 0.8rem;
}

.trusted-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1.5px solid var(--msl-gray-200);
  font-size: 0.7rem;
  color: var(--msl-dark);
  background: var(--msl-white);
  font-weight: 500;
  transition: all 200ms ease;
  display: inline-block;
  white-space: nowrap;
}

.trusted-pill:hover {
  border-color: var(--msl-secondary);
  background: rgba(6, 182, 212, 0.04);
  color: var(--msl-secondary);
  transform: translateY(-1px);
}

/* Divider between sections */
.trusted-divider {
  width: 1px;
  height: 40px;
  background: var(--msl-gray-200);
  display: none;
}

/* New contact grid layout with icons */
.trusted-contact-grid {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.trusted-contact-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(6, 182, 212, 0.08);
  transition: all 200ms ease;
  color: var(--msl-dark);
  text-decoration: none;
}

.trusted-contact-item:hover {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.08);
}

.trusted-contact-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
}

.trusted-contact-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.trusted-contact-label {
  font-size: 0.65rem;
  color: var(--msl-muted-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.trusted-contact-value {
  font-size: 0.85rem;
  color: var(--msl-secondary);
  font-weight: 600;
  margin-top: 0.1rem;
}

/* Old contact styles (kept for fallback) */
.trusted-contact {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--msl-slate-500);
}

.trusted-contact a {
  color: var(--msl-secondary);
  font-weight: 500;
}

/* Responsive layout tweaks for the trusted bar (mobile) */
@media (max-width: 767px) {
  .trusted-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 0.9rem 0;
    padding-inline: 1.25rem;
  }

  .trusted-section {
    min-width: unset;
  }

  .trusted-logos {
    gap: 0.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .trusted-label {
    display: block;
    flex-basis: 100%;
    margin-bottom: 0.3rem;
    white-space: normal;
  }

  .trusted-divider {
    display: none;
  }

  .trusted-contact-grid {
    flex-direction: column;
    gap: 0.6rem;
  }

  .trusted-contact-item {
    padding: 0.7rem;
    width: 100%;
  }
}

/* Programs */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.section-title {
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.9rem;
  max-width: 28rem;
  color: var(--msl-muted);
}

.programs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.program-card {
  background: var(--msl-card);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--msl-gray-200);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.program-tag {
  font-size: 0.75rem;
  color: var(--msl-muted);
  margin-bottom: 0.4rem;
}

.program-title {
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
  color: var(--msl-dark);
}

.program-meta {
  font-size: 0.8rem;
  color: var(--msl-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.program-cta-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.link-inline {
  color: var(--msl-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Why choose us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.why-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--msl-gray-200);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.why-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--msl-secondary);
}

.why-title {
  font-size: 0.95rem;
  margin: 0;
}

.why-text {
  font-size: 0.83rem;
  color: var(--msl-muted);
}

/* Admissions strip */
.admissions-strip {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.08));
  border-radius: 1.4rem;
  padding: 1.8rem 1.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.admissions-left h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
}

.admissions-left p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--msl-muted);
  max-width: 26rem;
}

.admissions-points {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--msl-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
}

.admissions-points span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.admissions-points span::before {
  content: "✓";
  color: var(--msl-secondary);
  font-size: 0.8rem;
}

.admissions-form {
  background: var(--msl-white);
  border-radius: 1rem;
  padding: 1.1rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.7rem;
}

.field label {
  font-size: 0.78rem;
  color: var(--msl-dark);
  font-weight: 500;
}

.field input,
.field select {
  border-radius: 0.6rem;
  border: 1px solid var(--msl-border);
  padding: 0.55rem 0.6rem;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--msl-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.26);
}

.form-note {
  font-size: 0.7rem;
  color: var(--msl-muted);
  margin-top: 0.4rem;
}

/* Testimonials & FAQ layout */
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 2rem;
}

.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--msl-gray-200);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--msl-sky-100), var(--msl-sky-200));
}

.testimonial-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.testimonial-meta {
  font-size: 0.78rem;
  color: var(--msl-muted);
}

.testimonial-quote {
  font-size: 0.87rem;
  color: var(--msl-dark);
}

.testimonial-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.testimonial-nav button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--msl-gray-200);
  background: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.testimonial-nav button:hover {
  background: var(--msl-ice-2);
  border-color: var(--msl-accent-light);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-item {
  border-radius: 0.7rem;
  border: 1px solid var(--msl-gray-200);
  background: var(--msl-white);
  overflow: hidden;
}

.faq-header {
  padding: 0.6rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
}

.faq-question {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--msl-dark);
}

.faq-toggle-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--msl-cool-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--msl-muted);
  flex-shrink: 0;
}

.faq-body {
  padding: 0 0.7rem 0.7rem;
  font-size: 0.8rem;
  color: var(--msl-muted);
  display: none;
}

.faq-item.is-open .faq-body {
  display: block;
}

.faq-item.is-open .faq-toggle-icon {
  background: var(--msl-ice-2);
  border-color: var(--msl-accent-light);
  color: var(--msl-blue-600);
}

/* Footer */
footer {
  background: var(--msl-ink);
  color: var(--msl-gray-300);
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--msl-ink);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.footer-brand-title {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--msl-ghost-text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0, var(--msl-accent), var(--msl-primary));
}

.footer-text {
  font-size: 0.8rem;
  color: var(--msl-muted-400);
  max-width: 18rem;
  margin-bottom: 0.8rem;
}

.footer-contact {
  font-size: 0.8rem;
  color: var(--msl-muted-400);
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-contact-icon {
  font-size: 1.1rem;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-contact-item div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-contact-label {
  font-size: 0.7rem;
  color: var(--msl-muted-400);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.footer-contact-item a,
.footer-contact-item span {
  color: var(--msl-ghost-text);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 200ms ease;
}

.footer-contact-item a:hover {
  color: var(--msl-accent);
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer-socials span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--msl-ghost-text);
}

.footer-links {
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--msl-muted-400);
}

.footer-links a:hover {
  color: var(--msl-ghost-text);
}

.footer-newsletter {
  margin-top: 0.65rem;
}

.footer-newsletter label {
  font-size: 0.75rem;
  color: var(--msl-muted-400);
  display: block;
  margin-bottom: 0.3rem;
}

.footer-input-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-input-row input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--msl-dark-2);
  background: var(--msl-ink);
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
  color: var(--msl-ghost-text);
  outline: none;
}

.footer-input-row input::placeholder {
  color: var(--msl-muted);
}

.footer-bottom {
  padding: 0.9rem 0 1.6rem;
  font-size: 0.75rem;
  color: var(--msl-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-bottom-links a {
  color: var(--msl-muted);
}

/* Responsive */
@media (max-width: 1023px) {
  .nav-center {
    display: none;
  }

  .nav-right .nav-signin {
    display: none;
  }

  .nav-right .btn-primary {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2rem;
  }

  .hero-visual {
    order: -1;
  }

  .admissions-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .nav-inner {
    height: var(--nav-height-mobile);
  }

  .topbar-inner {
    justify-content: center;
    text-align: center;
  }

  .hero {
    padding-bottom: 3rem;
  }

  .hero-cta-row {
    width: 100%;
    margin-top: 0.9rem; /* less gap now that .hero-meta and .hero-stats-bar are hidden */
  }

  .hero-cta-row .btn {
    border: 2px solid var(--msl-ink);
    flex: 1;
    justify-content: center;
  }

  .hero-stats-bar {
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero-stats-bar .chip {
    white-space: nowrap;
  }

  .section {
    padding: 3rem 0;
  }

  .admissions-strip {
    padding: 1.4rem 1.1rem;
    border-radius: 1rem;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Improve contrast for controls inside the dark hero section */
.hero .btn-outline {
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.02);
  padding: 0.65rem 1.4rem;
  font-weight: 600;
}
.hero .btn-outline:hover,
.hero .btn-outline:focus {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.98);
  transform: translateY(-2px);
}

/* Ensure secondary chips and meta text are visible on hero */
.hero .chip {
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.04);
}

.hero .hero-meta,
.hero .hero-subtitle {
  color: rgba(255,255,255,0.85);
}

/* Slightly increase spacing for hero CTA row on small screens */
@media (max-width: 767px) {
  .hero-cta-row {
    flex-direction: column;
    gap: 0.8rem;
  }
  .hero-cta-row .btn {
    width: 100%;
  }
}

/* Make the badge in the hero more prominent */
.hero .badge {
  font-size: 0.88rem;
  padding: 0.22rem 0.7rem;
  background: rgba(59,130,246,0.12);
  color: var(--msl-ice);
}
.hero .badge-dot {
  width: 9px;
  height: 9px;
  background: var(--msl-accent);
}

/* Improve hero floating card spacing and legibility */
.hero-floating-card {
  /* keep the card inside the hero box by default */
  right: 0.6rem;
  bottom: 0.9rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.82rem;
  max-width: 260px;
  min-width: 180px;
  box-shadow: 0 18px 48px rgba(2,6,23,0.5);
  border-radius: 1rem;
  z-index: 5;
}

/* New: compact events pill + popover (replaces floating card) */
.hero-events {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 6;
}
.events-pill {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--msl-white);
  border: 1px solid rgba(255,255,255,0.04);
  font-weight: 600;
  cursor: pointer;
}
.hero-events-popover {
  display: none;
  position: absolute;
  right: 0;
  bottom: 46px;
  background: rgba(15,23,42,0.96);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 18px 48px rgba(2,6,23,0.6);
  width: 280px;
}
.hero-events-popover[aria-hidden="false"] { display: block; }
.hero-events-popover .hero-floating-title { color: var(--msl-offwhite); margin-bottom: 0.45rem; }
.hero-events-popover .hero-floating-row { color: var(--msl-muted-400); display:flex; justify-content:space-between; gap:0.4rem; }
.hero-events-popover .popover-close { margin-top: 0.5rem; color: var(--msl-white); border: 1px solid rgba(255,255,255,0.04); background: transparent; padding:0.35rem 0.6rem; border-radius:8px; }

@media (max-width: 1023px) {
  .hero-events { right: 0.4rem; bottom: 0.4rem; }
}
@media (max-width: 767px) {
  /* Make the events trigger visible and flow with the layout on small screens
     instead of staying absolutely positioned (which caused overlap and shrinkage) */
  .hero-events {
    display: block;
    position: static;
    right: auto;
    bottom: auto;
    margin-top: 0.85rem;
    z-index: 3;
    width: 100%;
  }

  .events-pill {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    text-align: center;
  }

  /* Render the popover as an inline block on mobile so it doesn't overlap other content.
     It will appear beneath the pill when opened. */
  .hero-events-popover {
    position: static;
    right: auto;
    bottom: auto;
    /* extend slightly beyond container padding to appear visually wider on mobile */
    width: calc(100% + 24px);
    box-shadow: none;
    padding: 0.6rem 0.7rem;
    margin-top: 0.5rem;
    border-radius: 12px;
    background: rgba(15,23,42,0.96);
  }
  .hero-events-popover[aria-hidden="false"] { display: block; }

  /* Make the hero card adapt to a single-column stacked layout on small screens
     to avoid content compression. */
  .hero-card {
    padding-right: 1rem; /* remove large reserve space */
    padding-left: 1rem;
    min-height: auto;
    /* extend full-bleed to counter container padding so the card appears wider on small devices */
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
  }

  .hero-card-main {
    grid-template-columns: 1fr; /* stack avatar + copy vertically */
    gap: 0.6rem;
    align-items: start;
  }

  .hero-avatar {
    width: 40px;
    height: 40px;
    border: 2px solid var(--msl-ink);
  }

  .hero-card-metrics {
    flex-direction: column;
    gap: 0.6rem;
  }

  .hero-metric {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
}
.hero-floating-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: rgba(255,255,255,0.85);
  align-items: center;
}

@media (max-width: 1023px) {
  .hero-floating-card { right: 0.4rem; bottom: 0.4rem; }
}

@media (max-width: 767px) {
  .hero-floating-card { display: none; }
}
.hero-slide, .hero-controls .hero-prev, .hero-controls .hero-next { transition: opacity .9s ease, transform .9s ease; }

@media (prefers-reduced-motion: reduce){
  .hero-slide, .hero-controls .hero-prev, .hero-controls .hero-next { transition: none; }
}

.hero { min-height: 520px; display:flex; align-items:center; }

/* Full-screen hero beneath sticky nav on large screens */
@media (min-width: 992px){
  .hero { height: calc(100vh - var(--nav-height-desktop)); min-height:520px; }
  .hero .hero-inner{ align-items:center; min-height: calc(100vh - var(--nav-height-desktop)); }
}

/* Mobile stacking */
@media (max-width: 767px){
  /* Make mobile hero take 70% viewport height (excluding nav) so the slideshow has a strong presence */
  .hero { height: calc(70vh - var(--nav-height-mobile)); min-height: 420px; padding-top: 0.25rem; }

  /* Stack content vertically and anchor to the top for a clean mobile layout */
  .hero-inner{ display:flex; flex-direction:column; gap: 0.9rem; align-items: flex-start; justify-content: flex-start; padding-inline: 1rem; padding-top: 12px; }

  /* Remove the visual side card on small screens in favor of content stacked on top of the slides */
  .hero-visual{ display: none !important; }

  /* Ensure hero controls sit above the slideshow near the bottom without overlapping important content */
  .hero-controls{ bottom: 0.9rem; }

  /* Slightly lift the content for improved breathing room */
  .hero-card{ margin: 0 auto; width: min(92%, 360px); transform: translateY(-12px); }

  /* Reduce side shading to make the image feel edge-to-edge on small devices */
  .hero-slide::before,
  .hero-slide::after{ width: calc(var(--hero-shadow-width) * 0.5); --hero-shadow-opacity: 0; opacity: 0 !important; }

  /* Improve contrast — make overlay slightly stronger on mobile so white text remains legible over images */
  .hero-overlay { background: linear-gradient(180deg, rgba(15,23,42,0.28) 0%, rgba(15,23,42,0.36) 60%, rgba(15,23,42,0.5) 100%); }

  /* Make headline slightly bigger and clamp to fit narrow widths */

  /* Force zoomed backgrounds on small screens so slides always fill the hero height
     Use `auto 150%` to prefer keeping image aspect ratio while scaling height above 100%.
     Use center positioning to keep the focal point central. */
  .hero-slide {
    background-size: auto 150% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    /* Slightly raise the base scale so the images feel more 'zoomed' relative to the content */
    transform: scale(1.04);
    transform-origin: center center;
  }

  /* Keep the active slide slightly more zoomed than the rest for a subtle effect */
  .hero-slide.active { transform: scale(1.08); }
  .hero-title { font-size: clamp(1.25rem, 5vw, 1.6rem); }
  .hero-subtitle { font-size: 0.95rem; }

  /* Stack meta and chips compactly */
  .hero-meta { display:flex; gap:0.6rem; flex-wrap:wrap; align-items:center; }
  .hero-stats-bar { display:flex; gap:0.45rem; flex-wrap:wrap; }
  .hero-stats-bar .chip { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
  .hero-meta { font-size: 0.92rem; }

  /* Remove the stats chips and hero meta on small screens — keep hero focused on headline, subtitle and CTAs */
  .hero-stats-bar { display: none !important; }
  .hero-meta { display: none !important; }
}
.hero-controls .hero-prev:focus, .hero-controls .hero-next:focus { outline: 2px solid rgba(255,255,255,0.12); outline-offset: 2px; }