@primary: #EF8403;
@primary-hover: darken(@primary, 20%);
@secondary: #fff;
@secondary-hover: #fff;
@font-color: #444;
@background: #fff;
@light-gray: #8c8c8c;
@very-light-gray: #f0f0f0;

@border-color: #ccc;
@border-radius: 2px;

* {
	outline: 0;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-weight: 300;
}
html,
body {
	width: 100%;
	height: 100%;
	font: 1rem 'Roboto', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
	line-height: 1.5;
	font-weight: 300;
	color: @font-color;
	background: @background;
	overflow-x: hidden;
	background: #f0f0f0;
}

a {
	text-decoration: none;
	color: @font-color;

	&:hover {
		color: @primary;
	}
}

strong {
	font-weight: 700;
}

.wrapper {
	width: 90%;
	margin: 0 auto;
}
header {
	padding: 0 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #fff;
	background: @primary;
	z-index: 9999;

	.brandbar {
		margin: 0 auto;
		align-items: center;
		display: flex;
		flex-flow: row wrap;
		width: 100%;

		.brand {
			display: block;
			text-align: right;
			flex: 0 0 112px;
			width: 112px;

			a {
				padding: 20px;
			}
		}
	}
	a {
		text-decoration: none;
		color: @secondary;

		&:hover {
			color: @secondary-hover;
		}
	}
	.searchbar {
		flex: 0 1 600px;
		max-width: 100%;
		z-index: 9999;
		margin: 8px 0;

		form {
			width: 100%;
			display: flex;
		}
	}

	nav ul {
		display: flex;
		list-style: none;

		a {
			display: block;
			padding: 20px 15px;
			border-bottom: 4px solid transparent;
			text-transform: uppercase;

			&:hover {
				color: @secondary-hover;
				border-color: @secondary;
			}
		}
	}
	&.frontpage .brandbar {
		flex: 0 1 600px;
		flex-direction: column;
	}
	&.frontpage .brandbar a {
		font-size: 2rem;
	}
	&.frontpage .brandbar .brand,
	&.frontpage .brandbar .searchbar {
		flex: 1 0 auto;
		margin: 30px 50px;
		width: auto;
	}
	&.frontpage .brandbar .searchbar {
		width: 100%;
	}
}
.omnibox {
	background: #fff;
	flex: 0 0 400px;
	box-shadow: 1px 0 4px rgba(0, 0, 0, .2);
	z-index: 5;
	display: flex;
	flex-direction: column;

	.omni-content {
		overflow-y: auto;
		flex: 1 0 auto;
	}
	.footer {
		padding: 8px 12px 8px 20px;
		border-top: 1px solid @very-light-gray;
		flex: 0 0;
		font-size: 13px;
		text-align: right;

		a {
			color: @font-color;
			padding: 4px 8px;
		}
	}
}
.searchbar {
	background: @primary;
	display: flex;
	flex: 0 0 64px;
	position: relative;
	box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.2);
		

	input {
		border: 0;
		border-radius: @border-radius 0 0 @border-radius;
		padding: 12px 12px;
		flex: auto;
		line-height: 24px;
		font-size: 15px;
		color: #444;
	}
	button.submit,
	button.reset {
		position: relative;
		padding: 12px 15px;
		color: #888;
		border: 0;
		background: #fff;
		border-radius: 0 @border-radius @border-radius 0;
		cursor: pointer;
		font-size: 1.1rem;
	}
	button.reset {
		transition: all .2s;
		border-radius: 0;

		&::after {
			content: '';
			position: absolute;
			top: 0;
			right: 0;
			left: 0;
			bottom: 0;
			margin: 10px 0;
			border-right: 1px solid @very-light-gray;
		}
		&.reset-hide {
			display: none;
		}
	}
	button:hover {
		color: @primary;
	}
	&.searchresults-open {
		#searchresults {
			text-align: left;
			display: block;

		    &:empty {
		    	display: none;
		    }
		}
		input {
			border-radius: @border-radius 0 0 0;
		}
		button {
			border-radius: 0 @border-radius 0 0;
		}
	}
}

