/* =====================================================================
   EDF – Accessibility overrides (WCAG 2.1 AA / GIGW)
   Loaded after the theme CSS. Keeps the existing design; only adds what
   the theme is missing. Colour changes for contrast are made directly in
   style.css and colors/blue-color.css:
     #169fe6 -> #0a72af  brand blue (menu bar, headings, links)   5.2:1
     #1687bf -> #085e8f  footer / dropdown background             7.0:1
     #e6772d -> #bf571b  active / hover menu item                 4.6:1
     #d19d0e -> #9a7400  site title                               4.3:1
     #0084c9 -> #075c8d  menu separators
   ===================================================================== */

/* ---------- Utilities ---------- */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Skip link (2.4.1) ---------- */
.skip-link {
	position: absolute;
	top: -100px;
	left: 10px;
	z-index: 100000;
	padding: 10px 16px;
	background: #000;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
}

.skip-link:focus {
	top: 10px;
}

#content:focus {
	outline: none;
}

/* ---------- Visible focus (2.4.7) ---------- */
a:focus,
button:focus,
select:focus,
input:focus,
textarea:focus,
[tabindex]:focus {
	outline: 3px solid #1a1a1a;
	outline-offset: 2px;
}

#main-navigation a:focus,
#main-navigation button:focus,
#footer a:focus,
#copyrights a:focus,
.home-intro a:focus {
	outline-color: #fff;
}

/* ---------- Links inside running text are underlined (1.4.1 Use of Color) ---------- */
#content p a:not(.button),
.new-page a {
	text-decoration: underline;
}

/* ---------- Page titles promoted to <h1>: keep the original h2 look ---------- */
h1.hs-2 {
	font-size: 24px;
	line-height: 30px;
}

h2.hs-3,
h1.hs-3 {
	font-size: 22px;
	line-height: 30px;
}

h2.hs-4,
h3.hs-4 {
	font-size: 16px;
	line-height: 22px;
}

h3.hs-5,
h4.hs-5,
h2.hs-5 {
	font-size: 16px;
	line-height: 22px;
}

.home-intro h1 {
	font-size: 24px;
	line-height: 22px;
	margin-bottom: 5px;
	font-weight: 400;
	color: #fff;
}

#footer h2.footer-title {
	font-size: 16px;
	line-height: 22px;
	color: #fff;
	font-family: "Open Sans", Arial, Verdana;
	margin-bottom: 10px;
	font-weight: 400;
}

/* ---------- Main menu: "EDF" and "Gallery" are buttons (2.1.1, 4.1.2) ---------- */
.main-menu > li > button {
	display: block;
	margin: 0;
	padding: 15px 10px 16px 10px;
	border: 0;
	border-left: 1px solid #075c8d;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-family: "Open Sans", Arial, Verdana;
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.main-menu > li > button.currentm,
.main-menu > li:hover > button,
.main-menu > li > button:focus,
.main-menu > li > button[aria-expanded="true"] {
	background-color: #bf571b;
}

.main-menu > li > a:focus {
	background-color: #bf571b;
}

.main-menu > li > button[aria-expanded="true"] + ul,
.main-menu > li:focus-within > ul {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.main-menu ul[hidden] {
	display: none !important;
}

.main-menu ul a:focus {
	text-decoration: underline;
}

/* Mobile menu <select> + Go button (custom.js builds the select) */
#main-navigation .mobile-menu-go {
	display: none;
}

@media only screen and (max-width: 959px) {
	#main-navigation .mobile-menu-go {
		display: inline-block;
		margin: 0;
		vertical-align: middle;
		padding: 9px 14px;
		border: 1px solid #fff;
		background: #bf571b;
		color: #fff;
		font-size: 14px;
		cursor: pointer;
	}

	#main-navigation select {
		display: inline-block !important;
		max-width: calc(100% - 90px);
		vertical-align: middle;
	}
}

/* Small screens: pause button sits above the slider instead of covering its buttons */
@media only screen and (max-width: 767px) {
	.hero-slider #slider-toggle {
		position: static;
		display: block;
		margin: 6px 10px 6px auto;
	}
}

/* ---------- Accessibility toolbar (in the existing top strip) ---------- */
#header-links {
	margin-bottom: 0;
}

