@charset "UTF-8";
/*!
Theme Name: NESI v1.0
Theme URI:
Author:  Site Partners
Author URI: https://nesi.com
Description: Description
Version: 2.0.0
License: Private License
License URI: LICENSE
Text Domain: Site Partners
*/

.three-pages {
  padding: 50px 10vw;
}
.three-pages .wp-block-image {
  max-height: 225px;
  overflow: hidden;
}

/* Capabilities page quick overrides (ensure design parity and immediate effect) */
/* Ensure Capabilities page uses original header (over hero) at top-of-page */
body.page-capabilities #masthead:not(.site-header--scrolled),
body.capabilities-page #masthead:not(.site-header--scrolled) {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  background: transparent !important;
  box-shadow: none;
  z-index: 1000;
}

/* Expertise list cards – match Technology visual style */
.capabilities-expertise__list {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 26px;
}
.capabilities-expertise__list li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(8, 76, 138, 0.18);
  background: #f4fbff;
  box-shadow: 0 20px 35px rgba(10, 60, 110, 0.08);
}
.capabilities-expertise__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(9, 118, 194, 0.35) 0%,
    rgba(9, 118, 194, 0.18) 70%,
    rgba(9, 118, 194, 0.12) 100%
  );
  color: #0764a6;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.65),
    0 12px 22px rgba(7, 79, 150, 0.18);
}
.capabilities-expertise__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.capabilities-expertise__text {
  font-size: 1.08rem;
  line-height: 1.6;
  color: #032742;
  font-weight: 500;
}

/* Card grid: two up on desktop, single column on small screens */
.capabilities-cards__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
@media (max-width: 767px) {
  .capabilities-cards__grid {
    grid-template-columns: 1fr;
  }
}

/* Card internals – 5px inner padding and consistent image frame */
.capabilities-card {
  display: flex;
  flex-direction: column;
  padding: 5px;
  border-radius: 22px;
  border: 1px solid rgba(9, 74, 136, 0.16);
  background: #fff;
  box-shadow: 0 28px 44px rgba(10, 60, 110, 0.1);
}
.capabilities-card__content {
  padding: 5px 5px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.capabilities-card__media {
  margin: 0;
  padding: 5px;
  aspect-ratio: 16/9;
  height: auto;
  overflow: hidden;
}
.capabilities-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}
body .entry-header .header span {
  padding-right: 6px;
}
@media only screen and (min-width: 992px) {
  .primary-content-block
    .col-12
    .index__1.primary-content-block__text__inner.align_content--center {
    padding-right: 10vw;
  }
}
body #masthead {
  overflow: unset;
}

/* Header and Navigation Styles */
.site-header {
  width: 100%;
  position: relative;
  z-index: 1000;
  border-bottom: 0.5px solid #717171;
  margin-top: clamp(12px, 2.8vw, 28px);
}

#masthead #site-navigation .navbar-inner {
  padding-left: clamp(0rem, 0.5vw, 10px) !important;
  padding-right: clamp(0rem, 0.5vw, 10px) !important;
}

@media (min-width: 992px) {
  #masthead .navbar-brand-wrapper {
    margin-right: 0 !important;
    margin-left: clamp(0rem, 0.5vw, 6px) !important;
  }

  #masthead .menu-primary-menu-right-container {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  #masthead .navbar-center {
    flex: 1 1 auto !important;
    padding-left: clamp(0.5rem, 1.5vw, 24px) !important;
  }

  #masthead #menu-desktop {
    gap: clamp(0.75rem, 2vw, 2rem) !important;
  }

  #masthead .menu-desktop-right {
    gap: clamp(0.5rem, 1.5vw, 1.25rem) !important;
  }
}

/* Start soft compaction at 1336px to relieve crowding */
@media (min-width: 1200px) and (max-width: 1336px) {
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 0.8rem !important;
    letter-spacing: 0.2px !important;
  }
 
  #masthead #menu-desktop > li:last-child {
    margin-right: clamp(0.75rem, 3vw, 48px) !important;
  }
  #masthead #menu-desktop { gap: clamp(0.6rem, 1.2vw, 1.5rem) !important; }
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 8px 18px !important;
  }
}

/* Apply the same spacing for smaller desktops/tablets (768–991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  #masthead .navbar-right.menu-primary-menu-right-container {
    margin-left: 0 !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  #masthead #menu-desktop > li:last-child {
    margin-right: clamp(0.75rem, 5vw, 56px) !important;
  }
  #masthead #menu-desktop { gap: clamp(0.5rem, 1.2vw, 1.5rem) !important; }
  #masthead #site-navigation.container-fluid,
  #masthead #site-navigation .navbar-inner {
    padding-left: 1vw !important;
    padding-right: 1vw !important;
  }
}

/* === Large Desktop Readability Tweaks === */
@media (min-width: 1440px) {
  html, body { font-size: 100% !important; }
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link span,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link span {
    font-size: 1.25rem !important; /* 20px */
    letter-spacing: 0.4px;
  }
  #masthead #menu-desktop { gap: clamp(1.2rem, 1.8vw, 2.25rem) !important; }
  #masthead #menu-desktop > li:last-child { margin-right: clamp(1.25rem, 3vw, 88px) !important; }
 
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 10px 26px !important;
  }
}

/* Soften layout between 1440–1500px to avoid crowding */
@media (min-width: 1440px) and (max-width: 1500px) {
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link span,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link span {
    font-size: 1.125rem !important; /* 18px */
    letter-spacing: 0.35px !important;
  }
  #masthead #menu-desktop { gap: clamp(0.9rem, 1.2vw, 1.6rem) !important; }
  #masthead #menu-desktop > li:last-child { margin-right: clamp(1rem, 2.5vw, 56px) !important; }
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 8px 22px !important;
  }
}

@media (min-width: 1680px) {
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 1.25rem !important; /* 20px */
  }
  #masthead #menu-desktop { gap: clamp(1.4rem, 2vw, 2.5rem) !important; }
}

@media (min-width: 1920px) {
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 1.25rem !important; /* 20px */
  }
}

/* Tidy up 992px–1365px: match spacious desktop layout */
@media (min-width: 992px) and (max-width: 1365px) {
  #masthead .navbar-right.menu-primary-menu-right-container {
    margin-left: clamp(1.25rem, 6vw, 84px) !important;
    padding-left: 0 !important;
  }
  
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 0.9rem !important;
  }
  
  #masthead #menu-desktop {
    gap: clamp(0.55rem, 1vw, 1.25rem) !important;
  }
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 8px 20px !important;
  }

  #masthead #site-navigation.container-fluid {
    padding-left: 1vw !important;
    padding-right: 1vw !important;
  }
}

/* Compact, smaller desktops and large tablets (keep desktop nav, avoid crowding) */
@media (min-width: 768px) and (max-width: 991.98px) {
  #masthead #site-navigation.container-fluid {
    padding-left: 1vw !important;
    padding-right: 1vw !important;
  }

  #masthead #menu-desktop {
    gap: clamp(0.45rem, 1vw, 1rem) !important;
  }
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 0.875rem !important;
    letter-spacing: 0.4px;
  }

  #masthead .navbar-right.menu-primary-menu-right-container {
    margin-left: clamp(0.75rem, 5vw, 56px) !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 6px 16px !important;
  }
}

