
:root {
	--primary-color: #203864;
	--secondary-color: #35989f;
	--accent-color: #238361;
	--default-border-radius: 0.9em;
}

html, body {
	margin: 0;
	padding: 0;
}


body {
	background-color: var(--primary-color);
	display: flex;
	flex-direction: column;
	font-family: Verdana, sans-serif;
	min-height: 100vh;
}

footer {
	background-color: var(--secondary-color);
	box-sizing: border-box;
	margin-top: 30px;
	padding: 0.6em;
	text-align: center;
	width: 100%;
}

footer a, main a {
	color: var(--primary-color);
	font-weight: bold;
	text-decoration: none;
}

footer a:hover, main a:hover {
	text-decoration: underline;
}

form > label {
	display: block;
	font-weight: bold;
}

legend {
	font-weight: bold;
}

form input, fieldset, textarea {
	margin-bottom: 0.8rem;
}

fieldset .error {
	display: block;
}

textarea#message, fieldset {
	box-sizing: border-box;
	display: block;
	font-family: Verdana, sans-serif;
	font-size: 1rem;
	width: 31.5em;
}

h1 {
	color: var(--secondary-color);
	margin-bottom: 0.6em;
}

header h1 {
	text-shadow: 1px 1px 2px black;
	margin-bottom: 0.75rem;
	margin-left: 1.3rem;
}

header h2 {
	color: white;
	text-shadow: 1px 1px 2px black;
	margin-left: 1.3rem;
}

h2 {
	font-style: italic;
	font-weight: lighter;
	margin-top: 0;
}

main h1 {
	margin-top: 0;
}

main {
	background-color: white;
	box-sizing: border-box;
	flex: 1;
	padding: 0.9rem;
	width: auto;
}

nav {
	border-top: double white 3px;
	padding-top: 0.3em;
	padding-bottom: 0.3em;
}

nav button {
	background-color: transparent;
	border-style: none;
	color: white;
	font-weight: bold;
	text-shadow: 1px 1px 2px black;
}

nav ul {
	display: inline-flex;
	flex-wrap: wrap;
	list-style-type: none;
	margin: 0;
	padding: 0;
}

.nav-item {
	border-radius: var(--default-border-radius);
	margin: 0 0.6rem;
	padding: 0;
}

.nav-toggle {
	display: none;
	padding: 0.6rem;
}

/* Excludes nav items with dropdown arrows. */
.nav-item > a:only-child {
	border-bottom-right-radius: var(--default-border-radius);
	border-top-right-radius: var(--default-border-radius);
	width: 100%;
}

.nav-item > a {
	border-bottom-left-radius: var(--default-border-radius);
	border-top-left-radius: var(--default-border-radius);
	box-sizing: border-box;
	color: white;
	display: block;
	font-weight: bold;
	padding: 0.6rem;
	text-decoration: none;
	text-shadow: 1px 1px 2px black;
}

.nav-item:hover, .nav-item>a:focus, .dropdown-arrow:focus {
	background-color: var(--secondary-color); /* For browsers that do not support gradients. */
	background-image: linear-gradient(var(--accent-color), var(--secondary-color));
}

.dropdown-arrow {
	border-bottom-right-radius: var(--default-border-radius);
	border-top-right-radius: var(--default-border-radius);
	height: 100%;
}

.dropdown {
	align-items: center;
	display: flex;
	position: relative;
}

.dropdown + a {
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
}

.dropdown-content {
	background-color: var(--secondary-color);
	border-radius: 0.6em;
	display: none;
	min-width: 13rem;
	position: absolute;
	top: 100%;
}

.dropdown-item {
	min-height: 1.75rem;
	padding: 0;
}

/* Should match border radius of parent .dropdown-content. */
.dropdown-item:first-child a {
	border-radius: 0.6em 0.6em 0 0;
}

/* Should match border radius of parent .dropdown-content. */
.dropdown-item:last-child a {
	border-radius: 0 0 0.6em 0.6em;
}

.dropdown-item a {
	box-sizing: border-box;
	color: white;
	display: block;
	font-family: Verdana, sans-serif;
	height: 100%;
	margin: 0;
	padding: 0.313rem 0.6rem;
	text-decoration: none;
	text-shadow: 1px 1px 1px black;
	width: 100%;
}

.dropdown-item a:hover, .dropdown-item a:focus {
	background-color: var(--accent-color);
}

.dropdown:hover .dropdown-content {
	display: block;
}

[aria-expanded="true"] + .dropdown-content {
	display: block;
}

input[type="submit"] {
	background-color: var(--accent-color); /* For browsers that do not support gradients. */
	background-image: linear-gradient(var(--secondary-color), var(--accent-color));
	border-radius: var(--default-border-radius);
	color: white;
	cursor: pointer;
	font-weight: bold;
	min-height: 2.7rem;
	text-shadow: 1px 1px 1px black;
}

input[type="submit"]:hover {
	background-color: var(--secondary-color); /* For browsers that do not support gradients. */
	background-image: linear-gradient(var(--accent-color), var(--secondary-color));
}

.error, .required {
	color: red;
}

.error-input {
	border-color: red;
}

@media (max-width: 502px) {
	.nav-toggle {
		display: block;
	}
	
	#nav-list {
		display: none;
	}
	
	[aria-expanded="true"] + #nav-list {
		display: block;
	}

	.dropdown-content {
		flex-basis: 100%;
		flex-direction: column;
		position: relative;
		width: 100%;
	}

	.dropdown {
		flex-wrap: wrap;
		justify-content: space-between;
	}
	
	.dropdown-arrow {
		padding: 0.6rem; /* Should match padding of adjacent link. */
	}

	.nav-item > a, .dropdown + a {
		flex: 1;
	}
}