/* Goverment: header, menu and footer refinements (2026-11-02). Loaded after the theme styles.
   Mobile <= 979px matches MOBILEBREAKPOINT in custom.js (where the hamburger menu takes over). */

/* ---------- Social icons (Font Awesome, crisp at any pixel density) ---------- */
#socialimg .social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	text-decoration: none;
	transition: color 0.15s;
}
#socialimg .social-link:hover,
#socialimg .social-link:focus-visible { color: #0c98cf; }

/* ---------- Desktop menu: show which items have a submenu, open it from keyboard/touch too ---------- */
@media (min-width: 980px) {
	.sf-menu > li.menu-item-has-children > a:after {
		content: "";
		display: inline-block;
		margin-left: 6px;
		border: 4px solid transparent;
		border-top-color: currentColor;
		border-bottom: 0;
		vertical-align: middle;
	}
	.sf-menu li:focus-within > ul { display: block; }

	/* Centre the 36px social icons on the menu text (the theme's 0.7em offset was for the old 22px PNGs). */
	#socialimg { margin-top: 4.8px; }

}
@media (min-width: 980px) and (max-width: 1399px) {
	/* The menu needs ~800px but its column is 700px wide below 1400px (grid.css), so it wraps to a second row. The
	   theme fixed the black bar at 3em, so that row hung over the page banner (and was white on white once the header
	   is fixed); the bar now grows to hold it. From 1400px the menu fits on one row in the unchanged 3em bar. */
	.whiteheader { height: auto; }
}
@media (min-width: 980px) {

	/* 980-1023px had the desktop menu without the sticky styles (those start at 1024px in the theme). */
	#header { position: relative; top: 0; z-index: 25; }
	/* custom.js fixes the header from page load (.stuck) and adds the shadow once the page scrolls (.scrolled).
	   Only the shadow animates: the theme's "transition: all" also tweened width/top when the header got fixed. */
	#header.stuck {
		position: fixed !important;
		z-index: 1000;
		top: 0;
		width: 100% !important;
		background: #fff;
		transition: box-shadow 0.2s;
	}
	#header.stuck:not(.scrolled) { box-shadow: none; }
	/* The theme's ".stuck .sf-menu a { color: #fff }" also whitened the dropdown links on its white background; keep
	   their own colours (layout.css: .sub-menu li a #303133, hover #ccc) now that the header is .stuck from page load. */
	#header.stuck .sf-menu .sub-menu li a { color: #303133; }
	#header.stuck .sf-menu .sub-menu li a:hover { color: #ccc; }
	#header.stuck.scrolled { box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); }
	.admin-bar #header.stuck { top: 32px; }
}

/* ---------- Mobile header: one compact sticky row (logo, social links, menu button) ---------- */
@media (max-width: 979px) {
	html { scroll-padding-top: 64px; }
	body { padding-top: 64px; }

	#header {
		position: fixed !important;
		top: 0;
		left: 0;
		right: 0;
		z-index: 1000;
		height: 64px;
		background: #fff;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	}
	#header .whiteback { height: 64px; }
	#header #navimg {
		min-height: 0 !important;
		margin: 0 !important;
		padding: 6px 0 0 12px;
		width: auto;
	}
	#header #navimg > a { display: block; width: 117px; height: 52px; }
	#header #navimg .logou {
		float: none;
		width: 117px;
		height: 52px;
		margin: 0;
	}
	#header .whiteheader {
		position: absolute;
		top: 0;
		right: 0;
		width: auto;
		height: 64px;
		background: transparent;
	}
	#header .whiteheader:after { display: none; }
	#header .whiteheader > .nfw-row {
		display: flex;
		flex-direction: row-reverse;
		align-items: center;
		width: auto;
		height: 64px;
		margin: 0;
		padding: 0 6px 0 0;
	}
	#header .whiteheader .nfw-span9,
	#header .whiteheader .nfw-span2 {
		float: none;
		width: auto;
		margin: 0;
		padding: 0;
	}
	#header #socialimg { display: flex; gap: 0; }
	#header #socialimg .social-link {
		width: 44px;
		height: 44px;
		color: #0a6e9f;
		font-size: 28px;
	}
	#mobile-menu-trigger,
	#header #mobile-menu-trigger {
		position: static;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		margin: 0;
		padding: 0;
		color: #0a6e9f;
		font-size: 28px;
		touch-action: manipulation;
	}

	/* Menu panel under the fixed header; scrolls on its own when taller than the screen. */
	#mobile-menu {
		position: fixed;
		top: 64px;
		left: 0;
		right: 0;
		z-index: 999;
		max-height: calc(100vh - 64px);
		max-height: calc(100dvh - 64px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
	}
	/* Same dark tone as the desktop menu bar (the theme's amber with white text was 1.7:1 contrast). */
	#mobile-menu { background-color: #1b1b1b; border-bottom: 0; }
	#mobile-menu li a {
		color: #fff;
		font-size: 15px;
		line-height: 20px;
		padding-top: 14px;
		padding-bottom: 14px;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}
	#mobile-menu ul { background-color: #262626; }
	#mobile-menu li a:hover,
	#mobile-menu li a:focus-visible { background-color: #0a6e9f; color: #fff; }
	#mobile-menu .current-menu-item > a,
	#mobile-menu .current-menu-ancestor > a { box-shadow: inset 4px 0 0 #0c98cf; }
	#mobile-menu .mobile-menu-submenu-arrow {
		line-height: 48px;
		color: #fff;
		border-left: 1px solid rgba(255, 255, 255, 0.1);
	}
	#mobile-menu .mobile-menu-submenu-arrow:hover { background-color: #0a6e9f; }
	#back-to-top { z-index: 900; }
}