@media (min-width: 768px) {
  #masthead #site-navigation .navbar-inner {
    padding-left: 1vw !important;
    padding-right: 1vw !important;
  }
}

/* === Header Nav: Final Cascade (keeps desktop feel down to 992px) === */
@media (min-width: 992px) {
  #masthead .navbar-right.menu-primary-menu-right-container {
    margin-left: 0 !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  #masthead #menu-desktop > li:last-child {
    margin-right: clamp(1rem, 4vw, 72px) !important;
  }

  #masthead #menu-desktop { gap: clamp(0.7rem, 1.5vw, 2rem) !important; }
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: clamp(0.85rem, calc(0.5rem + 0.0353vw), 1rem) !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap;
  }

  #masthead #site-navigation.container-fluid,
  #masthead #site-navigation .navbar-inner {
    padding-left: 1vw !important;
    padding-right: 1vw !important;
  }
}

.main-navigation {
  position: relative;
  padding: clamp(1rem, 1.8vw, 18px) 0;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  gap: clamp(1.5rem, 3vw, 3rem);
  box-sizing: border-box;
}

.navbar-menus {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 2vw, 2rem);
  flex: 1 1 auto;
  min-width: 0;
}

/* Ensure LinkedIn + Contact group hugs the right edge */
#masthead .navbar-right {
  margin-left: auto !important;
  padding-right: clamp(0rem, 0.5vw, 10px) !important;
}

#masthead .navbar-center { min-width: 0; }

/* Tablet and up: force right group to the far edge and prevent it from taking width */
@media (min-width: 768px) {
  #masthead .navbar-right.menu-primary-menu-right-container {
    margin-left: auto !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  #masthead .menu-primary-menu-right-container ul#menu-desktop-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
}

#masthead #site-navigation .menu-primary-menu-right-container {
  width: auto !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

@media (min-width: 992px) {
  #masthead .menu-desktop-right {
    gap: clamp(0.75rem, 2vw, 2.25rem) !important;
  }
}

.navbar-brand-wrapper {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.navbar-brand-wrapper img,
.navbar-brand-logo {
  width: clamp(140px, 9.375vw, 180px);
  max-width: 180px;
  height: auto;
  max-height: 63.35px;
  aspect-ratio: 180 / 63.35;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-start;
  padding-left: clamp(1rem, 2.5vw, 3rem);
}

#menu-desktop {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

#menu-desktop > li {
  position: relative;
}

#menu-desktop > li > a {
  color: #333333;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.5rem 0;
  display: block;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

#menu-desktop > li > a:hover,
#menu-desktop > li.current-menu-item > a {
  color: #0877B4;
  border-bottom-color: #0877B4;
}



.navbar-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.menu-desktop-right {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-desktop-right > li {
  margin: 0;
}

.menu-desktop-right .linkedin-icon a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(2, 131, 189, 0.25);
  color: #0077b5;
  font-size: 18px;
  transition: color 0.3s ease, border-color 0.3s ease,
    background-color 0.3s ease;
}

.menu-desktop-right .linkedin-icon a:hover {
  color: #ffffff;
  border-color: #0283bd;
  background-color: #0283bd;
}

.menu-desktop-right .contact-button a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background-color: #0877B4;
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 2px solid #0877B4;
  transition: all 0.3s ease;
}

.menu-desktop-right .contact-button a:hover {
  background-color: #ffffff;
  color: #000000 !important;
  border-color: #0877B4;
}

.navbar-toggler {
  display: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 1400px) {
  .navbar-inner {
    padding-left: clamp(0.5rem, 2.5vw, 48px);
    padding-right: clamp(0.75rem, 4vw, 80px);
  }

  #menu-desktop {
    gap: clamp(1.25rem, 2.2vw, 2.5rem);
  }
}

@media (max-width: 1199.98px) {
  .navbar-inner {
    gap: clamp(0.75rem, 2vw, 1.5rem);
  }

  .navbar-brand-wrapper img,
  .navbar-brand-logo {
    width: clamp(120px, 12vw, 160px);
    max-height: 58px;
  }
}

@media (max-width: 991.98px) {
  .site-header {
    border-bottom: 0.5px solid #e5e5e5;
  }

  .main-navigation {
    padding: 15px 20px;
  }

  .navbar-inner {
    padding-left: 60px;
    padding-right: 20px;
  }

  .navbar-center,
  .navbar-right,
  .navbar-menus {
    display: none;
  }

  .navbar-toggler {
    display: block;
    left: 20px;
    right: auto;
  }

  .navbar-brand.alternative-site-logo {
    display: none !important;
  }

  .navbar-brand-wrapper {
    margin-left: auto;
  }
}

@media (min-width: 1280px) and (max-width: 1400px) and (max-height: 900px) {
  body.page-contact .entry-header .entry-header__inner,
  body.page-contact-us .entry-header .entry-header__inner {
    transform: translate(5%, -5%) !important;
  }
}

@media (max-width: 767.98px) {
  .navbar-inner {
    padding-left: 48px;
    padding-right: 20px;
  }

  .navbar-brand-wrapper img,
  .navbar-brand-logo {
    width: clamp(110px, 26vw, 150px);
    max-height: 50px;
  }
}

.site-header.bg--white {
  background-color: #ffffff;
}

.site-header.bg--lightGrey {
  background-color: #f8f9fa;
}

.site-header.bg--transparent,
.site-header.bg--dark {
  background-color: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.site-header.bg--transparent #menu-desktop > li > a,
.site-header.bg--dark #menu-desktop > li > a {
  color: #ffffff;
}

.site-header.bg--transparent #menu-desktop > li > a:hover,
.site-header.bg--dark #menu-desktop > li > a:hover,
.site-header.bg--transparent #menu-desktop > li.current-menu-item > a,
.site-header.bg--dark #menu-desktop > li.current-menu-item > a {
  color: #0877B4;
}

.site-header.bg--transparent .menu-desktop-right .linkedin-icon a,
.site-header.bg--dark .menu-desktop-right .linkedin-icon a {
  color: #000000;
}

.site-header.bg--transparent .menu-desktop-right .contact-button a,
.site-header.bg--dark .menu-desktop-right .contact-button a {
  background-color: transparent;
  border-color: #ffffff;
  color: #ffffff !important;
}

.site-header.bg--transparent .menu-desktop-right .contact-button a:hover,
.site-header.bg--dark .menu-desktop-right .contact-button a:hover {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff;
}

#menu-desktop .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 220px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  list-style: none;
  padding: 15px 0;
  margin: 10px 0 0 0;
  border-radius: 4px;
  z-index: 10;
}

#menu-desktop li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 0;
}

#menu-desktop .sub-menu a {
  padding: 10px 25px;
  display: block;
  color: #333333;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

#menu-desktop .sub-menu a:hover {
  background-color: #f8f9fa;
  color: #0877B4;
}

.site-header.bg--transparent + #content,
.site-header.bg--dark + #content {
  padding-top: 80px;
}

/* === FOOTER LAYOUT REFINEMENTS - WIDER ON LARGE SCREENS === */
.site-footer {
  background: #ffffff;
  color: #1d1d1d;
  padding: 64px 0 32px;
}

