@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500&display=swap');

/* Homepage level-two headings share the requested navy colour. */
body.index-page h2 { color: #123e67 !important; }

/* Keep main and dropdown navigation text consistent across header states. */
body #header .navmenu a { color: #123e67 !important; }

/* Display the supplied I-RISE artwork; the frame removes only transparent margins. */
.site-logo-frame {
  display: block;
  position: relative;
  width: 160px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 3px;
}
.site-logo-frame .site-logo-image,
.footer .site-logo-frame .site-logo-image {
  display: block;
  position: absolute;
  width: 120%;
  max-width: none;
  height: auto;
  max-height: none;
  left: -10%;
  top: -23%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  filter: none;
}
.footer .site-logo-frame { width: 205px; background: transparent; }
body.dark-mode .header .site-logo-frame { background: transparent; }
.top-navbar .site-logo-frame { width: 120px; background: transparent; }
.top-navbar { padding-inline: clamp(20px, 8vw, 160px); }

/* Compact navigation inspired by ISRA Associates. */
body .header,
body.scrolled .header {
  --header-surface: #f1f6fb;
  --header-hover: #e2edf7;
  --header-border: #dce7ef;
  min-height: 72px;
  padding-block: 8px;
  background: rgba(253, 251, 247, .92) !important;
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 12px 32px #0a192f0a;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
body.scrolled .header { box-shadow: 0 6px 28px #173e6710; }
.header .site-logo-frame { width: 108px; background: transparent; }
.header .container { gap: 24px; }
.header .rise-brand { border-radius: 5px; }
body .header .navmenu a,
body.scrolled .header .navmenu a,
body .header .cta-btn {
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
}
body .header .navmenu > ul > li > a::before { display: none; }
body .header .navmenu > ul > li > a {
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
body .header .navmenu > ul > li > a:hover,
body .header .navmenu > ul > li > a.active,
body .header .navmenu > ul > li > a:focus-visible {
  background: transparent;
}
.header .header-actions { gap: 12px !important; }
body .header .darkmode-toggle-btn,
body .header .mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--rise-ink) !important;
}
body .header .darkmode-toggle-btn:hover,
body .header .mobile-nav-toggle:hover { background: var(--header-hover); }
body .header .mobile-nav-toggle { border-color: var(--header-border); }
body .header .cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid #2f6a48;
  border-radius: 999px;
  background: #2f6a48;
  box-shadow: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
body .header .cta-btn i { font-size: 13px; }
body .header .cta-btn:hover,
body .header .cta-btn:focus-visible {
  background: #39734b;
  border-color: #39734b;
  color: #fff;
  box-shadow: 0 5px 16px #39734b24;
}
body .header .cta-btn:active {
  background: #2c5c3b;
  border-color: #2c5c3b;
  color: #fff;
  box-shadow: 0 2px 8px #39734b24;
}
body .header .navmenu .dropdown ul {
  background: var(--rise-paper) !important;
  border-color: var(--header-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px #123e6718;
}
body .header .navmenu .dropdown ul a { border-radius: 9px; }
body .header .navmenu .dropdown ul a:hover { background: var(--header-hover) !important; }
body.dark-mode .header,
body.dark-mode.scrolled .header {
  --header-surface: #19364a;
  --header-hover: #24495f;
  --header-border: #304e61;
  background: rgba(16, 38, 55, .94) !important;
}
.rise-slideshow { margin-top: 0; }
.rise-slideshow .hero-copy { padding-top: 154px; }

/* Keep the navigation transparent only while the hero is at the top of the page. */
body.hero-header-transparent .header {
  background: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.hero-header-transparent { --hero-nav-color: #123e67; }
body.hero-header-transparent:has(.rise-slideshow[data-theme="photo"]) { --hero-nav-color: #fff; }
body.hero-header-transparent:has(.rise-slideshow[data-theme="photo"]) .header .site-logo-image {
  filter: brightness(0) invert(1);
}
.header .site-logo-image--white { display: none; }
body.hero-header-transparent .header .darkmode-toggle-btn,
body.hero-header-transparent:not(.mobile-nav-active) .header .mobile-nav-toggle {
  color: var(--hero-nav-color) !important;
}
@media (min-width: 1200px) {
  body.hero-header-transparent:has(.rise-slideshow[data-theme="photo"]) .header .site-logo-image--default {
    display: none;
  }
  body.hero-header-transparent:has(.rise-slideshow[data-theme="photo"]) .header .site-logo-image--white {
    display: block;
    filter: none;
  }
  body.hero-header-transparent #header .navmenu > ul > li > a {
    color: var(--hero-nav-color) !important;
  }
  body.hero-header-transparent .header .navmenu > ul > li > a::after {
    background: var(--hero-nav-color);
  }
  body.hero-header-transparent:has(.rise-slideshow[data-theme="sculpture"]) .header .navmenu > ul > li > a:is(:hover, :focus-visible, .active) {
    color: #2f6a48 !important;
  }
}
@media (min-width: 1200px) {
  body .header > .container { display: grid !important; grid-template-columns: 1fr auto 1fr; gap: 24px; }
  .header .rise-brand { justify-self: start; margin-right: 0; }
  .header .header-actions { justify-self: end; }
  .header .navmenu > ul {
    gap: 23px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .header .navmenu > ul > li > a { padding: 14px 3px; line-height: 1.4; }
  .header .navmenu > ul > li > a::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 5px;
    height: 2px;
    background: linear-gradient(90deg, #1877a5, #6ca9c9);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s ease;
  }
  .header .navmenu > ul > li > a:is(:hover, :focus-visible, .active)::after { transform: scaleX(1); }
  body .header .navmenu .dropdown > ul { left: -14px; min-width: 310px; padding: 10px; border-top: 3px solid #5a9bbc; }
  body .header .navmenu .dropdown ul a { padding: 11px 13px; font-size: 14px; }
}
@media (max-width: 1199px) {
  body .header, body.scrolled .header { min-height: 64px; padding-block: 7px; }
  .header .site-logo-frame { width: 96px; }
  .header .container { gap: 12px; }
  .rise-slideshow .hero-copy { padding-top: 136px; }
  body.mobile-nav-active .header .navmenu > ul {
    inset: 74px 20px auto;
    max-height: calc(100dvh - 94px);
    overflow-y: auto;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--header-border);
    box-shadow: 0 20px 60px #10263730;
  }
  body.mobile-nav-active .header .mobile-nav-toggle { top: 10px; right: 24px; }
  body.mobile-nav-active .header .navmenu > ul > li > a { padding: 13px 16px; border-radius: 12px; }
  body.mobile-nav-active .header .navmenu > ul > li > a:is(:hover, :focus-visible, .active) { background: var(--header-hover); }
  body .header .navmenu .dropdown ul { box-shadow: none; }
}

/* One full-height mobile navigation pattern for every page. */
@media (max-width: 767px) {
  body.mobile-nav-active #header {
    background: #f6f8f8 !important;
    border-bottom: 1px solid rgba(4, 29, 49, .12) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.mobile-nav-active #header .rise-brand {
    position: relative;
    z-index: 10023;
  }

  body.mobile-nav-active #header .header-actions {
    display: none !important;
  }

  body.mobile-nav-active #header .navmenu {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10020 !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #f6f8f8 !important;
  }

  body.mobile-nav-active #header .mobile-nav-toggle {
    position: fixed !important;
    top: max(14px, env(safe-area-inset-top)) !important;
    right: 20px !important;
    z-index: 10022 !important;
    min-width: 50px;
    min-height: 50px;
    margin: 0;
    border: 1px solid rgba(4, 29, 49, .18);
    border-radius: 12px;
    background: #f6f8f8 !important;
    color: #041d31 !important;
    touch-action: manipulation;
  }

  body.mobile-nav-active #header .navmenu > ul {
    position: relative !important;
    inset: auto !important;
    max-height: none !important;
    overflow: visible;
    margin: 0 30px !important;
    padding: calc(92px + env(safe-area-inset-top)) 0 28px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body.mobile-nav-active #header .navmenu > ul > li {
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(4, 29, 49, .12);
  }

  body.mobile-nav-active #header .navmenu > ul > li > a {
    min-height: 0;
    padding: 20px 0;
    border-radius: 0;
    color: #082b47 !important;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -.4px;
  }

  body.mobile-nav-active #header .navmenu > ul > li > a.active {
    color: #2f6a48 !important;
  }

  body.mobile-nav-active #header .navmenu .toggle-dropdown {
    display: none;
  }

  body.mobile-nav-active #header .navmenu .dropdown > ul,
  body.mobile-nav-active #header .navmenu .dropdown > ul:not(.dropdown-active) {
    display: block !important;
    max-height: none !important;
    margin: -2px 0 16px;
    padding: 0;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body.mobile-nav-active #header .navmenu .dropdown ul li {
    margin: 0;
  }

  body.mobile-nav-active #header .navmenu .dropdown ul a {
    min-height: 0;
    padding: 6px 0 !important;
    color: #33415a !important;
    font-family: "Outfit", sans-serif;
    font-size: 15px !important;
    font-weight: 400;
    line-height: 21px;
  }

  body.mobile-nav-active #header .navmenu .home-mobile-contact {
    margin-top: 6px;
    padding-top: 12px;
  }

  body.mobile-nav-active #header .navmenu .home-mobile-contact > a {
    min-height: 56px;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 0;
    background: #2f6a48;
    color: #fff !important;
    font-family: "Outfit", sans-serif;
    font-size: 16px;
  }
}
@media (max-width: 575px) {
  body .header, body.scrolled .header { min-height: 60px; padding-block: 7px; }
  .header .site-logo-frame { width: 88px; }
  .header .container { padding-inline: 20px; gap: 8px; }
  .header .header-actions { gap: 8px !important; }
  body .header .cta-btn { padding-inline: 15px; font-size: 12px; }
  body .header .cta-btn i { display: none; }
  .rise-slideshow .hero-copy { padding-top: 108px; }
  body.mobile-nav-active .header .mobile-nav-toggle { top: 8px; right: 20px; }
}
@media (max-width: 359px) {
  .header .site-logo-frame { width: 80px; }
  .header .container { padding-inline: 12px; gap: 6px; }
  .header .header-actions { gap: 6px !important; }
  body .header .cta-btn { padding-inline: 12px; font-size: 11px; }
  body.mobile-nav-active .header .mobile-nav-toggle { right: 12px; }
}

