/** ----------------------------------------------------------
 *
 * Contains the main layout of the page and the individual styles.
 * Acts as the main stylesheet for theme.
 *
 *
 *		1. MAIN LAYOUT
			- Content
			- Flex
			- Buttons
			- Forms
			- Other
 *		2. HEADER
 *			- Logo
 *			- Search Form
 *		3. Navigation
 *			- Primary Navigation
 *			- Secondary Navigation
 *			- Secondary Nav 2-5 Levels deep
 *		4. Footer
			- Content
		5. Pages
			- Page
			- Home Page
			- Search Page

 *
 * @author Cullen Wilson <cullen@logicstudio.nz>
 * ------------------------------------------------------- */

/* ----- 1. MAIN LAYOUT ----- */

	/* --- Content --- */

	html {
		background-color: #205391;
	}

	body {
		margin: 0;
		min-width: 240px;
		-webkit-text-size-adjust: none; /* The text size is not adjusted for Safari on iPhone */
		background-color: #fff;
	}

	.ie7 body,
	.ie8 body {
		min-width: 860px; /* media queries are not supported in ie7/8 without a polyfill */
	}

	.main-top {
		padding-top: 30px;
	}

	.main-bottom {
		padding-bottom: 30px;
	}

	.main {
		padding: 80px 0;
	}

	.container {
		width: 1440px;
		margin: 0 auto;
		position: relative;
		max-width: 100%;
	}

	.background {
		width: 100%;
		background-size: cover;
		background-position: center;
		background-repeat: no-repeat;
		background-attachment: fixed;
		z-index: -1;
	}

	.content {
		width: 100%;
		padding-bottom: 80px;
	}

	.background .content h1 {
		color: #fff;
	}

	/* --- Flex --- */

	.flex-container {
		max-width: 1440px;
		margin: 0 auto;
		display: flex;
		flex-flow: row wrap;
	}

	.flex-container.flex-column, .flex-column {
		flex-flow: column;
		display: flex;
	}

	.flex-row-reverse {
		flex-direction: row-reverse;
	}

	.flex-center {
		align-items: center;
		justify-content: center;
	}

	.flex-vertical-center {
		align-items: center;
	}

	.flex-between {
		justify-content: space-between;
	}

    .flex-even {
        justify-content: space-evenly;
    }

	.flex-vertical-center {
		align-items: center;
	}

	.parent-height {
		height: 100%;
	}

	.flex {
		display: flex;
	}

	.flex-wrap {
		flex-wrap: wrap;
	}

	.flex-end {
		margin-top: auto;
	}

	.flex-auto {
		flex: 0 0 auto;
	}

	.flex-shrink {
		flex: 0 1 auto;
	}

	.flex-full {
		flex: 1 0 100%;
	}

	.flex-item, .flex-item-1 {
		flex: 1 0 auto;
	}

	.flex-item-2 {
		flex: 0 0 50%;
	}

	.flex-item-3 {
		flex: 0 0 33.33%;
	}

	.flex-item-4 {
		flex: 0 0 25%;
	}

	.flex-item-5 {
		flex: 0 0 20%;
	}


	/* --- Buttons --- */

	.typography .btn-container a.btn-bg, .typography .btn-container a.btn-sm {
		display: inline-block;
		margin-right: 20px;
	}

	button.btn-bg, .typography a.btn-bg, input.action {
		width: 150px;
		text-align: center;
		color: #205391;
		display: block;
		height: 60px;
		padding: 0 30px;
		font-weight: 600;
		line-height: 60px;
		font-size: 22px;
		font-weight: bold;
		cursor: pointer;
		text-decoration: none;
		transition: 0.5s;
		font-style: normal;
		border-radius: 40px;
		background-color: #fff;
	}

	input.action {
		width: auto;
		margin-top: 20px;
	}

	button.btn-sm, a.btn-sm {
		width: 120px;
		box-sizing: border-box;
		text-align: center;
		color: #205391;
		height: 36px;
		display: block;
		font-weight: bold;
		line-height: 34px;
		font-size: 21px;
		font-weight: bold;
		font-style: normal;
		background-color: #fff;
		border: 1px solid #205391;
		cursor: pointer;
		text-decoration: none;
		transition: 0.5s;
	}

	.btn-sm:hover {
		background-color: #205391;
		border: 1px solid #fff;
		color: #fff;
		transition: 0.5s;
	}

	.btn-bg:hover, a.btn-bg:hover {
		box-shadow: 8px 8px 8px rgba(0,0,0,0.4);
		text-decoration: none;
	}

	/* --- Forms --- */

	form, fieldset {
		border: none;
		padding: 0;
	}

	input, textarea {
		border: 1px solid #23201f;
		padding: 8px 12px;
		width: 300px;
	}

	label {
		display: block;
		padding: 4px 0;
		font-size: 16px;
	}

	form span {
		font-size: 16px;
	}

	.checkbox label {
		float: left;
	}

    .success {
        text-align: center;
        background-color: #4BB543;
        border-radius: 4px;
        color: rgba(254,254,254,0.8);
        font-weight: bold;
        padding: 12px;
        margin: 12px 0;
        letter-spacing: 1.2px;
    }

	.typography input.checkbox {
		display: inline-block;
		width: 16px;
		height: 16px;
		vertical-align: bottom;
		margin-left: 20px;
	}

	.typography input.text {
		background-color: #837868;
		border-radius: 40px;
		height: 50px;
		color: #fff;
		border: none;
		padding: 12px 18px;
		box-sizing: border-box;
		font-size: 16px;
	}

	.typography textarea {
		background-color: #837868;
		border-radius: 20px;
		color: #fff;
		border: none;
		padding: 12px 18px;
		box-sizing: border-box;
		font-size: 16px;
	}

	.page-form {
		width: 400px;
		max-width: 100%;
		margin: 0 auto;
	}

	.page-form input, .page-form textarea {
		width: 100%;
	}

	.page-form input.action {
		font-size: 16px;
		height: 50px;
		line-height: 26px;
		box-sizing: border-box;
		padding: 12px 18px;
		background-color: #205391;
		color: #fff;
		border: 1px solid #205391;
	}

	.page-form input.action:hover {
		background-color: #fff;
		border: 1px solid #205391;
		color: #205391;
	}


	/* --- Other --- */

	.bg-image {
		background-size: cover;
		background-position: center center;
		background-repeat: no-repeat;
	}

	.bg-image.bg-contain, .bg-contain {
		background-size: contain;
	}

	.text-center {
		justify-content: center;
		text-align: center;
	}

	.pos-relative {
		position: relative;
	}

	.clear {
		clear: both;
	}

	.main ul li, .main ol li {
		position: relative;
		margin-left: 20px;
	}

	.main ul.optionset li:before {
		display: none;
	}

	.main ul.optionset li input {
		width: 50px;
	}

	.main ul.optionset li label {
		display: inline-block;
	}

	.optionset li, ul.optionset:after {
		clear: both;
	}

	.optionset li {
		height: 40px;
	}

    .social {
        font-size: 42px;
        margin-top: 20px;
    }

	/* Transitions */