#colophon.site-footer,
.site-footer,
.site-footer > *,
.site-footer .container,
.site-footer .container-fluid,
#colophon .container,
#colophon .container-fluid {
  max-width: 100% !important;
  width: 100% !important;
}

.site-footer .container,
.site-footer .container-fluid,
#colophon .container,
#colophon .container-fluid {
  padding-left: clamp(0.5rem, 1.5vw, 24px) !important;
  padding-right: clamp(0.75rem, 2.5vw, 40px) !important;
}

@media (min-width: 1600px) {
  .site-footer .container,
  .site-footer .container-fluid,
  #colophon .container,
  #colophon .container-fluid {
    max-width: 1800px !important;
    margin: 0 auto !important;
    padding-left: clamp(0.5rem, 1.5vw, 24px) !important;
    padding-right: clamp(0.75rem, 2.5vw, 40px) !important;
  }
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

.site-footer a:hover {
  opacity: 0.6;
}

.site-footer__inner {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: start !important;
  gap: 3rem 10rem !important;
  max-width: 100% !important;
  width: 100% !important;
}

@media (min-width: 1400px) {
  .site-footer__inner {
    gap: 3rem 15rem !important;
  }
}

@media (min-width: 1800px) {
  .site-footer__inner {
    gap: 3rem 20rem !important;
  }
}

.site-footer__branding {
  display: flex;
  align-items: flex-start;
}

.site-footer__brand-link {
  display: inline-flex;
}

.site-footer__brand-logo {
  display: block;
  width: 272.79px;
  height: 96px;
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
}

.site-footer__navigation {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: start;
}

/* Three Column Footer Menu - Single Row Layout - WIDER SPACING */
.site-footer__menu,
#footer-navigation ul,
.site-footer #footer-navigation ul.site-footer__menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, auto) !important;
  grid-template-rows: repeat(3, auto) !important;
  column-gap: 8rem !important;
  row-gap: 0.75rem !important;
  justify-content: end !important;
  align-items: start !important;
  grid-auto-flow: column !important;
}

@media (min-width: 1400px) {
  .site-footer__menu,
  #footer-navigation ul,
  .site-footer #footer-navigation ul.site-footer__menu {
    column-gap: 10rem !important;
  }
}

@media (min-width: 1800px) {
  .site-footer__menu,
  #footer-navigation ul,
  .site-footer #footer-navigation ul.site-footer__menu {
    column-gap: 12rem !important;
  }
}

.site-footer__menu li,
#footer-navigation ul li,
.site-footer #footer-navigation ul.site-footer__menu li,
#footer-navigation ul li.menu-item {
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  list-style: none !important;
}

.site-footer__menu li:nth-child(1),
#footer-navigation ul li:nth-child(1) {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.site-footer__menu li:nth-child(2),
#footer-navigation ul li:nth-child(2) {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

.site-footer__menu li:nth-child(3),
#footer-navigation ul li:nth-child(3) {
  grid-column: 1 !important;
  grid-row: 3 !important;
}

.site-footer__menu li:nth-child(4),
#footer-navigation ul li:nth-child(4) {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.site-footer__menu li:nth-child(5),
#footer-navigation ul li:nth-child(5) {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

.site-footer__menu li:nth-child(6),
#footer-navigation ul li:nth-child(6) {
  grid-column: 2 !important;
  grid-row: 3 !important;
}

.site-footer__menu li:nth-child(7),
#footer-navigation ul li:nth-child(7) {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

.site-footer__menu li:nth-child(8),
#footer-navigation ul li:nth-child(8) {
  grid-column: 3 !important;
  grid-row: 2 !important;
}

.site-footer__menu a,
#footer-navigation ul li a,
.site-footer #footer-navigation ul.site-footer__menu li a {
  text-decoration: none !important;
  font-weight: 500 !important;
  display: block !important;
  text-align: left !important;
  line-height: 1.6 !important;
  padding: 4px 0 !important;
  white-space: nowrap !important;
}

.site-footer__divider {
  width: 95%;
  height: 1px;
  background: #ededed;
  margin: 20px auto 20px;
}

@media (min-width: 1400px) {
  .site-footer__divider {
    width: 98%;
  }
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem 2rem;
  font-size: 0.9375rem;
}

.site-footer__terms-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer__terms-menu a {
  text-decoration: none;
  font-weight: 500;
}

@media (max-width: 991.98px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    justify-items: start;
  }

  .site-footer__branding {
    justify-content: flex-start;
  }

  .site-footer__navigation {
    width: 100%;
    justify-content: flex-start !important;
  }

  .site-footer__menu,
  #footer-navigation ul {
    grid-template-columns: repeat(2, auto) !important;
    grid-template-rows: auto !important;
    column-gap: 3rem !important;
    justify-content: start !important;
    grid-auto-flow: row !important;
  }

  .site-footer__menu li,
  #footer-navigation ul li {
    grid-column: auto !important;
    grid-row: auto !important;
    text-align: left !important;
  }

  .site-footer__menu a,
  #footer-navigation ul li a {
    text-align: left !important;
  }
}

@media (max-width: 575.98px) {
  .site-footer {
    padding: 48px 0 24px;
  }

  .site-footer__menu,
  #footer-navigation ul {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .site-footer__divider {
    width: 100%;
  }
}

/* === FRONT PAGE HERO === */

.entry-header--home {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  padding: 0;
  background: #062044;
  min-height: 100vh;
  max-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
}

.entry-header--home .entry-header__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.entry-header--home .entry-header__media img,
.entry-header--home .entry-header__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.entry-header--home .entry-header__overlay {
  position: absolute;
  inset: 0;
  background: none;
  display: none;
}

.entry-header--home .entry-header__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding-top: 0;
  height: 100%;
  width: 100%;
}

@media (min-width: 992px) {
  .entry-header--home .entry-header__content {
    padding-left: calc(
      clamp(0.5rem, 2.2vw, 40px) + clamp(45px, 3.8vw, 70px)
    ) !important;
    padding-right: clamp(1rem, 4vw, 64px) !important;
  }

  .entry-header--home .entry-header__content .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .entry-header--home .entry-header__content .col-12,
  .entry-header--home .entry-header__content [class^="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .entry-header--home .entry-header__content .col-12 {
    margin-left: clamp(80px, 12vw, 220px) !important;
    padding-right: 10px !important;
    padding-top: clamp(16px, 6vh, 72px) !important;
  }
}

@media (min-width: 1200px) {
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 390px !important;
    padding-right: 10px !important;
    padding-top: 10% !important;
  }
}

@media (min-width: 1200px) {
  .entry-header--home .entry-header__content .row div[class^="col"] {
    margin-left: 390px !important;
    padding-right: 10px !important;
    padding-top: 10% !important;
  }
}

@media (min-width: 1400px) and (max-width: 1599.98px) {
  .entry-header--home .entry-header__content .row div[class^="col"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 7% !important;
    padding-right: 1% !important;
    padding-top: 10% !important;
  }
}

@media (min-width: 1600px) and (max-width: 1899.98px) {
  .entry-header--home .entry-header__content .row div[class^="col"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 15% !important;
    padding-right: 1% !important;
    padding-top: 10% !important;
  }
}