.content-wrapper {
	position: relative;
	padding:  40px 142px 20px;
	display: flex;
	max-width: 1450px;

	&.frontpage {
		max-width: 600px;
		padding-left: 0;
		padding-right: 0;
		margin: 0 auto;
	}
}
.content {
	flex: 0 0 600px;
	max-width: 100%;
	z-index: 5;
}
.sidebar {
	flex: auto;
	max-width: 450px;
	padding-left: 15px;
	z-index: 1;

	.mainImg {
		width: 100%;
	}
}

.headline {
	padding-bottom: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid #d5d5d5;
}
#subheadline,
.subheadline {
	color: #666;
	padding: 15px 0 15px 145px;
	background: #fff;

	h3 {
		font-size: 1rem;
	}
}


.fact {
	padding: 10px 0;
	border-bottom: 1px solid @very-light-gray;
	line-height: 1.2;

	img {
		max-width: 100%;
	}
	p {
		margin: 8px 0;
	}
	.light {
		font-size: .8rem;
		display: block;
	}
	
	.topic {
		text-transform: uppercase;
		font-size: 13px;
		padding: 0 5px 4px 0;
		width: 30%;
		text-align: right;
	}
	.fact-content {
		display: flex;
		flex-flow: row wrap;
		align-items: baseline;

		.key,
		.value {
			width: 70%;
			padding: 2px 5px;
		}
		.key {
			width: 30%;
			text-align: right;
			color: @light-gray;
    		word-break: break-word;
		}
	}
	&:last-of-type {
		border: 0;
		padding-bottom: 0;
	}
	&.description {
		padding: 0 0 10px 0;
	}
	&.long-description {
		line-height: 1.4;
	}
}
.sidebar .fact .fact-content .key {
	width: 40%;
}
.sidebar .fact .fact-content .value {
	width: 60%;
}

.card {
	display: inline-block;
	width: 100%;
	max-width: 600px;
	margin: 5px 0;
	padding: 20px;
	background: #fff;
	box-shadow: 0 1px 3px 1px rgba(0, 0, 0, .1);
	overflow: hidden;
	border-radius: @border-radius;
	z-index: 3;

	h2,
	h3,
	h4 {
		color: @primary;
		text-transform: uppercase;

		.fa {
			font-size: .9rem;
			margin-right: 10px;
		}
	}
	.head {
		min-height: 40px;
		background: @primary;
		margin: -20px -20px 20px;

		h1,
		h2,
		h3,
		h4 {
			color: @secondary;
			padding: 20px 20px 10px;
		}
		img {
			max-width: 100%;
			display: inherit;
		}
	}
	&.card-primary {
		border-top: 4px solid @primary;
	}
}
#birthday {
	display: flex;
	flex-flow: row wrap;
	margin: 0 -5px;
}
#birthday .birthday-wrapper {
	flex: 1 0 150px;
	max-width: 50%;
}
#birthday a {
	display: block;
	padding: 5px;

	.card {
		word-break: break-word;
	}
}
.card-container {
	display: flex;
	justify-content: flex-start;
	flex-flow: row wrap;
	margin: 0 -10px;

	.card {
		width: 50%;
		margin-left: 4px;
		margin-right: 4px;
	}
}
.aliases {
	color: @light-gray;
	display: flex;
	flex-flow: row wrap;
	margin: 0 -4px;
	position: relative;
	max-height: 80px;
	transition: height .2s ease;
	overflow: hidden;

	.alias {
		padding: 0 4px;
		margin: 2px 0;

		&::after {
			content: ',';
		}
	}
	& p:last-child::after {
	    content: none;
	}
	&.expanded {
		padding-bottom: 40px;
		max-height: 500px;
		height: auto;
	}
	.more {
		position: absolute;
		left: 0;
		bottom: 0;
		right: 0;
		height: 40px;
		padding-top: 10px;
		line-height: 30px;
		text-align: center;
		color: @primary;
		background: linear-gradient(to top, rgba(255,255,255,1) 50%,rgba(255,255,255,0) 100%);
		z-index: 9999;
		cursor: pointer;
	}
}
.images-container {
	overflow: hidden;
	overflow-x: auto;
	margin: 0 -20px;
	padding-top: 10px;
	margin-bottom: 10px;

	.images {
		display: flex;
		flex: 0 0 auto;

		a {
			display: inherit;
			margin-right: 5px;
		}
		img {
			height: 140px;

		}
	}
}
.match-wrapper {
	width: 100%;
}
.match {

	h4 {
		font-size: 16px;
		display: block;
		text-transform: none;
		color: @font-color;
	}
	p {
		color: @font-color;
		font-size: 14px;
		color: @light-gray;
		display: block;
	}
	&:hover h4 {
		color: @primary;
	}
}
#searchresults {
	display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #dadada;
    border-radius: 0 0 @border-radius @border-radius;
	box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.15);
	overflow: hidden;

    .match {
    	position: relative;

    	a {
    		position: relative;
	    	display: block;
	    	padding: 10px 12px;
	    	font-size: 1rem;

	    	h4 {
	    		display: inline;
	    		text-transform: none;
	    	}
	    	p {
	    		display: inline;
	    		padding-left: 10px;
	    	}
	    	&:hover {
	    		background: #fafafa;
	    	}
	    }	    
		&::after {
			content: '';
			position: absolute;
			bottom: 0;
			left: 12px;
			right: 12px;
			height: 1px;
			border-bottom: 1px solid @very-light-gray;
		}
		&:last-of-type a::after {
			content: none;
		}
    }
    .searchcount {
    	text-align: right;

    	.result {
			color: @light-gray;
			font-size: 11px;
			padding: 4px 12px;

			&:hover {
				color: #444;
			}
		}
	}
}

