
/*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 {
    margin: auto;
    position: relative;
    max-width: 40em;
}

h1 {
    width: 25em;
}

h2 {
    font-family: "pinot-grigio-modern", sans-serif;
    padding-top: 0;
    font-size: 0.6250em;
}

a {
    text-decoration: none;
}

header {
    padding: 1em .5em 0;
}

nav {
    padding: 1em 0;
    font-family: "josefin-sans", sans-serif;
    font-weight: bold;
}

ul li {
    list-style-type: none;
}

section.main h2{
    padding-top: .5em;
    font-size: 2em;
}


section.secondary h2 {
    padding-top: .5em;
    font-size: 1.3em;
    color: rgb(99, 99, 99);
}

section.tertiary h3 {
    border-top: 1px solid rgb(180, 5, 5);
    padding-top: .5em;
    font-size: 1em;
    font-family: "josefin-sans", sans-serif;
    color: rgb(180, 5, 5);
}

h2, li a {
    color: rgb(180, 5, 5);
}

li {
    line-height: 1.4em;
}

p {
    color: rgb(46, 46, 46);
    font-family: "josefin-sans", sans-serif;
    padding-bottom: 1.8em;
    line-height: 1.4em;
}

article p {
    font-size: 1.1em;
}

figcaption {
    font-style: italic;
    font-family: "josefin-sans", sans-serif;
    color: rgb(140, 140, 140);
    padding: 1em 0 0;
}

h2, p, figcaption {
    margin: 0 .5em;
}

aside {
    padding: 0em .5em;
}

aside h2 {
    padding-top: .3em;
}

article h2 {
    font-size: 2.5em;
    padding: 1.5em 0 .5em 0;
}

footer {
    background-color: rgb(180, 5, 5);
    box-sizing: border-box;
    padding-left: .5em;
}

footer p {
    color: #ffffff;
    padding: auto;
    padding-top: .75em;
}

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

div.gallery nav {
    display: grid;
    grid-template-columns:repeat(8, 1fr);
    grid-gap: .2em;
    }
    
    
    div.gallery figure{
    margin: 0;
    width: calc(50%-2em);
    position: absolute;
    opacity: 0;
    transition: left 0.5s, opacity 0.5s;
    }


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

    header {
        padding: 1em 0 0 0;
    }

    h2, p, figcaption {
        margin: 0;
        padding: 0;
    }

    p {
        padding-bottom: .8em;
    }

    aside p {
        margin: 0 0 0.7em 0;
    }

    main p {
        margin: 0 0 1em 0;
    }
}

@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;
    }

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

    div.gallery {
    max-width: 60em;
    grid-column: 1/3;
    margin: 0 auto;
    }
    
    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;
    }
    
    div.gallery nav {
    display: grid;
    grid-template-columns:repeat(8, 1fr);
    grid-gap: .2em;
    }
    
    div.gallery input {
    display: none;
    }
    
    div.gallery figure{
    margin: 0;
    width: calc(100%-2em);
    position: absolute;
    opacity: 0;
    transition: left 0.5s, opacity 0.5s;
    }
    
    div.gallery img {
    width: 100%;
    }
    
    .main-gallery{
    position: relative;
    overflow: hidden;
    padding-bottom: calc(70% + 5em);
    }

    div.subscription h2 {
        padding-top: 2em;
        font-size: 1.5em;
    }

    label {
        padding-right: 1em;
    }

    div.subscription ul li {
        display: flex;
        flex-wrap: wrap;
        padding: 1em 1em 0 0;
        font-family: "josefin-sans", sans-serif;
    }

    section.button {
        padding-top: 2em;
    }

}


@media screen and (prefers-color-scheme: dark) {

        body {
            background-color: #333;
        }

        h1 {
            background-image: url(magazine_logo_alt.svg);
            background-repeat: no-repeat;
            background-size: contain;
        }

        p {
            color: #ffffff;
        }

        h1 img {
            opacity: 0;
        }

        section.secondary h2 {
            color: #ffffff;
        }


        div.container {
            color: #333;
        }

         label {
            color: #ffffff;
        }


}