/*
 * JEDI Bright Blue Foundation V3 — Saturated Royal Blue
 * Global color and hero-gradient refresh.
 * Loaded after existing JEDI styles to avoid changing page structure.
 */

:root,
[data-theme="jedi"] {
  --jedi-navy: #1648B8;
  --jedi-navy-deep: #123D99;
  --jedi-blue: #1B5FCB;
  --jedi-red: #C06A48;
  --jedi-ink: #19354F;
  --jedi-muted: #667E96;
  --jedi-paper: #F5F9FD;
  --jedi-border: #DCE8F2;
  --jedi-blue-soft: #EDF6FC;
  --jedi-blue-mist: #F7FAFD;
  --jedi-sky: #72A9FF;
  --jedi-hero-gradient: linear-gradient(90deg, #1648B8 0%, #1B5FCB 54%, #2673D8 100%);
}

html { background: #F7FAFD; }
body { background-color: #FCFDFE; color: var(--jedi-ink); }

/* A lighter shared foundation for existing site chrome. */
.utility-bar { background: #123D99 !important; }
.site-header { background: rgba(255,255,255,.97); }
.brand-mark { background: linear-gradient(145deg, #1648B8, #2673D8) !important; }

/* Unified blue-gradient treatment for every current JEDI hero family. */
:is(
  .jedi-hero,
  .page-hero,
  .home-v3-hero,
  .about-v1-hero,
  .institution-v1-hero,
  .school-profile-hero,
  .language-v1-hero,
  .sa-v1-hero,
  .vocational-v1-hero
) {
  background:
    radial-gradient(ellipse at 83% 12%, rgba(105,157,255,.20) 0%, rgba(127,181,209,0) 34%),
    radial-gradient(ellipse at 8% 96%, rgba(25,86,210,.17) 0%, rgba(78,145,187,0) 38%),
    var(--jedi-hero-gradient) !important;
  color: #FFFFFF !important;
}

/* Softer, clearer hero copy and a warm JEDI copper highlight. */
:is(
  .home-v3-hero,
  .about-v1-hero,
  .institution-v1-hero,
  .school-profile-hero,
  .language-v1-hero,
  .sa-v1-hero,
  .vocational-v1-hero,
  .jedi-hero,
  .page-hero
) :is(p, .hero-description, .home-v3-hero-lead, .about-v1-hero-lead) {
  color: rgba(246, 251, 255, .88) !important;
}

:is(
  .home-v3-hero h1 em,
  .about-v1-hero h1 em,
  .institution-v1-hero h1 em,
  .school-profile-hero h1 em,
  .language-v1-hero h1 em,
  .sa-v1-hero h1 em,
  .vocational-v1-hero h1 em,
  .page-hero h1 em,
  .hero-title em
) {
  color: #FFE0B8 !important;
}

:is(
  .home-v3-eyebrow,
  .about-v1-kicker,
  .institution-v1-kicker,
  .language-v1-kicker,
  .sa-v1-kicker,
  .vocational-v1-kicker,
  .hero-eyebrow
) {
  color: #DCEFFA !important;
}

/* Less black overlay on the main photographic hero cards. */
.home-v3-hero-figure::after {
  background: linear-gradient(180deg, transparent 43%, rgba(16,55,88,.62) 100%) !important;
}
.home-v3-hero-caption,
.about-v1-hero .about-v1-visual-caption,
.language-v1-hero-caption,
.sa-v1-hero-caption,
.vocational-v1-hero-caption {
  background: rgba(18, 61, 153, .80) !important;
  border-color: rgba(255,255,255,.26) !important;
}

:is(
  .home-v3-hero-figure,
  .about-v1-visual-frame,
  .institution-v1-hero-visual,
  .school-profile-hero-visual,
  .language-v1-hero-image,
  .sa-v1-hero-photo,
  .vocational-v1-hero-photo-wrap
) {
  border-color: rgba(255,255,255,.34) !important;
  box-shadow: 0 26px 64px rgba(18,48,135,.22) !important;
}

/* Light blue surface rhythm; do not turn every section into a gradient. */
.home-v3-trust,
.home-v3-considerations,
.home-v3-institutions,
.institution-v1-directory-intro,
.sa-v1-intro,
.language-v1-intro,
.vocational-v1-intro {
  background-color: var(--jedi-blue-mist);
}

:is(
  .home-v3-program-card,
  .home-v3-consideration-grid article,
  .home-v3-why-grid article,
  .about-v1-step,
  .about-v1-values-grid article,
  .institution-v1-card,
  .language-v1-card,
  .vocational-v1-focus-card,
  .vocational-v1-institution-card
) {
  border-color: #DFEAF3;
}

:is(
  .home-v3-program-card:hover,
  .home-v3-consideration-grid article:hover,
  .about-v1-step:hover,
  .about-v1-values-grid article:hover,
  .institution-v1-card:hover
) {
  border-color: #BFD8EA;
}

/* Preserve the JEDI copper CTA identity; only refine the elevation. */
:is(
  .home-v3-button-primary,
  .about-v1-button-primary,
  .institution-v1-button-primary,
  .language-v1-button-primary,
  .sa-v1-button-primary,
  .vocational-v1-button-primary
) {
  box-shadow: 0 10px 25px rgba(179, 74, 44, .20), 0 2px 5px rgba(16,42,71,.08) !important;
}

@media (prefers-reduced-motion: no-preference) {
  :is(.home-v3-hero, .about-v1-hero, .institution-v1-hero, .school-profile-hero,
      .language-v1-hero, .sa-v1-hero, .vocational-v1-hero, .jedi-hero, .page-hero) {
    background-size: 100% 100%, 100% 100%, 100% 100%;
  }
}

@media (max-width: 760px) {
  :is(.home-v3-hero, .about-v1-hero, .institution-v1-hero, .school-profile-hero,
      .language-v1-hero, .sa-v1-hero, .vocational-v1-hero, .jedi-hero, .page-hero) {
    background:
      radial-gradient(ellipse at 88% 8%, rgba(105,157,255,.18) 0%, rgba(105,157,255,0) 34%),
      var(--jedi-hero-gradient) !important;
  }
}
