:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --gold-500: #d97706;
  --gold-400: #f59e0b;
  --gold-200: #fde68a;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(2, 44, 34, 0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--slate-900);
  background-color: var(--slate-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Topbar */
.topbar {
  background: var(--emerald-950);
  color: #cbd5e1;
  font-size: 0.82rem;
  padding: 0.45rem 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.topbar a:hover {
  color: var(--gold-200);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 1rem;
}

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

.brand-logo {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 1.05rem;
  color: var(--emerald-900);
  line-height: 1.2;
}

.brand-text span {
  display: block;
  font-size: 0.76rem;
  color: var(--slate-500);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-700);
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--emerald-800);
  background: var(--emerald-50);
}

.nav-cta {
  background: var(--emerald-800) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.1rem !important;
}

.nav-cta:hover {
  background: var(--emerald-900) !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: var(--slate-700);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--emerald-700);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--emerald-800);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold-500);
  color: var(--white);
}

.btn-gold:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--slate-200);
  color: var(--slate-700);
}

.btn-outline:hover {
  background: var(--slate-100);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--emerald-950) 0%, var(--emerald-800) 60%, #0f766e 100%);
  color: var(--white);
  padding: 4.5rem 0 5.5rem;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(253, 230, 138, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(253, 230, 138, 0.35);
  color: var(--gold-200);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.15rem;
}

.hero h1 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.05rem;
  color: #d1fae5;
  margin: 0 0 1.75rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}

.hero-card-title {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--gold-200);
  margin: 0 0 0.75rem;
}

.hero-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.hero-info-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.9rem;
  background: rgba(2, 44, 34, 0.45);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.badge-accred {
  background: var(--gold-400);
  color: var(--emerald-950);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* Stats Bar */
.stats-wrap {
  margin-top: -2.75rem;
  position: relative;
  z-index: 5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 1.75rem;
  color: var(--emerald-800);
  font-weight: 800;
}

.stat-card span {
  font-size: 0.88rem;
  color: var(--slate-600);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.75rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.section-header h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  margin: 0 0 0.65rem;
  color: var(--slate-900);
}

.section-header p {
  margin: 0;
  color: var(--slate-600);
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 1.4rem;
}

.card-img {
  width: 100%;
  height: 205px;
  object-fit: cover;
  background: var(--emerald-50);
}

.unit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-800);
  border: 1px solid var(--emerald-100);
}

.pill-gold {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* Page Header */
.page-banner {
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-800));
  color: var(--white);
  padding: 3.25rem 0;
}

.page-banner h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.page-banner p {
  margin: 0;
  color: #d1fae5;
}

/* Forms & Alerts */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--slate-700);
}

.form-control {
  width: 100%;
  padding: 0.68rem 0.88rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.94rem;
  background: var(--white);
  color: var(--slate-900);
}

.form-control:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}

.alert {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.93rem;
  border: 1px solid transparent;
}

.alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* Footer */
.footer {
  background: var(--emerald-950);
  color: #cbd5e1;
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer h4 {
  color: var(--white);
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
}

.footer a:hover {
  color: var(--gold-200);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  background: #16a34a;
  color: var(--white);
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.wa-float:hover {
  background: #15803d;
}

@media (max-width: 960px) {
  .hero-grid,
  .footer-grid,
  .grid-4,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.35rem;
  }
  .nav-links.open {
    display: flex;
  }
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   3D Full Cinematic Starfield & Homepage Polish
   ========================================================= */
body.home-cinematic {
  background: radial-gradient(ellipse at 18% 12%, #074232 0%, #032119 42%, #02120d 100%);
  color: #f8fafc;
  position: relative;
  overflow-x: hidden;
}

#starfield3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

body.home-cinematic .topbar {
  position: relative;
  z-index: 60;
  background: rgba(1, 20, 15, 0.85);
  border-bottom: 1px solid rgba(253, 230, 138, 0.14);
}

body.home-cinematic .navbar {
  background: rgba(3, 30, 23, 0.74);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(253, 230, 138, 0.16);
}

body.home-cinematic .brand-text strong {
  color: #ffffff;
}

body.home-cinematic .brand-text span {
  color: #a7f3d0;
}

body.home-cinematic .nav-links a {
  color: #e2e8f0;
}

body.home-cinematic .nav-links a:hover,
body.home-cinematic .nav-links a.active {
  color: var(--gold-200);
  background: rgba(255, 255, 255, 0.08);
}

body.home-cinematic .nav-cta {
  background: linear-gradient(135deg, var(--gold-500), #b45309) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

body.home-cinematic .mobile-toggle {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
}

@media (max-width: 768px) {
  body.home-cinematic .nav-links {
    background: rgba(2, 28, 21, 0.96);
    border-bottom-color: rgba(253, 230, 138, 0.18);
  }
}

.hero-cinematic {
  position: relative;
  z-index: 2;
  background: transparent;
  padding: 5.25rem 0 6.25rem;
  overflow: visible;
}

.hero-cinematic::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 95vw);
  height: 520px;
  background: radial-gradient(circle at 30% 40%, rgba(16, 185, 129, 0.22), transparent 55%),
              radial-gradient(circle at 75% 30%, rgba(245, 158, 11, 0.14), transparent 50%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.hero-cinematic::after {
  display: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(6, 78, 59, 0.55);
  border: 1px solid rgba(253, 230, 138, 0.42);
  color: var(--gold-200);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.18);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}

.hero-cinematic h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.35rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #d1fae5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-subchips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.75rem;
}

.hero-subchip {
  font-size: 0.8rem;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero-card-3d {
  background: linear-gradient(155deg, rgba(6, 78, 59, 0.62) 0%, rgba(2, 34, 25, 0.82) 100%);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(253, 230, 138, 0.28);
  box-shadow: 0 28px 60px -15px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.22s ease-out, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}

.hero-logo-halo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 0 26px rgba(253, 230, 138, 0.45);
}

.hero-card-3d .hero-info-list li {
  background: rgba(2, 26, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-card-3d .hero-info-list li:hover {
  border-color: rgba(253, 230, 138, 0.4);
  transform: translateX(4px);
}

/* Home Sections over 3D Starfield */
body.home-cinematic .stats-wrap {
  z-index: 4;
}

body.home-cinematic .stat-card {
  background: rgba(4, 42, 32, 0.78);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(253, 230, 138, 0.24);
  border-top: 3px solid var(--gold-400);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

body.home-cinematic .stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(253, 230, 138, 0.55);
}

body.home-cinematic .stat-card strong {
  color: var(--gold-200);
}

body.home-cinematic .stat-card span {
  color: #d1fae5;
}

.section-cosmos {
  position: relative;
  z-index: 2;
  background: transparent;
}

.section-cosmos-glass {
  position: relative;
  z-index: 2;
  background: rgba(2, 24, 18, 0.48);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(253, 230, 138, 0.14);
  border-bottom: 1px solid rgba(253, 230, 138, 0.14);
}

body.home-cinematic .section-kicker {
  background: rgba(245, 158, 11, 0.16);
  color: var(--gold-200);
  border: 1px solid rgba(253, 230, 138, 0.32);
}

body.home-cinematic .section-header h2 {
  color: #ffffff;
}

body.home-cinematic .section-header p {
  color: #cbd5e1;
}

body.home-cinematic .card {
  background: rgba(255, 255, 255, 0.96);
  color: var(--slate-900);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 45px -12px rgba(0, 0, 0, 0.42);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

body.home-cinematic .card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.55), 0 0 24px rgba(16, 185, 129, 0.22);
}

.card-img-wrap {
  overflow: hidden;
  position: relative;
}

.card-img-wrap .card-img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

body.home-cinematic .card:hover .card-img-wrap .card-img {
  transform: scale(1.06);
}

.card-glass-dark {
  background: rgba(5, 46, 35, 0.64) !important;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(253, 230, 138, 0.22) !important;
  color: #f8fafc !important;
}

.card-glass-dark h3,
.card-glass-dark h4 {
  color: #ffffff !important;
}

.card-glass-dark p {
  color: #cbd5e1 !important;
}

.program-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(245, 158, 11, 0.22));
  border: 1px solid rgba(253, 230, 138, 0.32);
  color: var(--gold-200);
  margin-bottom: 0.85rem;
}

body.home-cinematic .btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(253, 230, 138, 0.38);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

body.home-cinematic .btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--gold-200);
}

.cta-cinematic {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(4, 48, 36, 0.52) 0%, rgba(2, 20, 15, 0.86) 100%);
  border-top: 1px solid rgba(253, 230, 138, 0.18);
  color: #ffffff;
  text-align: center;
}

body.home-cinematic .footer {
  position: relative;
  z-index: 2;
  background: rgba(1, 16, 12, 0.92);
  border-top: 1px solid rgba(253, 230, 138, 0.15);
}

/* Scroll reveal */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease-out, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
  .reveal-up { opacity: 1; transform: none; transition: none; }
}
