/*
Theme Name: News Center 2017
Author: Chris Klimas
*/

* {
	box-sizing: border-box;
}

body {
	padding: 0;
	margin: 0;
	color: hsl(0, 0%, 10%);
	background: white;
	background-size: 100%;
	background-attachment: fixed;
	background-repeat: no-repeat;

	font-family: "Franklin Gothic Book", sans-serif;
}

input, button, select {
	font: 100% "Franklin Gothic Book", sans-serif;
	border: none;
	color: #333;
	background: hsl(0, 0%, 90%);
	padding: 6px 12px;
	height: 44px;
	border-radius: 2px;
}

input, button {
	-webkit-appearance: none;
}

button {
	background: hsl(0, 0%, 80%);
}

a {
	color: #007698;
	text-decoration: none;
	padding: 6px 8px;
}

a:hover {
	text-decoration: underline;
}

h1, h2, h3 {
	font-family: "Proxima Nova", sans-serif;
	font-weight: bold;
}

h1 {
	font-size: 36px;
	text-transform: none;
}

h2 {
	font-size: 32px;
}

h3 {
	font-size: 22px;
}
p, ul li {
	line-height:1.5;
}

.hidden {
	display: none;
}

.input-group {
	display: flex;
}

.input-group * {
	margin: 0;
}