.accessibility-toolbar {
	padding: 4px 0;
	text-align: right;
	font-size: 12px;
	line-height: 24px;
	color: #404040;
}

.accessibility-toolbar button {
	min-width: 28px;
	margin: 0 0 0 4px;
	padding: 1px 8px;
	border: 1px solid #656d78;
	border-radius: 3px;
	background: #fff;
	color: #1a1a1a;
	font-family: "Open Sans", Arial, Verdana;
	font-size: 12px;
	line-height: 20px;
	cursor: pointer;
}

.accessibility-toolbar button[aria-pressed="true"] {
	background: #0a72af;
	border-color: #0a72af;
	color: #fff;
}

#header-links .accessibility-toolbar a {
	margin-left: 10px;
	color: #0a72af;
	font-size: 12px;
	text-decoration: underline;
}

/* ---------- Text size options (A- / A / A+) ---------- */
body.a11y-text-small #content p,
body.a11y-text-small #content li,
body.a11y-text-small #content td,
body.a11y-text-small #content th,
body.a11y-text-small #footer p {
	font-size: 12px !important;
	line-height: 20px !important;
}

body.a11y-text-large #content p,
body.a11y-text-large #content li,
body.a11y-text-large #content td,
body.a11y-text-large #content th,
body.a11y-text-large #footer p,
body.a11y-text-large .main-menu a,
body.a11y-text-large .main-menu button {
	font-size: 17px !important;
	line-height: 27px !important;
}

/* ---------- High contrast mode ---------- */
body.a11y-high-contrast,
body.a11y-high-contrast #wrapp,
body.a11y-high-contrast #header,
body.a11y-high-contrast #header-links,
body.a11y-high-contrast #main-navigation,
body.a11y-high-contrast #content,
body.a11y-high-contrast #content div,
body.a11y-high-contrast #breadcrumb,
body.a11y-high-contrast .home-intro,
body.a11y-high-contrast .intro-features,
body.a11y-high-contrast .clients-wrapp,
body.a11y-high-contrast #footer,
body.a11y-high-contrast #copyrights,
body.a11y-high-contrast .main-menu ul,
body.a11y-high-contrast .main-menu a,
body.a11y-high-contrast .main-menu button,
body.a11y-high-contrast table,
body.a11y-high-contrast td,
body.a11y-high-contrast th {
	background: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
	text-shadow: none !important;
	box-shadow: none !important;
}

body.a11y-high-contrast h1,
body.a11y-high-contrast h2,
body.a11y-high-contrast h3,
body.a11y-high-contrast h4,
body.a11y-high-contrast h5,
body.a11y-high-contrast h6,
body.a11y-high-contrast p,
body.a11y-high-contrast li,
body.a11y-high-contrast span,
body.a11y-high-contrast strong,
body.a11y-high-contrast label {
	color: #fff !important;
}

body.a11y-high-contrast a,
body.a11y-high-contrast a * {
	color: #ff0 !important;
	text-decoration: underline !important;
}

body.a11y-high-contrast .main-menu > li > a.currentm,
body.a11y-high-contrast .main-menu > li > button.currentm,
body.a11y-high-contrast .main-menu > li > a:focus,
body.a11y-high-contrast .main-menu > li > button:focus,
body.a11y-high-contrast .main-menu > li:hover > a,
body.a11y-high-contrast .main-menu > li:hover > button {
	background: #ff0 !important;
	color: #000 !important;
}

body.a11y-high-contrast .accessibility-toolbar button,
body.a11y-high-contrast .button,
body.a11y-high-contrast #slider-toggle {
	background: #000 !important;
	color: #ff0 !important;
	border: 2px solid #ff0 !important;
}

body.a11y-high-contrast .accessibility-toolbar button[aria-pressed="true"] {
	background: #ff0 !important;
	color: #000 !important;
}

body.a11y-high-contrast a:focus,
body.a11y-high-contrast button:focus,
body.a11y-high-contrast select:focus,
body.a11y-high-contrast [tabindex]:focus {
	outline-color: #ff0 !important;
}

/* ---------- Home hero slider: pause / play control (2.2.2) ---------- */
.hero-slider {
	position: relative;
	float: left;
	width: 100%;
}

#slider-toggle {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 20000;
	padding: 6px 12px;
	border: 1px solid #fff;
	border-radius: 3px;
	background: #0a72af;
	color: #fff;
	font-family: "Open Sans", Arial, Verdana;
	font-size: 13px;
	line-height: 18px;
	cursor: pointer;
}

