/* Header + footer chrome. Loaded on every page. */

/* --- Header --------------------------------------------------------------- */
/* Geometry measured from the live Elementor build (see header.php):
   home 90px tall / wide lockup; inner pages 112px tall / square mark.
   Both are WHITE, full-bleed with 20px side padding, and the logo cell is 232px. */
.hh-header {
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 99;
}

.hh-header__inner {
	display: flex;
	align-items: center;
	width: 100%;
	padding-inline: 20px;
}

.hh-header__logo {
	display: flex;
	align-items: center;
	justify-content: center;   /* centres the square mark inside the 232px cell */
	flex: 0 0 auto;
	width: 232px;
}
.hh-header__logo img {
	width: auto;
	object-fit: contain;
}

.hh-header--home .hh-header__inner { padding-block: 20px 22px; }
.hh-header--home .hh-header__logo img { height: 48px; max-width: 232px; }

.hh-header--inner .hh-header__inner { padding-block: 20px 22px; }
.hh-header--inner .hh-header__logo img { height: 70px; width: 70px; }

.hh-header__logo-text {
	color: var(--hh-navy);
	font-family: var(--hh-font-heading);
	font-weight: 800;
	font-size: 1.125rem;
	line-height: 1.1;
}

.hh-header__panel {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
}

/* The nav takes all the space between the logo cell and the search widget and
   centres itself in it. Because both of those are 232px wide, that centres the
   menu on the viewport at EVERY width — the original only landed centred at
   1280 and drifted left on wider screens. */
.hh-nav {
	flex: 1;
	min-width: 0;
	display: flex;
	justify-content: center;
}

.hh-nav__list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}
.hh-nav__list li { margin: 0; position: relative; }

.hh-nav__list a {
	position: relative;
	color: var(--hh-ink);
	font-family: var(--hh-font);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
	padding: 13px 20px;
	display: inline-block;
}
.hh-nav__list a:hover { text-decoration: none; color: var(--hh-navy); }

/* 3px underline on the current item, spanning the padded link box. */
.hh-nav__list a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--hh-navy);
	opacity: 0;
	transition: opacity 0.15s ease;
}
.hh-nav__list a:hover::after { opacity: 0.35; }
.hh-nav__list .current-menu-item > a,
.hh-nav__list .current_page_item > a,
.hh-nav__list .current-menu-ancestor > a,
.hh-nav__list .current-menu-parent > a { color: var(--hh-navy); }
.hh-nav__list .current-menu-item > a::after,
.hh-nav__list .current_page_item > a::after,
.hh-nav__list .current-menu-ancestor > a::after,
.hh-nav__list .current-menu-parent > a::after { opacity: 1; }

/* Sub-menus */
.hh-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #fff;
	border-radius: var(--hh-radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	padding: 8px 0;
	margin: 0;
	list-style: none;
	display: none;
	z-index: 20;
}
.hh-nav__list li:hover > .sub-menu,
.hh-nav__list li:focus-within > .sub-menu { display: block; }
.hh-nav__list .sub-menu a {
	color: var(--hh-navy);
	display: block;
	padding: 8px 16px;
	border: 0;
}
.hh-nav__list .sub-menu a:hover { background: var(--hh-bg-subtle); }

/* Header search — input 178x38, 10px gap, button 44x34 (#4268C1). */
.hh-header__search {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	width: 232px;   /* matches the logo cell, so the centred nav lands on the viewport centre */
	justify-content: flex-end;
}
.hh-header__search input[type="search"] {
	font-family: var(--hh-font);
	font-size: 14px;
	color: var(--hh-ink-medium);
	background: #fff;
	border: 1px solid #e1e5eb;
	border-radius: 3px;
	padding: 9px 15px;
	width: 178px;
	height: 38px;
	min-width: 0;
}
.hh-header__search input[type="search"]:focus {
	outline: 2px solid var(--hh-navy);
	outline-offset: 1px;
}
.hh-header__search button {
	background: #4268c1;
	border: 0;
	border-radius: 3px;
	color: #fff;
	width: 44px;
	height: 34px;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.hh-header__search button:hover { background: #35559f; }
.hh-header__search svg { width: 15px; height: 15px; }

/* Mobile toggle */
.hh-header__toggle {
	display: none;
	margin-left: auto;
	background: transparent;
	border: 0;
	color: var(--hh-navy);
	padding: 8px;
	cursor: pointer;
}
.hh-header__toggle svg { width: 26px; height: 26px; }
.hh-header__toggle .hh-icon--close { display: none; }
.hh-header__toggle[aria-expanded="true"] .hh-icon--close { display: block; }
.hh-header__toggle[aria-expanded="true"] .hh-icon--open { display: none; }

@media (max-width: 1100px) {
	.hh-header__inner { position: relative; }
	.hh-header__toggle { display: block; }

	.hh-header__logo { width: auto; justify-content: flex-start; }
	.hh-header--inner .hh-header__logo img { height: 56px; width: 56px; }
	.hh-header--home .hh-header__logo img { height: 42px; max-width: min(232px, 56vw); }

	.hh-header__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		flex-direction: column;
		align-items: stretch;
		margin-left: 0;
		padding: 0 20px;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease;
		box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
		border-top: 1px solid var(--hh-border);
	}
	.hh-header.is-open .hh-header__panel { max-height: 80vh; padding-block: 8px 20px; overflow-y: auto; }

	.hh-nav { display: block; flex: none; }
	.hh-nav__list { flex-direction: column; align-items: stretch; }
	.hh-nav__list a { padding: 12px 0; border-bottom: 1px solid var(--hh-border); display: block; }
	.hh-nav__list a::after { display: none; }
	.hh-nav__list .sub-menu { position: static; display: block; box-shadow: none; background: transparent; padding: 0 0 0 14px; }

	.hh-header__search { margin: 14px 0 0; width: auto; justify-content: flex-start; }
	.hh-header__search input[type="search"] { width: 100%; flex: 1; }
}

/* --- Footer --------------------------------------------------------------- */
.hh-footer { background: #fff; }

.hh-footer__inner {
	display: grid;
	grid-template-columns: 1fr 1.2fr 1fr 1fr;
	gap: 32px;
	align-items: center;
	padding-block: 40px;
}

.hh-footer__logo { max-width: 150px; }
.hh-footer__badge img { max-width: 240px; margin-inline: auto; }

.hh-footer__col { text-align: center; }

.hh-footer__heading {
	color: var(--hh-navy);
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 10px;
}

.hh-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hh-footer__list li { margin-bottom: 6px; }
.hh-footer__list a {
	color: var(--hh-text);
	font-size: 0.875rem;
}
.hh-footer__list a:hover { color: var(--hh-navy); }

.hh-footer__bar {
	background: var(--hh-navy);
	color: #fff;
	text-align: center;
	padding-block: 12px;
	font-size: 0.8125rem;
}
.hh-footer__bar a { color: #fff; }
.hh-footer__bar a:hover { color: var(--hh-yellow); text-decoration: none; }

@media (max-width: 860px) {
	.hh-footer__inner { grid-template-columns: 1fr 1fr; text-align: center; }
	.hh-footer__brand { display: flex; justify-content: center; }
	.hh-footer__logo { margin-inline: auto; }
}
@media (max-width: 520px) {
	.hh-footer__inner { grid-template-columns: 1fr; }
}
