/* =====================================================================
   RSC HERO  ·  clean rebuild — June 2026
   Single source of truth for all hero sections.
   Loaded LAST on every affected page (after animations.css).
   ===================================================================== */


/* ─── 1. SCHOOL / ABOUT PAGE: VIDEO HERO ────────────────────────────── */

/*
 * On desktop (≥992px): utility-bar and nav are position:fixed — they float
 * above the page flow with z-index 1040/1300. The hero starts at y:0 in the
 * flow so the video naturally extends behind the fixed nav band. The nav's
 * dark glass background blends into the video. Content inside the hero is
 * padded down by 130px so it reads below the nav.
 *
 * On tablet/mobile (≤991px): utility-bar is static, nav is sticky — both
 * sit in flow above the hero. No overlap; the hero starts below them.
 */

header.school-hero,
header.page-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  background: #07161e !important;
  padding: 0 !important;
}

/* Full-bleed video */
header.school-hero .hero-video-bg,
header.page-hero .hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* Gradient overlay — video stays clearly visible, text stays readable */
header.school-hero::before,
header.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(5, 15, 26, 0.58) 0%,
    rgba(5, 15, 26, 0.30) 50%,
    rgba(5, 15, 26, 0.12) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Rainbow stripe at the bottom of the hero */
header.school-hero::after,
header.page-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--rainbow,
    linear-gradient(90deg, #e23b3b, #f1a005, #129b4e, #0f5a89, #7b3ff2));
  z-index: 3;
  pointer-events: none;
}

/* Content sits above the overlay */
header.school-hero > .container,
header.page-hero > .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 130px; /* clear fixed utility-bar(34px) + nav(74px) + breathing room */
  padding-bottom: 40px;
}

/* On mobile/tablet the nav is in flow — no overlap, less top padding needed */
@media (max-width: 991px) {
  header.school-hero > .container,
  header.page-hero > .container {
    padding-top: 36px;
    padding-bottom: 36px;
  }
}

/* Typography */
header.school-hero h1,
header.page-hero h1,
header.page-hero .section-title {
  color: #fff;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.08;
  margin: 14px 0 16px;
}

header.school-hero p,
header.school-hero .section-copy,
header.page-hero p,
header.page-hero .section-copy {
  color: rgba(255, 255, 255, 0.88);
  max-width: 660px;
  font-size: 17px;
}

/* Suppress the starfield canvas — the video replaces it */
header.school-hero .starfield-canvas,
header.page-hero .starfield-canvas {
  display: none !important;
}

/* Reduce-motion: hide video, near-black background remains */
@media (prefers-reduced-motion: reduce) {
  header.school-hero .hero-video-bg,
  header.page-hero .hero-video-bg {
    display: none;
  }
}


/* ─── 2. HOME PAGE CAROUSEL HERO ─────────────────────────────────────── */

header.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 108px);
  min-height: 520px;
  overflow: hidden;
  padding-top: 0 !important;
  background: #06182a;
}

@media (min-width: 992px) {
  header.hero {
    margin-top: 108px;
  }
}

@media (max-width: 991px) {
  header.hero {
    height: calc(100vh - 106px);
    min-height: 380px;
  }
}

/* Carousel structure fills the full hero height */
header.hero .carousel,
header.hero .carousel-inner,
header.hero .carousel-inner .item,
header.hero .hero-slide {
  height: 100%;
  min-height: 0 !important;
}