@media (min-width: 1900px) {
  .entry-header--home .entry-header__content .row div[class^="col"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 10% !important;
    padding-right: 1% !important;
    padding-top: 10% !important;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .entry-header--home .entry-header__content {
    padding-left: 5% !important;
  }
  .entry-header--home .entry-header__content .row [class^="col-"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 0 !important;
  }
}

@media (min-width: 1400px) and (max-width: 1599.98px) {
  .entry-header--home .entry-header__content {
    padding-left: 7% !important;
  }
  .entry-header--home .entry-header__content .row [class^="col-"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 0 !important;
  }
}

@media (min-width: 1600px) and (max-width: 1899.98px) {
  .entry-header--home .entry-header__content {
    padding-left: 15% !important;
  }
  .entry-header--home .entry-header__content .row [class^="col-"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 0 !important;
  }
}

@media (min-width: 1900px) {
  .entry-header--home .entry-header__content {
    padding-left: 15% !important;
  }
  .entry-header--home .entry-header__content .row [class^="col-"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 0 !important;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .entry-header--home .entry-header__content .row div[class^="col"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 5% !important;
    padding-right: 1% !important;
    padding-top: 10% !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .entry-header--home .entry-header__content .row div[class^="col"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 3% !important;
    padding-right: 1% !important;
    padding-top: 5% !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .entry-header--home .entry-header__content .row div[class^="col"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 1.5% !important;
    padding-right: 1.5% !important;
    padding-top: 4% !important;
  }
}

@media (max-width: 767.98px) {
  .entry-header--home .entry-header__content .row div[class^="col"],
  .entry-header--home .entry-header__content .col-12 {
    margin-left: 0 !important;
    padding-right: 2% !important;
    padding-top: 6% !important;
  }
}

.entry-header__inner--home {
  max-width: 800px;
  color: inherit;
  padding-top: 0;
}

.entry-header__inner--home .pre-header,
.entry-header__inner--home .header,
.entry-header__inner--home .blurb {
  color: inherit;
}

.entry-header__inner--home .header {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.entry-header__inner--home .blurb {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 700px;
}

/* === INNER PAGE HEROES === */

:root {
  --nesi-admin-bar-offset: 0px;
}

body.admin-bar {
  --nesi-admin-bar-offset: 32px;
}

@media (max-width: 782px) {
  body.admin-bar {
    --nesi-admin-bar-offset: 46px;
  }
}

.entry-header.bg--image:not(.entry-header--home),
.entry-header.bg--video:not(.entry-header--home) {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--nesi-admin-bar-offset));
  overflow: hidden;
}

.entry-header.bg--image:not(.entry-header--home) .entry-header__media,
.entry-header.bg--video:not(.entry-header--home) .entry-header__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.entry-header.bg--image:not(.entry-header--home) .entry-header__media img,
.entry-header.bg--video:not(.entry-header--home) .entry-header__media video {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center;
  object-position: center;
  display: block;
}

.entry-header.bg--image:not(.entry-header--home) .entry-header__content,
.entry-header.bg--video:not(.entry-header--home) .entry-header__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nesi-admin-bar-offset));
  padding-top: clamp(80px, 12vh, 180px);
  padding-bottom: clamp(64px, 12vh, 160px);
}

.entry-header.bg--image:not(.entry-header--home) .entry-header__content .row,
.entry-header.bg--video:not(.entry-header--home) .entry-header__content .row {
  width: 100%;
}

.entry-header.bg--image:not(.entry-header--home) .entry-header__inner,
.entry-header.bg--video:not(.entry-header--home) .entry-header__inner {
  width: 100%;
  max-width: 900px;
}

/* HOMEPAGE ONLY - CTA Wrapper and Form Styles */
.entry-header--home {
  padding-bottom: 10px !important;
}
.entry-header--home .entry-header__cta-wrapper {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  margin-top: 0 !important;
  width: 100% !important;
}

.entry-header--home .entry-header__cta-wrapper {
  justify-content: flex-start !important;
}

/* News page: center CTAs under the content */
.blog .entry-header--home .entry-header__cta-wrapper {
  justify-content: center !important;
}

.entry-header--home .entry-header__cta-wrapper > .btn--secondary,
.entry-header--home .entry-header__cta-wrapper > a.btn--secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 12px 28px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #000000 !important;
}

.entry-header--home .entry-header__cta-wrapper > a.btn--get-in-touch.is-news,
.entry-header--home .entry-header__cta-wrapper > a.btn--get-in-touch.is-front {
  background: #0877B4 !important;
  border-color: #0877B4 !important;
  color: #ffffff !important;
}
.entry-header--home .entry-header__cta-wrapper > a.btn--get-in-touch.is-news:hover,
.entry-header--home .entry-header__cta-wrapper > a.btn--get-in-touch.is-front:hover {
  filter: brightness(0.95);
}

.entry-header--home .entry-header__cta-wrapper > .btn--secondary:hover,
.entry-header--home .entry-header__cta-wrapper > a.btn--secondary:hover {
  background: #2896d2 !important;
  border-color: #2896d2 !important;
}

/* NESI Products button */
.entry-header--home .entry-header__cta-wrapper > a.btn--products:hover {
  background: #333232 !important;
  border-color: #333232 !important;
  color: #ffffff !important;
}

/* Original button styling for non-home pages */
.entry-header:not(.entry-header--home) .entry-header__cta-row,
.entry-header:not(.entry-header--home) .btn-wrapper {
  margin: 16px 0 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 12px;
  list-style: none;
  align-items: center;
}

.entry-header:not(.entry-header--home) .entry-header__cta-row li,
.entry-header:not(.entry-header--home) .btn-wrapper li {
  margin: 0;
  display: inline-block;
}

.entry-header:not(.entry-header--home) .entry-header__cta-row .btn,
.entry-header:not(.entry-header--home) .btn-wrapper .btn {
  min-width: auto;
  justify-content: center;
  padding: 10px 24px;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Scroll Arrow with Bounce Animation - Homepage Only */
.entry-header--home .entry-header__scroll-arrow {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: arrowBounce 2s ease-in-out infinite;
}

.entry-header--home .entry-header__scroll-arrow a {
  display: block;
  color: #ffffff;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.entry-header--home .entry-header__scroll-arrow a:hover {
  opacity: 1;
  animation: none;
}

.entry-header--home .entry-header__scroll-arrow:hover {
  animation-play-state: paused;
}

@keyframes arrowBounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-15px);
  }
  60% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@media (max-width: 1199.98px) {
  .entry-header__inner--home .header {
    font-size: 3rem;
  }

  .entry-header__inner--home .blurb {
    font-size: 1.125rem;
  }
}

@media (max-width: 991.98px) {
  .entry-header--home {
    min-height: 100vh;
    max-height: 100vh;
    height: 100vh;
    padding-bottom: 72px !important;
  }

  .entry-header--home .entry-header__content {
    padding-top: 0;
  }

  .entry-header__inner--home {
    max-width: 100%;
    padding-top: 0;
  }

  .entry-header__inner--home .header {
    font-size: 2.5rem;
  }

  .entry-header__inner--home .blurb {
    font-size: 1.0625rem;
  }

  .entry-header--home .entry-header__scroll-arrow {
    bottom: 14px;
  }
}

