/*CSS document*/

html, body, div, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit;}

img {
    width: 100%;
    display: block;
}

div.container, div.home-container{
    max-width: 40em;
    margin: auto; 
}

div.photo-container {
    background-color: #fafafa;
    max-width: 60em;
    margin: 0 auto;
    padding: 1em;
}

figcaption {
    color: rgb(85, 85, 85);
    font-family: muli, sans-serif; 
    font-weight: 300; 
    font-style: italic;
    font-size: 1em;
    margin: 0.5em 0 0.5em
}

body {
    font-family: muli, sans-serif;
    font-weight: 300;
    font-style: normal;
}

header {
    padding: 0 2em 0 0.5em;
    font-family: muli, sans-serif;
    font-weight: 700;
    font-style: normal;
}

h1 {
    width: 6em;
    padding-top: 1em;
    margin-top: 0.5em;
}

nav {
    margin: 1em 0em;
}

ul {
    list-style-type: none;
}

a {
	text-decoration: none;
    color: rgb(245, 64, 64);
}

h2 {
    font-family: "operetta-12", serif;
    font-weight: 600;
    font-style: normal;
    margin: 0.2em 0 0.2em
}

section.main h2 {
    font-size: 2.5em;
    font-weight: bold;
    padding: 0.2em 0 0 0.2em;
    color: rgb(245, 64, 64);
}

section.secondary h2 {
    font-size: 1.8em;
    font-weight: bold;
    color: rgb(0, 0, 0);
}

section.tertiary h2 {
    font-size: 1.2em;
    font-weight: bold;
    padding:0.5em 0 0.2em;
    color: rgb(0, 0, 0);
    border-top: 1px solid rgb(245, 64, 64);
    text-decoration: none;
}

p {
    margin-bottom: 0.5em;
    color: rgb(0,0,0);
    font-size: 1em;
}

article h2 {
    font-size: 2.5em;
    font-weight: bold;
    color: rgb(245, 64, 64);
}

article p {
    color: rgb(0,0,0);
    font-size: 1em;
}

aside {
    background-color: rgb(190, 190, 190);
}

aside h2 {
    font-size: 1.2em;
    font-weight: bold;
    color: rgb(245, 64, 64);
    margin: 0.2em 0 0.2em
}


aside figure {
    margin-left: 0.4em;
    margin-right: 0.4em;
    padding-top: 1em;
}

div.photo h2 {
    margin-bottom: 1em;
    font-size: 1.5em;
    color: rgb(245, 64, 64);
}

div.photo {
    max-width: 60em;
    margin: 0 auto;
    padding: 1em;
}

main.photogallery {
    position: relative;
    overflow: hidden;
    padding-bottom: calc(66% + 5em);
}

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

figcaption.photo {
    font-size: 1.2em;
    font-weight: bold;
    margin: 1em 0;
    color: rgb(0,0,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){
    opacity: 1;
}

nav.photo {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 0.1em;
}


input.photo {
    display: none;
}

body.news {
	font-family: Muli;
	line-height: 1.4em;
	color: rgb;
	background-color: #fafafa;
	box-sizing: border-box;
	}

ul.news {
	list-style: none;
	padding-left: 0;
}
	
div.newsletter {
        max-width: 60em;
        margin: 1em;
        padding: 1em;
}

h2.newstitle {
    margin-bottom: 1em;
    font-style: bold;
    font-size: 2em;
    text-align: center;
    color: rgb(245, 64, 64);
}

h2.news {
    margin-bottom: 1em;
    color: rgb(0, 0, 0);
}

section.personal-info ul li input[type="text"],
section ul li input[type="email"],
section ul li input[type="tel"],
section ul li select {
	flex: 4 0 20em;
	box-sizing: border-box;
	margin-bottom: 1em;
}


section.personal-info ul li {
	display: flex;
	flex-wrap: wrap;
}

section.personal-info ul li label{
	flex: 1 0 60em;
    margin-top: 1em;
}

section.subscription-type ul {
	display: flex;
	flex-wrap: wrap;
}

section.subscription-type ul li{
	flex: 1 0 15em;
}

textarea {
	box-sizing: border-box;
	width: 100%;
	resize: vertical;
	height: 6em;
	background: rgb(210, 210, 210);
	border: 1px solid rgb(255, 255, 255);
	margin: 1em;
    font-family: Muli;
	color: rgb(190, 190, 190);
	}

button {
    background-color: rgb(245, 64, 64);
    color:rgb(210, 210, 210);
    border: none;
    padding: 0.5em;
    display: block;
    margin: auto;
}

footer {
    background-color: rgb(245, 64, 64);
}

footer p {
    color: rgb(255,255,255);
    padding: 1em 1em 0 1em
}

@media screen and (min-width: 40em) {
    nav ul li{
        display: inline;
        margin-top:1em;
        margin-right: 0.5em;
    }
}

@media only screen and (min-width: 60em) {

    div.home-container {
        max-width: 80em;
        padding: 0 1em;
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 1em;
    }

    div.container{
        max-width: 60em;
        padding: 0 1em;
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 1em;
    }

    header, footer{
        grid-column: 1/3;
    }

    div.home-container main{
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 1em;
    }

    div.home-container aside {
        background: none;
        padding: 0;
        margin-top: 0;
    }

    div.container aside {
        margin-top: 0;
    }

    section.main{
        grid-column: 2/4;
        grid-row: 1/3;
        display: flex;
    }

    section.main a {
        flex: 1 0 12em;
        display: flex;
        flex-direction: column;
    }

    section.main a figure{
        flex: 1 0 12em;
        display: flex;
    }

    section.main a figure img{
        object-fit: cover;
    }

    section.main a h2{
        flex: 0 0 1em;
    }

    section.main a p{
        flex: 0 0 4em;
    }

    section.secondary{
        display: flex;
    }

    section.secondary a {
        flex: 1 0 12em;
        display: flex;
        flex-direction: column;
    }
    
    section.secondary a figure{
        flex: 1 0 12em;
        display: flex;
    }
    
    section.secondary a figure img{
        object-fit: cover;
    }
    
    section.secondary a h2 {
        flex: 0 0 1em;
    }
    
    section.secondary a p{
        flex: 0 0 4em;
    }   
}

@media only screen and (prefers-color-scheme: dark) {
    div.home-container,
    body,
    div.container,
    div.newsletter,
    body.news {
        background-color: rgb(0, 0, 0);
    }
    p,
    section.secondary h2,
    section.tertiary h2,
    article p,
    h2.news,
    aside figure,
    article h2,
    div.newsletter p,
    div.newsletter ul,
    div.newsletter ul li,
    div.newsletter ul li label,
    div.newsletter ul li input,
    div.newsletter ul li select,
    figcaption,
    figcaption.photo {
        color: rgb(255, 255, 255);
    }
    aside {
        background-color: rgb(190, 190, 190);
    }
    h1 {
        background-image: url("logodark.svg");
        background-repeat: no-repeat;
        background-size: contain;
    }
    h1 img {
        opacity: 0;
    }
    h2 {
        color: white;
    }
}
