/*CSS document*/

body {
    background-color: rgb(251, 245, 243);
    font-family: "menco", sans-serif;
    color: #1e1e1e;
}

div.container {
    max-width: 70em;
    margin: auto;
}

figure {
    margin: 0;
}

img {
    width: 100%;
}

ul {
    list-style-type: none;
    padding: 0;
}

h1 {
    width: 10em;
    margin-bottom: 1rem;
}

.mainstory a:hover {
    color: rgb(228,148,137);
    text-decoration: underline;
}

.secondary a:hover {
    color: rgb(228,148,137);
    text-decoration: underline;
}

.tertiary a:hover {
    color: rgb(228,148,137);
    text-decoration: underline;
}

.quad p:hover {
    color: rgb(228,148,137);
    text-decoration: underline;
}

h2,h3 {
    font-family: "menco", sans-serif;
    font-weight: 700;
    font-style: normal;
}

p {
    font-family: "menco", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1.3rem;
}

a {
    text-decoration: none;
    color: #1e1e1e;
}

li {
    display: inline-block;
}

nav ul li {
    display: inline;
    font-family: "menco", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 1rem; 
}

nav ul li a {
    display: inline-block;
    text-align: center;
    color: #1e1e1e;
    text-decoration: none;
    padding-right: 1rem;
}

nav ul li a:hover {
    color: rgb(228,148,137);
    text-decoration: underline;
}


footer {
    color: rgb(228,148,137);
    font-size: 1rem;
    font-family: "menco", sans-serif;
    font-weight: 500;
    font-style: normal;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

figcaption {
    font-family: "menco", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;  
}

/*Photogallery*/
div.gallery-container {
    max-width: 70em;
    margin: auto;
}

h2.gallery {
    margin-top: 1.9em;
    margin-bottom: 1.6em;
    font-family: "menco", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 2rem;
}

main.photos {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(80% + 4em);
    margin-top: 1em; 
}

figure.gallery {
    margin: 0;
    width: calc(100%-2em);
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
}

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){
    opacity: 1;
}

nav.photos {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-gap: 0.5em;
    margin-bottom: 1em;
}

img.gallery {
    width: 45%;
}

input {
    display: none;
}

/*Newsletter*/
div.newsletter {
    max-width: 70em;
    margin: auto;
}

form {
    max-width: 40em;
}

h4 {
    font-family: "menco", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 1.3rem;
    margin-top: 3.5em;
    color: rgb(228,148,137);
}

h2.newsletter {
    margin-top: 2em;
    font-size: 2.3em;
}

p.newsletter {
    font-size: 1.3em;
}

section.newsletter-options ul{
    max-width: 17em;
}

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

section.personal-info ul li input[type="text"],
section.personal-info ul li input[type="email"],
section.personal-info ul li input[type="tel"],
section ul li select {
    flex: 8 0 2em;
    box-sizing: border-box;
    display: flex;
    border-radius: 0;
    border: 1px solid #0d1321;
    padding: 1em;
}

section.personal-info li label{
    flex: 1 0 3em;
    margin-top: 0.4em;
    font-size: 1.3em;
}

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

section.newsletter-options ul li input[type="checkbox"], 
section ul li select {
    flex: 2 0 1em;
    box-sizing: border-box;
    display: flex;
    border-radius: 0;
    border: 1px solid #0d1321;
    margin-right: 1em;
}

section.newsletter-options li label{
    flex: 10 0 10em;
    font-size: 1.3em;
}

button {
    padding: 1rem;
    margin-top: 3rem;
    font-family: "menco", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1.3rem;
    margin-bottom: 2em;
}

@media screen and (min-width: 50em){
    
div.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 0 3em;
    margin: 0 auto;
}
    
header {    
    grid-column: 1/6;
}
    
main {
    display: grid;
    grid-column: 1/3;
    grid-gap: 2em;
    margin: 1em auto;
}
    
section.mainstory {
    display:grid;
    grid-column: 1/4;
    grid-row: 1/2;
}

section.quad {
    display:grid;
    grid-column: 1/4;
    grid-row: 3/4;
}
    
aside {
    display: grid;
    grid-column: 3/4;
    max-height: 5em;
    max-width: 16em;
}
    
text {
    grid-column: 1/2;
    grid-row: 1/4;
}
    
footer {
    grid-row: 4/5;
}

article {
    display:grid;
    grid-column: 1/3;
    grid-row: 2/4;  
    margin-top: 1rem;
    }
    
aside.previews {
    display: grid;
    grid-column: 3/4;
    max-height: 5em;
    max-width: 15em;
}
    
main.photos {
    padding-bottom: 45em;
}

}