@media (max-width: 767.98px) {
  .entry-header--home {
    min-height: 100vh;
    max-height: 100vh;
    height: 100vh;
    align-items: flex-start;
    padding-top: 100px;
    padding-bottom: 28px !important;
  }

  .entry-header--home .entry-header__content {
    padding-top: 0;
    align-items: flex-start;
  }

  .entry-header__inner--home {
    padding-top: 0;
  }

  .entry-header__inner--home .header {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .entry-header__inner--home .blurb {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .entry-header--home .entry-header__cta-wrapper {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  /* Removed legacy email lead-form responsive rules */

  .entry-header--home .entry-header__cta-wrapper > .btn--secondary,
  .entry-header--home .entry-header__cta-wrapper > a.btn--secondary {
    width: 100% !important;
  }

  .entry-header--home .entry-header__scroll-arrow {
    bottom: -16px;
  }
}

/* Non-home page headers - reduce excess space for articles */
.entry-header:not(.entry-header--home) {
  min-height: auto;
  max-height: none;
  padding: 24px 0 32px;
}

.site-footer__divider {
  width: 80%;
  height: 1px;
  background: #ededed;
  margin: 20px auto 20px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem 2rem;
  font-size: 0.9375rem;
}

.site-footer__terms-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer__terms-menu a {
  text-decoration: none;
  font-weight: 500;
}

@media (max-width: 991.98px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    justify-items: start;
  }

  .site-footer__branding {
    justify-content: flex-start;
  }

  .site-footer__navigation {
    width: 100%;
    justify-content: flex-start !important;
  }

  .site-footer__menu,
  #footer-navigation ul {
    grid-template-columns: repeat(2, auto) !important;
    grid-template-rows: auto !important;
    column-gap: 3rem !important;
    justify-content: start !important;
    grid-auto-flow: row !important;
  }

  .site-footer__menu li,
  #footer-navigation ul li {
    grid-column: auto !important;
    grid-row: auto !important;
    text-align: left !important;
  }

  .site-footer__menu a,
  #footer-navigation ul li a {
    text-align: left !important;
  }
}

@media (max-width: 575.98px) {
  .site-footer {
    padding: 48px 0 24px;
  }

  .site-footer__menu,
  #footer-navigation ul {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* ===================================================================
   BUTTON STYLES - Added for NESI Design
   =================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  cursor: pointer;
}

.btn svg {
  transition: transform 0.3s ease;
  margin-left: 8px;
}

.btn:hover svg {
  transform: translateX(4px) scale(1.1);
  animation: arrowPop 0.5s ease;
}

.btn--primary:hover svg,
.btn--secondary:hover svg {
  stroke: #000000;
}

@keyframes arrowPop {
  0% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(6px) scale(1.2);
  }
  100% {
    transform: translateX(4px) scale(1.1);
  }
}

.btn--primary {
  background: #0877b4;
  color: #ffffff;
}

.btn--primary:hover {
  background: #5badd6;
  color: #000000;
}

.btn--secondary {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
}

.btn--secondary:hover {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
}

.btn--plain {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.btn--plain:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn:hover {
  transform: translateY(-1px);
}

/* ===================================================================
   RECENT NEWS GRID STYLES
   =================================================================== */

.latest-posts-block .container-fluid {
  max-width: 1577px;
  margin: 0 auto;
  padding-left: clamp(1.5rem, 4vw, 3rem);
  padding-right: clamp(1.5rem, 4vw, 3rem);
}

.latest-posts-block__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.latest-posts-block__title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.latest-posts-block__title-group .pre-header,
.latest-posts-block__title-group .h1,
.latest-posts-block__title-group h2 {
  margin: 0;
}

.latest-posts-block__view-all {
  white-space: nowrap;
}

.latest-posts-block__divider {
  width: 100%;
  border-bottom: 1px solid #e6e6e6;
  margin-top: 24px;
}

.news-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2.2vw, 2rem);
  margin-top: 48px;
}

.news-card-grid .card-outer {
  margin: 0;
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 12px 30px rgba(15, 35, 95, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(15, 35, 95, 0.12);
}

.news-card__image {
  display: block;
  overflow: hidden;
}

.news-card__image-media {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.news-card__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 32px;
}

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #56606d;
}

.news-card__meta-separator {
  color: #b7bec7;
}

.news-card__categories a {
  color: inherit;
  text-decoration: none;
}

.news-card__categories a:hover,
.news-card__title a:hover {
  text-decoration: underline;
}

.news-card__title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.3;
  color: #10203a;
}

.news-card__title a {
  color: inherit;
  text-decoration: none;
}

.news-card__excerpt {
  margin: 0;
  color: #384253;
  line-height: 1.6;
}

.news-card__button {
  margin-top: auto;
  align-self: flex-start;
}

@media (min-width: 992px) {
  .news-card__image-media {
    height: 280px;
  }
}

@media (max-width: 767.98px) {
  .latest-posts-block__header {
    align-items: flex-start;
  }

  .latest-posts-block__divider {
    margin-top: 16px;
  }

  .news-card__content {
    padding: 24px;
  }

  .news-card__image-media {
    height: 220px;
  }
}

.btn:active {
  transform: translateY(0);
}

.btn:focus {
  outline: 3px solid rgba(11, 127, 193, 0.5);
  outline-offset: 2px;
}

.btn:focus:not(:focus-visible) {
  outline: none;
}

/* ===================================================================
   RECENT NEWS GRID - FIXED ALIGNMENT & BUTTON SIZING
   =================================================================== */

.news-card__title {
  margin: 0 !important;
  font-size: 1.5rem !important;
  line-height: 1.3 !important;
  color: #10203a !important;
  flex-shrink: 0 !important;
  min-height: 62px;
  display: -webkit-box;
  display: box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.news-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-card__title a:hover {
  color: #0877b4;
}

.news-card__excerpt {
  margin: 0 !important;
  color: #384253 !important;
  line-height: 1.6 !important;
  flex: 1 !important;
  display: -webkit-box !important;
  display: box !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 72px;
}

@media (max-width: 767.98px) {
  .news-card__title {
    font-size: 1.25rem !important;
    min-height: auto;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .news-card__excerpt {
    min-height: auto;
  }
}

/* ===================================================================
   RECENT NEWS BLOCK - COMPLETE STYLES
   Add this entire section to the end of your style.css file
   Version: 2.0
   =================================================================== */

/* ===========================
   MAIN BLOCK STYLES
   =========================== */

.latest-posts-block.content-block {
  padding: 80px 0;
}

.latest-posts-block .container-fluid {
  max-width: 1577px;
  margin: 0 auto;
  padding-left: clamp(1.5rem, 4vw, 3rem);
  padding-right: clamp(1.5rem, 4vw, 3rem);
}

/* ===========================
   HEADER SECTION
   =========================== */

.latest-posts-block__header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1.5rem !important;
  margin-bottom: 48px !important;
}

.latest-posts-block__title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.latest-posts-block__title-group .pre-header,
.latest-posts-block__title-group .h1,
.latest-posts-block__title-group h2 {
  margin: 0;
}

/* VIEW ALL BUTTON - COMPACT SIZE */
.latest-posts-block__view-all,
.latest-posts-block__view-all.btn,
.latest-posts-block__view-all.btn.btn--primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 24px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  border-radius: 999px !important;
  background: #0877b4 !important;
  color: #ffffff !important;
  border: none !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: auto !important;
  width: auto !important;
  max-width: 150px !important;
  height: auto !important;
  margin: 0 !important;
}

