/* Base CSS document for website */
/* https://www.oakharborwebdesigns.com/blog/articles/how-to-build-a-responsive-mobile-first-website-from-scratch */

@import url(https://fonts.googleapis.com/css?family=Tangerine);

/* CSS Variables https://www.w3schools.com/css/css3_variables.asp */
:root {
	--mainBGColor: #282828;
	--secondaryBGColor: #363636;
	--tertiaryBGColor: #0d6efd;

	--headerHt: 80px;
	--footerButtonsHt: 40px;

	--mainWidth: 800px;
	--sidebarWidth: 50%;
}

html {
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: var(--mainBGColor);
	font-family: arial;
	font-size: calc(15px + 0.390625vw);
	color: whitesmoke;
}

/* https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning */
header {
	width: 100%;
	max-height: var(--headerHt);
	margin: 0;
	top: 0px;
	padding-left: 20px;
/*	background-color: var(--tertiaryBGColor); */
	background-image: linear-gradient(to right,#151555, var(--tertiaryBGColor), #151555);
	position: fixed;
	z-index: 4;
	transition: top 0.2s ease-in-out;
}

header h2 {
	position: relative;
	font-family: 'Tangerine', cursive;
	font-size: 52px;
	text-shadow: 2px 2px 3px #000;
	bottom: 30px;
}

main {
	margin: auto;
	position: sticky;
	padding: 0px 10px;
	padding-top: var(--headerHt);
	padding-bottom: var(--footerButtonsHt);
	background-color: var(--secondaryBGColor);
	max-width: var(--mainWidth);
	z-index: 2;
}

footer {
	width: 100%;
	max-height: var(--footerButtonsHt);
	margin: 0;
	bottom: 0px;
	padding: 0;
	background-image: linear-gradient(to right, #151555, var(--tertiaryBGColor), #151555);
	position: fixed;
	z-index: 4;
	transition: bottom 0.2s ease-in-out;
}

/* classes to 'hide' the header and (mobile) footer, resp. */
.nav-up { 
	top: calc(-1*var(--headerHt));
}

.nav-down { 
	bottom: calc(-1*var(--footerButtonsHt));
}


/* styling for footer menu (only visible in mobile mode) */
.menu-flex {
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-evenly;
	margin: 0;
	padding: 0 10px;
	border: 0 none;
	list-style: none;
	text-align: center;
}

.menu-flex li {
	flex: 0 0 auto;
	margin: auto 0;
}

.menu-flex a {
	display: block;
	padding: 0;
}

.menu-flex button {
	display: block;
	max-height: 30px;
	padding: 0;
	border: none;
	background: transparent;
	/* for actual svg drawing in code, rather than pre-made image */
	font-size: 1.6em;
	color: white;
	transition: transform 0.2s ease-in-out;
}

/*
.menu-flex button:hover {
	color: var(--mainBGColor);
	background-color: white;
}
*/

.menu-flex button:active {transform: translateY(2px);}


/* Sidebar should be hidden in mobile, until menu-flex button is pressed
In desktop mode it should be visible but not overlap text and have low opacity until hovered over */
.sidebar {
	width: var(--sidebarWidth);
	height: 100%/*calc(100vh+(-1*var(--footerButtonsHt))+(-1*var(--headerHt)))*/;
	margin: 0;
	top: var(--headerHt);
	padding: 0;
	background: var(--mainBGColor);
/*	background: var(--tertiaryBGColor);*/
/*	background-image: linear-gradient(to right, var(--tertiaryBGColor), #353575);*/
	opacity: 1;
	position: fixed;
	z-index: 4;
	transition: left 0.2s ease-in-out;
}

.sidebar-flex {
	display: flex;
	flex-flow: column nowrap;
	justify-content: space-evenly;
	margin: 0;
	padding: 10px 0;
	border: 0 none;
	list-style: none;
	text-align: center;
}

.sidebar-flex li {
	flex: 0 0 auto;
	margin: auto 0;
}

.sidebar-flex a {
	display: block;
	padding: 15px 0;
	text-decoration: none;
	font-size: 125%;
	color: whitesmoke;
}

.sidebar-close {
	position: absolute;
	top: -10px;
	right: 10px;
	font-size: 150%;
}

.hidden {
	left: calc(-1*var(--sidebarWidth));
}

.visible {
	left: 0px;
	opacity: 1;
}


/* styling for links */
a {
	color: #0d9efd;
	text-decoration: none;
}

a:hover{ text-decoration: underline;}


/* styling for listing of stories */

.stories div {
	font-size: 0.9rem;
	padding: 5px 0px 5px 10px;
	border-radius: 15px;
	z-index: 0;
	transition: all 2s ease-in-out;
}

.stories h4 {font-size: 1.1rem;}

.stories div:nth-of-type(odd) {background: #555;}

.stories div:nth-of-type(even) {background: #464646;}


/*Styling for accordion on stories info */
.stories details summary {
	padding: 0 0 15px 15px;
	cursor: pointer;
}

.stories details summary::after {
	font-weight: bold;
	background-color: var(--tertiaryBGColor);
	border-radius: 10px;
	box-shadow: 2px 3px 4px rgba(0,0,0,0.5);
	padding: 5px 10px;
	width: 100%;
	content: "More info...";
}

.stories details[open] summary::after {
	content: "Less";
}



.stories p {
	padding-left: 15px;
}

.rollUp {
	height: 5px;
	opacity: 0;
	z-index: -1;
}


/* Sidebar should be hidden in mobile, until menu-flex button is pressed
In desktop mode it should be visible but not overlap text and have low opacity until hovered over */
@media screen and (min-width: 900px) {
	:root {
		--sidebarWidth: calc(48vw - (var(--mainWidth)/2));
	}

	footer {
		display: none;
	}

	.sidebar {
		opacity: 0.5;
		z-index: 1;
		transition: opacity font-size 0.2s ease-in-out;
	}

	.sidebar:hover {
		opacity: 1;
	}

	.sidebar li:hover {
		font-size: 110%;
	}

	.hidden {
		left: 0px
	}

	.visible {
		opacity: 0.5;
	}

	.sidebar-close {
		left: -10px;
		opacity: 0;
	}
}
