/* myROVs header + mega menu. Colours follow Elementor Site Settings (globals) with fallbacks. */

:root { --mr-h-util-h: 36px; }
@media (max-width: 767px) { :root { --mr-h-util-h: 0px; } }

.mr-header {
	--mr-h-navy: var(--e-global-color-primary, #0B2540);
	--mr-h-deep: #071A2E;
	--mr-h-accent: var(--e-global-color-accent, #C2410C);
	--mr-h-accent-hover: #9A3412;
	--mr-h-text: var(--e-global-color-text, #1F2933);
	--mr-h-steel: var(--e-global-color-secondary, #4F5F70);
	--mr-h-line: #D9E0E7;
	--mr-h-panel: #E9EEF3;
	--mr-h-soft: #F4F6F8;
	--mr-h-mono: var(--e-global-typography-accent-font-family, "IBM Plex Mono"), ui-monospace, monospace;
	font-family: var(--e-global-typography-text-font-family, "Archivo"), system-ui, sans-serif;
	color: var(--mr-h-text);
	line-height: 1.4;
	position: relative;
	z-index: 100;
}
.mr-header *, .mr-header *::before, .mr-header *::after { box-sizing: border-box; }
.mr-header a { text-decoration: none; }
.mr-header a:hover { text-decoration: none; }
.mr-header ul { list-style: none; margin: 0; padding: 0; }
.mr-header p { margin: 0; }
.mr-wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Sticky: the utility strip scrolls away, the main bar stays. Works inside Elementor's header wrapper. */
.elementor-location-header:has(.mr-header),
body > .mr-sticky {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--mr-h-util-h, 36px));
	z-index: 1000;
}
@media (max-width: 600px) { .admin-bar .elementor-location-header:has(.mr-header) { top: calc(0px - var(--mr-h-util-h, 36px)); } }
.elementor-location-header:has(.mr-header) .elementor-widget-shortcode,
.elementor-location-header:has(.mr-header) .e-con,
.elementor-location-header:has(.mr-header) .e-con-inner { padding: 0 !important; margin: 0 !important; max-width: none !important; --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px; }

/* ---------- Utility strip ---------- */
.mr-util { background: var(--mr-h-deep); color: var(--mr-h-line); font-size: 13px; height: var(--mr-h-util-h); }
.mr-util__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mr-util__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-util__links { display: flex; gap: 22px; flex-shrink: 0; }
.mr-util__links a, .mr-util__plain { display: inline-flex; align-items: center; gap: 6px; color: var(--mr-h-line); }
.mr-util__links a:hover, .mr-util__links a:focus-visible { color: #fff; }

/* ---------- Main bar ---------- */
.mr-bar { position: relative; background: #fff; border-bottom: 1px solid var(--mr-h-line); }
.mr-bar__in { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.mr-logo { display: block; line-height: 0; flex-shrink: 0; border-radius: 6px; }
/* v2.9.6: brand lockup (Compact symbol). 48 px tall on desktop, 44 px on tablets, 40 px on phones. */
.mr-header .mr-logo__img { display: block; height: 48px; width: auto; max-width: none; }

.mr-nav { flex: 1; min-width: 0; }
.mr-nav__list { display: flex; align-items: center; gap: 4px; }
/* Top-level items. Selectors are deliberately specific: Hello's reset and Elementor's
   Site Settings style every <button> (orange fill, padding); these must not reach the menu. */
.mr-header .mr-nav__link,
.mr-header button.mr-nav__trigger,
.mr-header button.mr-nav__trigger:hover,
.mr-header button.mr-nav__trigger:focus,
.mr-header button.mr-nav__trigger:active {
	display: inline-flex; align-items: center; gap: 5px;
	font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; text-align: left;
	color: var(--mr-h-navy);
	background: none; background-color: transparent; border: 0; border-radius: 6px; box-shadow: none; text-shadow: none;
	padding: 10px 12px; margin: 0; min-height: 44px; width: auto; cursor: pointer; white-space: nowrap;
	position: relative; transition: color .15s ease;
}
.mr-header button.mr-nav__trigger .mr-ico { transition: transform .2s ease, color .15s ease; color: var(--mr-h-steel); }
.mr-header .mr-nav__link:hover,
.mr-header button.mr-nav__trigger:hover,
.mr-header .mr-has-panel.is-open > button.mr-nav__trigger { color: var(--mr-h-accent); background: none; }
.mr-header button.mr-nav__trigger:hover .mr-ico,
.mr-header .mr-has-panel.is-open > button.mr-nav__trigger .mr-ico { color: var(--mr-h-accent); }
.mr-header .mr-has-panel.is-open > button.mr-nav__trigger .mr-ico { transform: rotate(180deg); }
/* Accent underline that sits on the bar's bottom edge: grows on hover, stays for the open menu and the current page. */
.mr-header .mr-nav__link::after,
.mr-header button.mr-nav__trigger::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 3px; border-radius: 2px;
	background: var(--mr-h-accent); transform: scaleX(0); transform-origin: left center; transition: transform .2s ease;
}
.mr-header .mr-nav__link:hover::after,
.mr-header button.mr-nav__trigger:hover::after,
.mr-header .mr-nav__link[aria-current="page"]::after,
.mr-header .mr-has-panel.is-open > button.mr-nav__trigger::after { transform: scaleX(1); }
.mr-header :focus-visible { outline: 2px solid var(--mr-h-accent); outline-offset: 2px; border-radius: 6px; }

.mr-cta { display: flex; gap: 10px; flex-shrink: 0; margin-left: auto; }
.mr-header a.mr-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
	border-radius: 6px; font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-decoration: none;
	transition: background-color .15s, color .15s, border-color .15s;
}
.mr-header a.mr-btn--accent, .mr-header a.mr-btn--accent:focus { background-color: var(--mr-h-accent); color: #fff; border: 1px solid var(--mr-h-accent); }
.mr-header a.mr-btn--accent:hover { background-color: var(--mr-h-accent-hover); border-color: var(--mr-h-accent-hover); color: #fff; }
.mr-header a.mr-btn--ghost, .mr-header a.mr-btn--ghost:focus { background-color: transparent; color: var(--mr-h-navy); border: 1px solid var(--mr-h-navy); }
.mr-header a.mr-btn--ghost:hover { background-color: var(--mr-h-navy); color: #fff; }

.mr-header button.mr-burger,
.mr-header button.mr-burger:hover,
.mr-header button.mr-burger:focus,
.mr-header button.mr-burger:active {
	display: none; margin-left: auto; width: 44px; height: 44px; min-height: 0; padding: 0;
	border: 1px solid var(--mr-h-line); border-radius: 8px; background: #fff; background-color: #fff; box-shadow: none;
	color: var(--mr-h-navy); cursor: pointer; align-items: center; justify-content: center; font-size: 0; line-height: 0;
}
.mr-header button.mr-burger:hover { border-color: var(--mr-h-navy); }
.mr-burger__close { display: none; }
.mr-burger[aria-expanded="true"] .mr-burger__open { display: none; }
.mr-burger[aria-expanded="true"] .mr-burger__close { display: inline-flex; }
.mr-nav__drawer-cta { display: none; }

/* ---------- Panels (desktop) ---------- */
@media (min-width: 1181px) {
	.mr-nav__item { position: static; }
	.mr-nav__item.mr-is-small { position: relative; }
	.mr-panel {
		position: absolute; top: 100%; left: 0; right: 0;
		background: #fff; border-top: 1px solid var(--mr-h-line); border-bottom: 1px solid var(--mr-h-line);
		box-shadow: 0 24px 48px -12px rgba(7, 26, 46, .22);
		opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none;
		transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
	}
	.mr-is-small > .mr-panel { left: 0; right: auto; top: calc(100% + 14px); width: 340px; border: 1px solid var(--mr-h-line); border-radius: 10px; }
	.mr-has-panel.is-open > .mr-panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
	.mr-panel__in.mr-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding-top: 28px; padding-bottom: 28px; }
	.mr-panel__in.mr-wrap:not(:has(.mr-mega__feature)) { grid-template-columns: 1fr; }
	.mr-mega__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 28px; align-content: start; }
	.mr-is-small .mr-panel__in { padding: 10px; }
}

/* ---------- Panel content (all sizes) ---------- */
.mr-mega__heading { font-family: var(--mr-h-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mr-h-steel); padding: 0 10px 10px; margin-bottom: 4px !important; border-bottom: 1px solid var(--mr-h-line); }
.mr-mega__link { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; color: var(--mr-h-navy); transition: background-color .15s; }
.mr-mega__link:hover, .mr-mega__link:focus-visible, .mr-mega__link[aria-current="page"] { background: var(--mr-h-soft); }
.mr-mega__media { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 11px; background: #F4F7FA; color: var(--mr-h-navy); box-shadow: inset 0 0 0 1px #E3E9EF; display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.mr-mega__media svg { display: block; }
.mr-mega__link:hover .mr-mega__media, .mr-mega__link:focus-visible .mr-mega__media, .mr-mega__link[aria-current="page"] .mr-mega__media { background: #fff; box-shadow: inset 0 0 0 1.5px var(--mr-h-accent), 0 4px 12px rgba(11, 37, 64, .12); transform: translateY(-1px); }
.mr-mega__thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.mr-mega__text { display: flex; flex-direction: column; min-width: 0; }
.mr-mega__title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.mr-mega__link:hover .mr-mega__title { color: var(--mr-h-accent); }
.mr-mega__desc { font-size: 13px; color: var(--mr-h-steel); line-height: 1.35; margin-top: 2px; }
.mr-mega__feature { background: var(--mr-h-navy); color: #fff; border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 12px; align-self: start; border-top: 4px solid var(--mr-h-accent); }
.mr-mega__feature-title { font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.mr-mega__feature-text { font-size: 14px; line-height: 1.5; color: var(--mr-h-line); }
.mr-header .mr-mega__feature a.mr-btn { align-self: flex-start; margin-top: 4px; }
.mr-mega__foot { background: var(--mr-h-soft); border-top: 1px solid var(--mr-h-line); }
.mr-mega__foot a { display: inline-flex; align-items: center; gap: 8px; padding: 14px 10px; font-size: 14px; font-weight: 600; color: var(--mr-h-navy); }
.mr-mega__foot a:hover { color: var(--mr-h-accent); }

/* ---------- Tablet and mobile: off-canvas drawer with accordions ---------- */
@media (max-width: 1180px) {
	.mr-cta { display: none; }
	.mr-header button.mr-burger, .mr-header button.mr-burger:hover, .mr-header button.mr-burger:focus, .mr-header button.mr-burger:active { display: inline-flex; }
	.mr-bar__in { min-height: 64px; }
	.mr-nav {
		position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
		background: #fff; overflow-y: auto; overscroll-behavior: contain; z-index: 1002;
		padding: 76px 16px 32px; transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
		box-shadow: -20px 0 40px rgba(7, 26, 46, .2);
	}
	.mr-nav.is-open { transform: none; visibility: visible; }
	.mr-nav::before { content: "Menu"; position: absolute; top: 30px; left: 22px; font-family: var(--mr-h-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mr-h-steel); }
	.admin-bar .mr-nav { top: var(--wp-admin--admin-bar--height, 0px); }
	.mr-header button.mr-burger { position: relative; z-index: 1003; }
	.mr-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.mr-nav__item { border-bottom: 1px solid var(--mr-h-line); }
	.mr-header .mr-nav__link, .mr-header button.mr-nav__trigger, .mr-header button.mr-nav__trigger:hover, .mr-header button.mr-nav__trigger:focus, .mr-header button.mr-nav__trigger:active { width: 100%; justify-content: space-between; font-size: 17px; padding: 14px 6px; min-height: 52px; }
	.mr-header .mr-nav__link::after, .mr-header button.mr-nav__trigger::after { display: none; }
	.mr-panel { display: none; padding: 0 0 12px; }
	.mr-has-panel.is-open > .mr-panel { display: block; }
	.mr-panel__in.mr-wrap { padding: 0; }
	.mr-mega__cols { display: grid; gap: 14px; }
	.mr-mega__heading { padding: 8px 6px 8px; }
	.mr-mega__link { padding: 8px 6px; }
	.mr-mega__desc { display: none; }
	.mr-mega__feature { display: none; }
	.mr-mega__foot { background: none; border: 0; }
	.mr-mega__foot .mr-wrap { padding: 0; }
	.mr-mega__foot a { padding: 6px; }
	.mr-nav__drawer-cta { display: grid; gap: 10px; margin-top: 24px; }
	.mr-header .mr-nav__drawer-cta a.mr-btn { width: 100%; min-height: 50px; font-size: 16px; }
	.mr-nav__contact { display: flex; align-items: center; gap: 10px; padding: 10px 6px; font-weight: 600; color: var(--mr-h-navy); }
	.mr-overlay { position: fixed; inset: 0; background: rgba(7, 26, 46, .5); z-index: 1001; }
	.mr-overlay[hidden] { display: none; }
	html.mr-lock, html.mr-lock body { overflow: hidden; }
}
@media (max-width: 767px) {
	.mr-util { display: none; }
	.mr-wrap { padding-left: 16px; padding-right: 16px; }
	.mr-header .mr-logo__img { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.mr-header *, .mr-panel, .mr-nav { transition: none !important; }
}

/* Desktop menu spacing. Below 1320px the secondary button hides (Sell is also under Brokerage). */
@media (min-width: 1181px) {
	.mr-bar__in { gap: 18px; }
	.mr-nav__list { gap: 0; }
	.mr-header .mr-nav__link, .mr-header button.mr-nav__trigger, .mr-header button.mr-nav__trigger:hover, .mr-header button.mr-nav__trigger:focus, .mr-header button.mr-nav__trigger:active { padding-left: 10px; padding-right: 10px; }
	.mr-header .mr-nav__link::after, .mr-header button.mr-nav__trigger::after { left: 10px; right: 10px; }
}
@media (min-width: 1181px) and (max-width: 1320px) {
	.mr-header .mr-nav__link, .mr-header button.mr-nav__trigger, .mr-header button.mr-nav__trigger:hover, .mr-header button.mr-nav__trigger:focus, .mr-header button.mr-nav__trigger:active { font-size: 14.5px; padding-left: 8px; padding-right: 8px; }
	.mr-header .mr-nav__link::after, .mr-header button.mr-nav__trigger::after { left: 8px; right: 8px; }
	.mr-header .mr-cta a.mr-btn--ghost { display: none; }
}
/* Keep the last small dropdown inside the screen. */
@media (min-width: 1181px) { .mr-is-small:last-child > .mr-panel { left: auto; right: 0; } }

/* v2.5: two groups stacked in one column ("By model" over "Market activity") */
.mr-mega__join { margin-top: 18px; }

/* v2.9.5: "All QYSEA / All CHASING": a fan of three product photos */
.mr-mega__media--img, .mr-mega__media--stack { background: #fff; box-shadow: inset 0 0 0 1px #E3E9EF; overflow: hidden; }
.mr-mega__media--img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; display: block; }
.mr-mega__media--stack { position: relative; }
.mr-mega__media--stack > span { position: absolute; width: 27px; height: 27px; border-radius: 7px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1.5px #fff, 0 1px 4px rgba(7, 26, 46, .22); }
.mr-mega__media--stack > span:nth-child(1) { left: 3px; top: 3px; }
.mr-mega__media--stack > span:nth-child(2) { left: 9px; top: 9px; }
.mr-mega__media--stack > span:nth-child(3) { left: 15px; top: 15px; }
.mr-mega__link:hover .mr-mega__media--img, .mr-mega__link:hover .mr-mega__media--stack { background: #fff; }
.mr-mega__media--stack img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* v2.9.6: logo sizes */
@media (min-width: 1181px) and (max-width: 1320px) { .mr-header .mr-logo__img { height: 44px; } }
@media (min-width: 768px) and (max-width: 1180px) { .mr-header .mr-logo__img { height: 44px; } }
/* v2.9.7: the header stays as wide as the page (1240 px). Tighter spacing on desktop so the logo, menu and both
   buttons fit on one line. */
@media (min-width: 1181px) {
	.mr-bar__in { gap: 14px; }
	.mr-header .mr-logo__img { height: 44px; }
	.mr-header .mr-nav__link, .mr-header button.mr-nav__trigger, .mr-header button.mr-nav__trigger:hover, .mr-header button.mr-nav__trigger:focus, .mr-header button.mr-nav__trigger:active { font-size: 14.5px; padding-left: 8px; padding-right: 8px; gap: 3px; }
	.mr-header .mr-nav__link::after, .mr-header button.mr-nav__trigger::after { left: 8px; right: 8px; }
	.mr-header .mr-cta { gap: 8px; }
	.mr-header .mr-cta a.mr-btn { padding-left: 16px; padding-right: 16px; }
}

/* v2.10.14: "All ..." links: a small group shot of whole vehicles on the white tile. */
.mr-mega__media--group { position: relative; background: #fff; box-shadow: inset 0 0 0 1px #E3E9EF; overflow: hidden; }
.mr-mega__media--group img { position: absolute; object-fit: contain; mix-blend-mode: multiply; display: block; }
.mr-mega__media--g3 img:nth-child(1) { left: 2px; top: 4px; width: 22px; height: 18px; }
.mr-mega__media--g3 img:nth-child(2) { right: 2px; top: 4px; width: 22px; height: 18px; }
.mr-mega__media--g3 img:nth-child(3) { left: 8px; bottom: 3px; width: 28px; height: 21px; }
.mr-mega__media--g2 img:nth-child(1) { left: 2px; top: 11px; width: 20px; height: 22px; }
.mr-mega__media--g2 img:nth-child(2) { right: 2px; top: 11px; width: 20px; height: 22px; }
.mr-mega__link:hover .mr-mega__media--group { background: #fff; }
