/* CSS Document */
/* Styles used by the navigation bar
   ----------------------------------------------------------------- */

/* Screen-reader skip link — hidden until keyboard focus (WCAG 2.4.1).
   Emitted by /includes/nav.php, so this rule must live in the stylesheet
   the shared nav requires (dropdown.css) to guarantee every page hides
   the link properly. */
.skip-link {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: 10px;
	top: 10px;
	background: #fff;
	padding: 8px;
	z-index: 10000;
}

.header {
	width: 100%;
	background: #fffffe;
	border-bottom: 2px solid #0078c0;
	position: relative;
}

/* Micro clearfix by Nicolas Gallagher */
/* For modern browsers */
.cf:before,
.cf:after {
	content: "";
	display: table;
}

.cf:after {
	clear: both;
}

/* For IE 6/7 */
.cf {
	zoom: 1;
}

/* horizontal menu styles
   ----------------------------------------------------------------- */
/* All rules below are scoped to `header > nav` / `.header nav` so the
   site-wide shared-nav styles don't bleed into other <nav> elements on
   a page (e.g. a page-specific sub-nav / ribbon).
   The direct-child combinator (>) in `header > nav` ensures we only
   target the immediate shared-nav, not any descendant <nav> elements
   nested deeper in the page (which use their own styling). */
header > nav,
.header nav {
	height: 55px;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	position: relative;
	z-index: 2000;
}

header > nav img,
.header nav img {
	border: none;
}

header > nav ul,
.header nav ul,
header > nav li,
.header nav li {
	margin: 0;
	padding: 0;
	list-style: none;
}

header > nav ul.topmenu,
.header nav ul.topmenu {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: stretch;
	height: 55px;
	width: 100%;
}

header > nav ul.topmenu > li,
.header nav ul.topmenu > li {
	position: relative;
	flex: 0 0 auto;
}

/* Top-level links and accessible submenu buttons */
header > nav li a,
.header nav li a,
header > nav li .menu-toggle,
.header nav li .menu-toggle {
	display: block;
	line-height: 55px;
	text-align: center;
	font-size: 1em;
	padding: 0 0.85em;
	color: #5f716e;
	text-decoration: none;
	background: #fffffe;
	border: 0;
	font-family: inherit;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	white-space: nowrap;
}

/* Make submenu buttons visually match links */
header > nav li .menu-toggle,
.header nav li .menu-toggle {
	height: 55px;
}

/* Hover and focus styling for top level items */
header > nav li a:hover,
.header nav li a:hover,
header > nav li .menu-toggle:hover,
.header nav li .menu-toggle:hover,
.header .topmenu li:hover > a,
.header .topmenu li:hover > .menu-toggle,
header > nav li a:focus,
.header nav li a:focus,
header > nav li .menu-toggle:focus,
.header nav li .menu-toggle:focus,
header > nav li a:focus-visible,
.header nav li a:focus-visible,
header > nav li .menu-toggle:focus-visible,
.header nav li .menu-toggle:focus-visible {
	background: #fffffe;
	color: #1e7a3c; /* WCAG AA: 5.26:1 on white (was #50C87C, 2.05:1) */
	position: relative;
}

/* Strong keyboard focus */
header > nav li a:focus,
.header nav li a:focus,
header > nav li .menu-toggle:focus,
.header nav li .menu-toggle:focus,
header > nav li a:focus-visible,
.header nav li a:focus-visible,
header > nav li .menu-toggle:focus-visible,
.header nav li .menu-toggle:focus-visible {
	outline: 3px solid #0078c0;
	outline-offset: -3px;
}

/* Current page */
.current,
a:hover.current,
.topmenu li:hover a.current {
	position: relative;
	cursor: default;
}

/* Add dropdown arrow to menu buttons */
.topmenu .has-submenu > .menu-toggle::after {
	content: " ▼";
	font-size: 0.75em;
	margin-left: 0.25em;
	vertical-align: middle;
}

.topmenu .has-submenu > .menu-toggle[aria-expanded="true"]::after {
	content: " ▲";
}

/* dropdown menu styles */
ul.submenu {
	float: none;
	background: #fffffe;
	width: auto;
	height: auto;
	position: absolute;
	top: 55px;
	left: 0;
	min-width: 100%;
	max-height: none;
	overflow: visible;
	z-index: 1000;
	display: block;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Hidden state controlled by JS */
ul.submenu[hidden] {
	display: none;
}

ul.submenu li {
	float: none;
	width: 100%;
}

ul.submenu li a {
	display: block;
	padding: 0.7em 2em;
	line-height: 1.3;
	white-space: nowrap;
	text-transform: none;
	text-align: left;
}

/* Keep submenu open on hover/focus for mouse users too */
.topmenu li:hover > ul.submenu,
.topmenu li:focus-within > ul.submenu {
	display: block;
}

ul.submenu li:last-child a {
	border-bottom: none;
}

ul.submenu li a:hover,
ul.submenu li a:focus,
ul.submenu li a:focus-visible {
	background: #fffffe;
	color: #1e7a3c; /* WCAG AA: 5.26:1 on white (was #50C87C, 2.05:1) */
	outline: 3px solid #0078c0;
	outline-offset: -3px;
}

/* Optional: tighten spacing a little on narrower desktop widths */
@media (max-width: 1280px) {
	header > nav,
	.header nav {
		max-width: 1160px;
	}

	header > nav li a,
	.header nav li a,
	header > nav li .menu-toggle,
	.header nav li .menu-toggle {
		padding: 0 0.7em;
		font-size: 0.96em;
	}
}

/* Accessibility: indicate PDF and new-window links */
/* ---------------------------------------------------------------- */
/* These rules live here (rather than a page-specific stylesheet)   */
/* because dropdown.css is loaded site-wide. The :not(:has(img))    */
/* part skips links that wrap an image so the indicator doesn't    */
/* appear next to a logo or thumbnail.                              */

a[href$=".pdf"]:not(:has(img))::after {
	content: " (PDF)";
	font-size: 0.85em;
	color: #505050;
}

a[target="_blank"]:not(:has(img))::after {
	content: " (opens in new window)";
	font-size: 0.85em;
	color: #505050;
}

/* When a link is BOTH a PDF and opens in a new window, show both */
/* pieces of info in a single combined suffix. */
a[href$=".pdf"][target="_blank"]:not(:has(img))::after {
	content: " (PDF, opens in new window)";
	font-size: 0.85em;
	color: #505050;
}

/* Keep the indicator readable inside pill-style buttons (blue background, white text) */
a.bluepill[href$=".pdf"]:not(:has(img))::after,
a.bluepill[target="_blank"]:not(:has(img))::after,
a.bluepill[href$=".pdf"][target="_blank"]:not(:has(img))::after,
a.ReportButton[href$=".pdf"]:not(:has(img))::after,
a.ReportButton[target="_blank"]:not(:has(img))::after,
a.ReportButton[href$=".pdf"][target="_blank"]:not(:has(img))::after {
	color: inherit;
	text-transform: none;
}

/* Utility: visually hide content while keeping it available to
   screen readers. Use this on labels or helper text that sighted
   users don't need to see but assistive tech should announce. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Container for page-specific controls (search, prev/next) that used to
   live inside the nav bar. Positioned and sized to match the old nav box
   so the absolute-positioned children keep their coordinates. */
.page-controls {
    position: relative;
    width: 100%;
    max-width: 1240px;
    height: 40px;
    margin: 0 auto;
}

@media (max-width: 1280px) {
    .page-controls {
        max-width: 1160px;
    }
}