/* Individual slide */
.hero-slide {
  position: relative;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

/* Dark gradient over image slides */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(3, 18, 32, 0.80) 0%,
    rgba(10, 49, 80, 0.50) 55%,
    rgba(6, 29, 46, 0.40) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Rainbow stripe at bottom of each slide */
.hero-slide::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--rainbow,
    linear-gradient(90deg, #e23b3b, #f1a005, #129b4e, #0f5a89, #7b3ff2));
  pointer-events: none;
  z-index: 2;
}

/* Video slides — transparent so the header-level video backgrounds show through */
.hero-slide-video {
  background: transparent;
}

/* Home page: video backgrounds placed as direct children of <header class="hero">.
   This is the IDENTICAL pattern used on the about/school pages that work perfectly.
   Videos live OUTSIDE the Bootstrap carousel so Bootstrap can never interfere. */
header.hero .hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
header.hero .hero-video-bg.hero-vid-active {
  opacity: 1;
}

/* Slide content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 32px 0;
  color: #fff;
}

.hero-content h1 {
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.06;
  margin: 12px 0 16px;
  font-weight: 800;
  color: #fff;
}

.hero-content p {
  font-size: 18px;
  opacity: 0.93;
  max-width: 660px;
  color: #eaf2f8;
}

@media (max-width: 767px) {
  .hero-content h1 { font-size: clamp(24px, 7vw, 36px); }
  .hero-content p  { font-size: 15px; }
}

/* Reduce-motion: hide video slides' video element */
@media (prefers-reduced-motion: reduce) {
  .hero-slide-video .hero-video { display: none; }
}


/* ─── 3. CAROUSEL NAVIGATION ARROWS ──────────────────────────────────── */

/* Hide Bootstrap's default chevron controls */
header.hero .carousel-control {
  display: none !important;
}

/* Custom prev / next arrow buttons */
.rsc-carousel-prev,
.rsc-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.rsc-carousel-prev { left: 20px; }
.rsc-carousel-next { right: 20px; }

.rsc-carousel-prev:hover,
.rsc-carousel-next:hover,
.rsc-carousel-prev:focus,
.rsc-carousel-next:focus {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
  text-decoration: none;
  transform: translateY(-50%) scale(1.07);
  outline: none;
}

.rsc-carousel-prev svg,
.rsc-carousel-next svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .rsc-carousel-prev { left: 10px; }
  .rsc-carousel-next { right: 10px; }
  .rsc-carousel-prev,
  .rsc-carousel-next {
    width: 42px;
    height: 42px;
  }
}

/* Slide indicator dots */
header.hero .carousel-indicators {
  bottom: 18px;
  z-index: 10;
  margin: 0;
}

header.hero .carousel-indicators li {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}

header.hero .carousel-indicators .active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}


/* ─── 4. NAV ON HERO PAGES ────────────────────────────────────────────── */

/*
 * body.has-hero-page is added by site.js when .school-hero or .page-hero
 * exists on the page. This makes the nav dark so it reads as part of the
 * same header band as the utility bar — the video starts right below.
 */

body.has-hero-page .site-nav:not(.nav-scrolled) {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: 0 2px 20px rgba(7, 55, 87, 0.10) !important;
  border-bottom: 1px solid rgba(15, 90, 137, 0.08) !important;
  transition: background 0.35s ease !important;
}

body.has-hero-page .site-nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 4px 24px rgba(7, 55, 87, 0.10) !important;
}

/* Nav links: dark on the smoky-white nav */
body.has-hero-page .site-nav:not(.nav-scrolled) .navbar-nav > li > a,
body.has-hero-page .site-nav:not(.nav-scrolled) .navbar-brand span,
body.has-hero-page .site-nav:not(.nav-scrolled) .brand span {
  color: #1a2639 !important;
  text-shadow: none !important;
}

body.has-hero-page .site-nav:not(.nav-scrolled) .navbar-nav > li > a:hover,
body.has-hero-page .site-nav:not(.nav-scrolled) .navbar-nav > li > a:focus {
  color: #0f5a89 !important;
  background: transparent !important;
}

/* Language switcher */
body.has-hero-page .site-nav:not(.nav-scrolled) .lang-switcher a {
  color: rgba(26, 38, 57, 0.55) !important;
}

body.has-hero-page .site-nav:not(.nav-scrolled) .lang-switcher a:not(.lang-active) {
  color: #1a2639 !important;
}

/* CTA pill */
body.has-hero-page .site-nav:not(.nav-scrolled) .nav-cta {
  background: #0f5a89 !important;
  border: 1.5px solid #0f5a89 !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(15, 90, 137, 0.20) !important;
}

/* Hamburger */
body.has-hero-page .site-nav:not(.nav-scrolled) .icon-bar {
  background: #1a2639 !important;
}

body.has-hero-page .site-nav:not(.nav-scrolled) .navbar-toggle,
body.has-hero-page .site-nav:not(.nav-scrolled) .mobile-nav-toggle {
  background: transparent !important;
  border-color: rgba(26, 38, 57, 0.25) !important;
}