/* Mobile navigation must use the viewport, not the blurred header,
   as the fixed drawer's containing block. Keep controls legible over all slides. */
@media (max-width: 1199px) {
  body #header,
  body.hero-header-transparent #header {
    --mobile-nav-ink: #123e67;
    height: 72px;
    min-height: 72px;
    padding: 0;
    background: #fdfbf7 !important;
    border-bottom-color: var(--header-border) !important;
    border-bottom-width: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body #header > .container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 10px;
    width: 100%;
    max-width: none;
    padding-inline: 20px;
  }
  body #header .rise-brand {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    justify-self: start;
  }
  body #header .site-logo-frame { width: 104px; }
  body #header .header-actions {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  body #header .header-actions > .cta-btn { display: none; }
  body #header .navmenu {
    grid-column: 3;
    grid-row: 1;
    height: 44px;
    line-height: 0;
  }
  body #header .mobile-nav-toggle { margin: 0; }
  body.dark-mode #header {
    --mobile-nav-ink: #edf5fc;
    background: #102637 !important;
  }
  body #header .site-logo-image {
    filter: none !important;
  }
  body.dark-mode #header .site-logo-frame {
    background: #fdfbf7;
  }
  body #header .mobile-nav-toggle,
  body #header .darkmode-toggle-btn {
    flex-shrink: 0;
    background: var(--header-surface);
    color: var(--mobile-nav-ink) !important;
    border-color: var(--header-border);
  }
  body.mobile-nav-active #header .navmenu {
    inset: 72px 0 0;
    height: auto;
    line-height: normal;
    background: #10263799;
    transition: none;
  }
  body.mobile-nav-active #header .mobile-nav-toggle {
    top: 14px;
    right: 20px;
  }
  body.mobile-nav-active #header .navmenu > ul {
    inset: 12px 16px auto;
    max-height: calc(100dvh - 100px);
    padding: 12px;
    border-radius: 16px;
    overscroll-behavior: contain;
  }
  body.mobile-nav-active #header .navmenu > ul > li > a {
    min-height: 52px;
    padding: 12px 16px;
    font-size: 16px;
  }
  body #header .navmenu .toggle-dropdown {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  body #header .navmenu .dropdown > ul {
    transform: none;
  }
  body #header .navmenu .dropdown > ul:not(.dropdown-active) {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    padding: 0;
    margin-block: 0;
  }
  body #header .navmenu .dropdown > .dropdown-active {
    max-height: none;
    margin: 4px 0 12px;
    padding: 4px;
  }
  body #header .navmenu .home-mobile-contact {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--header-border);
  }
  body #header .navmenu .home-mobile-contact > a {
    justify-content: center;
    gap: 12px;
    background: #2f6a48;
    color: #fff !important;
  }
  body #header .home-mobile-contact > a > i {
    width: auto;
    height: auto;
    margin: 0;
    background: none;
  }
  body.mobile-nav-active #header .navmenu > ul,
  body #header .navmenu .dropdown ul {
    background: var(--header-surface) !important;
  }
  body #header .navmenu a {
    color: var(--mobile-nav-ink) !important;
  }
}

