/*
 * Small compatibility layer for the archived WordPress markup.
 * The original theme and page-specific styling live under /wp-content/.
 */

.nivoSlider.legacy-slider {
  height: auto !important;
  min-height: 1px;
  background: #fff;
}

.nivoSlider.legacy-slider > img {
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease-in-out;
  will-change: opacity;
}

.nivoSlider.legacy-slider > img.legacy-slide-active {
  position: relative !important;
  display: block !important;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .nivoSlider.legacy-slider > img {
    transition: none;
  }
}

.nav-toggle[aria-expanded="true"] + #header {
  margin-top: 0;
}

#navigation.legacy-navigation-open {
  display: block;
}

.legacy-form-message {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #bd4c4c;
  color: #a73737;
  background: #fffafa;
}

.legacy-form-message--success {
  border-color: #7f9c79;
  color: #496844;
  background: #f7fbf6;
}

/*
 * Keep the Services dropdown links visually neutral until interaction.
 * The archived theme applies the active parent/page treatment to every
 * descendant link, so reset that treatment only within the submenu.
 */
#navigation #main-nav > li.menu-item-has-children > .sub-menu > li > a {
  background-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  text-decoration: none !important;
}

#navigation #main-nav > li.menu-item-has-children > .sub-menu > li > a:hover,
#navigation #main-nav > li.menu-item-has-children > .sub-menu > li > a:focus-visible {
  background-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  text-decoration: underline !important;
}

#navigation #main-nav > li.current-menu-ancestor > a,
#navigation #main-nav > li.current_page_parent > a,
#navigation #main-nav > li.menu-item-has-children > .sub-menu > li.current-menu-item > a,
#navigation #main-nav > li.menu-item-has-children > .sub-menu > li.current_page_item > a {
  color: #c45151 !important;
  background-color: #f8f2f2 !important;
  border-radius: 5px !important;
  box-shadow: 1px 0 5px 2px #c45151 !important;
  -webkit-box-shadow: 1px 0 5px 2px #c45151 !important;
}

.home-page h2 a[href="/contact"]:hover,
.home-page h2 a[href="/contact"]:focus-visible {
  color: #c45151 !important;
  text-decoration: underline !important;
}