/* ─── 5. PARTNERSHIP SECTION ──────────────────────────────────────────── */

.rsc-partnership {
  background: linear-gradient(135deg, #eef5fb 0%, #e4eff8 100%);
  padding: 64px 0;
}

.rsc-partnership-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 36px rgba(7, 55, 87, 0.09);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: center;
}

.rsc-partnership-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.rsc-partnership-logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  flex: 1;
}

.rsc-partnership-logo-box img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.rsc-partnership-flag {
  font-size: 52px;
  line-height: 1;
  display: block;
}

.rsc-partnership-logo-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink, #1a2639);
  line-height: 1.3;
}

.rsc-partnership-logo-loc {
  font-size: 11px;
  color: var(--muted, #6b7d96);
}

.rsc-partnership-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rsc-partnership-divider-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent, var(--brand, #0f5a89) 50%, transparent);
}

.rsc-partnership-divider-badge {
  background: var(--brand, #0f5a89);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.rsc-partnership-body .section-title {
  margin-top: 10px;
  font-size: clamp(22px, 2.6vw, 32px);
}

.rsc-partnership-body p {
  color: var(--muted, #6b7d96);
  margin-bottom: 24px;
  line-height: 1.7;
}

@media (max-width: 991px) {
  .rsc-partnership-card {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .rsc-partnership { padding: 40px 0; }
  .rsc-partnership-logos { gap: 14px; }
  .rsc-partnership-flag { font-size: 40px; }
  .rsc-partnership-logo-box img { height: 48px; }
}


/* ─── 6. TRUSTED-BY: THREE COLUMNS ───────────────────────────────────── */

.rsc-trusted {
  background: #f0f6fb;
  padding: 40px 0;
  border-top: 1px solid #d4e0ed;
  border-bottom: 1px solid #d4e0ed;
}

.rsc-trusted-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand, #0f5a89);
  margin: 0 0 24px;
  opacity: 0.8;
}

.rsc-trusted-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rsc-trusted-chip {
  background: #fff;
  border: 1.5px solid #cfe0ed;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: rsc-chip-tick 9s ease-in-out infinite;
}

.rsc-trusted-chip:nth-child(2) { animation-delay: 3s; }
.rsc-trusted-chip:nth-child(3) { animation-delay: 6s; }

@keyframes rsc-chip-tick {
  0%, 78%, 100% {
    border-color: #cfe0ed;
    box-shadow: none;
    transform: translateY(0);
  }
  85% {
    border-color: var(--brand, #0f5a89);
    box-shadow: 0 4px 20px rgba(15, 90, 137, 0.14);
    transform: translateY(-3px);
  }
}

.rsc-trusted-chip img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.rsc-trusted-chip-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink, #1a2639);
  line-height: 1.3;
}

.rsc-trusted-chip-sub {
  font-size: 11px;
  color: var(--muted, #6b7d96);
  margin-top: 2px;
}

@media (max-width: 767px) {
  .rsc-trusted-grid { grid-template-columns: 1fr; }
  .rsc-trusted-chip { animation: none; }
}


/* ─── 7. DECORATIVE ACCENTS ───────────────────────────────────────────── */

/* Thin rainbow line at the base of the utility bar */
.utility-bar { position: relative; }

.utility-bar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--rainbow,
    linear-gradient(90deg, #e23b3b, #f1a005, #129b4e, #0f5a89, #7b3ff2));
  opacity: 0.28;
  pointer-events: none;
}

/* Shimmer sweep on hero badge chips */
.hero-badge {
  position: relative;
  overflow: hidden;
}

.hero-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.24) 50%,
    transparent 72%
  );
  background-size: 200% 100%;
  border-radius: inherit;
  animation: rsc-badge-shimmer 3.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rsc-badge-shimmer {
  0%   { background-position:  200% center; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { background-position: -200% center; opacity: 0; }
}

/* Rainbow accent line beneath dark-section headings */
.bg-dark .section-title,
.cta-panel .section-title {
  position: relative;
}

.bg-dark .section-title::after,
.cta-panel .section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: var(--rainbow,
    linear-gradient(90deg, #e23b3b, #f1a005, #129b4e, #0f5a89, #7b3ff2));
  opacity: 0.68;
}