.latest-posts-block__view-all:hover,
.latest-posts-block__view-all.btn:hover {
  background: #5badd6 !important;
  color: #000000 !important;
  transform: translateY(-1px) !important;
}

.latest-posts-block__view-all svg {
  width: 14px !important;
  height: 14px !important;
  margin-left: 8px !important;
  flex-shrink: 0 !important;
  transition: transform 0.3s ease !important;
}

.latest-posts-block__view-all:hover svg {
  transform: translateX(4px) !important;
  stroke: #000000 !important;
}

/* ===========================
   NEWS CARD GRID
   =========================== */

.latest-posts-block .news-card-grid,
.news-card-grid.row,
.news-card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: clamp(1.5rem, 3vw, 2.5rem) !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  align-items: stretch !important;
  list-style: none !important;
}

.news-card-grid .card-outer,
.news-card-grid .col,
.news-card-grid .col-12,
.news-card-grid .col-md-4,
.news-card-grid .col-lg-4,
.news-card-grid > div,
.news-card-grid > * {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* ===========================
   NEWS CARD STRUCTURE
   =========================== */

.news-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 12px 30px rgba(15, 35, 95, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(15, 35, 95, 0.12);
}

/* ===========================
   CARD IMAGE - FIXED HEIGHT
   =========================== */

.news-card__image {
  display: block !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  position: relative !important;
  width: 100% !important;
  height: 280px !important;
  max-height: 280px !important;
  min-height: 280px !important;
}

.news-card__image-media,
.news-card__image img {
  width: 100% !important;
  height: 100% !important;
  max-height: 280px !important;
  min-height: 280px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.5s ease !important;
}

.news-card:hover .news-card__image-media,
.news-card:hover .news-card__image img {
  transform: scale(1.05) !important;
}

/* ===========================
   CARD CONTENT - FLEX LAYOUT
   =========================== */

.news-card__content {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  padding: 32px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* ===========================
   CARD METADATA
   =========================== */

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #56606d;
  flex-shrink: 0;
  margin: 0;
}

.news-card__meta-separator {
  color: #b7bec7;
}

.news-card__date {
  font-weight: 500;
}

.news-card__reading-time {
  font-weight: 600;
}

.news-card__categories a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-card__categories a:hover {
  color: #0877b4;
}

/* ===========================
   CARD TITLE - FIXED HEIGHT
   =========================== */

.news-card__title {
  margin: 0 !important;
  font-size: 1.5rem !important;
  line-height: 1.3 !important;
  color: #10203a !important;
  flex-shrink: 0 !important;
  min-height: 78px !important;
  max-height: 78px !important;
  display: -webkit-box !important;
  display: box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  box-orient: vertical !important;
  overflow: hidden !important;
}

.news-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-card__title a:hover {
  color: #0877b4;
}

/* ===========================
   CARD EXCERPT - FIXED HEIGHT
   =========================== */

.news-card__excerpt {
  margin: 0 !important;
  color: #384253 !important;
  line-height: 1.6 !important;
  font-size: 1rem !important;
  flex: 1 1 auto !important;
  display: -webkit-box !important;
  display: box !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 72px !important;
  max-height: 72px !important;
}

/* ===========================
   CARD BUTTON - AT BOTTOM
   =========================== */

.news-card__button,
.news-card__button.btn,
.news-card__button.btn.btn--primary {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  align-self: flex-start !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 12px 28px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  background: #0877b4 !important;
  color: #ffffff !important;
  border: none !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
}

.news-card__button:hover {
  background: #5badd6 !important;
  color: #000000 !important;
  transform: translateY(-1px) !important;
}

.news-card__button svg {
  width: 16px !important;
  height: 16px !important;
  margin-left: 8px !important;
  flex-shrink: 0 !important;
  transition: transform 0.3s ease, stroke 0.3s ease !important;
}

.news-card__button:hover svg {
  transform: translateX(4px) scale(1.1) !important;
  stroke: #000000 !important;
}

/* ===========================
   CARD ANIMATIONS (OPTIONAL)
   =========================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card-grid .card-outer {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.news-card-grid .card-outer:nth-child(1) {
  animation-delay: 0.1s;
}

.news-card-grid .card-outer:nth-child(2) {
  animation-delay: 0.2s;
}

.news-card-grid .card-outer:nth-child(3) {
  animation-delay: 0.3s;
}

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */

/* Large Desktop (1200px - 1600px) */
@media (min-width: 1200px) and (max-width: 1599.98px) {
  .news-card__image,
  .news-card__image-media,
  .news-card__image img {
    height: 280px !important;
    max-height: 280px !important;
    min-height: 280px !important;
  }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199.98px) {
  .latest-posts-block.content-block {
    padding: 60px 0;
  }

  .news-card-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
  }

  .news-card__image,
  .news-card__image-media,
  .news-card__image img {
    height: 240px !important;
    max-height: 240px !important;
    min-height: 240px !important;
  }

  .news-card__content {
    padding: 28px !important;
  }

  .news-card__title {
    font-size: 1.375rem !important;
    min-height: 72px !important;
    max-height: 72px !important;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991.98px) {
  .latest-posts-block.content-block {
    padding: 60px 0;
  }

  .latest-posts-block__header {
    margin-bottom: 36px !important;
  }

  .news-card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }

  .news-card__image,
  .news-card__image-media,
  .news-card__image img {
    height: 260px !important;
    max-height: 260px !important;
    min-height: 260px !important;
  }
}

/* Mobile (up to 767px) */
@media (max-width: 767.98px) {
  .latest-posts-block.content-block {
    padding: 48px 0;
  }

  .latest-posts-block__header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    margin-bottom: 32px !important;
  }

  .latest-posts-block__view-all {
    width: 100% !important;
    max-width: none !important;
    justify-content: center !important;
  }

  .news-card-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .news-card__image,
  .news-card__image-media,
  .news-card__image img {
    height: 220px !important;
    max-height: 220px !important;
    min-height: 220px !important;
  }

  .news-card__content {
    padding: 24px !important;
  }

  .news-card__title {
    font-size: 1.25rem !important;
    min-height: auto !important;
    max-height: none !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
  }

  .news-card__excerpt {
    min-height: auto !important;
    max-height: none !important;
  }
}

/* Small Mobile (up to 575px) */
@media (max-width: 575.98px) {
  .news-card__image,
  .news-card__image-media,
  .news-card__image img {
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
  }

  .news-card__content {
    padding: 20px !important;
  }
}

/* ===========================
   ACCESSIBILITY
   =========================== */

.news-card:focus-within {
  outline: 3px solid rgba(8, 119, 180, 0.5);
  outline-offset: 2px;
}

.news-card__button:focus,
.latest-posts-block__view-all:focus {
  outline: 3px solid rgba(8, 119, 180, 0.5);
  outline-offset: 2px;
}

.news-card__button:focus:not(:focus-visible),
.latest-posts-block__view-all:focus:not(:focus-visible) {
  outline: none;
}

/* END NEWS CARDS SECTION */

/* ===================================================================
   RECENT NEWS - ACCESSIBILITY & BUTTON OVERRIDES
   =================================================================== */

