/* reset styles based on https://www.joshwcomeau.com/css/custom-css-reset/ */

*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html, body {
  height: 100%;
}
body {
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}



/* klamath dam project styles */

html {
    /* set a base font size that grows proportionally as the screen widens. 
    this controls all font sizes except the main <h1> and <h2> for the article title and subhed. */
    font-size: calc(15px + 0.390625vw);
}

body {
	xxxxbackground: rgb(243,223,193);
	xxxxbackground: linear-gradient(135deg, rgba(243,223,193,1) 0%, rgba(221,190,168,1) 100%); 
	background: url("assets/shrubs-mobile_600x1500.png") repeat-y #f3dfc1;
	color: #160f29;
	font-family: 'Lato', sans-serif;
}

header {
	padding: .5rem 5%;
}

.voa-logo {
	background-color: rgba(243,223,193, .65);
}

.voa-logo img {
	height: auto;
	width: 80px;
}

.intro {
	position: relative;
	border-color: #7b916c;
	border-style: solid;
	border-width: .25rem 0;
}

.title-wrap {
	position: absolute;
	bottom: 0;
	left: 5%;
	z-index: 100;
}

.intro-video-wrap {
	background: #7b916c;
	position: relative;
	z-index: 50;
}

video.intro-video {
	height: auto;
	width: 100%;
}

.title-wrap h1 {
	background: #160f29;
	color: #f3dfc1;
	display: inline-block;
	font-family: 'Rubik Distressed', sans-serif;
	font-size: 1.5rem;
	font-weight: 400;
	margin: 0 auto .15rem auto;
	max-width: 100%;
	overflow-wrap: normal;
	padding: 0 .25rem;
}

.title-wrap h2 {
	background: #160f29;
	color: #f3dfc1;
	display: inline-block;
	font-size: .8rem;
	font-weight: 700;
	margin: 0 auto .5rem auto;
	max-width: 60%;
	overflow-wrap: normal;
	padding: .25rem .25rem;
}

p.byline {
	padding: 1.25rem 5%;
}

p.overview-text {
	background-color: rgba(243,223,193, .65);
	font-size: 1.25rem;
	font-weight: 400;
	padding: 1.25rem 5% calc(4rem + 1.25rem) 5%;
}

/* 
the .embed-container definitions make YouTube embeds responsive & maintains video aspect ratio

.embed-container { 
	position: relative; 
	padding-bottom: 56.25%; 
	height: 0; 
	overflow: hidden; 
	max-width: 100%;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
	position: absolute; 
	top: 0; 
	left: 0; 
	width: 100%; 
	height: 100%;
}
*/

/* the .embed-container definitions make YouTube embeds responsive & maintains video aspect ratio */
.embed-container { 
	width: 100%;
	aspect-ratio: 16 / 9;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
	display: block;
	height: 100%;
	width: 100%;
}

.episode {
	padding-bottom: 4rem;
}

.episode-number {
	font-family: 'Rubik Distressed', sans-serif;
	font-size: 2.75rem;
	font-weight: 400;
	padding-left: 5%;
	padding-right: 1rem;
	position: relative;
	left: 0;
	bottom: -0.9rem;
	text-transform: lowercase;
	z-index: 50;
}

.episode-video {
	border-color: #7b916c;
	border-style: solid;
	border-width: 1rem 0;
}

.episode-description {
	background-color: rgba(243,223,193, .65);
	font-size: 1.25rem;
	padding: 1.25rem 5%;
}

.episode-gallery-wrapper {
	padding: 0 5% 1.25rem 5%;
	width: 100%;
}

.episode-gallery {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	column-gap: .75rem;
	row-gap: .75rem;
}

.episode-gallery > a {
	border: .25rem solid #7b916c;
	flex-grow: 1;
	/* max-width needs to subtract the gallery A tag border width */
	max-width: calc(33.333333% - .5rem);
	text-decoration: none;
}



.map-facts-wrapper{
	margin: 0 5%;
}

h4.dam-title {
	background: #7b916c;
	display: inline-block;
	font-size: 1.25rem;
	font-weight: 900;
	padding: .25rem .5rem 0 .25rem;
}

.map-facts-box {
	xxxxbackground: #7b916c;
}

.map-facts-box > * {
	xxxxpadding: .25rem;
}