/* ----- 2. HEADER ----- */

	/* -- Main -- */

	.header {
		background-color: #fff;
		height: auto;
	}

	.top-header {
		height: 210px
	}

	.top-header.scroll {
		height: 70px;
	}

	.menu-header {
		background-color: #205391;
		color: #fff;
	}

	.menu {
		height: 80px;
	}

	/* -- Logo -- */

	.header .logo {
		max-height: 200px;
		max-width: 240px;
	}

/* ----- 3. NAVIGATION ----- */

	/* --- Primary navigation --- */

	.header .primary {
		align-content: flex-end;
	}

	.header .primary ul {
		display: flex;
		list-style: none;
		height: 100%;
		margin: 0;
		padding: 0;
	}

	.header .primary li {
		white-space: nowrap; /* forces text to never wrap onto a second line */
		text-align: left;
		position: relative;
		padding-right: 50px;
	}

	.header .primary li:hover > ul {
		display: block;
	}

	.header .primary li a {
		color: #fff;
		font-size: 20px;
		font-weight: bold;
	    padding: 0 8px;
		display: block;
		height: 100%;
	}

	.header .primary li ul {
		position: absolute;
		top: 100%;
		left: 0px;
		display: none;
		box-sizing: border-box;
		background: #205391;
		text-align: left;
		min-width: 240px;
		white-space: nowrap;
		z-index: 99999;
		height: auto;
	}

	.header .primary li ul ul {
		left: 100%;
		top: 0;
	}

	.header .primary li a:hover {
	    text-decoration: underline;
	}

	.header .primary li li {
		padding: 10px 0;
	}

	.mobile-menu-close {
		position: absolute;
		top: 12px;
		right: 12px;
		color: #fff;
		cursor: pointer;
		display: none;
	}

	.mobile-menu-close:hover, .left-menu-item:hover > h5 {
		text-shadow: 8px 8px 16px rgba(0,0,0,0.4);
		transition: 0.5s;
	}

	/* Sidebar */

	.sidebar {
		float: right;
		width: 340px;
	}

	.typography .sidebar a {
		display: block;
		color: #fff;
		border-bottom: 1px solid #fff;
		text-decoration: none;
		padding: 10px 0;
	}

	.typography .sidebar h2 {
		color: #fff;
		padding-bottom: 30px;
	}

	.typography .sidebar a:hover {
		text-decoration: none;
	}

	.sidebar-content {
		background-color: #205391;
		color: #fff;
		margin-top: 20px;
		padding: 40px;
	}

	/* Search form */

	.search-icon {
		float: right;
		cursor: pointer;
		height: 40px;
		margin: 40px 0;
		line-height: 40px;
		color: #205391;
		position: relative;
	}

	.search-icon h5 {
		margin: 0;
	}

	.search-bar {
		margin: 0;
		padding: 0;
		width: 100%;
		height: 60px;
		background-color: rgba(158,157,157,0.8);
		opacity: 0.8;
		position: relative;
	}

	.search-bar form, .search-bar fieldset, .search-bar .field, .search-bar .middleColumn {
		height: inherit;
		margin: 0;
	}

	.search-bar label {
		display: none;
	}

	.search-bar .field {
		margin: 0;
		padding: 0;
	}

	.search-bar form input.text {
		width: calc(100% - 50px);
		color: #fff;
		height: 100%;
		box-sizing: border-box;
		margin: 0;
		border: none;
		font-size: 28px;
		background: transparent;
		padding: 0 0 0 20px;
	}

	.search-bar form input.action { /* positions the search button icon over the top of the search input */
		font-size: 14px;
		position: absolute;
		right: 0;
		top: 0;
		width: 50px;
		height: 100%;
		cursor: pointer;
		border: none;
		line-height: 40px;
		background: none;
		color: #205391;
		border-radius: 0;
		margin: 0;
		padding: 0;
		text-indent: -9999px;
	}

	.search-bar form .field:before {
		content: "\f002";
		font-family: 'FontAwesome';
		position: absolute;
		right: 20px;
		line-height: 60px;
		text-align: center;
		font-size: 32px;
		color:#205391;
	}

	.search-bar form input.active,
	.search-bar form input.action:hover {
		color: #fff;
	}
	.search-bar form input:focus,
	.header textarea:focus {
		outline: none; /* removes default browser outlining on focus */
	}
	.search-dropdown-icon {
		display: none; /* hides search-dropdown-icon when site is at full width - media queries set it to display:block when at mobile/tablet width */
	}



	/* --- Secondary navigation --- */
	.main .secondary {
		margin-bottom: 40px;
	}
	.main .secondary ul {
		padding: 0;
		margin: 0;
		list-style: none;
	}
	.main .secondary li {
		border-top: 1px solid #f0f0f0;
		position: relative;
		list-style-type: none;
		margin-bottom: 0;
	}
		.main .secondary li .arrow {
			padding-right: 5px;
			display: block;
			font-size: 15px;
			line-height: 20px;
			position: absolute;
			left: 2px;
			top: 7px;
			-moz-transition: 0.2s; /* this transition moves the arrow from left:2px to left:6px */
			-webkit-transition: 0.2s;
			transition: 0.2s;
		}
	.main .secondary li a:hover .arrow {
		left: 6px; /* this sets the final position for the arrow transition */
	}
	.main .secondary li a { /* side nav link styling */
		padding: 10px 0;
		display: block;
		border-bottom: none;
		text-decoration: none;
		font-style: normal;
	}

	.main .secondary li:hover > a span {
		color: #23201f;
	}

	.main .secondary li .text {
		padding-left: 28px;
		display: block;
	}
	.main .secondary li.current a.current {
		color: #23201f;
	}


	/* --- Secondary navigation 2-5 levels deep --- */

	.main .secondary ul ul {
		display: none;
	}
	.secondary ul li.current ul,
	.secondary ul li.section ul { /* Only show child pages from selected parent */
		display: block;
	}
	.secondary li.current ul ul {
		display: none;
	}
	.main .secondary ul ul li a { padding-left: 10px; } /* Indent all sidebar navigation levels*/
		.main .secondary ul ul li a .arrow { left: 12px; }
		.main .secondary ul ul li a:hover .arrow { left: 16px; }

	.main .secondary ul ul ul li a { padding-left: 20px; }
		.main .secondary ul ul ul li a .arrow { left: 22px; }
		.main .secondary ul ul ul li a:hover .arrow { left: 26px; }

	.main .secondary ul ul ul ul li a { padding-left: 30px; }
		.main .secondary ul ul ul ul li a .arrow { left: 32px; }
		.main .secondary ul ul ul ul li a:hover .arrow { left: 36px; }

	.main .secondary ul ul ul ul ul li a { padding-left: 40px; }
		.main .secondary ul ul ul ul ul li a .arrow { left: 32px; }
		.main .secondary ul ul ul ul ul li a:hover .arrow { left: 36px; }

	.main .secondary li a:hover,
	.main .secondary li.section a:hover,
	.main .secondary li.current a:hover {
		color: #b80000;
	}


