/* Naylor main menu. Desktop: bar with dropdowns from 1025px. Below that: menu button + drawer. */
nav.nm {
	--nm-blue: #094b8d;
	--nm-navy: #062c51;
	--nm-link: #044e87;
	--nm-orange: #f2751a;
	--nm-soft: #f1f6fa;
	--nm-line: #dfe7ee;
	--nm-white: #ffffff;
	font-family: inherit;
	color: var(--nm-navy);
	position: relative;
}
nav.nm ul { list-style: none; margin: 0; padding: 0; }
nav.nm a { text-decoration: none; }
nav.nm button { font: inherit; margin: 0; text-transform: none; letter-spacing: normal; cursor: pointer; }
/* the site styles all buttons (dark fill, white text); undo that in every state */
nav.nm button, nav.nm button:hover, nav.nm button:focus, nav.nm button:active { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; color: inherit !important; text-decoration: none !important; }
nav.nm .nm-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
nav.nm a:focus-visible, nav.nm button:focus-visible { outline: 2px solid var(--nm-orange); outline-offset: 2px; }
nav.nm [hidden] { display: none !important; }
/* Elementor's invisible copy of a sticky header: never show its dropdowns or drawer */
.elementor-sticky__spacer nav.nm .nm-panel, .elementor-sticky__spacer nav.nm .nm-drawer .nm-bar .nm-panel { display: none !important; }

/* chevron */
.nm-chev { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .15s ease; }
nav.nm [aria-expanded="true"] .nm-chev { transform: translateY(1px) rotate(225deg); }

/* links inside panels */
nav.nm .nm-link { display: inline-block; color: var(--nm-link); font-size: 16px; line-height: 1.35; padding: 5px 0; }
nav.nm .nm-link:hover, nav.nm .nm-link[aria-current="page"] { color: var(--nm-navy); text-decoration: underline; text-underline-offset: 3px; }
nav.nm .nm-group-title { display: block; color: var(--nm-blue); font-size: 17px; font-weight: 700; line-height: 1.3; padding-bottom: 7px; margin-bottom: 6px; border-bottom: 2px solid var(--nm-orange); }
nav.nm a.nm-group-title:hover { color: var(--nm-navy); text-decoration: underline; text-underline-offset: 3px; }
/* AssociationMediaHub logo under a group title, like the old menu */
nav.nm .nm-logo-link { display: block; width: max-content; margin: 8px 0 4px; line-height: 0; }
/* menu item images (Appearance > Menus > Menu image); a width set there comes as an inline style */
nav.nm .nm-img { max-width: 100%; object-fit: contain; }
/* --nm-h = the file's own height (set by PHP): small images keep their size instead of being blown up.
   A definite height (not max-height) is needed: SVGs with only a viewBox have no size of their own. */
