/* ==========================================================================
   MFI Site Essentials — new header, footer and location cards (Kadence site).
   Uses the site's own fonts (Kadence typography settings) and palette.
   Everything is scoped to .mfi-header / .mfi-drawer / .mfi-footer / .mfi-locs
   so the rest of the site is untouched.
   ========================================================================== */
:root {
	--mfi-navy: var(--global-palette3, #104057);
	--mfi-navy-ink: #092736;
	--mfi-teal: var(--global-palette2, #4f8298);
	--mfi-teal-light: var(--global-palette4, #5098ae);
	--mfi-orange: var(--global-palette1, #f4a261);
	--mfi-orange-deep: #ec8d43;
	--mfi-mist: var(--global-palette7, #ecf5fc);
	--mfi-paper: var(--global-palette8, #f6fafd);
	--mfi-text: #2b4757;
	--mfi-muted: #557082;
	--mfi-line: #d9e7f0;
	--mfi-head: var(--global-heading-font-family, "Inter", sans-serif);
	--mfi-body: var(--global-body-font-family, "Karla", sans-serif);
	--mfi-r-lg: 24px;
	--mfi-r-md: 16px;
	--mfi-r-sm: 12px;
	--mfi-shadow: 0 22px 48px -28px rgba(16, 64, 87, .45);
	--mfi-shadow-sm: 0 10px 24px -18px rgba(16, 64, 87, .5);
	--mfi-gutter: clamp(20px, 3vw, 40px);
	--mfi-admin-bar: var(--wp-admin--admin-bar--height, 0px);
}

/* ---------- Shared resets inside our parts (Kadence styles buttons/headings globally) ---------- */
.mfi-header, .mfi-drawer, .mfi-footer, .mfi-locs { font-family: var(--mfi-body); -webkit-font-smoothing: antialiased; }
.mfi-header, .mfi-drawer, .mfi-footer, .mfi-locs, .mfi-header *, .mfi-drawer *, .mfi-footer *, .mfi-locs * { box-sizing: border-box; }
.mfi-header button, .mfi-drawer button, .mfi-footer button, .mfi-locs button {
	background: none; color: inherit; border: 0; border-radius: 0; padding: 0; margin: 0;
	box-shadow: none; font: inherit; line-height: inherit; letter-spacing: normal; text-transform: none; min-height: 0;
}
/* Kadence gives every button a coloured hover; only neutralise colour/shadow, never size. */
.mfi-header button:hover, .mfi-drawer button:hover, .mfi-footer button:hover, .mfi-locs button:hover,
.mfi-header button:focus, .mfi-drawer button:focus { background-color: transparent; box-shadow: none; }
.mfi-header ul, .mfi-drawer ul, .mfi-footer ul, .mfi-locs ul { list-style: none; margin: 0; padding: 0; }
.mfi-header li, .mfi-drawer li, .mfi-footer li { margin: 0; }
.mfi-header img, .mfi-drawer img, .mfi-footer img, .mfi-locs img { max-width: 100%; height: auto; }
.mfi-header a, .mfi-drawer a, .mfi-footer a, .mfi-locs a { text-decoration: none; box-shadow: none; }
.mfi-header :focus-visible, .mfi-drawer :focus-visible, .mfi-footer :focus-visible, .mfi-locs :focus-visible { outline: 3px solid var(--mfi-teal-light); outline-offset: 3px; border-radius: 6px; }
.mfi-header .screen-reader-text, .mfi-drawer .screen-reader-text, .mfi-footer .screen-reader-text, .mfi-locs .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mfi-wrap { width: 100%; max-width: 1290px; margin-inline: auto; padding-inline: var(--mfi-gutter); }
.mfi-header .mfi-wrap { max-width: 1440px; }
.mfi-icon { flex: none; width: 1.15em; height: 1.15em; }

/* Buttons */
.mfi-header .mfi-btn, .mfi-drawer .mfi-btn, .mfi-footer .mfi-btn, .mfi-locs .mfi-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	padding: .85em 1.5em; border-radius: 999px; border: 2px solid transparent;
	font: 700 15px/1.2 var(--mfi-head); letter-spacing: 0; text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.mfi-header .mfi-btn--sm, .mfi-locs .mfi-btn--sm { padding: .65em 1.15em; font-size: 14px; }
.mfi-header .mfi-btn--primary, .mfi-drawer .mfi-btn--primary, .mfi-footer .mfi-btn--primary, .mfi-locs .mfi-btn--primary { background: var(--mfi-orange); color: var(--mfi-navy-ink); }
.mfi-header .mfi-btn--primary:hover, .mfi-drawer .mfi-btn--primary:hover, .mfi-footer .mfi-btn--primary:hover, .mfi-locs .mfi-btn--primary:hover { background: var(--mfi-orange-deep); color: var(--mfi-navy-ink); }
.mfi-header .mfi-btn--dark, .mfi-header .mfi-btn--dark:hover { background: var(--mfi-navy); color: #fff; }
.mfi-locs .mfi-btn--ghost { background: transparent; color: var(--mfi-navy); border-color: var(--mfi-navy); }
.mfi-locs .mfi-btn--ghost:hover { background: var(--mfi-navy); color: #fff; }
.mfi-drawer .mfi-btn--block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.mfi-header { position: sticky; top: var(--mfi-admin-bar); z-index: 1000; background: #fff; transition: box-shadow .25s; }
.mfi-header.is-stuck { box-shadow: 0 8px 30px -18px rgba(9, 39, 54, .45); }

.mfi-topbar { background: var(--mfi-navy); color: #dbe9f1; font-size: 14px; line-height: 1.4; }
.mfi-topbar__in { display: flex; align-items: center; gap: 22px; min-height: 46px; }
.mfi-topbar__locs { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.mfi-topbar__loc { display: flex; align-items: center; gap: 10px; }
.mfi-header .mfi-topbar a { color: #fff; }
.mfi-header .mfi-topbar__place { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mfi-topbar__place .mfi-icon { color: var(--mfi-orange); }
.mfi-header .mfi-topbar__tel { color: var(--mfi-orange); font-weight: 700; }
.mfi-header .mfi-topbar__tel:hover, .mfi-header .mfi-topbar__place:hover span { text-decoration: underline; }
.mfi-topbar__links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.mfi-header .mfi-topbar__links a, .mfi-header .mfi-search-toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #fff; cursor: pointer; }
.mfi-header .mfi-topbar__links a:hover, .mfi-header .mfi-search-toggle:hover { color: var(--mfi-orange); }
.mfi-header .mfi-topbar .mfi-btn--primary, .mfi-header .mfi-topbar .mfi-btn--primary:hover { color: var(--mfi-navy-ink); }
.mfi-topbar__cta { flex: none; }

.mfi-mainbar { border-bottom: 1px solid var(--mfi-line); background: #fff; }
.mfi-mainbar__in { display: flex; align-items: center; gap: 24px; min-height: 96px; transition: min-height .25s; }
.mfi-header .mfi-brand { display: block; flex: none; line-height: 0; }
.mfi-header .mfi-brand img { width: auto; height: 80px; transition: height .25s; }
.mfi-header.is-stuck .mfi-mainbar__in { min-height: 76px; }
.mfi-header.is-stuck .mfi-brand img { height: 60px; }

.mfi-nav { flex: 1; display: flex; justify-content: flex-end; }
.mfi-nav__list { display: flex; align-items: center; gap: 2px; }
.mfi-nav__item { position: relative; display: flex; align-items: center; }
.mfi-header .mfi-nav__link {
	display: block; padding: 10px 9px; color: var(--mfi-navy); font: 700 15px/1.3 var(--mfi-head);
	white-space: nowrap; border-radius: 8px;
}
.mfi-header .mfi-nav__link:hover, .mfi-header .mfi-nav__item.is-current > .mfi-nav__link { color: var(--mfi-teal); }
.mfi-header .mfi-nav__item.is-current > .mfi-nav__link { box-shadow: inset 0 -2px 0 var(--mfi-orange); border-radius: 0; }
.mfi-nav__item.has-sub > .mfi-nav__link { padding-right: 2px; }
.mfi-header .mfi-nav__toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 32px; color: var(--mfi-navy); cursor: pointer; border-radius: 8px; }
.mfi-nav__toggle .mfi-icon { width: 16px; height: 16px; transition: transform .2s; }
.mfi-nav__item.is-open > .mfi-nav__toggle .mfi-icon { transform: rotate(180deg); }

.mfi-header .mfi-sub {
	position: absolute; top: calc(100% + 10px); left: -8px; z-index: 20; min-width: 260px; padding: 10px;
	background: #fff; border: 1px solid var(--mfi-line); border-radius: var(--mfi-r-md); box-shadow: var(--mfi-shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.mfi-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.mfi-header .mfi-nav__item.is-wide .mfi-sub { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 0 8px; min-width: 620px; left: 50%; transform: translate(-50%, 6px); }
.mfi-header .mfi-nav__item:last-child .mfi-sub, .mfi-header .mfi-nav__item:nth-last-child(2) .mfi-sub { left: auto; right: 0; }
.mfi-nav__item.is-open > .mfi-sub, .mfi-nav__item.has-sub:hover > .mfi-sub { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .18s, transform .18s; }
.mfi-header .mfi-nav__item.is-wide.is-open > .mfi-sub, .mfi-header .mfi-nav__item.is-wide:hover > .mfi-sub { transform: translate(-50%, 0); }
.mfi-header .mfi-sub a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--mfi-text); font: 600 15px/1.35 var(--mfi-body); }
.mfi-header .mfi-sub a:hover, .mfi-header .mfi-sub a[aria-current] { background: var(--mfi-mist); color: var(--mfi-navy); }

.mfi-mainbar__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.mfi-header__cta { display: none !important; }
.mfi-show-sm { display: none; }
.mfi-header .mfi-burger {
	display: none; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px;
	background: var(--mfi-mist); color: var(--mfi-navy); font: 700 15px var(--mfi-head); cursor: pointer;
}
.mfi-header .mfi-burger:hover { background: var(--mfi-mist); color: var(--mfi-navy); }

.mfi-search { background: var(--mfi-mist); border-bottom: 1px solid var(--mfi-line); padding: 16px 0; }
.mfi-search[hidden] { display: none; }
.mfi-search__form { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: var(--mfi-shadow-sm); margin: 0; }
.mfi-search__form .mfi-icon { color: var(--mfi-teal); }
.mfi-header .mfi-search__form input[type="search"] { flex: 1; border: 0; outline: 0; box-shadow: none; background: transparent; padding: 8px 0; font: 500 16px var(--mfi-body); color: var(--mfi-navy); min-width: 0; }
.mfi-header .mfi-search__form .mfi-btn { padding: .7em 1.3em; }

/* Mobile drawer */
.mfi-drawer { position: fixed; inset: 0; z-index: 100000; }
.mfi-drawer[hidden] { display: none; }
.mfi-drawer__backdrop { position: absolute; inset: 0; background: rgba(9, 39, 54, .55); opacity: 0; transition: opacity .25s; }
.mfi-drawer__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; overflow-y: auto; overscroll-behavior: contain;
	padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 18px; transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .7, .2, 1);
}
.mfi-drawer.is-open .mfi-drawer__backdrop { opacity: 1; }
.mfi-drawer.is-open .mfi-drawer__panel { transform: none; }
.mfi-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.mfi-drawer .mfi-brand--small img { height: 60px; width: auto; }
.mfi-drawer .mfi-drawer__close, .mfi-drawer .mfi-drawer__close:hover {
	width: 44px; height: 44px; border-radius: 50%; background: var(--mfi-mist); color: var(--mfi-navy);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.mfi-mnav__item { border-bottom: 1px solid var(--mfi-line); }
.mfi-drawer .mfi-mnav a, .mfi-drawer .mfi-mnav__toggle, .mfi-drawer .mfi-mnav__toggle:hover {
	display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 2px;
	color: var(--mfi-navy); font: 700 17px/1.3 var(--mfi-head); background: none; cursor: pointer; text-align: left;
}
.mfi-mnav__toggle .mfi-icon { transition: transform .2s; color: var(--mfi-teal); }
.mfi-mnav__toggle[aria-expanded="true"] .mfi-icon { transform: rotate(180deg); }
.mfi-drawer .mfi-mnav__sub { padding: 0 0 10px 12px; border-left: 2px solid var(--mfi-orange); margin-left: 4px; }
.mfi-drawer .mfi-mnav__sub[hidden] { display: none; }
.mfi-drawer .mfi-mnav__sub a { font: 600 15.5px/1.3 var(--mfi-body); padding: 9px 4px; color: var(--mfi-text); }
.mfi-drawer__calls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mfi-drawer .mfi-call { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--mfi-r-sm); background: var(--mfi-navy); color: #fff; line-height: 1.25; font-size: 14px; }
.mfi-call strong { display: block; color: var(--mfi-orange); font-size: 13px; }
.mfi-call .mfi-icon { color: var(--mfi-orange); }
.mfi-drawer__links { display: flex; flex-wrap: wrap; gap: 8px; }
.mfi-drawer .mfi-drawer__links a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--mfi-mist); color: var(--mfi-navy); font: 700 14.5px var(--mfi-head); }
.mfi-drawer__search { display: flex; border: 1.5px solid var(--mfi-line); border-radius: 999px; overflow: hidden; margin: 0; }
.mfi-drawer .mfi-drawer__search input[type="search"] { flex: 1; border: 0; box-shadow: none; padding: 12px 16px; font: 500 16px var(--mfi-body); min-width: 0; border-radius: 0; background: #fff; }
.mfi-drawer .mfi-drawer__search button, .mfi-drawer .mfi-drawer__search button:hover { background: var(--mfi-navy); color: #fff; width: 52px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
body.mfi-lock { overflow: hidden; }

/* Header breakpoints */
@media (max-width: 1439px) {
	.mfi-header .mfi-nav__link { font-size: 14px; padding-inline: 7px; }
	.mfi-mainbar__in { gap: 16px; }
}
@media (max-width: 1300px) {
	.mfi-nav { display: none; }
	.mfi-header .mfi-burger { display: inline-flex; }
	.mfi-mainbar__actions { margin-left: auto; }
	.mfi-header__cta { display: inline-flex !important; }
	.mfi-topbar__cta { display: none !important; }
}
@media (max-width: 900px) {
	.mfi-topbar__links { display: none; }
	.mfi-topbar__in { justify-content: center; min-height: 40px; }
}
@media (max-width: 640px) {
	.mfi-topbar { font-size: 13px; }
	.mfi-topbar__locs { justify-content: center; gap: 2px 18px; }
	.mfi-topbar__place .mfi-icon { display: none; }
	.mfi-hide-sm { display: none; }
	.mfi-show-sm { display: inline; }
	.mfi-header .mfi-burger span { display: none; }
	.mfi-header .mfi-burger { width: 44px; padding: 0; justify-content: center; }
	.mfi-mainbar__in { min-height: 76px; }
	.mfi-header .mfi-brand img { height: 60px; }
	.mfi-header.is-stuck .mfi-brand img { height: 52px; }
	.mfi-header.is-stuck .mfi-mainbar__in { min-height: 66px; }
}
@media (max-width: 380px) {
	.mfi-topbar__loc { flex-direction: column; gap: 0; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.mfi-footer { background: var(--mfi-navy); color: #cfe0ea; padding: clamp(56px, 7vw, 88px) 0 28px; font-size: 15.5px; line-height: 1.6; }
.mfi-footer a { color: #e8f1f6; }
.mfi-footer a:hover { color: var(--mfi-orange); }
.mfi-footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-bottom: 44px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.mfi-footer__brand { display: flex; align-items: center; gap: 28px; }
.mfi-footer .mfi-footer__logo img { height: 120px; width: auto; }
.mfi-footer .mfi-footer__tagline { margin: 0; font: 600 17px/1.6 var(--mfi-body); color: #fff; max-width: 52ch; }
.mfi-footer__contact { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.mfi-footer__phones { display: grid; gap: 6px; text-align: right; }
.mfi-footer__phones li { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.mfi-footer__phones li > span:first-child { color: #9fbccc; font-size: 14px; }
.mfi-footer .mfi-footer__phones a, .mfi-footer__fax { display: inline-flex; align-items: center; gap: 8px; color: #fff; font: 700 18px var(--mfi-head); }
.mfi-footer .mfi-footer__fax { font-weight: 600; font-size: 16px; color: #cfe0ea; }
.mfi-footer__phones .mfi-icon { color: var(--mfi-orange); }
.mfi-footer__cols { display: grid; grid-template-columns: 1.15fr 1.1fr 1.2fr .8fr .9fr; gap: 36px; padding: 48px 0 40px; }
.mfi-footer .mfi-footer__h { color: #fff; font: 800 17px/1.3 var(--mfi-head); margin: 0 0 16px; letter-spacing: 0; text-transform: none; }
.mfi-footer__col ul { display: grid; gap: 9px; }
.mfi-footer .mfi-footer__col li a { color: #cfe0ea; font-weight: 500; line-height: 1.4; }
.mfi-footer .mfi-footer__col li a:hover { color: var(--mfi-orange); }
.mfi-footer .mfi-footer__addr { font-style: normal; margin: 0 0 18px; line-height: 1.5; }
.mfi-footer .mfi-footer__addr-name { display: block; color: var(--mfi-orange); font-weight: 800; margin-bottom: 4px; font-family: var(--mfi-head); }
.mfi-footer .mfi-footer__addr a:not(.mfi-footer__addr-name) { color: #cfe0ea; }
.mfi-footer .mfi-footer__area { margin: 0; padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; line-height: 1.7; color: #9fbccc; }
.mfi-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.mfi-footer .mfi-footer__copy { margin: 0; }
.mfi-footer__legal, .mfi-footer__social { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.mfi-footer__social { gap: 8px; }
.mfi-footer .mfi-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; }
.mfi-footer .mfi-footer__social a:hover { background: var(--mfi-orange); color: var(--mfi-navy-ink); }
@media (max-width: 1100px) { .mfi-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
	.mfi-footer__top { grid-template-columns: 1fr; }
	.mfi-footer__contact { align-items: flex-start; }
	.mfi-footer__phones { text-align: left; }
	.mfi-footer__phones li { justify-content: flex-start; }
}
@media (max-width: 640px) {
	.mfi-footer__brand { flex-direction: column; align-items: flex-start; gap: 18px; }
	.mfi-footer .mfi-footer__logo img { height: 96px; }
	.mfi-footer__cols { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
	.mfi-footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) { .mfi-footer__cols { grid-template-columns: 1fr; } }

/* ==========================================================================
   Home: location cards
   ========================================================================== */
.mfi-locs { width: 100%; max-width: 1290px; margin: 0 auto; padding: 8px var(--mfi-gutter) 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); text-align: left; }
.mfi-loc { display: flex; flex-direction: column; background: #fff; border-radius: var(--mfi-r-lg); overflow: hidden; border: 1px solid var(--mfi-line); box-shadow: var(--mfi-shadow-sm); }
.mfi-loc__map { aspect-ratio: 16 / 9; background: var(--mfi-mist); }
.mfi-locs .mfi-loc__map iframe { display: block; width: 100%; height: 100%; border: 0; }
.mfi-loc__body { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; flex: 1; }
.mfi-locs .mfi-loc__eyebrow { margin: 0 0 8px; color: var(--mfi-teal); font: 700 14px/1.4 var(--mfi-head); letter-spacing: .04em; text-transform: uppercase; }
.mfi-locs .mfi-loc__title { margin: 0 0 12px; color: var(--mfi-navy); font: 800 clamp(1.4rem, 1.15rem + .8vw, 1.8rem)/1.25 var(--mfi-head); text-transform: none; }
.mfi-locs .mfi-loc__text { margin: 0 0 18px; color: var(--mfi-muted); font-size: 16px; line-height: 1.65; }
.mfi-loc__rows { display: grid; gap: 10px; margin: 0 0 24px; }
.mfi-locs .mfi-loc__row { display: flex; align-items: flex-start; gap: 12px; color: var(--mfi-navy); font: 600 16px/1.45 var(--mfi-body); }
.mfi-locs .mfi-loc__row .mfi-icon { color: var(--mfi-orange); margin-top: 2px; width: 22px; height: 22px; }
.mfi-locs .mfi-loc__row--phone { font: 800 1.35rem/1.3 var(--mfi-head); }
.mfi-locs .mfi-loc__row:hover { color: var(--mfi-teal); }
.mfi-loc__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
@media (max-width: 860px) { .mfi-locs { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
	.mfi-header *, .mfi-drawer *, .mfi-footer *, .mfi-locs * { transition: none !important; }
}
@media print { .mfi-header, .mfi-drawer { display: none !important; } }
