/* ================================
   REMOVE NUMBER FIELD SPINNERS
================================ */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* ================================
   DESKTOP DROPDOWNS (BASE)
   Always blue (not tied to scroll)
================================ */
@media (min-width: 922px) {

  /* Submenu panel background */
  .ast-desktop .main-header-menu .sub-menu,
  .main-header-bar-navigation .sub-menu,
  .main-header-menu .sub-menu {
      background-color: #445e87 !important;
      border: none !important;
      box-shadow: none !important;
      padding: 0 !important;
      min-width: 180px !important; /* adjust if needed */
  }

  /* Each dropdown item */
  .ast-desktop .main-header-menu .sub-menu li a,
  .main-header-bar-navigation .sub-menu li a,
  .main-header-menu .sub-menu li a {
      display: block !important;
      width: 100% !important;
      background-color: #445e87 !important;
      color: #ffffff !important;
      border: 1px solid #ffffff !important;
      padding: 10px 18px !important;
      margin: 0 !important;
      box-sizing: border-box !important;
      line-height: 1.3 !important;
      white-space: normal !important; /* allow wrapping */
  }

  /* Remove leftover spacing, borders, shadows */
  .ast-desktop .main-header-menu .sub-menu li,
  .main-header-bar-navigation .sub-menu li,
  .main-header-menu .sub-menu li {
      border: none !important;
      margin: 0 !important;
      padding: 0 !important;
      box-shadow: none !important;
  }

  /* Desktop only – extend hover hitbox for dropdown parents */
  .ast-desktop .main-header-menu > li.menu-item-has-children {
    position: relative;
  }

  /* Invisible bridge between menu item and its submenu */
  .ast-desktop .main-header-menu > li.menu-item-has-children::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;       /* spans full width under the parent item */
    top: 100%;      /* starts just below the menu item */
    height: 115px;  /* increase if submenu still flickers */
  }
}

/* ================================
   MOBILE MENU – BLUE SUBMENUS
================================ */
@media (max-width: 921px) {
  .ast-header-break-point .main-header-menu .sub-menu,
  .ast-header-break-point .main-header-menu .sub-menu li a {
      background-color: #0a3d62 !important;
      color: #ffffff !important;
      border: none !important;
  }
}

/* ================================
   HEADER BASE STATE
================================ */
.site-header {
    background-color: transparent;
    transition:
        background-color 0.25s ease-in-out,
        padding 0.25s ease-in-out;
    z-index: 9999;
}

/* Stick header on desktop */
@media (min-width: 922px) {
    .site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
    }
}

/* =========================================================
   DESKTOP: COMPACT HEADER WHEN SCROLLED (body.shf-scrolled)
   ========================================================= */
@media (min-width: 922px) {

    /* Shrink logo without distortion */
    body.shf-scrolled .site-logo-img img {
        max-height: 38px !important;     /* controls logo size */
        width: auto !important;
        height: auto !important;
        transition: max-height 0.25s ease-in-out;
    }

    /* Reduce vertical padding in the header bar */
    body.shf-scrolled .main-header-bar {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    /* Remove extra padding around logo block and nudge it up */
    body.shf-scrolled .site-branding,
    body.shf-scrolled .ast-site-identity {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: -4px !important;   /* adjust if you want logo higher/lower */
        margin-bottom: 0 !important;
    }

    /* Kill extra vertical padding inside the container */
    body.shf-scrolled .main-header-bar .ast-container,
    body.shf-scrolled .main-header-bar .ast-container-inner {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Menu items: keep normal font, small vertical padding */
    body.shf-scrolled .main-header-menu > li > a {
        color: #445e87 !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        margin-top: 0 !important;
        line-height: 1.2 !important;
        transition: color 0.25s ease-in-out;
    }

    /* White background behind header once scrolled */
    body.shf-scrolled .site-header {
        background-color: #ffffff !important;
    }
}

html, body {
    overflow-x: hidden !important;
}

/* Move logo image only */
.ast-site-identity .custom-logo {
    margin-top: 5px; /* adjust */
    display: block;
}