.latest-posts-block .news-card__title,
.news-card-grid .news-card__title {
  max-height: none !important;
  min-height: 0 !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  box-orient: initial !important;
  display: block !important;
  overflow: visible !important;
  white-space: normal !important;
}

.latest-posts-block .news-card__title a,
.news-card-grid .news-card__title a {
  white-space: normal !important;
  display: inline !important;
}

.latest-posts-block .news-card__excerpt,
.news-card-grid .news-card__excerpt {
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  max-height: none !important;
  min-height: 0 !important;
  display: block !important;
  overflow: visible !important;
}

.latest-posts-block .news-card__content {
  gap: clamp(1rem, 1.8vw, 1.75rem) !important;
}

.latest-posts-block .news-card__button,
.news-card-grid .news-card__button {
  flex-shrink: 0 !important;
  min-width: max-content !important;
  padding: 0.55rem 1.35rem !important;
  white-space: nowrap !important;
  transition: background-color 0.3s ease, color 0.3s ease !important;
}

.latest-posts-block .news-card__button.btn:hover,
.latest-posts-block .news-card__button.btn:focus,
.news-card-grid .news-card__button.btn:hover,
.news-card-grid .news-card__button.btn:focus,
.excerpt-carousel .news-card__button.btn:hover,
.excerpt-carousel .news-card__button.btn:focus {
  transform: none !important;
}

.latest-posts-block .news-card__button svg,
.news-card-grid .news-card__button svg,
.excerpt-carousel .news-card__button svg {
  width: 16px !important;
  height: 16px !important;
  transition: color 0.3s ease !important;
  transform: none !important;
}

.latest-posts-block .news-card__button:hover svg,
.latest-posts-block .news-card__button:focus svg,
.news-card-grid .news-card__button:hover svg,
.news-card-grid .news-card__button:focus svg,
.excerpt-carousel .news-card__button:hover svg,
.excerpt-carousel .news-card__button:focus svg {
  transform: none !important;
}

/* Ensure Read More button keeps its shape and position */
.latest-posts-block .news-card__content,
.news-card-grid .news-card__content,
.excerpt-carousel .news-card__content {
  min-height: 300px !important;
}

.latest-posts-block .news-card__button,
.news-card-grid .news-card__button,
.excerpt-carousel .news-card__button {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
}

/* ===================================================================
   READ MORE (Single Post Carousel) — match News cards behaviour
   =================================================================== */
/* Show full titles like on News page */
.excerpt-carousel .news-card__title {
  /* Slightly smaller to reveal more text; allow up to 3 lines */
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 84px !important;
  max-height: 84px !important;
}
.excerpt-carousel .news-card__title a {
  display: inline !important;
  white-space: normal !important;
}
.excerpt-carousel .news-card__content {
  gap: clamp(0.75rem, 1.5vw, 1.25rem) !important;
}
.excerpt-carousel .news-card__button,
.excerpt-carousel .news-card__button.btn,
.excerpt-carousel .news-card__button.btn.btn--primary {
  margin-top: auto !important;
  margin-bottom: 0 !important;
}

/* ===================================================================
   READ MORE — scale section down ~20%
   (scoped to single-post carousel only)
   =================================================================== */
.excerpt-carousel .owl-carousel .owl-item {
  padding: 0 !important;
  margin-right: 0 !important;
}

.excerpt-carousel .owl-carousel .owl-stage {
  display: block !important;
}
.excerpt-carousel .owl-carousel .owl-item {
  display: block !important;
}
.excerpt-carousel .owl-carousel .owl-item .card-outer,
.excerpt-carousel .owl-carousel .owl-item .news-card {
  height: auto;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .excerpt-carousel .owl-carousel .owl-item {
    margin-right: 50px !important;
  }
}
@media (min-width: 900px) {
  .excerpt-carousel .owl-carousel .owl-item {
    margin-right: 60px !important;
  }
}
.excerpt-carousel .blog-posts {
  margin: 0 !important;
}
.excerpt-carousel .owl-carousel .owl-stage-outer {
  overflow: hidden !important;
}
.excerpt-carousel .news-card__image-media {
  height: 160px !important;
}
@media (min-width: 992px) {
  .excerpt-carousel .news-card__image-media {
    height: 180px !important;
  }
}

.excerpt-carousel .news-card__content {
  padding: 18px 18px 12px !important;
  gap: clamp(0.75rem, 1.2vw, 1.25rem) !important;
  min-height: 220px !important;
}

.single-post-nav .container-fluid > .row > .col-lg-10,
.excerpt-carousel__container .col-lg-10 {
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  flex: 0 0 100% !important;
}

.excerpt-carousel .news-card__meta {
  font-size: 0.75rem !important;
}

.excerpt-carousel .news-card__title {
  font-size: 1.1rem !important;
  line-height: 1.25 !important;
}
@media (max-width: 767.98px) {
  .excerpt-carousel .news-card__title {
    font-size: 1.05rem !important;
  }
}

.excerpt-carousel .news-card__excerpt {
  line-height: 1.5 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 48px !important;
  max-height: 48px !important;
}

/* Laptop tuning (e.g., 13" screens): clamp long titles slightly to keep cards even */
@media (max-width: 1440px) {
  .excerpt-carousel .news-card__title {
    font-size: 1.18rem !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    min-height: 84px !important;
    max-height: 84px !important;
  }
  .excerpt-carousel .news-card__content {
    min-height: 230px !important;
  }
}

/* Tablet portrait and below: slightly reduce title size for balance */
@media (max-width: 991.98px) {
  .excerpt-carousel .news-card__title {
    font-size: 1.15rem !important;
  }
}

/* Small desktop / 13" laptops: tighten inter-card gaps and keep heights even */
/* Use Owl's own spacing to avoid half‑cards */
@media (max-width: 1366px) and (min-width: 900px) {
  .excerpt-carousel .owl-carousel .owl-item {
    margin-right: 60px !important;
  }
}
@media (max-width: 1200px) and (min-width: 900px) {
  .excerpt-carousel .owl-carousel .owl-item {
    margin-right: 60px !important;
  }
}

.excerpt-carousel .news-card__button.btn {
  padding: 0.45rem 1.05rem !important; /* keep shape, smaller */
}

/* ===================================================================
   TERMS OF USE PAGE OVERRIDES
   Wrap body content in a div and ensure paragraphs are full width with
   10% left padding as requested.
   =================================================================== */
.terms-body {
  width: 100%;
}
.terms-body p {
  width: 100%;
  padding-left: 5%;
  box-sizing: border-box;
}
.terms-body h1,
.terms-body h2,
.terms-body h3,
.terms-body h4,
.terms-body h5,
.terms-body h6 {
  width: 100%;
  padding-left: 5%;
  box-sizing: border-box;
}

body.page-id-46 .default-editor .row > [class^="col-"],
body.page-id-46 .default-editor .row > [class*=" col-"],
body.postid-46 .default-editor .row > [class^="col-"],
body.postid-46 .default-editor .row > [class*=" col-"] {
  flex: 0 0 100% !important;
  max-width: 100% !important;
}
body.page-id-46 .default-editor p,
body.postid-46 .default-editor p {
  width: 100% !important;
  padding-left: 5% !important;
  box-sizing: border-box !important;
}

