/* ===========================================================================
   SERVICES DROPDOWN — shared chrome                         added 2026-09-24
   Loaded by every page, the home page included, so the header behaves the
   same everywhere.

   No JavaScript: the panel opens on :hover and on :focus-within, which is what
   makes it usable from the keyboard — tabbing onto "Services" opens it and
   tabbing onward moves through its links. The home page is React-hydrated and
   the inner pages are static, so a CSS-only menu is also the only version that
   is guaranteed to behave identically on both.

   Nothing here restyles the existing header: the nav links, the pill, the
   spacing and the colours are all untouched. This only adds the panel.
   =========================================================================== */

.mt-navitem {
  position: relative;
  display: inline-flex;
  align-items: center
}

.mt-navmenu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 60;
  margin-top: 14px;
  min-width: 264px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 16px;
  border: 1px solid var(--mt-border);
  background: #fff;
  box-shadow: 0 26px 60px -26px rgba(26, 31, 46, .55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s
}

/* The 14px margin above leaves a dead gap the pointer would cross on its way
   down, which would close the menu. This bridges it — transparent, no paint,
   purely a hover target. */
.mt-navmenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 16px
}

.mt-navitem:hover .mt-navmenu,
.mt-navitem:focus-within .mt-navmenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0)
}

/* one wrapper per link, so every anchor is :nth-child(1) - see the note in
   mt-nav.js about the home page's nth-child(n+4) rule */
.mt-navmenu__item {
  display: block
}

.mt-navmenu__link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--mt-navy);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease
}

.mt-navmenu__link:hover {
  background: var(--mt-bg-soft);
  color: var(--mt-orange-dark)
}

.mt-navmenu__link:focus-visible {
  outline: 3px solid var(--mt-orange);
  outline-offset: -3px
}

/* The panel is a desktop affordance; below lg the nav itself is hidden and the
   mobile card lists the same link as an indented child. */
@media (max-width:1023px) {
  .mt-navmenu {
    display: none
  }
}

/* --- the mobile card ------------------------------------------------------
   The children start collapsed. [hidden] alone would be overruled here: the
   links carry Tailwind utilities and preflight's [hidden]{display:none} has
   the same specificity while coming earlier in the cascade, so the group says
   it explicitly. */
.mt-navsubs {
  display: flex;
  flex-direction: column;
  gap: 4px
}

.mt-navsubs[hidden] {
  display: none
}

/* the child links, indented under their parent. Scoped to nav so they outrank
   the px-3 utility the link already carries. */
nav .mt-navsub {
  padding-left: 28px
}

/* the parent keeps its row layout and gains a chevron that turns when open */
nav .mt-navparent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px
}

.mt-navsub__chev {
  flex: 0 0 16px;
  color: var(--mt-orange);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1)
}

nav .mt-navparent[aria-expanded="true"] .mt-navsub__chev {
  transform: rotate(180deg)
}

@media (prefers-reduced-motion:reduce) {
  .mt-navsub__chev {
    transition: none
  }
}

@media (prefers-reduced-motion:reduce) {
  .mt-navmenu {
    transition: none
  }
}