/* ==========================================================================
   DEINO — Primary navigation
   About Us and What We Do dropdowns.

   Kept in its own file on purpose: a new filename cannot be served from an
   old cached copy, so the navigation always renders correctly after upload.
   ========================================================================== */

/* ---- Dropdown containers ---------------------------------------------- */
.nav__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

/* The caret is a real button so touch and keyboard users can open the menu.
   All inherited button chrome is reset so it can never render as a blob. */
.nav__menu-toggle {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 30px;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 5px;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.nav__caret {
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .25s ease;
}
.nav__item--has-menu:hover .nav__caret,
.nav__item--has-menu:focus-within .nav__caret,
.nav__item--has-menu.is-open .nav__caret {
  transform: translateY(1px) rotate(-135deg);
}

/* Caret colour follows the link text in every header state */
.header .nav__menu-toggle { color: rgba(255,255,255,.94); }
.header.is-solid .nav__menu-toggle { color: #0A2747; }
.header .nav__item--has-menu.is-active .nav__menu-toggle { color: #B58A3A; }
.nav__menu-toggle:focus-visible { outline: 2px solid #B58A3A; outline-offset: 2px; }

/* Parent is highlighted when you are on any page inside its menu */
.nav__item--has-menu.is-active > .nav__link { color: #B58A3A !important; }
.nav__item--has-menu.is-active > .nav__link::after { transform: scaleX(1); }

/* ---- The panel -------------------------------------------------------- */
/* Hidden by default in every state, so it can never appear as inline text */
.nav__menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 140;
  min-width: 232px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #FFFFFF;
  border: 1px solid rgba(10,39,71,.09);
  border-radius: 12px;
  box-shadow: 0 22px 48px rgba(7,28,51,.16), 0 2px 6px rgba(7,28,51,.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

/* Small gold-edged pointer connecting the panel to its heading */
.nav__menu::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  background: #FFFFFF;
  border-left: 1px solid rgba(10,39,71,.09);
  border-top: 1px solid rgba(10,39,71,.09);
  transform: translateX(-50%) rotate(45deg);
}

/* Invisible bridge so the pointer can move from heading to panel */
.nav__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}

.nav__item--has-menu:hover .nav__menu,
.nav__item--has-menu:focus-within .nav__menu,
.nav__item--has-menu.is-open .nav__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* ---- Menu items ------------------------------------------------------- */
.nav__menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border-radius: 8px;
  color: #0A2747 !important;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.005em;
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, padding .18s ease;
}
/* Thin gold rule that slides in on hover */
.nav__menu-link::before {
  content: "";
  width: 0;
  height: 1.5px;
  background: #B58A3A;
  flex: none;
  transition: width .2s ease;
}
.nav__menu-link:hover,
.nav__menu-link:focus-visible {
  background: #F4F2EC;
  color: #0A2747 !important;
  outline: none;
}
.nav__menu-link:hover::before,
.nav__menu-link:focus-visible::before,
.nav__menu-link[aria-current="page"]::before { width: 14px; }
.nav__menu-link[aria-current="page"] { color: #B58A3A !important; }

/* ---- Mobile panel: sub-pages nest under their section ------------------ */
.navpanel__list a.navpanel__sub {
  padding-left: 2.35rem;
  min-height: 46px;
  font-size: clamp(1.1rem, 4.4vw, 1.75rem);
  opacity: .9;
}
.navpanel__list a.navpanel__sub .idx { display: none; }
.navpanel__list a.navpanel__sub::before {
  content: "";
  flex: none;
  align-self: center;
  display: inline-block;
  width: 14px;
  height: 1.5px;
  margin-right: .85rem;
  background: currentColor;
  opacity: .45;
}

/* ---- Footer: Contact Us, Privacy Policy, Terms of Use ------------------ */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.75rem;
}
.footer-legal a {
  font-size: 15px !important;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: 0;
}
.ref-footer__bottom {
  font-size: 15px;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.footer__base { font-size: 15px; }
@media (max-width: 599px) {
  .footer-legal { gap: .5rem 1.25rem; }
}

/* ---- Open mobile menu: keep the logo and Close button legible ---------- */
/* The menu panel is cream, so the header must switch to its navy state
   while the panel is open — otherwise both render white on cream. */
body.nav-open .header .nav-toggle,
body.nav-open .header .nav-toggle__text { color: #0A2747 !important; }
body.nav-open .header .brand-logo--light { opacity: 0 !important; }
body.nav-open .header .brand-logo--color { opacity: 1 !important; }
/* Inner pages carry a more specific header rule; match and exceed it */
body.nav-open .header.ref-header:not(.is-solid) .nav-toggle,
body.nav-open .header.ref-header.is-solid .nav-toggle { color: #0A2747 !important; }
body.nav-open .header.ref-header:not(.is-solid) .brand-logo--light,
body.nav-open .header.ref-header.is-solid .brand-logo--light { opacity: 0 !important; }
body.nav-open .header.ref-header:not(.is-solid) .brand-logo--color,
body.nav-open .header.ref-header.is-solid .brand-logo--color { opacity: 1 !important; }
