/* Section dropdowns in the main menu + jump targets. See inc/content/section-nav.php. */

/* Dropdown: opens at the header's bottom edge, site colours, square corners. */
.do-nav {
  --awb-submenu-color: #111111 !important;
  --awb-submenu-active-color: #ff8400 !important;
  --awb-submenu-bg: #ffffff !important;
  --awb-submenu-active-bg: #ffffff !important;
  --awb-submenu-sep-color: #ececec !important;
}

@media (min-width: 768px) {
  .do-nav.awb-menu_desktop .awb-menu__sub-ul_main {
    margin-top: 23px !important;
    border-top: 2px solid #ff8400;
    box-shadow: 0 12px 28px rgba(13, 13, 13, 0.1);
  }

  /* Invisible bridge over the gap, so the dropdown stays open while the pointer moves down. */
  .do-nav.awb-menu_desktop .awb-menu__sub-ul_main::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -25px;
    height: 25px;
  }

  .do-nav.awb-menu_desktop .awb-menu__sub-a {
    font-family: Inter, sans-serif;
    font-weight: 500;
  }

  .do-nav.awb-menu_desktop .awb-menu__sub-a:hover,
  .do-nav.awb-menu_desktop .awb-menu__sub-a:focus-visible {
    color: #ff8400 !important;
  }
}

/*
 * Up to 1799px the three equal header columns leave too little room for the
 * menu with its dropdown arrows (it wrapped onto two lines). Logo and button
 * columns shrink to their content and the menu takes the rest.
 */
@media (min-width: 1025px) and (max-width: 1799px) {
  .do-header .fusion-layout-column:has(.do-nav) {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
  }

  .do-header .fusion-layout-column:not(:has(.do-nav)) {
    flex: 0 0 auto !important;
    width: max-content !important;
    max-width: none !important;
  }

  .do-header .fusion-layout-column:not(:has(.do-nav)) .fusion-column-wrapper {
    white-space: nowrap;
  }
}

/* Small laptops: tighter menu so it still fits on one line. */
@media (min-width: 1025px) and (max-width: 1279px) {
  .do-nav.awb-menu_desktop {
    --awb-gap: 14px !important;
  }

  .do-nav.awb-menu_desktop .awb-menu__main-a {
    font-size: 15px !important;
  }

  .do-nav.awb-menu_desktop .awb-menu__open-nav-submenu-hover {
    padding-left: 4px !important;
  }
}

@media (min-width: 1025px) and (max-width: 1099px) {
  .do-nav.awb-menu_desktop .awb-menu__main-a {
    font-size: 14px !important;
  }
}

/* Jump targets stop below the sticky header. */
.do-anchor {
  display: block;
  height: 0;
  scroll-margin-top: var(--do-header-h, 80px);
}

.do-hsvc-card {
  scroll-margin-top: calc(var(--do-header-h, 80px) + 24px);
}

/* The service picked from the menu is marked, since a row shows three cards. */
.do-hsvc-card:target,
.do-hsvc-card.do-is-target {
  outline: 2px solid #ff8400;
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/*
 * Collapsed (mobile) menu button.
 * The header's Avada menu has the two toggle icons set the wrong way round
 * (× while closed, ≡ while open); swap the glyphs here instead of in the DB.
 * The menu column also gets the free space so the button sits at the right edge.
 */
.do-nav .awb-menu__m-collapse-icon-open::before {
  content: "\f0c9";
}

.do-nav .awb-menu__m-collapse-icon-close::before {
  content: "\f00d";
}

.do-header .fusion-layout-column:has(.do-nav.collapse-enabled) {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
}

.do-header .fusion-layout-column:has(.do-nav.collapse-enabled) > .fusion-column-wrapper {
  margin-right: 0 !important;
}

.do-nav.collapse-enabled {
  justify-content: flex-end !important;
}

/* Icon lines up with the header's right padding, like the logo on the left. */
.do-nav.collapse-enabled .awb-menu__m-toggle {
  padding-right: 0 !important;
}
