/*
 * Masthead (site-wide): logo and menu. v1.2 part 1.
 *
 * Loaded by header.php after 2019-dc.css, on every page. The masthead copies the
 * page grid (#main_content padding and image-box padding at each band) so that
 *  - the logo's left edge is the left edge of the first image column and its width is
 *    that image's width (a quarter of the content width, less the image gaps);
 *  - the menu ends at the right edge of the fourth image column.
 * Breakpoints follow 2019-dc.css: tablet from 40em, desktop from 70em, wide from 100em.
 */

.dc-masthead {
	--dcm-max: 1000px; /* #main_content max width */
	--dcm-pad: 6px;    /* #main_content side padding */
	--dcm-inset: 3px;  /* gap round each image box */
	background: #fff;
	max-width: none;
	width: 100%;
}

@media print, screen and (min-width: 70em) {
	.dc-masthead {
		--dcm-max: 1400px;
		--dcm-pad: 10px;
		--dcm-inset: 5px;
	}
}

@media print, screen and (min-width: 100em) {
	.dc-masthead {
		--dcm-max: 2000px;
		--dcm-pad: 10px;
		--dcm-inset: 6px;
	}
}

.dc-masthead-inner {
	box-sizing: border-box;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	width: 100%;
	max-width: var(--dcm-max);
	margin: 0 auto;
	padding: 18px var(--dcm-pad) 10px;
}

/* Logo: as wide as the first image column; left edge on the image edge. */
.dc-masthead .dc-logo-link-desktop {
	display: block;
	flex: none;
	width: calc(100% / 4 - 2 * var(--dcm-inset));
	margin-left: var(--dcm-inset);
	line-height: 0;
}

.dc-masthead .dc-logo {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	position: static;
}

/* Menu: 12 px / 400, 26 px between items, ending on the right edge of column 4. */
.dc-masthead .dc-menu-wrap {
	flex: none;
	margin-right: var(--dcm-inset);
}

.dc-masthead .dc-menu {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-end;
	gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
	background: transparent;
}

.dc-masthead .dc-menu > li {
	margin: 0;
	padding: 0;
	line-height: 1;
}

.dc-masthead .dc-menu > li > a {
	display: block;
	margin: 0;
	padding: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	color: #333;
	background: transparent;
	text-decoration: none;
	white-space: nowrap;
}

.dc-masthead .dc-menu > li > a:hover {
	color: #000;
}

/* Current page: weight 600 with a 1 px underline, 4 px below the text. */
.dc-masthead .dc-menu > li > a.is-current {
	font-weight: 600;
	color: #000;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.dc-masthead .dc-menu > li > a:focus-visible {
	outline: 2px solid #2a7fa8;
	outline-offset: 3px;
}

/* ---------- Phone (under 640 px) ---------- */
@media screen and (max-width: 39.9375em) {
	/* Title bar: logo 36 px high, three-bar menu icon (Foundation toggles #responsive-menu). */
	#header-logo-container .grid-x {
		align-items: center;
	}

	#header-logo-image .dc-logo-link {
		display: block;
		line-height: 0;
	}

	.dc-logo-phone {
		display: block;
		width: auto;
		height: 36px;
		margin: 0;
	}

	#menu-icon-cell {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* The opened list: one item per line. */
	.dc-masthead-inner {
		display: block;
		padding: 0;
	}

	.dc-masthead .dc-menu-wrap {
		margin: 0;
	}

	.dc-masthead .dc-menu {
		display: block;
	}

	.dc-masthead .dc-menu > li > a {
		padding: 12px 16px;
		font-size: 16px;
		border-top: 1px solid #eee;
	}
}
