@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins/Poppins-Light.ttf");
  font-weight: normal;
  font-style: normal;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
}

header {
  background-image: url('../images/header-bg-coloured.png');
	background-position: 50% 50%;
	background-size: cover;
  margin: 0;
	margin-bottom: 10px;
  text-align: center;
  padding: 20px 0;
  color: #ddd;
	display: flex;
	flex-direction: column;
	align-items: center;
}
header h1 {
	margin-bottom: 0;
	margin-top: 20px;
	font-size: 3em;
}
header img:nth-of-type(1) {
	background: rgb(0, 44, 158);
	margin-top: 20vh;
	height: 80px;
	display: block;
	border: 3px solid white;
}
header img:nth-of-type(2) {
	background: rgb(0, 44, 158);
	padding: 10px;
	height: 100px;
	display: block;
	margin-top: 20px;
}
header small {
  font-size: 1.5em;
}

ol {
  list-style-type: none;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.main-navigation h2 {
  padding: 20px 0 20px 20px;
  background: #002c9e;
  color: #ddd;
  cursor: pointer;
  margin-bottom: 0;
}
.main-navigation h2::before {
  content: "+";
  margin-right: 10px;
}
.main-navigation h2.open::before {
  content: "-";
}
.main-navigation ol {
	padding: 0;
	margin: 0 auto;
	max-width: 800px;
}
.main-navigation li ol {
  overflow: hidden;
  background: #aaa;
  max-height: 0;
  transition: max-height 0.3s ease-out;
  margin-top: 0;
}
.main-navigation li ol li {
	font-size: 1.2em;
	font-weight: bold;
	letter-spacing: 1px;
  margin: 10px auto;
  padding: 20px 0 20px 90px;
	background-size: 60px 60px;
	background-repeat: no-repeat;
	background-position: 10px 50%;
	border: 1px solid black;
	box-shadow: 6px 4px 0px 1px gray;
	cursor: pointer;
	width: 80%;
}

.main-navigation a {
	display: block;
	width: 100%;
	height: 100%;
	color: black;
	text-decoration: none;
}

.main-navigation li ol li:hover {
	transform: scale(1.05,1.1);
}

li[data-type="resource-video"] {
	background-image: url('../icons/resource-video.png');
}

li[data-type="resource"] {
	background-image: url('../icons/resource.png');
}

li[data-type="supplementary-pdf"] {
	background-image: url('../icons/supp-pdf.png');
}

li[data-type="supplementary-video"] {
	background-image: url('../icons/supp-video.png');
}

li[data-type="link"] {
	background-image: url('../icons/link.png');
}


.media-viewer {
	position: fixed;
	display: none;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.95);
	align-items: center;
	justify-content: center;
	z-index: 10;
}

video {
	display: none;
	width: 75%;	
	max-height: 75%;
	background: black;
	box-shadow: 0px 0px 5px 2px white;
}

#linker {
	display: none;
	background: rgb(0, 44, 158);
	color: white;
	text-decoration: none;
	font-size: 2em;
	padding: 50px;
}

iframe {
	display: none;
	width: 75%;
	height: 95%;	
}

h2.overlay-heading {
	position: absolute;
	top: 25px;
	left: 5px;
	background: #002c9e;
	color: #ddd;
	padding: 5px;
	max-width: 11%;
	font-size: 18px ;
	text-align: center;
	border-radius: 5px;
	margin: 0;
}

button {
  border: none;
	cursor: pointer;
	outline: none;
	position: absolute;
	background: rgba(0,0,0,0);
}

#close-button {
	top: 25px;
	right: 25px;
}

#close-button img {
	width: 100%;
	height: 100%;
}

#previous-button {
	top: 50%;
	left: 25px;
	transform: translate(0,-50%);
}

#next-button {
	top: 50%;
	right: 25px;
	transform: translate(0,-50%);
}

.legend {
	position: fixed;
	z-index: 100;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	background: white;
	padding: 10px;
	box-shadow: 0px 0px 15px 10px black;
	display: none;
	max-width: 95%;
	max-height: 95%;
	overflow: scroll;
}

#legend-close {
	position: absolute;
	top: 5px;
	right: 5px;
	cursor: pointer;
	margin: 0;
	width: 40px;
}

#legend-close img {
	width: 100%;
}

.legend img {
	width: 70px;
	margin-right: 20px;
}

.legend-item {
	display: flex;
	padding: 10px 0;
	align-items: center;
}

#legend-open {
	background: #002c9e;
	font-family: 'Poppins';
	font-size: 1.1em;
	color: white;
	padding: 10px 20px;
	position: sticky;
	top: 10px;
	margin-left: 10px;
	box-shadow: 0px 0px 3px 3px white;
}

img {
	max-width: 90%;
}
 .main-navigation img {
	 display: block;
	 margin: 0 auto;
	 margin-top: 20px;
 }

 .active {
	 color: white;
}

@media screen and (min-width:900px) {
	header {
		height: 100vh;
	}
}

@media screen and (max-width:600px) {
	.legend {
		width: 95%;
	}

	h2.overlay-heading {
		font-size: 0.8em;
	}

	video {
		width: 95% !important;
		height: 60% !important;
	}

	iframe {
		width: 95% !important;
		height: 60% !important;
	}

	#linker {
		width: 95% !important;
		height: 60% !important;
	}

	#previous-button {
		left:5px !important;
		top: 90% !important;
	}

	#next-button {
		right:5px !important;
		top: 90% !important;
	}

	#close-button {
		top: 90% !important;
		right: 50% !important;
		transform: translate(50%,-50%);
	}

}

@media screen and (max-width:350px) {
	.legend {
		font-size: 0.8em;
	}

	header h1 {
		font-size: 2em;
	}

	header img {
		height: auto !important;
	}

	.main-navigation li ol li {
		font-size: 0.9em;
		background-size: 40px 40px;
		letter-spacing: 0px;
		padding-left: 60px;
	}
}

@media screen and (max-width:1000px) {
	video {
		height: 75%;
		width: 75%;
	}

	iframe {
		height: 75%;
		width: 75%;
	}

	#linker {
		height: 75%;
		width: 75%;
	}

	h2.overlay-heading {
		top:2%;
		left: 50%;
		transform: translate(-50%,0%);
		width: 80%;
		max-width: 80%;
	}

	#next-button {
		right: 5px;
		width: 35px;
	}

	#previous-button {
		left: 5px;
		width: 35px;
	}

	#close-button {
		right: 5px;
		width: 35px;
		height: 35px;
	}
}
