/**
 * Sitewide critical CSS — shared chrome only.
 *
 * Keeps first paint usable while main.*.css loads asynchronously.
 * Intentionally small; do not dump full component styles here.
 */

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

html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Elza, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.63;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  background-color: #fefdeb;
  color: #004b87;
}

@media screen and (min-width: 768px) {
  body {
    font-size: 16px;
  }
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: #004b87;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

a.skip-link.visually-hidden:focus {
  position: absolute !important;
  z-index: 10000;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  background-color: #fff;
  color: #000;
  padding: 3px 10px;
}

/* Weather bar: fixed 45px (12+21+12) before async CSS / API content (CLS). */
.weather-wrapper {
  box-sizing: border-box;
  height: 45px;
  min-height: 45px;
  max-height: 45px;
  padding: 12px 0;
  overflow: hidden;
}

.weather-widget {
  box-sizing: border-box;
  height: 21px;
  min-height: 21px;
  line-height: 21px;
  opacity: 0;
}

.weather-widget.weather-loaded {
  opacity: 1;
}

/* Header shell — also mirrored inline in html.html.twig (first paint). */
header {
  margin-bottom: -6px;
  position: relative;
  z-index: 1000;
}

/*
 * Homepage content overlaps the header by design. Without this in critical/
 * inline CSS, async main.css applies it late and <main> jumps 139→129.
 * Higher specificity + !important so .container { max-width: 1200px } cannot
 * win first paint then lose later (region width 1200→1350 CLS).
 */
.region-content,
.region-content.container {
  margin-top: -16px;
  max-width: none !important;
  width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.header-wrapper {
  /* Fixed height + overflow clip while closed. !important beats aggregates
     that reload height:auto and let off-canvas nav inflate the bar (CLS). */
  box-sizing: border-box;
  height: 100px !important;
  max-height: 100px !important;
  padding: 19px 20px;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: #004b87;
  border-radius: 10px;
  z-index: 2;
  overflow: hidden;
}

html.open-menu .header-wrapper,
body.open-menu .header-wrapper,
.header-wrapper:has(.information__button.active),
.header-wrapper:has(.information__dropdown.active) {
  overflow: visible;
}

@media screen and (max-width: 500px) {
  .header-wrapper {
    height: 72px !important;
    max-height: 72px !important;
    padding: 5px 20px;
  }
}

.region-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 62px;
}

/*
 * Off-canvas nav must not layout while the menu is closed — including when
 * it already lives under .menu-wrapper (server-rendered). A prior rule set
 * display:block for anything inside .menu-wrapper and inflated the header.
 */
header .soka-main-nav,
header .menu--main,
header #block-soka-theme-informationfor,
header #block-customlabelforsupportingnavigation,
header #block-supportingmenu,
header #block-shortcutsblock,
header #block-supportingnavsoka,
header #block-soka-theme-sociallinkssoka {
  display: none !important;
}

html.open-menu header .menu-wrapper .soka-main-nav,
html.open-menu header .menu-wrapper .menu--main,
html.open-menu header .menu-wrapper #block-soka-theme-informationfor,
html.open-menu header .menu-wrapper #block-customlabelforsupportingnavigation,
html.open-menu header .menu-wrapper #block-supportingnavsoka,
html.open-menu header .menu-wrapper #block-soka-theme-sociallinkssoka,
body.open-menu header .menu-wrapper .soka-main-nav,
body.open-menu header .menu-wrapper .menu--main,
body.open-menu header .menu-wrapper #block-soka-theme-informationfor,
body.open-menu header .menu-wrapper #block-customlabelforsupportingnavigation,
body.open-menu header .menu-wrapper #block-supportingnavsoka,
body.open-menu header .menu-wrapper #block-soka-theme-sociallinkssoka {
  display: block !important;
}

/* Closed panel stub — keep 0×0 until .open-menu expands it. */
.menu-wrapper {
  position: absolute !important;
  top: 0;
  right: 0;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  background: transparent !important;
}

.field--name-field-org-logo {
  position: relative;
  max-width: 123px;
  flex-shrink: 0;
}

.field--name-field-org-logo a,
.field--name-field-org-logo .logo-link {
  display: flex;
  align-items: center;
  width: 168px;
  height: 62px;
}

/* Override critical `img { height:auto }` — unloaded logo imgs were 0×0 then
   168×62 (major CLS on mobile/desktop). */
.field--name-field-org-logo img {
  display: block;
  width: 168px !important;
  height: 62px !important;
  max-width: none !important;
  object-fit: contain;
}

.field--name-field-org-logo svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

@media screen and (min-width: 768px) {
  .field--name-field-org-logo {
    max-width: 164px;
  }
}

/* Match main CSS before it loads — otherwise siteheader jumps ~164→652px. */
.block-soka-header-block {
  margin-right: auto;
}

@media screen and (min-width: 768px) {
  .block-soka-header-block {
    display: flex;
    align-items: center;
    position: relative;
    width: calc(50% + 82px);
    justify-content: space-between;
  }
}

#block-mainnavsoka {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
  min-height: 40px;
}

