/*CSS document*/


/*this section has styling that applies to the whole site*/
body {
    font-family: alfabet, sans-serif;
	font-weight: 400;
	font-style: normal;
	line-height: 1.4em;
	background-color: rgb(250 250 250);
	box-sizing: border-box;
}

figure {
    margin: 0;
}

img {
    width: 100%;

}

nav ul {
    list-style-type: none;
    padding: 0;
	text-align: center;
 
}

nav ul li{
   display: inline;
   margin-right: 1em;
}

a{
	font-family: alfabet, sans-serif;
	font-weight: 400;
	font-style: normal;
	
    text-decoration: none;
    color: rgb(0 47 108);
}

a:hover{
	 color: rgb(116 140 171);
}


h3,  h2{
    font-family: alfabet, sans-serif;
	font-weight: 700;
	font-style: normal;
	font-size: 1.25rem;
    color: rgb(0 47 108);
    line-height: 1.5em;
}

h4 {
    font-family: alfabet, sans-serif;
	font-weight: 700;
	font-style: normal;
    color: rgb(0 47 108);
	margin-top: 2em;
	margin-bottom: 0em;
}

p{
	color: rgb(10 10 10);
}


/*this section styles homepage (index.html)*/
div.container {
	max-width: 40em;
	margin: .5em auto;
	padding: 1em;
}

section.mainstory{
    padding-top: 2rem;
}

section{
    padding-bottom: 2rem;
}

section.secondary{
	padding-top: 2em;
	padding-bottom: 0em;
}

section.tertiary{
	padding-bottom: 0.5em;
	padding-top: 1em;
}

/*this section styles article page (mainstory.html)*/
main.article {
	margin-top: 3em;
}

div.containertwo{
	max-width: 40em;
	margin: .5em auto;
	padding: 1em;
}

/*this section styles the photogallery page (photogallery.html)*/
div.containerthree{
	max-width: 40em;
	margin: .5em auto;
	padding: 1em;
}

div.gallery{
	padding-top: 1em;
}

main.gallery {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(75% + 2em);
	margin-bottom: 2em;
	
}

figure.gallery{
    margin:0;
    position: absolute;
    opacity: 0;
    transition: left 0.5s, opacity 0.5s;
}

figure.gallery img{
		width: 40em;
		height: 25em;
		flex: 1 0 10em;
		object-fit: cover;
	}

figcaption.gallery{
	position: relative;
	margin: .5em 0;
	
}

input:nth-of-type(1):checked ~ main figure:nth-of-type(1),
input:nth-of-type(2):checked ~ main figure:nth-of-type(2),
input:nth-of-type(3):checked ~ main figure:nth-of-type(3),
input:nth-of-type(4):checked ~ main figure:nth-of-type(4),
input:nth-of-type(5):checked ~ main figure:nth-of-type(5),
input:nth-of-type(6):checked ~ main figure:nth-of-type(6),
input:nth-of-type(7):checked ~ main figure:nth-of-type(7),
input:nth-of-type(8):checked ~ main figure:nth-of-type(8),
input:nth-of-type(9):checked ~ main figure:nth-of-type(9),
input:nth-of-type(10):checked ~ main figure:nth-of-type(10),
input:nth-of-type(11):checked ~ main figure:nth-of-type(11),
input:nth-of-type(12):checked ~ main figure:nth-of-type(12){
    opacity: 1;
}

nav.gallery {
    display: grid;
    grid-template-columns: auto auto auto auto;
    grid-gap: 0.5em;
}

nav.gallery label img {
	height: 6em;
	flex: 1 0 10em;
	object-fit: cover;
}

input[name="item"] {
    display: none;
}


/*this section styles the subscription page (newsletter.html)*/
div.containerfour {
        max-width: 40em;
        margin: .5em auto;
		padding: 1em;
}

section.personal-info ul li {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 1em;
}

section.personal-info ul li input[type="text"],
section ul li input[type="email"]{
	flex: 1 0 10em;
	box-sizing: border-box;
}

section.personal-info ul li label {
	flex: 0 0 9em;
}

section.newsletter ul {
	padding: 0;
	list-style-type: none;
	display: flex;
	flex-wrap: wrap;
}

section.newsletter ul li {
	flex: 1 0 20em;
	}
	
	
section.personal-info ul {
	padding: 0;
	}

form{
	margin-top: 3em;
    padding: .25em 1em 1em;
	border: solid 1.5px rgb(0 47 108);
	border-radius: 3px;
}


input[type=submit] {
	background-color: rgb(250 250 250);
	border: solid 1px rgb(0 47 108);
	border-radius: 3px;
	font-family: alfabet, sans-serif;
	font-weight: 400;
	font-style: normal;
	
}

input[type=submit]:hover {
	color: rgb(0 47 108);
}


/*this section styles website when user is in dark mode*/
@media screen and (prefers-color-scheme: dark){
	body{
		background-color: rgb(33 33 33);
	}
	
	h1{
		background-image: url("logo-1-alt.svg");
		background-repeat: no-repeat;
		background-size: contain;
	}
	h1 img {
		opacity: 0;
	}
	
 	body h4, body p, body figcaption, body a:hover, div.containerfour{
		color: rgb(250 250 250);
	}
	
	 body h3, body h2, body nav ul li a{
		color: rgb(116 140 171);
	}
	
	
	div.containerthree div.gallery{
		background-color: rgb(33 33 33);

	}
	div.containerfour form{
		border-color: rgb(116 140 171);
	}
}


/*this section styles website when the user's screen exceeds the min-width*/
@media screen and (min-width: 60em){
	div.container{
		max-width: 80em;
		margin: .5em auto;
		display: grid;
		grid-template-columns: 3fr 1fr;
		grid-gap: 2em;
	}
	main.homepage{
		display: grid;
		grid-gap: 0 2em;
		grid-template-columns: 1fr 1fr 1fr;
		grid-column: 1/2;
		padding-bottom: calc(30% + 1em);
	}
	
	header {
		grid-column: 1/3;
	}
	section{
		max-width: 60em;
		margin: 0 auto;
	
	}
	section.mainstory{
		grid-column: 2/4;
		grid-row: 1/3;
		display: flex;
		flex-direction: column;
	}
	section.mainstory a{
		flex: 1 0 10em;
		display: flex;
		flex-direction: column;
	}
	section.mainstory a figure{
		flex: 1 0 10em;
	}
	section.mainstory a figure img{
		height: 100%;
		object-fit: cover;
	}
	section.mainstory a h3{
		flex: 0 0 auto;
		margin-top: 1em;

	}
	section.mainstory a p{
		flec: 0 0 auto;
		margin-top: 0em;
	}
	
	section.secondary figure img{
		flex: 1 0 10em;
		height: 10em;
		object-fit: cover;
	}

	section.tertiary {
		padding-top: 0.2em;
	}
	 div.containerfour {
    margin: auto;
  }
}