/* ---------- Mobile footer: 44px tap targets, tidy legal row ---------- */
@media (max-width: 767px) {
	#footer-bottom .widget { margin-bottom: 28px; }
	#footer-bottom .widget-title { margin-bottom: 8px; }
	#footer-bottom .footer-list li { margin: 0; line-height: 1.4; }
	#footer-bottom .footer-list a,
	#footer-bottom .textwidget a {
		display: inline-block;
		min-height: 44px;
		padding: 11px 0;
		box-sizing: border-box;
	}
	.bg-footer .copyright { line-height: 1.5; padding: 0 16px 16px; }
	.bg-footer .copyright .copyright-text { display: block; margin-bottom: 8px; }
	.bg-footer .copyright .footer-sep { display: none; }
	.bg-footer .copyright a {
		display: inline-block;
		min-height: 44px;
		padding: 11px 10px;
		box-sizing: border-box;
	}
}

/* ---------- Footer link contrast: the theme blue on #1b1b1b was ~3.3:1; this lighter blue is ~7:1 ---------- */
#footer-bottom .textwidget address a,
.bg-footer .copyright a { color: #4fb3e8; }
#footer-bottom .textwidget address a:hover,
.bg-footer .copyright a:hover { color: #fff; }

/* ---------- Mobile content: text sizes and 44px tap targets (audit of all pages, 2026-11-02) ---------- */
@media (max-width: 979px) {
	/* Blog meta and sidebar were 12-14px; 14px is the floor for secondary text, 16px for headings. */
	.post-meta, .post-meta *, article h6, article h6 *, .blog-post h6, .blog-post h6 *,
	.widget small, article small, .post small { font-size: 14px !important; }
	#content .widget-title, .sidebar .widget-title, aside .widget-title { font-size: 16px; }
	.alert.info strong { font-size: 14px; }
	.blog-post-date small { font-size: 14px; }
	/* Sidebar lists (categories, archives, meta): full-width rows of 44px. */
	#content .widget ul li a { display: inline-block; min-height: 44px; line-height: 44px; }

	/* Form fields and buttons. */
	#content input[type="text"], #content input[type="email"], #content input[type="search"], #content input[type="url"],
	#content input[type="tel"], #content select, .wpcf7 input.wpcf7-text, .wpcf7 input.wpcf7-email,
	#s, #author, #email, #url, #subject { min-height: 44px; font-size: 16px; box-sizing: border-box; }
	#searchsubmit { min-height: 44px; min-width: 44px; }
	#content input[type="checkbox"], #content input[type="radio"] { width: 20px; height: 20px; }
	#content a.btn, .wpb_wrapper a.btn, #content .load-more {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		box-sizing: border-box;
	}
	/* Portfolio filters. */
	#content .portfolio-filter a, #content [class*="filter"] li a { display: inline-block; min-height: 44px; line-height: 44px; }

	/* Small inline links (tags, categories, share icons, slider dots): larger invisible hit area, same look. */
	article .post-meta a, #content h6 a, a[rel="tag"], .post-tags a, .tagcloud a, a.social-icon, .bx-pager-link { position: relative; }
	article .post-meta a:after, #content h6 a:after, a[rel="tag"]:after, .post-tags a:after, .tagcloud a:after, a.social-icon:after, .bx-pager-link:after {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 44px;
		height: 44px;
		min-width: 100%;
		transform: translate(-50%, -50%);
	}
}

