.header,
.mobile-menu {
  --nav-ink: #122d3c;
  --nav-deep: #103240;
  --nav-teal: #116a65;
  --nav-mint: #c5f2dc;
  --nav-line: #dce5e7;
}

.contact-strip {
  color: #e1efee;
  background: #102e3b;
  font-size: .78rem;
  font-weight: 540;
}
.contact-strip .wrap { min-height: 32px; }
.contact-strip .wrap > span,
.contact-strip a,
.drawer-email { display: inline-flex; align-items: center; gap: .65em; }
.contact-strip .wrap > span::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border: 1.5px solid #8be5c5;
  transform: rotate(45deg);
}
.contact-strip a::before,
.drawer-email::before {
  content: "";
  flex: none;
  width: 13px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: linear-gradient(35deg, transparent 45%, currentColor 47% 55%, transparent 57%) left top / 50% 68% no-repeat,
              linear-gradient(-35deg, transparent 45%, currentColor 47% 55%, transparent 57%) right top / 50% 68% no-repeat;
}
.header {
  background: #fff;
  border-bottom: 1px solid var(--nav-line);
  box-shadow: 0 2px 10px #0a25300a;
}
.header .brand img { display: block; width: clamp(128px, 11.4vw, 161px); }
.header :focus-visible { outline: 3px solid #127779; outline-offset: 3px; }
.nav-arrow { font: 600 1.13rem/1 "DM Sans", sans-serif; }

@media (min-width: 801px) {
  .header .navbar { min-height: 77px; gap: clamp(12px, 2.1vw, 32px); }
  .header .nav-links { flex: 1; min-width: 0; justify-content: center; gap: clamp(3px, .65vw, 12px); color: var(--nav-ink); }
  .header .nav-links::before { content: ""; flex: 1; }
  .header .nav-links::after { content: ""; flex: 1; order: 1; }
  .nav-links > a:not(.nav-cta),
  .header .services-toggle,
  .header .services-fallback summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: .62rem clamp(.5rem, 1.1vw, 1rem);
    border: 0;
    border-radius: 8px;
    color: var(--nav-ink);
    background: transparent;
    font-size: .94rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
  }
  .nav-links > a:not(.nav-cta):hover,
  .header .services-toggle:hover,
  .header .services-fallback summary:hover { color: var(--nav-teal); background: #edf5f2; }
  .header .nav-links > a[aria-current="page"]:not(.nav-cta),
  .header .services-toggle:is(.section-active,[aria-expanded="true"]),
  .header .services-fallback[open] summary,
  .header .services-fallback:has([aria-current="page"]) summary {
    color: #0a5854;
    background: #e6f3ec;
    text-decoration: none;
    box-shadow: inset 0 -2px #8cccb3;
  }
  .header .services-fallback summary { list-style: none; cursor: pointer; }
  .header .services-fallback summary::-webkit-details-marker { display: none; }
  .header .services-fallback summary::after {
    content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg);
  }
  .header .services-fallback[open] summary::after { transform: translateY(1px) rotate(225deg); }
  .header .services-toggle[aria-expanded="true"],
  .header .services-fallback[open] summary { background: #175451; color: #fff; box-shadow: none; }
  .header .nav-links .nav-cta {
    flex: none; order: 2;
    gap: 13px;
    min-height: 45px;
    margin-inline-start: auto;
    padding: 5px 6px 5px 18px;
    border: 1px solid #103745;
    border-radius: 100px;
    background: #103745;
    color: #fff;
    box-shadow: none;
  }
  .header .nav-cta .nav-arrow {
    display: grid; place-items: center; width: 31px; height: 31px;
    border-radius: 50%; background: var(--nav-mint); color: #143d40;
  }
  .header .nav-links .nav-cta:is(:hover,[aria-current="page"]) { background: #1c565a; }
  .header .nav-group .mega-panel,
  .header .services-fallback > div {
    top: 100%; left: 0; right: auto;
    width: clamp(308px, 29vw, 354px);
    max-height: calc(100dvh - 100px);
    padding: 8px;
    gap: 3px;
    background: #fff;
    border: 1px solid #cbdcdb;
    border-radius: 15px;
    box-shadow: 0 18px 40px -15px #102f4054, 0 4px 12px -5px #102f4027;
  }
  .header .nav-links a.mega-overview,
  .header .services-fallback > div a:first-child {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    min-height: 43px; padding: 10px 13px; border-radius: 8px;
    color: #ecfffa; background: #153e48;
  }
  .header .nav-links .mega-overview strong { margin: 0; font-size: .93rem; font-weight: 620; }
  .header .nav-links .mega-overview .nav-arrow { color: #a6e9cb; }
  .header .nav-links a.mega-overview:hover,
  .header .services-fallback > div a:first-child:hover { background: #21585a; }
  .header .nav-links a.mega-item { gap: 12px; min-height: 61px; padding: 7px 9px; border-radius: 8px; color: var(--nav-ink); }
  .header .mega-item strong { margin: 0 0 2px; font-size: .95rem; font-weight: 650; }
  .header .mega-item small { font-size: .78rem; color: #526670; }
  .header .nav-links a.mega-item:is(:hover,:focus-visible,[aria-current="page"]),
  .header .services-fallback > div a:not(:first-child):is(:hover,[aria-current="page"]) {
    color: #0b514e; border-color: transparent; background: #edf6f1;
  }
  .header .services-fallback > div a { min-height: 41px; padding: 11px 13px; border-radius: 8px; }
}

.mega-item .mega-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; padding: 8px; border-radius: 10px;
}
.mega-item .mega-icon img { display: block; width: 22px; height: 22px; }
.mega-item[href$="/corporate-services"] .mega-icon { background: #d9e8fa; }
.mega-item[href$="/financial-brokerage"] .mega-icon { background: #ccefe0; }
.mega-item[href$="/commercial-brokerage"] .mega-icon { background: #e8dff4; }

@media (max-width: 800px) {
  .header .navbar { min-height: 65px; }
  .nav-ready .header .nav-toggle {
    min-height: 43px; padding: .55rem .92rem;
    color: #f8ffff; background: var(--nav-deep); border-color: var(--nav-deep); border-radius: 100px;
  }
  .nav-ready .header .nav-toggle::before { width: 15px; height: 8px; border-color: #afefd6; }
  .mobile-menu[open] {
    inset: 0 0 0 auto;
    width: min(calc(100% - 14px), 405px); height: 100vh; height: 100dvh;
    margin: 0 0 0 auto; border: 0; border-left: 1px solid #b8c9c9;
    box-shadow: -16px 0 50px #0b29333b; background: #fff; color: var(--nav-ink); color-scheme: light;
  }
  .mobile-menu::backdrop { background: #0a283b99; }
  .mobile-menu-inner { display: flex; flex-direction: column; min-height: 100%; padding: 0 clamp(17px, 5vw, 26px) max(18px, env(safe-area-inset-bottom)); }
  .mobile-menu-top { min-height: 81px; padding: max(12px, env(safe-area-inset-top)) 0 12px; border-bottom: 1px solid var(--nav-line); }
  .mobile-menu-top h2 { font-size: 2rem; color: var(--nav-ink); }
  .mobile-menu-close {
    min-height: 42px; padding: .45rem .76rem;
    color: #1c4c53; background: #eff6f2; border: 1px solid #d9e6df; border-radius: 100px;
  }
  .mobile-menu nav { display: flex; flex-direction: column; gap: 0; padding-top: 12px; padding-bottom: 28px; }
  .mobile-menu nav > a:not(.mobile-menu-cta),
  .mobile-services > summary {
    min-height: 58px; padding: .83rem .12rem; color: var(--nav-ink);
    font-weight: 610; font-size: 1.16rem; letter-spacing: -.02em;
  }
  .mobile-services, .mobile-menu nav > a:not(.mobile-menu-cta) { border-bottom: 1px solid var(--nav-line); }
  .mobile-menu nav > a:not(.mobile-menu-cta)::after { border-color: #467d7a; }
  .mobile-services > summary::after { border-color: #376866; }
  .mobile-services[open] > summary, .mobile-services:has(a[aria-current="page"]) > summary { color: var(--nav-teal); }
  .mobile-menu nav a[aria-current="page"] { color: #0c645d; text-underline-offset: .25em; }
  .mobile-menu a:hover, .mobile-menu summary:hover { color: var(--nav-teal); }
  .mobile-service-links { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0 0 10px; padding: 6px; background: #f1f6f4; border: 0; border-radius: 11px; }
  .mobile-service-links a.mega-overview {
    grid-area: auto; display: flex; flex-direction: row; align-items: center; justify-content: space-between; min-height: 40px;
    padding: 7px 9px; border-radius: 7px; color: #174e4b; background: transparent;
  }
  .mobile-service-links a.mega-overview strong { font-size: .91rem; }
  .mobile-service-links a.mega-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    min-height: 44px; padding: 4px 8px; border: 0; border-radius: 7px; color: var(--nav-ink);
  }
  .mobile-service-links a.mega-item:is(:hover,:focus-visible,[aria-current="page"]) { background: #dfede5; color: #114f4b; }
  .mobile-service-links .mega-item .mega-icon { width: 32px; height: 32px; padding: 7px; border-radius: 8px; }
  .mobile-service-links .mega-icon img { width: 18px; height: 18px; }
  .mobile-service-links a::after, .mobile-service-links small { display: none; }
  .mobile-service-links .mega-item strong { margin: 0; font-size: .91rem; font-weight: 610; }
  .mobile-menu a.mobile-menu-cta {
    min-height: 49px; margin-top: 16px; padding: .7rem 1.12rem; border-radius: 100px; color: #fff; background: var(--nav-deep);
  }
  .mobile-menu .mobile-menu-cta::after { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--nav-mint); color: var(--nav-deep); }
  .mobile-menu a.drawer-email {
    width: fit-content; min-height: 44px; margin-top: auto; padding: .6rem 0; justify-content: flex-start;
    color: #325e64; font-size: .9rem; font-weight: 530;
  }
  .mobile-menu :focus-visible { outline: 3px solid #157473; outline-offset: 1px; }
}
@media (max-width: 375px) {
  .mobile-menu[open] { width: 100%; }
  .contact-strip .wrap { gap: 10px; }
  .contact-strip .wrap > span::before { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .header .nav-links > a, .header .services-toggle, .header .mega-item, .mobile-service-links a { transition: background-color .16s ease, color .16s ease; }
  .header .menu-chevron { transition: transform .19s ease; }
  .header .nav-arrow { transition: transform .18s ease; }
  .header a:hover .nav-arrow { transform: rotate(8deg); }
  .header .mega-panel:not([hidden]) { animation: services-appear .14s ease-out; }
  @keyframes services-appear { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 800px) and (prefers-reduced-motion: no-preference) {
  .mobile-menu[open] { animation: drawer-appear .2s cubic-bezier(.2,.75,.3,1); }
  @keyframes drawer-appear { from { transform: translateX(12%); opacity: .8; } to { transform: none; opacity: 1; } }
}
