:root {
  --surface: #ffffff;
  --bg: #f6f8fc;
  --ink: #1f2b3d;
  --muted: #5a667b;
  --brand: #1a4fa8;
  --brand-dark: #123b7f;
  --accent: #ff4f8b;
  --border: #d7deea;
  --section: #edf2fb;
  --shadow: 0 14px 32px rgba(16, 33, 66, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.top-contact {
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.92rem;
  max-height: 48px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.top-contact p {
  margin: 0;
}

.top-contact a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 10px 26px rgba(14, 28, 56, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

.site-header.scrolled .top-contact {
  max-height: 0;
  opacity: 0;
}

.nav-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: padding 0.25s ease;
}

.site-header.scrolled .nav-wrap {
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 1.08rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-heart {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ecd9df;
  box-shadow: 0 2px 6px rgba(129, 68, 91, 0.14);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

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

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f8dff, #4ad2ff);
  transition: width 0.1s linear;
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px 50px;
}

.hero-banner {
  margin-top: 18px;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  min-height: clamp(430px, 56vw, 760px);
  box-shadow: var(--shadow);
  isolation: isolate;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #d9e4f5;
}

.hero-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(11, 26, 56, 0.84) 28%, rgba(11, 26, 56, 0.25) 82%);
}

.hero-layer {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.hero-layer-a {
  width: 340px;
  height: 340px;
  right: -110px;
  top: -90px;
  background: radial-gradient(circle at 30% 30%, rgba(141, 184, 255, 0.52), rgba(141, 184, 255, 0));
}

.hero-layer-b {
  width: 280px;
  height: 280px;
  right: 8%;
  bottom: -150px;
  background: radial-gradient(circle at 60% 40%, rgba(255, 98, 167, 0.35), rgba(255, 98, 167, 0));
}

.hero-badge {
  position: absolute;
  z-index: 2;
  color: #f3f6ff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(18, 40, 78, 0.45);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  animation: floatBadge 8s ease-in-out infinite;
  opacity: 0.9;
}

.hero-badge-a {
  top: 20%;
  right: 6%;
}

.hero-badge-b {
  right: 10%;
  bottom: 14%;
  animation-delay: 1.8s;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 64px 56px;
  max-width: 640px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #99b5f3;
}

.hero-content h1 {
  margin: 0 0 12px;
  line-height: 1.12;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero-content p {
  margin: 0;
  color: #f0f4ff;
  font-size: 1.04rem;
  max-width: 48ch;
}

.hero-mission {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-style: italic;
  font-weight: 700;
  color: #f7f9ff !important;
  max-width: 62ch !important;
}

.btn {
  display: inline-block;
  margin-top: 20px;
  border-radius: 999px;
  padding: 11px 18px;
  text-decoration: none;
  font-weight: 800;
}

.btn.primary {
  background: #fff;
  color: var(--brand-dark);
}

.legacy-section,
.programs,
.media-gallery,
.videos,
.contact-cta {
  margin-top: 38px;
}

.legacy-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-top: 1px solid #e3eaf5;
  border-bottom: 1px solid #e3eaf5;
  padding: 42px 0;
}

.legacy-grid {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
  display: block;
}

.legacy-grid h2,
.programs h2,
.contact-cta h2 {
  margin: 0 0 10px;
  line-height: 1.18;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.legacy-grid p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
}

.programs {
  background: var(--section);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 34px 26px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-left: 0;
  border-right: 0;
}

.center {
  text-align: center;
}

.programs h2 {
  text-align: center;
  margin-bottom: 20px;
}

.program-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}

.program-shell:last-child {
  margin-bottom: 0;
}

.program-head p {
  margin: 0;
  color: var(--brand);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.program-head h3 {
  margin: 4px 0 8px;
  font-size: 2rem;
  line-height: 1.1;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill-row span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #27538b;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e3eefb;
}

.program-body {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: start;
}

.program-shell:nth-of-type(even) .program-gallery {
  order: 2;
}

.program-shell:nth-of-type(even) .program-detail {
  order: 1;
}

.program-gallery {
  display: grid;
  gap: 10px;
}

.program-main-frame {
  border-radius: 12px;
  border: 1px solid var(--border);
  height: clamp(280px, 34vw, 520px);
  position: relative;
  overflow: hidden;
  background: #edf2fb;
  --gallery-bg: none;
}

.program-main-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gallery-bg);
  background-size: cover;
  background-position: center;
  filter: blur(16px) saturate(1.05);
  transform: scale(1.08);
  opacity: 0.8;
}

.program-main-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.program-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.program-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: #b7c6de;
  opacity: 0.95;
  transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.program-thumb img {
  display: none;
}

.program-thumb.is-active {
  background: var(--brand);
  transform: scale(1.18);
  opacity: 1;
}

.program-thumb:hover {
  background: #86a3d4;
  opacity: 1;
}

.program-detail {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 14px;
}

.detail-label {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: #23467e;
}

.detail-group + .detail-group {
  margin-top: 6px;
}

.detail-toggle {
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px dashed #c8d5ea;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 24px 10px 0;
  position: relative;
  cursor: pointer;
}

.detail-toggle::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 10px;
  color: var(--brand);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.detail-toggle.is-open::after {
  content: "−";
}

.detail-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.detail-content p {
  margin: 0;
  color: var(--muted);
  padding: 0 0 8px;
}

.detail-content.is-open {
  max-height: 140px;
}

.program-btn {
  margin-top: 12px;
  background: #4aafff;
  color: #08315e;
  box-shadow: none;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.media-gallery h2,
.videos h2 {
  text-align: center;
  margin: 0 0 10px;
}

.media-intro {
  margin: 0 auto 14px;
  text-align: center;
  color: var(--muted);
  max-width: 72ch;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.media-grid figure,
.video-grid figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.media-grid figure {
  position: relative;
  background: #0f1729;
}

.media-grid figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  filter: blur(16px) saturate(1.04);
  transform: scale(1.08);
  opacity: 0.72;
}

.media-grid img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(240px, 36vw, 420px);
  object-fit: contain;
  object-position: center;
}

.media-grid figcaption {
  display: none;
}

.media-grid figcaption,
.video-grid figcaption {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.83rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.video-grid video {
  width: 100%;
  max-height: 460px;
  background: #000;
  display: block;
  cursor: zoom-in;
}

main img,
main video {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 10, 20, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-media {
  max-width: min(98vw, 1500px);
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  border-radius: 10px;
}

.lightbox video.lightbox-media {
  width: min(98vw, 1400px);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.8rem;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.contact-cta {
  background: linear-gradient(135deg, #10356f, #1b56ad);
  color: #fff;
  border-radius: 18px;
  padding: 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  box-shadow: 0 14px 26px rgba(13, 34, 78, 0.22);
}

.contact-cta p {
  margin: 0;
  color: #e5ecff;
}

.contact-cta .eyebrow {
  color: #9ebafb;
}

.hero-cta {
  margin-top: 8px;
}

.site-footer {
  margin-top: 40px;
  padding: 24px 22px 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease-out, transform 0.28s ease-out;
  transition-delay: 0s;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] {
  transition-delay: 0.05s;
}

.reveal[data-delay="2"] {
  transition-delay: 0.1s;
}

.reveal[data-delay="3"] {
  transition-delay: 0.15s;
}

@keyframes floatBadge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 920px) {
  .legacy-grid,
  .program-body {
    grid-template-columns: 1fr;
  }

  .program-main-image {
    width: 100%;
    height: 100%;
  }

  .program-main-frame {
    height: clamp(220px, 52vw, 360px);
  }

  .program-shell:nth-of-type(even) .program-gallery,
  .program-shell:nth-of-type(even) .program-detail {
    order: initial;
  }

  .contact-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    display: none;
  }
}

@media (max-width: 680px) {
  .wrap,
  .nav-wrap,
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .legacy-section {
    padding: 30px 0;
  }

  .legacy-grid {
    padding: 0 14px;
    gap: 16px;
  }

  .nav-links {
    display: none;
  }

  .hero-banner {
    min-height: 360px;
    border-radius: 0;
  }

  .hero-content {
    padding: 32px 20px;
  }

  .programs {
    border-radius: 0;
    padding: 14px;
  }

  .program-shell {
    padding: 12px;
  }

  .program-head h3 {
    font-size: 1.6rem;
  }

  .program-thumbs {
    justify-content: center;
  }

  .contact-cta {
    border-radius: 14px;
    padding: 18px;
  }

  .media-grid {
    grid-template-columns: 1fr;
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .media-grid::-webkit-scrollbar {
    height: 8px;
  }

  .media-grid::-webkit-scrollbar-thumb {
    background: #b8c7e2;
    border-radius: 999px;
  }

  .media-grid figure {
    flex: 0 0 86vw;
    max-width: 86vw;
    scroll-snap-align: center;
  }

  .media-grid img {
    height: min(74vh, 620px);
  }
}