@media screen and (min-width: 960px) {
  /* Information For + Menu — reserve width through font-swap (desktop only). */
  #block-mainnavsoka {
    min-width: 270px;
  }
}

nav.menu--mainnavsoka {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Hidden below desktop until main CSS; without this the button (+ JS-filled
   dropdown) flashes audience links then vanishes. */
.information__button {
  display: none !important;
}

.information__dropdown {
  display: none !important;
}

.information__dropdown.active {
  display: block !important;
}

@media screen and (min-width: 960px) {
  .information__button {
    display: block !important;
    position: relative;
    padding: 20px 30px 20px 20px;
    white-space: nowrap;
    background-color: transparent;
    color: #fefdeb;
    border: none;
    box-shadow: none;
    cursor: pointer;
    font-family: Elza, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.28px;
    min-width: 172px;
    box-sizing: border-box;
  }
}

.menu__button {
  z-index: 10;
  position: relative;
  display: flex;
  width: 100px;
  height: 40px;
  padding: 16px 0;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-transform: capitalize;
  font-family: inherit;
  font-weight: 700;
  flex-shrink: 0;
}

/* Layout primitives used above the fold */
.container {
  width: 100%;
  padding-right: 10px;
  padding-left: 10px;
  margin-right: auto;
  margin-left: auto;
}

/* Match Bootstrap theme container max-widths before async main CSS — otherwise
   header.container shrinks (e.g. ~1350→1200) and scores ~0.77 CLS. */
@media screen and (min-width: 1235px) {
  .container {
    max-width: 1200px;
  }
}

@media screen and (min-width: 1500px) {
  .container {
    max-width: 1420px;
  }
}

/*
 * Header CTA / support links live in the logo block. Main CSS hides them
 * (CTAs re-show at ≥768px). Without this, they paint as a nav flash until
 * async CSS arrives.
 */
.field--name-field-wrapper-support-nav,
.field--name-field-org-name,
.field--name-field-wrapper-ctas {
  display: none !important;
}

/* Theme utility used above the fold — lives in async main CSS otherwise,
   so stats/CTAs paint as default link blue on first paint (visible flash). */
.text-purelight {
  color: #fefdeb !important;
}

@media screen and (min-width: 768px) {
  .block-soka-header-block .field--name-field-wrapper-ctas {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-left: 33px;
    /* Reserve Apply•Visit•Give width so font-swap does not shove MAIN. */
    min-width: 140px;
  }

  .block-soka-header-block .field--name-field-wrapper-ctas .field__item {
    position: relative;
    white-space: nowrap;
  }

  .block-soka-header-block .field--name-field-wrapper-ctas .field__item::after {
    content: '•';
    position: relative;
    font-weight: 400;
    color: #fefdeb;
    margin-left: 10px;
  }

  .block-soka-header-block .field--name-field-wrapper-ctas .field__item:last-child::after {
    display: none;
  }

  .block-soka-header-block .field--name-field-wrapper-ctas a {
    color: #fefdeb !important;
    font-size: 14px;
    letter-spacing: 0.28px;
    text-decoration: none;
    white-space: nowrap;
  }
}

/* Home hero shell — reserve space for LCP image (also mirrored inline in
   html.html.twig so first paint does not wait on this file). */
.homepage-hero {
  min-height: 300px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  /* Former .pb-50 — first paint must match or title-row CLS ~0.12 (726→676). */
  padding-bottom: 50px !important;
  margin-top: 0 !important;
}

.homepage-hero picture {
  display: contents;
}

/* Bottom-anchored; height/min/max locked. Bottom gap via padding (not h1 margin). */
.homepage-hero .title-row {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 122px !important;
  min-height: 122px !important;
  max-height: 122px !important;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 0 50px !important;
  display: block;
  overflow: hidden;
  box-sizing: border-box !important;
}

.homepage-hero .title-row > [class*="col-"] {
  width: 100%;
  max-width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.homepage-hero .home-hero__title {
  position: relative;
  z-index: 2;
  max-width: 375px;
  margin: 0 auto;
  text-align: center;
  height: 100%;
}

.homepage-hero h1 {
  position: relative;
  z-index: 2;
  font-family: Elza, sans-serif;
  color: #fefdeb;
  margin: 0 !important;
  padding: 0 !important;
  font-weight: 700;
  text-shadow: 2px 2px 12px #00000099;
  font-size: 30px;
  line-height: 1.2;
  height: 72px !important;
  max-height: 72px !important;
  overflow: hidden;
}

/* Flip-card shell — async main CSS was sizing these late (title-wrapper CLS). */
.flip-card {
  width: 300px;
  height: 340px;
  position: relative;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.flip-card__front,
.flip-card__back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.flip-card__image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
}

.flip-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: none;
}

.flip-card__title-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 24px 24px;
  z-index: 3;
  box-sizing: border-box;
}

.flip-card__title.h6,
.flip-card__title {
  margin: 0;
  font-family: Elza, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  min-height: 50px;
}

/* Gen-block 3-col image slot — matches mixin height before async main CSS. */
.paragraph--type--gen-block-3-column .gen-col-card__image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  padding: 5px;
  box-sizing: border-box;
}