body.page-id-46 .default-editor h1,
body.page-id-46 .default-editor h2,
body.page-id-46 .default-editor h3,
body.page-id-46 .default-editor h4,
body.page-id-46 .default-editor h5,
body.page-id-46 .default-editor h6,
body.postid-46 .default-editor h1,
body.postid-46 .default-editor h2,
body.postid-46 .default-editor h3,
body.postid-46 .default-editor h4,
body.postid-46 .default-editor h5,
body.postid-46 .default-editor h6 {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 5% !important;
  box-sizing: border-box !important;
}

body.page-id-46 .entry-header__inner .entry-header__title,
body.page-id-46 .entry-header__inner .entry-title,
body.postid-46 .entry-header__inner .entry-header__title,
body.postid-46 .entry-header__inner .entry-title,
body.page-contact .entry-header__inner .entry-header__title,
body.page-contact .entry-header__inner .entry-title,
body.page-contact-us .entry-header__inner .entry-header__title,
body.page-contact-us .entry-header__inner .entry-title {
  padding-left: 0 !important;
  box-sizing: border-box !important;
}

body.page-id-46 .entry-header .entry-header__inner,
body.postid-46 .entry-header .entry-header__inner,
body.page-contact .entry-header .entry-header__inner,
body.page-contact-us .entry-header .entry-header__inner {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}
body.page-id-46 .entry-header .entry-header__inner .pre-header,
body.page-id-46 .entry-header .entry-header__inner .entry-title,
body.postid-46 .entry-header .entry-header__inner .pre-header,
body.postid-46 .entry-header .entry-header__inner .entry-title,
body.page-contact .entry-header .entry-header__inner .pre-header,
body.page-contact .entry-header .entry-header__inner .entry-title,
body.page-contact-us .entry-header .entry-header__inner .pre-header,
body.page-contact-us .entry-header .entry-header__inner .entry-title {
  padding-left: 0 !important;
}
body.page-contact .entry-header--home .entry-header__overlay,
body.page-contact-us .entry-header--home .entry-header__overlay {
  display: block;
  background: linear-gradient(
    180deg,
    rgba(10, 38, 70, 0.86) 0%,
    rgba(10, 38, 70, 0.65) 100%
  );
}
body.page-contact .entry-header__inner .header,
body.page-contact-us .entry-header__inner .header {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  flex-wrap: nowrap;
  line-height: 1.1;
  white-space: nowrap;
}

body.page-contact .entry-header__inner .contact-hero__accent,
body.page-contact-us .entry-header__inner .contact-hero__accent {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.15em 0.55em !important;
  margin-left: 0;
  background-color: #0077b5 !important;
  color: #ffffff !important;
  line-height: 1.1;
  border-radius: 0.125em;
  position: relative;
  overflow: visible;
  min-height: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

body.page-contact .entry-header__inner .contact-hero__accent::before,
body.page-contact .entry-header__inner .contact-hero__accent::after,
body.page-contact-us .entry-header__inner .contact-hero__accent::before,
body.page-contact-us .entry-header__inner .contact-hero__accent::after {
  display: none !important;
  content: none !important;
}

/* Contact page: center hero content on small screens */
@media (max-width: 991.98px) {
  body.page-contact .entry-header .entry-header__inner,
  body.page-contact-us .entry-header .entry-header__inner {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    align-items: center !important;
    transform: none !important; /* center on small screens */
    will-change: auto;
  }

  body.page-contact .entry-header__inner .pre-header,
  body.page-contact-us .entry-header__inner .pre-header,
  body.page-contact .entry-header__inner .header,
  body.page-contact-us .entry-header__inner .header {
    text-align: center !important;
  }

  body.page-contact .entry-header--home,
  body.page-contact-us .entry-header--home {
    padding-top: 28px !important;
  }

  /* Tighter vertical spacing and top alignment of content */
  body.page-contact .entry-header .entry-header__content,
  body.page-contact-us .entry-header .entry-header__content {
    align-items: center !important;
    padding-top: 12px !important;
  }

  body.page-contact .entry-header__inner .pre-header,
  body.page-contact-us .entry-header__inner .pre-header {
    margin-bottom: 6px !important;
  }
}

/* Phones: keep contact hero centered and remove any offsets */
@media (max-width: 767.98px) {
  body.page-contact .entry-header .entry-header__inner,
  body.page-contact-us .entry-header .entry-header__inner {
    transform: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    align-items: center !important;
  }

  body.page-contact .entry-header__inner .pre-header,
  body.page-contact-us .entry-header__inner .pre-header {
    margin-bottom: 6px !important;
  }
}

@media (max-width: 480px) {
  body.page-contact .entry-header__inner .header,
  body.page-contact-us .entry-header__inner .header {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
  }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Extra compaction for small desktops to prevent crowding */
  #masthead #menu-desktop { gap: clamp(0.45rem, 1vw, 1.25rem) !important; }
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 0.85rem !important;
    letter-spacing: 0.25px !important;
  }
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 6px 16px !important;
  }
  #masthead .menu-desktop-right .linkedin-icon a { width: 36px; height: 36px; }
}
/* Micro-compaction band to fix 980px–1028px crowding */
@media (min-width: 980px) and (max-width: 1028px) {
  /* Keep right group docked; do not let it consume fixed width */
  #masthead .navbar-right.menu-primary-menu-right-container {
    margin-left: 0 !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  /* Provide clear space between last link and CTA */
  #masthead #menu-desktop > li:last-child {
    margin-right: clamp(0.75rem, 5vw, 40px) !important;
  }
  /* Tighten inter-link spacing and font size a bit more */
  #masthead #menu-desktop { gap: clamp(0.4rem, 1vw, 1.1rem) !important; }
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 0.8rem !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap;
  }
  /* Slim the CTA and LinkedIn icon a touch more */
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 6px 14px !important;
  }
  #masthead .menu-desktop-right .linkedin-icon a { width: 32px; height: 32px; }
  /* Ensure nav container gutters stay minimal */
  #masthead #site-navigation.container-fluid,
  #masthead #site-navigation .navbar-inner {
    padding-left: 1vw !important;
    padding-right: 1vw !important;
  }
}

/* Edge band: 1029px–1110px where collisions still occurred */
@media (min-width: 1029px) and (max-width: 1110px) {
  #masthead .navbar-right.menu-primary-menu-right-container {
    margin-left: 0 !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  #masthead #menu-desktop > li:last-child {
    margin-right: clamp(0.65rem, 4vw, 44px) !important;
  }
  #masthead #menu-desktop { gap: clamp(0.38rem, 0.9vw, 1.15rem) !important; }
  #masthead #site-navigation ul#menu-desktop li.nav-item a.nav-link,
  #masthead #site-navigation ul#menu-desktop-right li.nav-item a.nav-link {
    font-size: 0.78rem !important;
    letter-spacing: 0.15px !important;
    white-space: nowrap;
  }
  #masthead .menu-desktop-right .contact-button a,
  #masthead #site-navigation .menu-desktop-right .contact-button a {
    padding: 5px 12px !important;
  }
  #masthead .menu-desktop-right .linkedin-icon a { width: 30px; height: 30px; }
  #masthead #site-navigation.container-fluid,
  #masthead #site-navigation .navbar-inner { padding-left: 1vw !important; padding-right: 1vw !important; }
}