/* ---------- Home hero on phones (it was hidden with .hidden-phone, so phones lost the main message) ---------- */
@media (max-width: 767px) {
	.home .fullwidth-section.hidden-phone {
		display: block !important;
		position: relative;
		padding-top: 0 !important;
		background-position: 65% center !important;
	}
	/* The black text sits on the blue map; a light veil keeps it readable. */
	.home .fullwidth-section.hidden-phone:before {
		content: "";
		position: absolute;
		top: 0; right: 0; bottom: 0; left: 0;
		background: rgba(255, 255, 255, 0.78);
	}
	.home .fullwidth-section.hidden-phone > * { position: relative; }
	.home #sub-head .vc_custom_1463991806978 { margin-top: 28px !important; }
	.home #sub-head .head-title { font-size: 26px !important; }
	.home #sub-head .head-join { font-size: 20px !important; }
	.home #sub-head .vc_custom_1463987762029 { margin-top: 12px !important; }
	.home #sub-head .vc_custom_1463988658131 { padding-top: 16px !important; }
	.home #sub-head a.btn {
		float: none !important;
		display: flex;
		width: 100%;
		margin: 0 0 12px;
		justify-content: center;
	}
	/* The blue stats band is drawn into the desktop background image; on phones it gets its own band. */
	.home #sub-head .vc_custom_1463753531154 {
		margin: 28px calc(50% - 50vw) 0 !important;
		width: 100vw;
		padding: 18px 0 10px;
		background: #136fa1;
	}
	/* One shared grid: numbers right-aligned in a fixed column, labels left-aligned next to them. */
	.home #sub-head .vc_custom_1463753531154 p {
		display: flex !important;
		align-items: center;
		width: 340px;
		max-width: calc(100vw - 24px);
		margin: 0 0 12px 50%;
		transform: translateX(-50%); /* centred on the screen, not limited by the padded column */
		text-align: left !important;
	}
	.home #sub-head .vc_custom_1463753531154 p span:first-child {
		flex: 0 0 104px;
		padding-right: 16px !important;
		text-align: right;
		line-height: 1.1;
	}
	/* Each label is two lines in the content ("...<br>..."); keep exactly those two. */
	.home #sub-head .vc_custom_1463753531154 p span:last-child { flex: 1; text-align: left; line-height: 1.35; white-space: nowrap; }
}

@media (max-width: 359px) {
	.home #sub-head .vc_custom_1463753531154 p span:first-child { flex-basis: 84px; padding-right: 12px !important; font-size: 1.6em !important; }
	.home #sub-head .vc_custom_1463753531154 p span:last-child { font-size: 15px; }
}

/* ---------- Home "Our clients" on phones: a 2-column logo grid instead of 8 stacked logos ---------- */
@media (max-width: 767px) {
	.home .vc_custom_1464352417763 .vc_col-sm-8 .nfw-row {
		display: flex;
		flex-wrap: wrap;
		margin: 0 !important;
	}
	.home .vc_custom_1464352417763 .vc_col-sm-8 .nfw-row:before,
	.home .vc_custom_1464352417763 .vc_col-sm-8 .nfw-row:after { display: none; }
	.home .vc_custom_1464352417763 .vc_col-sm-8 .nfw-row > .wpb_column {
		width: 50% !important;
		float: none;
		padding: 6px;
		box-sizing: border-box;
	}
	.home .vc_custom_1464352417763 .vc_col-sm-8 .wpb_single_image { margin: 0; text-align: center; }
	.home .vc_custom_1464352417763 .vc_col-sm-8 .vc_single_image-wrapper { display: block; }
	.home .vc_custom_1464352417763 .vc_col-sm-8 img { width: 100%; max-width: 150px; height: auto; margin: 0 auto; }
	.home .govclients ul { margin: 20px 0 0 !important; padding-left: 20px; }
	/* Hanging indent: wrapped lines start under the text, not under the arrow. */
	.home .govclients li { position: relative; padding: 4px 0 4px 16px; }
	.home .govclients li:before { position: absolute; left: 0; }
}

/* ---------- Other mobile layout fixes from the page-by-page review ---------- */
@media (max-width: 979px) {
	/* Blog, post, archive, search and 404 templates: the 128px gap was room for the old absolute header. */
	#page-header { margin-top: 0 !important; }
}
@media (max-width: 767px) {
	/* Contact: offices one under the other (two 46% columns were 150px wide on a phone). */
	.page-id-173 .wpb_text_column div[style*="float: left"] {
		float: none !important;
		width: 100% !important;
		margin-left: 0 !important;
		margin-bottom: 8px;
	}
	.page-id-173 .wpb_text_column div[style*="float: left"] p { padding-top: 16px !important; }
	/* Home sections written right-aligned for the desktop layout read left-aligned on phones. */
	.home #content [style*="text-align: right"] { text-align: left !important; }
	/* Breathing room between stacked images and text. */
	#content .wpb_single_image { margin-top: 16px; margin-bottom: 16px; }
}