/* ----- 4. FOOTER ----- */

	/* --- Content --- */
	.footer {
		background-color: #205391;
	}

	.footer .logo {
		max-height: 120px;
	}

	.footer img {
		max-width: 100%;
	}

	.footer-logos img {
		width: 200px;
		margin: 20px 0;
	}

	.footer, .footer.typography a, .footer .h6 {
		color: #fff;
		font-style: normal;
	}

	.footer-menu ul {
		columns: 2;
	}

	.footer-menu li a {
		border: none;
		font-style: normal;
	}

	.footer-menu li:hover > a {
		color: #ff0824;
	}

	.footer-item {
		flex: 0 0 340px;
		height: 400px;
		padding: 60px 0;
		box-sizing: border-box;
		align-items: start;
	}

	.footer-item .fa {
		font-size: 60px;
		padding-right: 20px;
		width: 60px;
	}

	.copyright {
		margin-top: auto;
	}

/* ----- 4. Pages ----- */

	/* --- Page --- */

	.main-content {
		margin-bottom: 40px;
	}

	.main-content, .main-form {
		background-color: #fff;
		padding: 40px;
	}

	.icon-links {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		color: rgba(255, 255, 255, 0.9);
		font-weight: bold;
		font-size: 24px;
		letter-spacing: 1px;
	}

	.icon-link {
		height: 180px;
		width: 25%;
		min-width: 220px;
		background-color: #fff;
		display: flex;
		flex-direction: column;
		margin: 0;
		align-items: center;
		justify-content: space-evenly;
		position: relative;
		text-align: center;
	}

	.icon-link:nth-child(1n+0) {
		background-color: #6184B0;
	}

	.icon-link:nth-child(2n+0) {
		background-color: #406898;
	}

	.icon-link:nth-child(3n+0) {
		background-color: #27558F;
	}

	.icon-link:nth-child(4n+0) {
		background-color: #194171;
	}

	.icon-link .fa {
		font-size: 60px;
		color: #fff;
		opacity: 0.9;
	}

	.absolute-cover {
		position: absolute;
		top: 0;
		left: 0;
		height: 100%;
		width: 100%;
		z-index: 9;
	}


	/* --- Home Page --- */

	.HomePage .content {
		max-width: 1000px;
		margin: 0 auto;
	}

	.HomePage .btn-container {
		margin-top: 20px;
	}

	.HomePage .btn-container .btn-bg {
		margin-top: 20px;
	}

	.HomePage .loggedin-content h1 {
		font-weight: 200;
	}

	.page-sections {
		width: calc(100% - 360px);
		float: left;
	}

	.page-section {
		background-color: #fff;
		position: relative;
		padding: 40px;
		margin-bottom: 20px;
	}

	.page-section h2 {
		padding-bottom: 30px;
	}

	.page-section .date {
		margin-top: auto;
		padding: 10px 0;
	}

	.section-link {
		position: absolute;
		top: 40px;
		right: 40px;
	}

	.event {
		background-color: #EFEFF0;
		padding: 20px;
		box-sizing: border-box;
		flex: 0 0 32%;
		position: relative;
		transition: 0.5s;
	}

	.event:hover {
		box-shadow: 8px 8px 16px rgba(0,0,0,0.4);
	}

	.event:hover > a {
		border-bottom: none;
	}

	.event .fa {
		color: #205391;
		font-size: 80px;
		padding-bottom: 20px;
	}

	.event a {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}

	.news .news-image {
		height: 200px;
		flex: 0 0 240px;
		margin-right: 20px;
	}

	.news-summary {
		box-sizing: border-box;
	}

	.news {
		margin: 10px 0;
		font-size: 16px;
	}

	.news-items .news {
		border-bottom: 1px solid #EFEFF0;
    	padding: 6px;
	}

	.news-image {
		position: relative;
	}

	.news-image a {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
	}

	.pagination {
		text-align: center;
	}

	.post-image {
		text-align: center;
	}

	/* --- Search Page --- */

	#SearchResults li {
		list-style-type: none;
		border-bottom: 1px solid #EFEFF0;
		padding: 22px 6px;
	}

	#SearchResults a.readMoreLink {
		font-size: 14px;
	}

	#SearchResults h4 a {
		text-decoration: underline;
	}

	.typography #SearchResults p {
		font-size: 18px;
	}
