/*--------------------------------------------------------------------
 Based on example code from Morten Rand-Hendriksen in his excellent
       CSS: Advanced Layouts with Grid course on LinkedIn Learning.
--------------------------------------------------------------------*/

/*--------------------------------------------------------------
Accessibility
--------------------------------------------------------------*/
/* Text meant only for screen readers */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:hover,
.screen-reader-text:active,
.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
}

/*--------------------------------------------------------------
Typography
--------------------------------------------------------------*/

body {
	margin: 0;
}

body,
button,
input,
select,
textarea {
	font-family: 'Open Sans', 'Helvetica', 'Arial', sans-serif;
	font-size: 18px;
	line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: 'Lato', 'Helvetica', 'Arial', sans-serif;
	color: #353535;
	clear: both;
}

p {
	margin-bottom: 1.5em;
}

b,
strong {
	font-weight: bold;
}

dfn,
cite,
em,
i {
	font-style: italic;
}

blockquote {
	margin: 0 1.5em;
}

address {
	margin: 0 0 1.5em;
}

pre {
    display: inline-block;
    font-family: "Courier 10 Pitch", Courier, monospace;
    color: #ddca7e;
    background: #282c34;
	padding: .5em .8em;
    border-radius: .2em;
}

code,
kbd,
tt,
var {
	font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

abbr,
acronym {
	border-bottom: 1px dotted #666;
	cursor: help;
}

mark,
ins {
	background: #fff9c0;
	text-decoration: none;
}

sup,
sub {
	font-size: 75%;
	height: 0;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sup {
	bottom: 1ex;
}

sub {
	top: .5ex;
}

small {
	font-size: 75%;
}

big {
	font-size: 125%;
}


/*--------------------------------------------------------------
General styling
--------------------------------------------------------------*/

h1,
h2,
h3 {
	text-align: center;
	margin: 0;
	padding: 1em 0;
}

p {
	margin: 0;
	padding: 1em 0;
}

img {
	display: block;
	border: 0;
	width: 100%;
	height: auto;
}

.masthead {
	background-color: #333333;
	background-size: auto 21px;
	background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg width='100%25' height='100%25' viewBox='0 0 21 21' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' xmlns:serif='http://www.serif.com/' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-miterlimit:1;'%3E%3Crect x='-0.425' y='-0.383' width='22.1' height='22.114' style='fill:%23222;'/%3E%3Cpath d='M6.75,-1.818l0.036,23.236' style='fill:none;stroke:%23111;stroke-width:0.49px;'/%3E%3Cpath d='M14.261,6.781c6.539,-0.039 6.482,0 6.482,0' style='fill:none;stroke:%23d94600;stroke-width:0.49px;stroke-linecap:square;'/%3E%3Cpath d='M13.75,-1.818l0.036,23.236' style='fill:none;stroke:%23111;stroke-width:0.49px;'/%3E%3Cpath d='M20.75,-1.818l0.036,23.236' style='fill:none;stroke:%23111;stroke-width:0.46px;'/%3E%3Cpath d='M-2.036,6.713l26.081,0.037' style='fill:none;stroke:%23111;stroke-width:0.55px;'/%3E%3Cpath d='M-2.036,13.713l26.081,0.037' style='fill:none;stroke:%23111;stroke-width:0.49px;'/%3E%3Cpath d='M-2.036,20.713l26.081,0.037' style='fill:none;stroke:%23111;stroke-width:0.49px;'/%3E%3C/svg%3E");
}

.masthead img {
	display:none;
}

.masthead h1, .masthead p {
	color:#fff;
	padding: 1em 40px 32px 20px;
	text-align: center;
}

.masthead h1 {
	align-self: flex-end;
	padding-bottom: .2em;
	line-height: 1.2em;
}


/* Promo section */

.logo,
.site-title {
	text-align: center;
}

.logo {
	font-size: 8em;
}

.site-title {
	margin-top: -1em;
	margin-bottom: 3em;
}

/* Intro section */

.intro {
	background: #F6F7EB;
	padding: 2em 1.5em;
}

.intro p {
	padding: .6em 0;
}

.intro a {
	border-bottom: 1px dotted #C00;
	border-top: 1px dotted #C00;
	padding: .1rem .2rem;
	background: #FFEEEE;
	text-decoration: none;
	color: #C00;
	font-weight: bold;
}

.intro a:hover, .intro a:focus, .intro a:active {
    background: #C00;
    color: #fff;
}

/* Cards section */

.cards, .videos, .podcasts {
	margin:0;
	padding: 2em 1.5em ;
}

.cards {
	background: #70bf40;
}
.videos {
	background: #F6F7EB;
}
.podcasts {
	background: #E36B18;
	background: #DD6F18;
}
.find-me {
	background: #3F88C5;
	/*background: #E36B18;*/
}

.cards ul, .podcasts ul {
	margin: 0;
	padding: 0 0 1.8em 0;
}
.videos ul {
	max-width: 640px;
	margin: 0 auto;
	padding: 0;
}

.cards li, .podcasts li {
	margin-bottom: 1em;
	background: white;
	list-style-type: none;
}
.videos li {
	margin-bottom: 1em;
	background: #222;
	list-style-type: none;
}
.podcasts span {
	color:#444444;
	font-size: .8em;
}

.card, .video, .podcast {
	padding: 0;
}

.card a, .video a, .podcast a {
	padding: 1em;
	display: block;
	color: #333;
	text-align: left;
	text-decoration: none;
	background: white;
	border: 1px transparent;
	transition: all .2s;
}
.video a {
	background: #222;
}

.cards h3, .videos h3, .podcasts h3 {
	text-align: left;
	padding-bottom: 0;
}

.cards p {
	padding-top: .5em;
	padding-bottom:  .5em;
}

.cards h2, .videos h2, .podcasts h2 {
	color:#fff;
	margin: 0;
	padding-top: .5em;
	padding-bottom: 1.8em;
}
.videos h2 {
	color:#333;
}

.card a h3, .podcasts a h3 {
	color:inherit;
}
.card a:focus,
.card a:hover,
.podcast a:focus,
.podcast a:hover {
	background: #333;
	color: #fff;
}
.videos h3 {
	color:#fff;
}
.video a:focus,
.video a:hover {
	background: #555;
	color: #333;
}

.card img {
	max-width: 120px;
}


/* footer section */
.footer {
	padding: 2em;
	background: #222222;
	color: white;
	text-align: center;
}


/*--------------------------------------------------------------
Basic responsive layout for all browsers:
--------------------------------------------------------------*/

.site {
	max-width: 50em;
	margin: 0 auto;
}

/*--------------------------------------------------------------
CSS Grid layout for modern browsers:
--------------------------------------------------------------*/

/* Check for CSS Grid support: */
@supports (grid-area: auto) {

	/* Enable grid for viewports 600px and wider: */
	@media screen and (min-width: 600px) {

		/* Disable fallback max-width center aligned rule: */
		.site {
			max-width: none;
		}

		/* Header section, with image on the left and name and blurb on right */
		.masthead {
			display:grid;
			grid-template-columns: minmax(120px, 200px) 3fr;
			grid-template-rows: repeat(2, minmax(100px,auto));
			grid-column-gap: 2em;
		}
		.masthead img {
			display: block;
			grid-row: 1/3;
			width: 100%;
			height: 100%;
			object-fit: cover;

			/*object-fit: cover;*/
/*			display:flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
*/		}
		.masthead h1, .masthead p {
			text-align:left;
			grid-column: 2/5;
		}

		/* Four-column layout: Two center columns have total width of 50em: */
		.main-area > * {
			display: grid;
			grid-template-columns: 1fr repeat(2, minmax(auto, 25em)) 1fr;
		}

		/* Center items by placing them in the two center columns: */
		.intro p,
		.cards ul,
		.cards h2,
		.videos ul,
		.videos h2,
		.videos img,
		.podcasts ul,
		.podcasts h2,
		.podcasts img {
			grid-column: 2/4;
		}

		.cards ul, .podcasts ul {
			display:grid;
			grid-template-columns: 1fr 1fr;
			grid-gap: 2em;
		}

		.cards li, .podcasts li {
			margin-bottom: 0;
		}
		.videos li {
			margin-bottom: 2em;
		}

		.card, .video, .podcast {
			display: flex;
			margin-bottom: 0;
		}

		/*.card a, .video a, .podcast a {*/
		.card a {
			width: 100%;
			display: grid;
			grid-template-columns: 120px auto;
			grid-template-rows: auto auto;
			grid-column-gap: 1em;
			text-align: left;
		}

		.card a img {
			grid-column: 1;
			grid-row: 1/3;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
		}

		.card h3 {
			grid-column: 2;
			grid-row: 1;
			align-self: flex-end;
			padding:0 0 .5em 0;
		}
		.video h3, .podcast h3 {
			padding:0 0 .5em 0;
		}

		.card p {
			grid-column: 2;
			grid-row: 2;
			padding: 0;
		}
	}

	@media screen and (min-width: 900px) {
		.masthead {
			grid-template-columns: minmax(200px, 280px) 3fr;
			grid-template-rows: repeat(2, minmax(140px,auto));
		}
	}

	@media screen and (min-width: 1200px) {
		.masthead {
			grid-template-columns: minmax(280px, 360px) 3fr;
			grid-template-rows: repeat(2, minmax(180px,auto));
		}
	}

	@media screen and (min-width: 1500px) {
		.masthead {
			grid-template-columns: minmax(360px, 440px) 3fr;
			grid-template-rows: repeat(2, minmax(220px,auto));
		}
	}


}
