/*CSS document*/

/*HOME*/
body {
    font-family: semplicitapro, sans-serif;
    font-weight: 400;
    font-style: normal;
}

section{
    max-width: 40em;
    margin: 0 auto 2em;
}

figure {
    margin: 0;
    margin-bottom: 0.5em;
}

figcaption{
    font-style: italic;
}

h1{
    width: 4em;
}

h2,h3{
    color:#477592;
    margin-top: 0;
    margin-bottom: 0em;
}

a{
    text-decoration: none;
    color: #477592;    
}

a h3{
    font-family: semplicitapro, sans-serif;
    font-style: normal;
}
a p{
    color: rgb(0 0 0); 
    font-weight: 200;
    margin: 0.5em 0 2em ;
}

img {
    width: 100%;
}

nav ul li{
    text-transform: uppercase;
    display: inline;
    font-weight: 400;
    margin-right: 1em;
}

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

/*MAINSTORY*/ 
div.mainstory{
    max-width: 50em;
    margin: 0 auto;
}

/*PHOTOGALLERY*/
div.photogallery{
    max-width: 50em;
    margin: 0 auto;
    padding: 1em;
}
main.photogallery{
    grid-column: 1/3;
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-gap:0 1em;
}
section.photogallery figure{
    margin: 0;
    width: calc(100%-2em);
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
}
section.photogallery main{
    position: relative;
    overflow: hidden;
    padding-bottom: calc(72% + 3em);
}

section.photogallery figcaption{
    font-size: 1em;
    font-weight: bold;
    margin: 1em 0;
    color: #888;
}
section.photogallery img {
    width: 100%;
}

section.photogallery nav{
    display: grid;
    grid-template-columns:repeat(8, 1fr);
    grid-gap: 0.2em;
}
section.photogallery input{
    display: none;
}
    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;
} 

/*NEWSLETTER*/
div.newsletter{
    max-width: 50em;
    margin: 1em;
    padding: 1em; 
    grid: none;
}
section.Subscribe ul li {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 1em;
}

section.Subscribe ul li input[type="text"],
section ul li input[type="email"],
section ul li input[type="tel"],
section ul li select {
	flex: 1 30em;
	box-sizing: border-box;
}

section.Subscribe ul li label {
	flex: 0 0 8em;
}

section.inform ul {
	display: flex;
	flex-wrap: wrap;
	}

section.inform ul li{
	flex: 1 0 15em;
	}

main.newsletter {
	box-sizing: border-box;
	display: block;
	width: 90%;
	height: auto;
	background: #fcfcfc;
	border: 1px solid #e8e8e8;
	padding: 0.4em;
	color: #777;
	}

textarea{
    display:block;
    width: 90%;
    height: 6em;
}

@media screen and (min-width: 40em){
     div.newsletter{
        margin: auto;
    }

@media screen and (min-width: 60em){
     div.container{
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 0 2em;
        max-width: 65em;
        margin: 0 auto;
    }
    
     div.mainstory{
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 0 2em;
    }
    
    header{
        grid-column: 1/3;
    }
    
    main{
        grid-column: 1/2;
        display: grid;
        grid-template-columns: repeat(3,1fr);
        grid-gap: 0 1em;
    }
    
    section.mainstory{
        grid-column: 2/4;
        grid-row: 1/2;
        display:flex;
        flex-direction: column;   
    }
    
    section.mainstory figure{
        flex: 1 0 18em;
        display:flex;
        flex-direction: column;
    }
    
    section.mainstory figure div{
        flex: 1 0 18em;
        background-image: url(Top-10-Shoes.jpeg);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }
    section.mainstory figure figcaption{
        flex:0 0 3em;
    }
    section.mainstory figure div img{
        height: 100%;
        opacity:0;
    }
    section.mainstory h3{
        flex: 0 0 auto;
        margin: 0;
    }
    section.mainstory p{
        flex:0 0 auto;
        margin: 0;
    }
    
    aside{
        grid-column: 2/3;
    }
}