/* Keep this after the legacy drawer rules so every page uses the same panel. */
@media (max-width: 767px) {
  body.mobile-nav-active #header {
    background: #f6f8f8 !important;
    border-bottom: 1px solid rgba(4, 29, 49, .12) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.mobile-nav-active #header .rise-brand {
    position: relative;
    z-index: 10023;
  }

  body.mobile-nav-active #header .header-actions { display: none !important; }

  body.mobile-nav-active #header .navmenu {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10020 !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #f6f8f8 !important;
  }

  body.mobile-nav-active #header .mobile-nav-toggle {
    position: fixed !important;
    top: max(14px, env(safe-area-inset-top)) !important;
    right: 20px !important;
    z-index: 10022 !important;
    min-width: 50px;
    min-height: 50px;
    margin: 0;
    border: 1px solid rgba(4, 29, 49, .18);
    border-radius: 12px;
    background: #f6f8f8 !important;
    color: #041d31 !important;
    touch-action: manipulation;
  }

  body.mobile-nav-active #header .navmenu > ul {
    position: relative !important;
    inset: auto !important;
    max-height: none !important;
    overflow: visible;
    margin: 0 30px !important;
    padding: calc(92px + env(safe-area-inset-top)) 0 28px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body.mobile-nav-active #header .navmenu > ul > li {
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(4, 29, 49, .12);
  }

  body.mobile-nav-active #header .navmenu > ul > li > a {
    min-height: 0;
    padding: 20px 0;
    border-radius: 0;
    color: #082b47 !important;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -.4px;
  }

  body.mobile-nav-active #header .navmenu > ul > li > a.active { color: #2f6a48 !important; }
  body.mobile-nav-active #header .navmenu .toggle-dropdown { display: none; }

  body.mobile-nav-active #header .navmenu .dropdown > ul,
  body.mobile-nav-active #header .navmenu .dropdown > ul:not(.dropdown-active) {
    display: block !important;
    max-height: none !important;
    margin: -2px 0 16px;
    padding: 0;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body.mobile-nav-active #header .navmenu .dropdown ul li { margin: 0; }

  body.mobile-nav-active #header .navmenu .dropdown ul a {
    min-height: 0;
    padding: 6px 0 !important;
    color: #33415a !important;
    font-family: "Outfit", sans-serif;
    font-size: 15px !important;
    font-weight: 400;
    line-height: 21px;
  }

  body.mobile-nav-active #header .navmenu .home-mobile-contact {
    margin-top: 6px;
    padding-top: 12px;
  }

  body.mobile-nav-active #header .navmenu .home-mobile-contact > a {
    min-height: 56px;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 0;
    background: #2f6a48;
    color: #fff !important;
    font-family: "Outfit", sans-serif;
    font-size: 16px;
  }
}
