/* Site overrides. Loaded after the theme bundles, so these rules win. */

/* ------------------------------------------------------------------------
   Smart Slider's forced-full-width wrapper measured its parent before the
   layout settled, so on some viewport widths it kept a stale
   -viewport-width translate that pushed the whole home slider off-screen
   (the slider looked empty and its arrows could not be clicked). The slider
   already sits in a full-width section, so the wrapper needs no correction.
   ------------------------------------------------------------------------ */
ss3-force-full-width {
  transform: none !important;
}

/* ------------------------------------------------------------------------
   Menu: the frame belongs to the top-level item whose dropdown is open, not
   to the links inside the dropdown. Dropdown entries only change colour.
   ------------------------------------------------------------------------ */
.ui-menu__sub-li.current-menu-item > .ui-menu__sub-a,
.ui-menu__sub-li.current_page_item > .ui-menu__sub-a {
  color: var(--ui-active-color, #04508e);
  background: transparent;
  box-shadow: none;
}

.ui-menu__sub-li.current-menu-item > .ui-menu__sub-a:focus-visible,
.ui-menu__sub-li.current_page_item > .ui-menu__sub-a:focus-visible {
  outline: 2px solid var(--ui-active-color, #04508e);
  outline-offset: 2px;
}

/* Desktop only: the dropdown is opened by hover, so the parent keeps the
   same underline the theme draws for the current page. */
@media (min-width: 1201px) {
  .ui-menu__main-li.current-menu-parent > .ui-menu__main-a,
  .ui-menu__main-li.current-menu-ancestor > .ui-menu__main-a,
  .ui-menu__main-li.menu-item-has-children:hover > .ui-menu__main-a,
  .ui-menu__main-li.menu-item-has-children:focus-within > .ui-menu__main-a {
    box-shadow: inset 0 -2px 0 0 currentColor;
  }
}

/* Mobile menu: the open/current parent is marked the same way. */
.ui-menu__main-li.current-menu-parent > .ui-menu__open-nav-submenu_mobile,
.ui-menu__main-li.current-menu-ancestor > .ui-menu__open-nav-submenu_mobile {
  color: var(--ui-active-color, #04508e);
}

/* ------------------------------------------------------------------------
   Error pages (403, 404, 500). They use the normal header and footer, so
   they only need the message block itself.
   ------------------------------------------------------------------------ */
.snmec-error {
  padding: 96px 20px 110px;
  background: #f4f7fb;
  text-align: center;
}

.snmec-error__inner {
  max-width: 640px;
  margin: 0 auto;
}

.snmec-error__code {
  margin: 0;
  font-size: 88px;
  line-height: 1;
  font-weight: 700;
  color: #04508e;
  letter-spacing: 0.02em;
}

.snmec-error__title {
  margin: 12px 0 14px;
  font-size: 30px;
  line-height: 1.25;
  color: #011246;
}

.snmec-error__text {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.75;
  color: #4a5568;
}

.snmec-error__button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  background: #04508e;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.snmec-error__button:hover,
.snmec-error__button:focus {
  background: #5e76bf;
  color: #fff;
}

@media (max-width: 700px) {
  .snmec-error {
    padding: 64px 18px 80px;
  }

  .snmec-error__code {
    font-size: 64px;
  }

  .snmec-error__title {
    font-size: 24px;
  }
}

/* ------------------------------------------------------------------------
   Phones: the theme keeps desktop type sizes and reserves 100px of padding
   on the right of each button for its hover arrow, so long labels broke into
   three cramped lines next to the icon. Buttons now size to their text, and
   long headings wrap on word boundaries instead of overflowing.
   ------------------------------------------------------------------------ */
@media (max-width: 767px) {
  body {
    font-size: 16px;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .core-title-heading,
  .core-text p,
  .core-button-text {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  /* The reserved hover space is what squeezed the label. */
  .core-button {
    --ui-padding-right: 0px !important;
    --ui-margin-right: 0px;
    max-width: 100%;
    padding-right: 12px;
    font-size: 16px;
    line-height: 1.3;
  }

  .core-button .ui-button-text-transition {
    overflow: visible;
  }

  .core-button .core-button-text {
    white-space: normal;
    line-height: 1.3;
  }

  .core-button .ui-button__icon {
    margin-right: 10px;
  }

  /* Section headings keep their hierarchy but stop competing with the
     viewport. */
  .core-title-size-two .core-title-heading {
    font-size: 30px !important;
    line-height: 1.2 !important;
  }

  .core-title-size-three .core-title-heading {
    font-size: 26px !important;
    line-height: 1.25 !important;
  }

  .core-title-size-four .core-title-heading {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  .core-title-size-five .core-title-heading {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }
}