/* Contact form: the "required" message of the acceptance checkbox goes under the whole line instead of splitting
   "I accept the" from "terms and conditions". */
.wpcf7 .wpcf7-form-control-wrap[data-name="checkbox-739"] { position: relative; }
.wpcf7 .wpcf7-form-control-wrap[data-name="checkbox-739"] .wpcf7-not-valid-tip {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 6px;
	white-space: nowrap;
}
/* Room for that message above the Send button. */
.wpcf7 p:has([data-name="checkbox-739"] .wpcf7-not-valid-tip) { margin-bottom: 44px; }
/* The response box sat over the floated Send button on desktop. */
.wpcf7 .wpcf7-response-output { clear: both; margin: 16px 0 0; }

/* ---------- SEO headings: the banner title (and the home hero title) became each page's H1 ---------- */
/* Same look as the former div.section-title / p.head-title: body font metrics; their inline styles still apply. */
h1.section-title,
h1.head-title {
	font-family: 'Open Sans', Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	color: #4b4b4b;
	letter-spacing: normal;
}
h1.head-title { margin-top: 0; }

/* ---------- Accessibility and performance (PageSpeed audit, 2026-11-02) ---------- */
/* Footer widget titles are now <h2> (heading order); same look as the theme's #footer-bottom h5. */
#footer-bottom h2.widget-title {
	color: #fff;
	font-size: 18px;
	font-weight: bold;
	line-height: 18px;
	min-height: 37px;
}
/* Links inside running text were told apart by colour alone (1.55:1 against the text); underline them. */
#content p a:not(.btn),
#content li a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
/* Cookie banner link: 4.19:1 on its blue was below 4.5:1. */
.cc-window .cc-link { color: #fff; opacity: 1; }
/* Icon font: show the page text at once instead of waiting for the icons. */
@font-face {
	font-family: 'FontAwesome';
	src: url('fontawesome/font/fontawesome-webfont.woff?v=4.2.0-swap') format('woff'); /* own URL, so this rule is the one used */
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* Footer legal links sit inside the copyright sentence: underline (they were told apart by colour only). */
.bg-footer .copyright a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Case studies, History and Expertise on phones ---------- */
@media (max-width: 767px) {
	/* Case studies: the 25% / 73% floats left the details column ~100px wide ("Functional / area:" on two lines). */
	.page-id-435 .nexxt > div[style*="float: left"] {
		float: none !important;
		width: 100% !important;
		margin-left: 0 !important;
	}
	.page-id-435 .nexxt > div[style*="text-align: center"] { text-align: left !important; }
	.page-id-435 .nexxt > div[style*="margin-top: 15px"] { margin-top: 12px !important; }
	.page-id-435 .nexxt p[style*="margin-left: 30px"] {
		margin: 4px 0 16px !important;
		padding: 12px 16px;
		background: #f4f7f9;
		border-left: 3px solid #0a6e9f;
		border-radius: 4px;
	}

	/* History: the timeline was 80% wide with a 10% indent. */
	.page-id-244 .content { width: 100%; padding-left: 0; }
	.page-id-244 .content .circle { margin-left: 8px; margin-right: 12px; }

	/* Expertise: each region heading sits on its own list, regions are spaced apart, countries in two columns. */
	.page-id-197 .vc_col-sm-2 { margin-bottom: 28px; }
	.page-id-197 .vc_col-sm-2 p[style*="font-size: 20px"] { margin: 0 0 8px; }
	.page-id-197 .vc_col-sm-2 ul {
		margin: 0;
		padding-left: 0;
		column-count: 2;
		column-gap: 16px;
	}
	.page-id-197 .vc_col-sm-2 li { break-inside: avoid; padding: 2px 0; }
}

/* History: below 1400px the 92% text column did not fit next to the year and fell under it; it now takes the room left. */
@media (max-width: 1399px) {
	.page-id-244 .content > p { clear: both; margin: 0; }
	.page-id-244 .content .blue.float { min-width: 2.75em; }
	.page-id-244 .content .right { float: none; width: auto; overflow: hidden; }
}

/* Text contrast (WCAG AA 4.5:1 on white), PageSpeed live audit 2026-11-02. */
/* Required-field markers and the acceptance label: #ff0000 was 4.0:1, #d40000 is 5.5:1. */
label span { color: #d40000; }
/* Expertise region headings (inline #0c98cf, 3.3:1): same blue, darker, 4.7:1. */
.page-id-197 p[style*="color: #0c98cf"] { color: #0a7cab !important; }