.read-more {
	position: relative;
	text-align: center;
	border-top: 1px solid @border-color;
	margin-bottom: -12px;
	transition: all .2s;

	a {
		display: block;
		padding: 8px 0;
		color: @light-gray;

		&:hover {
			color: @primary;
		}
	}
	&::before {
		content: '';
		position: absolute;
		top: -40px;
		left: 0;
		right: 0;
		height: 39px;
		background: linear-gradient(to bottom, transparent, #fff);
	}
	&.active {


		&::before {
			content: none;
		}
	}
}
.timeline-container {
	width: 100%;
	height: auto;
	max-height: 200px;
	overflow: hidden;
	transition: all .2s;
	padding: 10px 0;

	.timeline-wrapper {
		display: flex;

		.timeline-time {
			align-items: flex-start;
			padding-right: 20px;
			color: @primary;
		}
		.timeline-series {
			flex: auto;

			.timeline-event {

				a {
					cursor: pointer;
					color: #444;

					&:hover,
					&.open {
						color: @primary;
					}
				}
			}
			.timeline-event-content {
				position: relative;

				img {
					margin-top: 5px;
					background: @primary;
					width: 300px;
					height: 200px;
					max-width: 100%;
				}
				p {
					color: #444;
					padding-bottom: 5px;
					margin-bottom: 5px;
					border-bottom: 1px solid @very-light-gray;
				}
			}
		}
		&:last-of-type .timeline-event-content p {
			border: 0;
		}
	}
	&.expanded {
		height: auto;
		max-height: inherit;
	}
}


@media (max-width: 800px) {
	header {
		padding: 10px;

		.brandbar {
			text-align: center;
			justify-content: center;
			width: 100%;
			max-width: 600px;
			margin: 0 auto;

			.brand,
			.searchbar {
				text-align: center;
				flex: 0 1 600px;
				max-width: 100%;
			}

			a {
				font-size: 1.2rem;
			}
		}
		&.frontpage .brandbar {
			.brand,
			.searchbar {
				margin: 20px 0 10px 0;
			}
		}
	}
	.content-wrapper {
		padding: 0;
		flex-flow: row wrap;
	}
	.content,
	.sidebar,
	.match-wrapper {
		flex: 0 1 600px;
		max-width: 100%;
		margin: 0;
		padding: 10px;
		margin: 0 auto;
	}
	.content {
		padding-bottom: 0;
	}
	.sidebar {
		padding-top: 0;
	}
}