/*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;}

body {
    font-family: poppins, sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    background: #f5f0f1;
    color: #24171C;
    line-height: 1.5rem;
    margin: 0rem 1.5rem;
}

a {
    text-decoration: none;
    color: #24171C;
}

div.container, div.main_story_container, div.gallery_container, div.news_container{
    max-width: 80em;
    margin: 0 auto 3rem;
}

nav {
    margin-bottom: 1.5rem;
}

img {
    width: 100%;
    padding-top: 1rem;
}

h1 {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    width: 60%;
}

h2 {
    font-family: rift-soft, sans-serif;
    padding: 0.5rem 0rem 0.5rem;
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-family: rift-soft, sans-serif;
    padding: 1rem 0rem 0.3rem;
    font-size: 1.6rem;
    font-weight: 700;
    font-style: normal;
}

li{
    font-family: rift-soft, sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.05rem;
    display: inline;
    padding-right: 0.45rem;
}

li a {
    color:  #604D53;
}

p {
    padding-bottom: 1rem;
}

section {
    border-bottom: 1.5pt dashed #604D53;
}

figcaption {
    font-size: 0.85rem;
    padding-bottom: 1.5rem;
}

footer {
    padding-top: 1rem;
}

/* gallery section */

body {
	box-sizing: border-box;
}

div.gallery_container input {
    display: none;
}

div.gallery_container main {
    position: relative;
    overflow: none;
    padding-bottom: calc(72% + 3rem);
}

figure.gallery {
    margin: 0;
    width: calc(100%-2rem);
    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.gallery_nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 0.2rem;
}

/* End of gallery section */

/* Subscription section */

div.news_container {
    margin: auto;
}

div.newsletter_container {
    max-width: 30rem;
}

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

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: 1 1 20rem;
	box-sizing: border-box;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    background: #fcfcfc;
	border: 1px solid #e8e8e8;
    padding: 0.3rem 0.5rem;
}

input::placeholder {
    color:  #86767b;
}

section.personal-info ul li label {
	flex: 0 0 3.5rem;
}

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

section.personal-info {
    border: none;
    padding: 1.4rem 0rem;
}

textarea {
	box-sizing: border-box;
    margin-bottom: 1rem;
	display: block;
	width: 100%;
	height: 6rem;
	background: #fcfcfc;
	border: 1px solid #e8e8e8;
	padding: 0.4rem;
	font-family: sans-serif;
	color: #777;
	}

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

  div.container, div.main_story_container{
    margin: auto;
  }

}
/* End of subscription section */

@media screen and (min-width: 40rem) and (max-width: 60rem){
    div.container, div.main_story_container {
        display: grid;
        grid-template-columns: 2fr 1.2fr;
        grid-gap: 0 1.5rem;
    }

    header  {
        grid-column: 1/3;
    }

    main  {
        grid-column: 1/2;
    }

    section.main_story figure {
        padding-top: 1rem;
    }

    section.main_story figure div{
        flex: 1 0 2rem;
        background-image: url(cookie_chem.jpeg);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }

    section.main_story figure div img {
        height: 100%;
        opacity: 0;
    }

    aside  {
        grid-column: 2/3;
    }

}

@media screen and (min-width: 60rem){
    div.container {
        display: grid;
        grid-template-columns: 3fr 1fr;
        grid-gap: 0 1.5rem;
    }

    div.main_story_container {
        display: grid;
        grid-template-columns: 4fr 2.5fr 2fr;
        grid-gap: 0 1.5rem;
    }

    div.main_story_container footer{
            grid-column: 1/2;
    }

    header  {
        grid-column: 1/3;
    }

    main  {
        grid-column: 1/2;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 0 1.5rem;
    }

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

    section.main_story figure {
        padding-top: 1rem;
        flex: 1 0 28rem;
        display: flex;
        flex-direction: column;
    }

    section.main_story figure div{
        flex: 1 0 28rem;
        background-image: url(cookie_chem.jpeg);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }

    section.main_story figure div img {
        height: 100%;
        opacity: 0;
    }

    section.main_story figure figcaption {
        flex: 0 0 3rem;
    }

    section.main_story h3 {
        flex: 0 0 auto;
        margin: 0;
    }

    section.main_story p {
        flex: 0 0 auto;
        margin: 0;
    }

    aside  {
        grid-column: 2/3;
    }

    article {
        grid-column: 1/2;
    }

}