#slider-toggle:focus {
	outline: 3px solid #1a1a1a;
	outline-offset: 2px;
}

/* Partner logos: carousel arrows must be visible when focused */
.flexslider.clients-slider .flex-direction-nav a:focus {
	opacity: 1 !important;
	display: block !important;
}

/* ---------- Footer accessibility links ---------- */
#footer .footer-links {
	float: none;
	clear: both;
	padding-top: 15px;
}

#footer .footer-links ul {
	float: none;
	margin: 0;
	padding: 12px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.3);
	text-align: center;
}

#footer .footer-links li {
	display: inline-block;
	float: none;
	width: auto;
	margin: 0 10px;
	padding: 0;
	border: 0;
	font-size: 14px;
}

#footer a {
	text-decoration: underline;
}

/* ---------- Gallery: zoom button appears on keyboard focus, as on hover ---------- */
ul#portfolio-container.three-columns li .item-wrapp .portfolio-item:focus-within a.item-preview {
	right: 39.5%;
}

.portfolio-item:focus-within img {
	position: relative;
	z-index: 10;
	opacity: 0.1;
}

.portfolio-item a.item-preview:focus {
	background: #fff;
	outline-color: #fff;
}

.portfolio-item a.item-preview:focus i {
	color: #434a54;
}

/* ---------- Vision & Mission icons (were inside empty <h1>s) ---------- */
.service-item .service-icon {
	margin-bottom: 20px;
	font-size: 26px;
	line-height: 32px;
}

.service-item .service-icon i {
	font-size: 100px;
	color: #0a72af;
}

/* ---------- Gallery dialog (replaces prettyPhoto for keyboard users) ---------- */
#gallery-dialog {
	max-width: min(90vw, 1000px);
	padding: 16px;
	border: 0;
	background: #fff;
}

#gallery-dialog::backdrop {
	background: rgba(0, 0, 0, 0.8);
}

#gallery-dialog img {
	display: block;
	max-width: 100%;
	max-height: 75vh;
	margin: 0 auto;
}

#gallery-dialog p {
	margin: 10px 0 0;
	text-align: center;
}

#gallery-dialog-close {
	float: right;
	margin-bottom: 10px;
	padding: 6px 12px;
	border: 1px solid #0a72af;
	background: #0a72af;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

/* ---------- New accessibility pages (statement, sitemap, help...) ---------- */
.new-page {
	margin-bottom: 30px;
}

.new-page h2 {
	font-size: 22px;
	line-height: 30px;
	color: #0a72af;
}

.new-page ul {
	margin: 0 0 20px 20px;
	list-style: disc;
}

.new-page li {
	margin-bottom: 6px;
}

.new-page table {
	width: 100%;
	margin-bottom: 20px;
}

.new-page caption {
	padding: 8px 0;
	font-weight: 700;
	text-align: left;
}

.new-page th,
.new-page td {
	padding: 8px 10px;
	border: 1px solid #ccd0d9;
	text-align: left;
}

/* ---------- Reflow at 320px (1.4.10) ---------- */
#content img,
#footer img {
	max-width: 100%;
	height: auto;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Notice on older pages that are no longer linked from the menus */
.legacy-notice { background: #fff4d6; border-bottom: 2px solid #9a7400; color: #2b2b2b; }
.legacy-notice p { margin: 0; padding: 12px 0; font-size: 14px; line-height: 1.5; }
.legacy-notice a { color: #075c8d; text-decoration: underline; }
.a11y-high-contrast .legacy-notice { background: #000; border-color: #ff0; color: #fff; }
.a11y-high-contrast .legacy-notice a { color: #ff0; }

/* Reflow at 320px (1.4.10): let long web addresses wrap, keep nested list items inside the column */
#content p a,
.new-page th,
.new-page td {
	overflow-wrap: anywhere;
	word-break: break-word;
}

@media only screen and (max-width: 767px) {
	#content ul.simple-list li {
		box-sizing: border-box;
	}
}

/* A closed submenu stays hidden even if the theme menu script left an inline display style (Esc, 1.4.13) */
#main-navigation ul[hidden] {
	display: none !important;
}

.site-footer {
	float: left;
	width: 100%;
}