.input-group *:last-child {
	border-left: none;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.small-only, .small-only-inline, .small-only-fixed {
	display: none;
}

.screen-reader-only {
	position: absolute;
	left: -10000px; 
	top: auto; 
	width: 1px; 
	height: 1px; 
	overflow: hidden;
}

.skip-to-main {
    border: none;
    display: block;
    font-weight: 600;
    height: 0;
    left: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    position: fixed;
    text-decoration: none;
    top: 0;
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    transition: none;
    z-index: 0;
}
a.skip-to-main:focus {
    color: #2c2a29;
    background: #fafafa;
    padding: 0.5rem;
    margin: 0.25rem;
    position: absolute;
    z-index: 1000;
    height: auto;
}
/* Needed for polyfilling purposes. */

.sticky {
	position: sticky;
}

/* Top header */

header.top {
	background: #5d87a1 url('images/abstract-header.jpg');
	background-size: cover;
	background-position: 50% 0;
	background-repeat: no-repeat;
	height: 16vh;
	min-height: 150px;
	position: relative;
}

header.top .logo {
	position: absolute;
	top: 0;
	right: 0;
}

header.top h1 {
	position: absolute;
	bottom: 0;
	left: 26px;
	font-size: calc(72px + 2vh);
	margin: 0;
}

header.top h1 a {
	color: white;
}

header.top h1 a:hover {
	text-shadow: 0 0 20px hsla(0, 0%, 100%, 0.3);
	text-decoration: none;
}

/* Fixed sidebar */

nav.side {
	float: left;
	width: 250px;
	padding: 13px 26px 26px 26px;
	top: 0;
	text-align: right;
	font-size: 90%;
}

nav.side a {
	color: #333333; padding:14px 5px;
}

nav.side a:hover {
	color: #5d87a1;
}

nav.side h3 {
	color: hsl(0, 0%, 70%);
	margin-bottom: 12px;
	margin-top: 50px;
	font-size: 16px;
	border-bottom: 1px solid hsl(0, 0%, 90%);
	font-weight: normal;
}

nav.side input[type="search"] {
	border-top-left-radius: 18px;
	border-bottom-left-radius: 18px;
}

nav.side button[type="submit"] {
	width: 35px;
	text-align: center;
	padding: 2px 18px 0 0;
	border-top-right-radius: 18px;
	border-bottom-right-radius: 18px;
}

nav.side select {
	width: 100%;
}

nav.side .input-group input[type="search"] {
	flex-grow: 1;
}

nav.side .input-group {
	justify-content: flex-end;
}

nav.side > *:first-child {
	margin-top: 0;
}

nav.side > *:last-child {
	margin-bottom: 0;
}

nav.side ul {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
	margin-bottom: 10px;
}

nav.side li {
	margin-bottom: 15px;
}

nav.side li ul {
	margin-top: 10px;
}

nav.side ul.social-media li {
	display: inline;
}

nav.side ul.social-media li:last-child {
	padding-right: 0;
}

nav.side img.logo {
	width: 100%;
	height: auto;
}

nav.side .social-media img {
	width: auto;
	height: 2rem;
}

/* Main content */

.main {
	margin-left: 250px;
	padding: 26px;
}

.main h1 {
	margin-top: 0;
}

/* Front page top content. */

.front-page .top-stories .post-block {
	width: 100%;
	position: relative;
	margin-bottom: 0;
	background-size: cover;
}

.front-page .top-stories .post-block .text {
	padding: 10px;
}

.front-page .top-stories .post-block h2 {
	font-size: 24px;
}

.front-page .top-stories .excerpt {
	display: none;
}

.front-page .top-stories .primary {
	margin-bottom: 26px;	
}

.front-page .top-stories .primary .post-block {
	height: 26vw;
	display: flex;
}

.front-page .top-stories .thumbnail {
	flex-grow: 1;
	flex-shrink: 1;
}

.front-page .top-stories .primary .text {
	width: 25em;
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: auto;
}

.front-page .top-stories .secondary {
	display: flex;
	margin-bottom: 26px;
}

.front-page .top-stories .secondary .post-block {
	flex-grow: 1;
	flex-shrink: 1;
	width: 50%;
	height: auto;
	margin-left: 13px;
	margin-bottom: 0;
}

.front-page .top-stories .secondary .post-block:first-child {
	margin-left: 0;
	margin-right: 12px;
}

/* Single post pages */

.main.single-post {
	max-width: 65rem;
}

.single-post h1 {
	margin-top: 0;
}

.single-post h2 {
	font-weight: normal;
	font-size: 1.5rem;
	color: #000000;
}

.single-post img.featured {
	width: 100%;
	height: auto;
}

.single-post h2 {
	margin: 26px 0;
}

.single-post .top.featured-portrait {
	display: flex;
	align-items: center;
}

.single-post .top.featured-portrait img {
	height: 200px;
	width: auto;
	margin-right: 10px;
}

.single-post .slug {
	font-size: 90%;
}

.single-post p {
	line-height: 1.5;
}

.single-post aside {
	clear: right;
	float: right;
	width: 18rem;
	margin: 0 0 10px 10px;
}

.single-post aside.featured-image img {
	max-width: 100%;
}

.single-post aside.gallery {
	margin-bottom: 0;
}

.single-post .gallery ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.single-post .gallery li {
	display: block;
	float: left;
	width: calc((100% - 10px) / 2);
	margin-bottom: 10px;
}

.single-post .gallery li:nth-child(odd) {
	margin-right: 10px;
}

.single-post .gallery li:only-child {
	width: 100%;
}

.single-post .gallery img {
	width: 100%;
	height: auto;
}

.single-post aside h3, .single-post aside.share h2  {
	text-transform: uppercase;
	font-size: 18px;
	margin-top: 0;
	color: #000000;
}

.single-post aside.share, .single-post aside.media-mentions {
	text-align: center;
	padding: 10px;
	background: #f9f9f9;
}

.single-post aside.media-mentions ul {
	text-align: left;
}

.single-post aside ul.social-media {
	list-style: none;
	padding: 0;
	margin: 0;
}

.single-post aside ul.social-media li {
	display: inline;
	margin-right: 10px;
}

.single-post aside ul.social-media img {
	height: 40px;
	width: auto;
}

/* Related posts at the bottom of single posts */

.stories.related {
	display: flex;
}

.stories.related .post-block {
	flex-grow: 1;
	max-width: calc((100% - 52px) / 3);
	height: auto;
	margin-right: 26px;
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
}

.stories.related .post-block:last-child {
	margin-right: 0;
}

.stories.related .post-block .thumbnail {
	height: 11vw;
	overflow: hidden;
}

.stories.related .post-block.thumbnail-portrait .thumbnail {
	float: none;
	text-align: center;
	background: hsl(0, 0%, 80%);
}

.stories.related .post-block .excerpt {
	display: none;
}

/* Donation buttons at the bottom of single posts */

button.donation {
	color: black;
	background: transparent;
	cursor: pointer;
	display: flex;
	width: 100%;
	height: auto;
	flex-direction: row;
	align-items: stretch;
	padding: 0;
}

button.donation h3, button.donation p {
	margin: 0;
}

button.donation h3 {
	color: white;
	border-top-left-radius: 2rem;
	border-bottom-left-radius: 2rem;
	background: black;
	padding: 10px 1rem;
	flex-shrink: 0;
	transition: 0.2s background;
	display: flex;
	align-items: center;
	font-weight: normal;
	font-size: 18px;
}

button.donation:hover h3 {
	background: #C8102E;
}

button.donation p {
	padding: 10px;
	background: #ffcd00;
	flex-grow: 1;
	text-align: left;
}

/* Post blocks -- stories as shown in a list. */

.post-blocks {
	margin-top: 26px;
}

.gutter-sizer {
	width: 26px;
}

.post-block {
	margin-bottom: 26px;
	width: calc((100% - 52px) / 3);
	height: 26em;
	overflow: hidden;
	background: #f9f9f9;
}

.post-block.thumbnail-portrait {
	width: calc((2 * (100% - 52px) / 3) + 26px);
	height: calc(13em - 13px);
}

.post-block .thumbnail {
	margin-bottom: 10px;
}

.post-block .thumbnail img {
	width: 100%;
	height: auto;
}

.post-block.thumbnail-portrait .thumbnail {
	float: left;
	padding-right: 10px;
	margin-bottom: 0;
	height: 100%;
}

.post-block.thumbnail-portrait .thumbnail img {
	height: 100%;
	width: auto;
}

.post-block .text {
	padding: 0 10px 10px 10px;
}

.post-block.thumbnail-portrait .text {
	padding-top: 10px;
}

.post-block h2 {
	font-size: 18px;
	line-height: 120%;
	margin: 0;
	text-transform: none;
}

.post-block .date {
	font-size: 90%;
	color:#737373;
}

.post-block .excerpt {
	font-size: 90%;
}

.post-block .excerpt p:last-child {
	margin-bottom: 0;
}

/* Tags listed at the end of a single post page. */

.post-tags a {
	display: inline-block;
	background-color: #f9f9f9;
	padding: 5px 10px;
	margin: 5px;
}

/* Mobile view */

@media (max-width: 750px) {
	body {
		padding-bottom: 100px;
	}

	.normal-only {
		display: none;
	}

	.small-only {
		display: block;
	}

	.small-only-inline {
		display: inline;
	}

	header.top {
		background: hsla(203, 27%, 50%, 0.9);
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: 60px;
		min-height: 60px;
		z-index: 10;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	header.top .logo {
		position: static;
		padding: 10px;
		flex-shrink: 1;
	}

	header.top .logo img {
		height: 55px;
		width: auto;
	}

	header.top h1 {
		position: static;
		margin: 10px;
		font-size: 18px;
		text-transform: uppercase;
		font-weight: normal;
		flex-shrink: 0;
	}

	nav.side {
		padding: 0;
	}

	nav.side > * {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 3rem;
		z-index: 99;
		padding: 10px;
		background: white;
		border-top: 1px solid hsl(0, 0%, 90%);
		transform: translateY(100%);
		transition: 0.25s transform ease-out;
		padding: 10px;
		text-align: center;
	}

	nav.side > .active {
		transform: none;
	}

	nav.side p, nav.side ul, nav.side li:last-child {
		margin: 0;
	}

	nav.side .links a {
		display: block;
	}

	nav.side p + p {
		margin-top: 10px;
	}

	ul.small-tabs {
		position: fixed;
		z-index: 100;
		bottom: 0;
		left: 0;
		right: 0;
		height: 3rem;
		background: white;
		border-top: 1px solid hsl(0, 0%, 90%);
		list-style-type: none;
		display: flex;
		margin: 0;
		padding: 0;
	}

	ul.small-tabs li {
		width: 25%;
		flex-grow: 1;
		display: flex;
		align-items: stretch;
	}

	ul.small-tabs button {
		background: white;
		text-align: center;
		font: 13px "Proxima Nova", sans-serif;
		text-transform: uppercase;
		height: 3rem;
		flex-grow: 1;
		border-radius: 0;
		margin: 0;
		outline: 0;
	}
	
	ul.small-tabs button.active {
		background: hsl(0, 0%, 95%);
		color: #5d87a1;
	}

	div.main {
		margin-top: 60px;
		margin-left: 0;
		padding: 0;
	}

	div.main.list > h1 {
		padding: 13px 10px 0 10px;
		font-size:28px;
	}

	.post-blocks {
		position: static !important; /* Masonry plugin assigns position: relative to this element directly */
	}

	.post-block {
		background: none;
		flex-direction: column;
		position: static !important; /* Masonry plugin assigns position: absolute to elements directly */
		width: auto;
		height: auto;
		margin-bottom: 26px;
	}

	.post-block h2 {
		margin-top: 2px;
		font-size: 24px;
	}

	.post-block .thumbnail {
		margin-bottom: 0;
	}

	.post-block .text {
		padding: 10px;
	}

	.post-block.thumbnail-portrait {
		width: auto;
		height: auto;
		display: flex;
		flex-direction: row;
	}

	.post-block.thumbnail-portrait .thumbnail img {
		width: 33vw;
		height: auto;
	}

	.post-block.thumbnail-portrait .text {
		padding-top: 0;
	}

	.front-page .top-stories .excerpt {
		display: block;
	}

	.front-page .top-stories .primary {
		margin-bottom: 0;
	}

	.front-page .top-stories .primary .post-block {
		height: auto;
		margin-bottom: 26px;
	}

	.front-page .top-stories .primary .post-block .text {
		width: auto;
	}

	.front-page .top-stories .secondary {
		display: block;
	}

	.front-page .top-stories .secondary .post-block {
		width: auto;
		margin-left: 0;
		margin-bottom: 26px;
	}

	.front-page .top-stories .secondary .post-block:first-child {
		margin-right: 0;
	}

	.main.single-post {
		padding: 13px;
	}

	.single-post p {
		font-size: 90%;
	}

	.single-post h1 {
		font-size: 30px;
	}

	.single-post aside {
		width: 40vw;
	}

	.single-post .gallery li {
		width: 40vw;
		margin: 0;
		float: none;
		line-height: 0; /* http://stackoverflow.com/questions/6584004/remove-extra-space-at-bottom-of-html-list-item#6584455 */
	}

	.single-post .gallery li:nth-child(odd) {
		margin-right: 0;
	}

	.single-post .gallery img {
		margin-bottom: 10px;
	}

	aside.share ul.social-media li {
		display: block;
		margin: 0 0 10px 0;
		text-align: center;
	}

	.stories.related {
		flex-direction: column;
	}

	.stories.related .post-block {
		width: auto;
		max-width: none;
		margin: 0;
	}

	.stories.related .post-block .thumbnail {
		height: auto;
	}

	.stories.related .post-block .text {
		padding-left: 0;
		padding-right: 0;
	}

	.stories.related .post-block h2 {
		font-size: 18px;
	}

	.post-block .date {
		margin: 0.25rem 0;
	}

	.post-tags {
		text-align: center;
		margin-top: 0;
	}

	.post-tags i {
		display: block;
	}
	
	button.donation {
		flex-direction: column;
	}

	button.donation h3 {
		border-top-left-radius: 1rem;
		border-bottom-left-radius: 0;
		border-top-right-radius: 1rem;
	}

	button.donation p {
		border-bottom-left-radius: 1rem;
		border-bottom-right-radius: 1rem;
		padding-left: 1rem;
		padding-right: 1rem;
	}
}
.pagination .page-numbers {
    margin-right: 1rem;
    padding: 0.5rem;
}
/* Local fonts because of CORS restrictions. */

@font-face {
	font-family: 'Proxima Nova';
	src: url('fonts/ProximaNova-Reg-webfont.eot');
	src: url('fonts/ProximaNova-Reg-webfont.eot?#iefix') format('embedded-opentype'),
	 url('fonts/ProximaNova-Reg-webfont.woff') format('woff'),
	 url('fonts/ProximaNova-Reg-webfont.ttf') format('truetype'),
	 url('fonts/ProximaNova-Reg-webfont.svg#ProximaNova') format('svg');
}

@font-face {
	font-family: 'Franklin Gothic Book';
	src: url('fonts/FranklinGothic-Book-webfont.eot');
	src: local('Franklin Gothic Book'),
	 url('fonts/FranklinGothic-Book-webfont.eot?#iefix') format('embedded-opentype'), 
	 url('fonts/FranklinGothic-Book-webfont.woff') format('woff'),
	 url('fonts/FranklinGothic-Book-webfont.ttf') format('truetype'),
	 url('fonts/FranklinGothic-Book-webfont.svg#FranklinGothicBook') format('svg');
}

@font-face {
	font-family: 'Franklin Gothic Book';
	font-weight: normal;
	font-style: italic;
	src: url('fonts/FranklinGothic-BookIt-webfont.eot');
	src: local('Franklin Gothic Book Italic'),
	 url('fonts/FranklinGothic-BookIt-webfont.eot?#iefix') format('embedded-opentype'),
	 url('fonts/FranklinGothic-BookIt-webfont.woff') format('woff'),
	 url('fonts/FranklinGothic-BookIt-webfont.ttf') format('truetype'),
	 url('fonts/FranklinGothic-BookIt-webfont.svg#FranklinGothicBook') format('svg');
}

@font-face {
	font-family: 'Franklin Gothic Book';
	font-weight: bold;
	font-style: normal;
	src: url('fonts/FranklinGothic-Med-webfont.eot');
	src: 
	 url('fonts/FranklinGothic-Med-webfont.eot?#iefix') format('embedded-opentype'),
	 url('fonts/FranklinGothic-Med-webfont.woff') format('woff'),
	 url('fonts/FranklinGothic-Med-webfont.ttf') format('truetype'),
	 url('fonts/FranklinGothic-Med-webfont.svg#FranklinGothicBook') format('svg');
}