nav.nm .nm-img--under, nav.nm .nm-img--only { display: block; width: auto; height: min(52px, var(--nm-h, 52px)); }
nav.nm .nm-img--under { margin-top: 6px; }
nav.nm .nm-logo-link .nm-img--under { margin-top: 0; }
nav.nm .nm-img--before { display: inline-block; width: auto; height: min(20px, var(--nm-h, 20px)); margin-right: 8px; vertical-align: -4px; }
/* block, not inline-block: on a text line the link keeps empty space below it for letter descenders */
nav.nm .nm-has-img--only { display: block; width: max-content; max-width: 100%; line-height: 0; }
nav.nm .nm-cta { display: inline-block; background: var(--nm-orange); color: var(--nm-white); font-size: 17px; font-weight: 600; line-height: 25px; padding: 15px 12px 14px; border-radius: 8px; white-space: nowrap; }
nav.nm .nm-cta:hover { background: #d9620c; color: var(--nm-white); }

/* ---------- desktop ---------- */
@media (min-width: 1025px) {
	.nm-burger, .nm-drawer-only { display: none !important; }
	.nm-drawer { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
	/* JS sets a left margin so the items sit centered between the logo image and the button */
	.nm-bar { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-start; gap: clamp(8px, .6vw, 14px); }
	.nm-item { display: flex; align-items: center; position: relative; }
	nav.nm .nm-top { display: inline-flex; align-items: center; color: var(--nm-blue); font-size: 19px; font-weight: 500; line-height: 1.2; white-space: nowrap; padding: 15px 2px 15px 4px; box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .15s ease; }
	/* same text outline as the live naylor.com menu: thin at rest, heavier on hover / while open */
	nav.nm--main .nm-bar > .nm-item > .nm-top { -webkit-text-stroke: .5px #094b8d; -webkit-text-fill-color: #094b8d; }
	nav.nm--main .nm-bar > .nm-item:hover > .nm-top, nav.nm--main .nm-bar > .nm-item.is-open > .nm-top { -webkit-text-stroke: 1.5px #062c51; -webkit-text-fill-color: #062c51; }
	nav.nm .nm-item { color: var(--nm-blue); }
	nav.nm .nm-item:hover, nav.nm .nm-item.is-open, nav.nm .nm-item.is-current { color: var(--nm-navy); }
	nav.nm .nm-toggle-sub { padding: 15px 4px 15px 0; }
	nav.nm button.nm-top.nm-toggle-sub { padding: 15px 6px 15px 4px; }
	.nm-item.is-open > .nm-top, .nm-item.is-current > .nm-top, nav.nm .nm-top:hover { color: var(--nm-navy); }
	/* orange line under the whole top item: the text link and its arrow button together */
	nav.nm--main .nm-bar > .nm-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; transition: background-color .15s ease; pointer-events: none; }
	nav.nm--main .nm-bar > .nm-item:hover::after, nav.nm--main .nm-bar > .nm-item.is-open::after, nav.nm--main .nm-bar > .nm-item.is-current::after { background: var(--nm-orange); }

	.nm-panel { position: absolute; z-index: 9999; background: var(--nm-white); box-shadow: 0 18px 30px rgba(6, 44, 81, .16); }
	.nm-panel--list { top: calc(100% + 4px); left: 0; min-width: 270px; border-radius: 10px; box-shadow: 0 10px 30px rgba(6, 44, 81, .12), 0 2px 6px rgba(6, 44, 81, .06); }
	.nm-panel--list .nm-panel-in { padding: 12px 22px 16px; }
	/* JS adds nm-flip only when a dropdown would run off the right edge of the window */
	.nm-panel--list.nm-flip { left: auto; right: 0; }
	.nm-panel--list .nm-link { display: block; padding: 7px 0; }
	/* mega panel: full window width; JS sets top/left/width */
	/* mega panel: never taller than the window; JS sets max-height, the panel scrolls inside */
	.nm-panel--mega { top: 100%; left: 0; border-top: 1px solid var(--nm-line); overflow-y: auto; overscroll-behavior: contain; }
	.nm-panel--mega .nm-panel-in { max-width: 1240px; margin: 0 auto; padding: 28px 40px 0; }
	.nm-cols { display: grid; gap: 0 36px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.nm-cols--1 { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
	.nm-cols--2 { grid-template-columns: repeat(2, minmax(0, 320px)); }
	.nm-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.nm-cols--many { display: block; column-count: 4; column-gap: 36px; }
	.nm-group { break-inside: avoid; page-break-inside: avoid; padding-bottom: 28px; }
	.nm-top-row-wrap { background: var(--nm-soft); border-bottom: 1px solid var(--nm-line); }
	.nm-top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; max-width: 1240px; margin: 0 auto; padding: 14px 40px; }

	/* utility bar (small top links), right-aligned like before */
	nav.nm--utility { display: flex; justify-content: flex-end; }
	nav.nm--utility .nm-bar { flex: 0 0 auto; gap: 0; }
	nav.nm--utility .nm-item + .nm-item { border-left: 1px solid var(--nm-line); }
	nav.nm--utility .nm-top { color: var(--nm-navy); font-size: 14px; font-weight: 400; padding: 5px 4px 5px 11px; box-shadow: none !important; }
	nav.nm--utility .nm-item:last-child .nm-top { padding-right: 11px; }
	/* links without a dropdown: 11px on both sides of the divider, like live */
	nav.nm--utility .nm-item:not(.has-panel) > .nm-top { padding: 5px 11px; }
	nav.nm--utility .nm-item { color: var(--nm-navy); }
	nav.nm--utility .nm-toggle-sub { padding: 5px 11px 5px 0; }
	nav.nm--utility button.nm-top.nm-toggle-sub { padding: 5px 11px; }
	/* Client Login dropdown: compact */
	nav.nm--utility .nm-panel--list { left: auto; right: 0; min-width: 0; width: max-content; }
	nav.nm--utility .nm-panel--list .nm-panel-in { padding: 8px 16px 10px; }
	nav.nm--utility .nm-panel--list .nm-link { padding: 4px 0; }
	nav.nm--utility .nm-top:hover { text-decoration: underline; text-underline-offset: 3px; }
}
/* short screens: tighter panel so most of it fits without scrolling */
@media (min-width: 1025px) and (max-height: 860px) {
	.nm-panel--mega .nm-panel-in { padding-top: 20px; }
	.nm-top-row { padding-top: 10px; padding-bottom: 10px; }
	.nm-group { padding-bottom: 18px; }
	nav.nm .nm-group-title { font-size: 16px; padding-bottom: 5px; margin-bottom: 4px; }
	nav.nm .nm-panel--mega .nm-link { font-size: 15px; padding: 3px 0; }
}
/* Font sizes per screen width, copied from the live naylor.com menu (Elementor breakpoints 1200 / 1440 / 1920) */
@media (min-width: 1025px) and (max-width: 1200px) {
	nav.nm--main .nm-top { font-size: 16px; padding-left: 2px; }
	nav.nm--utility .nm-top, nav.nm--utility .nm-panel--list .nm-link { font-size: 16px; }
	nav.nm .nm-cta { font-size: 15px; padding: 18px 9px; }
	nav.nm .nm-drawer { gap: 12px; }
}
@media (min-width: 1025px) and (max-width: 1100px) {
	nav.nm--main .nm-bar { gap: 6px; }
}
@media (min-width: 1201px) and (max-width: 1440px) {
	nav.nm--main .nm-top { font-size: 19px; }
	nav.nm--utility .nm-top, nav.nm--utility .nm-panel--list .nm-link { font-size: 14px; }
	nav.nm .nm-cta { font-size: 17px; padding: 15px 10px 14px; }
}
@media (min-width: 1441px) {
	nav.nm--main .nm-top { font-size: 20px; }
	nav.nm--utility .nm-top, nav.nm--utility .nm-panel--list .nm-link { font-size: 18px; }
	nav.nm .nm-cta { font-size: 20px; padding: 18px 10px; }
}
@media (min-width: 1920px) {
	nav.nm--main .nm-top { font-size: 24px; }
}
/* the top row of a mega panel (both sizes) */
.nm-goals { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
nav.nm .nm-goals-label { color: var(--nm-navy); font-weight: 700; font-size: 16px; }
.nm-goals-list { display: flex; flex-wrap: wrap; gap: 0 18px; }
/* skip-spaces: Chrome does not underline the space that starts the ::after arrow by default (gap in the line) */
nav.nm .nm-all { color: var(--nm-blue); font-weight: 700; font-size: 16px; margin-left: auto; text-decoration-skip-spaces: none; }
nav.nm .nm-all::after { content: " \2192"; }
nav.nm .nm-all:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- phone and tablet ---------- */
@media (max-width: 1024px) {
	nav.nm--utility { display: none !important; }
	.nm--main { display: flex; justify-content: flex-end; }
	.nm-burger { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: var(--nm-navy); padding: 0; }
	.nm-burger-lines, .nm-burger-lines::before, .nm-burger-lines::after { display: block; width: 26px; height: 3px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
	.nm-burger-lines { position: relative; }
	.nm-burger-lines::before, .nm-burger-lines::after { content: ""; position: absolute; left: 0; }
	.nm-burger-lines::before { top: -8px; }
	.nm-burger-lines::after { top: 8px; }
	nav.nm.is-drawer-open .nm-burger-lines { background: transparent; }
	nav.nm.is-drawer-open .nm-burger-lines::before { transform: translateY(8px) rotate(45deg); background: var(--nm-navy); }
	nav.nm.is-drawer-open .nm-burger-lines::after { transform: translateY(-8px) rotate(-45deg); background: var(--nm-navy); }

	/* JS sets top to the bottom of the header */
	.nm-drawer { display: none; position: fixed; left: 0; right: 0; bottom: 0; top: 80px; z-index: 9999; background: var(--nm-white); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 0 40px; border-top: 1px solid var(--nm-line); }
	nav.nm.is-drawer-open .nm-drawer { display: block; }

	.nm-bar { display: block; }
	.nm-item { display: flex; flex-wrap: wrap; align-items: stretch; border-bottom: 1px solid var(--nm-line); }
	nav.nm .nm-top { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; color: var(--nm-navy); font-size: 18px; font-weight: 700; line-height: 1.3; padding: 15px 20px; text-align: left; }
	nav.nm .nm-item { color: var(--nm-navy); }
	nav.nm .nm-toggle-sub { flex: 0 0 56px; display: flex; align-items: center; justify-content: center; }
	nav.nm .nm-item.has-panel > a.nm-top { border-right: 1px solid var(--nm-line); }
	nav.nm button.nm-top.nm-toggle-sub { flex: 1 1 auto; justify-content: space-between; }
	nav.nm button.nm-top .nm-chev, nav.nm .nm-toggle-sub .nm-chev { margin-left: 0; color: var(--nm-orange); }
	.nm-item.is-current > .nm-top { color: var(--nm-blue); }

	.nm-panel { flex: 0 0 100%; background: var(--nm-soft); }
	.nm-panel-in { padding: 6px 20px 16px; }
	.nm-cols { display: block; column-count: 1; }
	.nm-group { padding-top: 12px; }
	nav.nm .nm-group-title { font-size: 16px; }
	nav.nm .nm-img--under, nav.nm .nm-img--only { height: min(42px, var(--nm-h, 42px)); }
	nav.nm .nm-link { display: block; padding: 8px 0; }
	.nm-top-row { display: grid; gap: 12px; border-bottom: 1px solid var(--nm-line); margin: 0 20px; padding: 14px 0; }
	nav.nm .nm-all { margin-left: 0; }
	.nm-goals-list { display: block; flex-basis: 100%; }

	.nm-cta-wrap { padding: 20px; }
	nav.nm .nm-cta { display: block; text-align: center; }
	.nm-bar--utility { border-top: 1px solid var(--nm-line); }
	.nm-bar--utility .nm-top { font-size: 16px; font-weight: 500; }

	html.nm-lock, html.nm-lock body { overflow: hidden; }

	/* Footer copy of the top links ([naylor_menu part="utility"] in the footer): stays visible and looks like the footer's
	   own link list below it (Avenir 16px/500, #094b8d, "|" dividers, bold-look hover), with Client Login as a small dropdown.
	   The drawer style above is for the header. */
	.elementor-location-footer nav.nm--utility { display: flex !important; justify-content: center; padding-top: 15px; }
	.elementor-location-footer nav.nm--utility .nm-bar { display: flex; flex-wrap: wrap; justify-content: center; border-top: 0; }
	/* color on the item too: buttons inherit it (nav.nm button { color: inherit !important }) */
	.elementor-location-footer nav.nm--utility .nm-item { flex-wrap: nowrap; align-items: center; position: relative; border-bottom: 0; margin: 0 10.5px; color: var(--nm-blue); }
	.elementor-location-footer nav.nm--utility .nm-item + .nm-item::before { content: ""; position: absolute; left: -11px; top: 50%; height: 11.5px; border-left: 1px solid var(--nm-blue); transform: translateY(-50%); }
	.elementor-location-footer nav.nm--utility .nm-top { flex: 0 0 auto; color: var(--nm-blue); font-size: 16px; font-weight: 500; line-height: 25px; padding: 0; }
	.elementor-location-footer nav.nm--utility .nm-item.has-panel > a.nm-top { border-right: 0; padding-right: 4px; }
	.elementor-location-footer nav.nm--utility .nm-toggle-sub { flex: 0 0 auto; padding: 0; color: var(--nm-blue); }
	.elementor-location-footer nav.nm--utility button.nm-top.nm-toggle-sub { justify-content: flex-start; padding: 0; }
	.elementor-location-footer nav.nm--utility .nm-top .nm-chev, .elementor-location-footer nav.nm--utility .nm-toggle-sub .nm-chev { margin-left: 6px; color: currentColor; }
	.elementor-location-footer nav.nm--utility .nm-top:hover { text-shadow: -.25px -.25px 0 var(--nm-blue), .25px .25px var(--nm-blue); }
	.elementor-location-footer nav.nm--utility .nm-panel--list { position: absolute; top: calc(100% + 6px); left: 50%; right: auto; transform: translateX(-50%); z-index: 9999; width: max-content; background: var(--nm-white); border-radius: 10px; box-shadow: 0 10px 30px rgba(6, 44, 81, .12), 0 2px 6px rgba(6, 44, 81, .06); }
	.elementor-location-footer nav.nm--utility .nm-panel-in { padding: 8px 16px 10px; }
	.elementor-location-footer nav.nm--utility .nm-link { padding: 4px 0; font-size: 16px; text-align: left; }
}
/* footer top links stacked up to 800px, like the footer link list below them (its custom CSS: max-width 800px, 20px above each link) */
@media (max-width: 800px) {
	.elementor-location-footer nav.nm--utility { padding-top: 0; }
	.elementor-location-footer nav.nm--utility .nm-bar { flex-direction: column; flex-wrap: nowrap; align-items: center; }
	.elementor-location-footer nav.nm--utility .nm-item { margin: 20px 0 0; }
	.elementor-location-footer nav.nm--utility .nm-item + .nm-item::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.nm-chev, nav.nm .nm-top, .nm-burger-lines, .nm-burger-lines::before, .nm-burger-lines::after { transition: none; }
}