.paragraph--type--gen-block-3-column .gen-col-card__image picture {
  display: contents;
}

.paragraph--type--gen-block-3-column .gen-col-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: none;
}

/*
 * Hero stats: show the correct copy immediately AND paint them styled.
 * Display alone was not enough — without glass/white text they flash as
 * raw blue body text over the hero photo until async main CSS arrives.
 */
.home-hero__stats__desktop {
  display: none !important;
}

.home-hero__stats__mobile {
  display: block;
  height: 90px;
  min-height: 90px;
  max-height: 90px;
  overflow: hidden;
  background-color: #fefdeb;
  color: #004b87;
}

/* Pre-Swiper: keep slides in a single-row clip so all 3 don't stack (CLS). */
.home-hero__stats__mobile .hero-stats-swiper {
  position: relative;
  overflow: hidden;
  height: 90px;
  padding: 0 60px;
}

.home-hero__stats__mobile .swiper-wrapper {
  display: flex;
  height: 100%;
}

.home-hero__stats__mobile .swiper-slide {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-hero__stats__mobile .swiper-button-prev,
.home-hero__stats__mobile .swiper-button-next {
  width: 44px;
  height: 44px;
  box-sizing: border-box;
}

/* Scroll CTA uses Bootstrap d-* in markup historically; hide until desktop
   styles below apply so it does not flash as a native grey button. */
.home-hero__scroll {
  display: none !important;
}

@media screen and (min-width: 960px) {
  .home-hero__stats__desktop {
    display: flex !important;
    position: absolute;
    top: 60px;
    right: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    z-index: 1;
    color: #fefdeb;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.05)
    );
    border: 1px solid #fefdeb;
    border-right: none;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .home-hero__stats__desktop .home-hero__stat__item {
    text-align: center;
    color: #fefdeb;
    padding: 30px;
    border-bottom: 1px solid #fefdeb;
    width: 100%;
    box-sizing: border-box;
  }

  .home-hero__stats__desktop .home-hero__stat__item:last-child {
    border-bottom: none;
  }

  .home-hero__stats__desktop .stat__number__inner {
    font-size: 62px;
    line-height: 1;
    letter-spacing: 0.6px;
    color: #fefdeb;
  }

  .home-hero__stats__desktop .stat__caption {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #fefdeb;
  }

  .home-hero__stats__mobile {
    display: none !important;
  }

  .home-hero__scroll {
    display: flex !important;
    position: absolute;
    bottom: 0;
    right: 10%;
    height: 30px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    color: #004b87;
    z-index: 10;
    background: #fefdeb;
    padding: 12px 24px;
    border-radius: 10px 10px 0 0;
    border: 0;
    cursor: pointer;
  }
}

.homepage-hero > .container {
  position: relative;
  border-radius: 0 0 10px 10px;
  min-height: 300px;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  box-sizing: border-box;
  margin-top: 0 !important;
}

.home-hero__bg {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center;
  pointer-events: none;
  border-radius: 0 0 10px 10px;
}

@media screen and (min-width: 960px) {
  .homepage-hero {
    height: 100vh !important;
    max-height: 726px !important;
    display: flex;
    justify-content: flex-end;
  }

  .homepage-hero > .container {
    min-height: 0;
    height: 100% !important;
    display: block;
  }

  .homepage-hero .title-row {
    height: 196px !important;
    min-height: 196px !important;
    max-height: 196px !important;
    padding: 0 0 20px !important;
  }

  .homepage-hero .title-row > [class*="col-"] {
    width: 66.666667%;
    max-width: 66.666667%;
    margin: 0 20px;
  }

  .homepage-hero .home-hero__title {
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .homepage-hero h1 {
    font-size: 80px;
    line-height: 1.1;
    height: 176px !important;
    max-height: 176px !important;
  }
}

/*
 * Side-scroller desktop shell. Without this, cards stack as a ~3300px column
 * until async main.css arrives, then collapse to the 900px horizontal track
 * (large gap under the hero + major region-content CLS).
 */
@media screen and (min-width: 960px) {
  .side-scroller {
    padding: 80px 0 0;
    overflow: hidden;
  }

  .side-scroller__scroll-container {
    height: 900px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .side-scroller__inner {
    position: relative;
    width: calc((1420px * 3) + 1920px);
    height: 900px;
  }

  .side-scroller__cards {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    height: 100%;
    width: calc((1420px * 3) + 1920px);
  }

  .side-scroller__card {
    position: relative;
    flex-shrink: 0;
    width: 1420px;
    height: 900px;
    margin: 0;
    overflow: visible;
  }

  .side-scroller__card--fourth-slide {
    width: 1920px !important;
    max-width: none !important;
  }

  .side-scroller__card .side-scroller__slide-image {
    position: absolute;
    display: block;
  }

  .side-scroller__card-tag {
    position: absolute;
    z-index: 3;
  }

  .side-scroller__card-inner {
    position: absolute;
    padding: 0;
  }
}

/* Footer shell */
.site-footer {
  margin-top: 20px;
  color: #fefdeb;
}

.footer-quicklinks {
  background-color: #66b0ff;
  border-radius: 10px 10px 0 0;
}