.map {
	background: #7b916c;
	height: auto;
	max-width: 100%;
	padding: .25rem;
	width: 100%;
}

dl.dam-facts {
	background-color: rgba(243,223,193, .65);
	padding: .25rem;
}

.dam-facts dt {
	font-size: .8rem;
	padding-top: .25rem;
	text-transform: uppercase;
}

.dam-facts dd {
	font-weight: 900;
	padding-bottom: .25rem;
}



.credits {
	margin: 0 5% 4rem 5%;
}

.credits > h3 {
	border-bottom: .5rem solid #7b916c;
	font-family: 'Rubik Distressed', sans-serif;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 60%;
	margin-bottom: .5rem;
}

.credits dl {
	background-color: rgba(243,223,193, .65);
}

.credits dt {
	font-size: .8rem;
	padding-top: .25rem;
	text-transform: uppercase;
}

.credits dd {
	font-weight: 900;
	padding-bottom: .75rem;
}


/* responsive CSS for mid- and large-sized screens */

@media (min-width: 600px) {
	
	body { 
		background: url("assets/shrubs-tablet_1500x1500.png") repeat-y #f3dfc1; 
	}
}



/* this controls the map fact box on mid-sized devices only */
@media (min-width: 600px) and (max-width: 1199px) {

	.map-facts-box {
		align-items: flex-start;
		display: flex;
	}

	.map,
	.dam-facts {
		flex: 1;
	}

	.map {
		height: auto;
		width: 100%;
	}

	.dam-facts dt,
	.dam-facts dd {
		padding-left: 1rem;
	}
}



@media (min-width: 750px) {
	
	.intro {
		border-width: .5rem 0;
	}

	.title-wrap h1 {
		font-size: 2.5rem;
		margin: 0 auto .25rem auto;
	}

	.title-wrap h2 {
		font-size: 1.15rem;
		max-width: 80%;
	}
}



@media (min-width: 1000px) {
	
	.intro {
		border-width: .75rem 0;
	}

	.title-wrap h1 {
		font-size: 3rem;
	}

	.title-wrap h2 {
		font-size: 1.5rem;
	}
}



/* content splits to two columns above 1200px wide */
@media (min-width: 1200px) {
	
	.overview,
	.episode {
		display: flex;
		margin-left: auto;
		margin-right: auto;
		max-width: 1500px;
	}

	.overview-content,
	.episode-content {
		flex: 3;
	}

	.map-facts-wrapper {
		flex: 1;
	}

	.episode-video {
		border-width: 1rem;
	}
}



@media (min-width: 1500px) {
	
	body {
		background: url("assets/shrubs-desktop_3000x1500.png") repeat #f3dfc1;
	}

	.intro {
		border-width: 1rem 0;
	}

	.title-wrap h1 {
		font-size: 4.5rem;
		padding: 0 .75rem;
	}

	.title-wrap h2 {
		font-size: 1.5rem;
		margin: 0 auto 1rem auto;
		padding: .25rem .75rem;
	}

	.overview-content,
	.episode-content {
		flex: 4;
	}

	.map-facts-wrapper {
		flex: 1;
	}
}



@media (min-width: 1600px) {

	/* allows some expansion before going to auto margins */
	.overview,
	.episode,
	.credits {
		margin-left: auto;
		margin-right: auto;
		max-width: 1500px;
	}
}

/* dino addition */

div.episode-gallery a {
    transition: transform 0.2s;
}

.episode-gallery a:hover {
    transform: scale(1.1);
}

.map-facts-wrapper {
    margin-top: 1.5em;
}

@media (max-width: 1199px) {
    p.overview-text {
        padding-bottom:0em;
    }
    dl.dam-facts {
        display: flex;
        flex-wrap: wrap;
    }
    .dam-facts dt {
        flex-basis: 35%;
    }
    .dam-facts dd {
        flex-basis: 65%;
    }
}

.pswp__custom-caption {
    background:rgba(0,0,0,0.75);
    font-size: 18px;
    padding:0.5em;
    color: #fff;
    width: 100%;
    position: absolute;
    bottom:0px;
    font-family: 'Lato', sans-serif;
}
.pswp__custom-caption a {
    color: #fff;
    text-decoration: underline;
}
.hidden-caption-content {
    display: none;
}

.episode-gallery > a {
    background-color: #7b916c;
    display: flex;
}