/* ================================= Global Styles ================================= */
:root {
    --primary: #c2884f;
    --background: #fcf6ef;
    --accent: #729d0c;
    --menu-back: #ffffff;
    --foot-back: #eeeeee;
    --divider: darkgrey;
}
@font-face {
    font-family: 'Montserrat';
    src: url('Montserrat.woff2');
}
@font-face {
    font-family: 'Bona Nova';
    src: url('Bona_Nova.woff2');
}
@font-face {
    font-family: 'Yeseva_One';
    src: url('Yeseva_One.woff2');
}
body, html {
    width: 100%;
    margin: 0;
    font-family: 'Montserrat',sans-serif;
    background-color: var(--background);
}

/* ================================= Header styles ================================= */
header > div {
    text-align: center;
    > a {
        display: grid;
        justify-items: center;
        color: var(--primary);
        text-decoration: none;
        font-family: 'Bona Nova', Sans-serif;
        text-align: center;
        font-size: 4em;
        padding: 0 0 0.5em 0;
        > img {
            padding-top: 0.5em;
        }
    }
}
@media (min-resolution: 250dpi) {
    header > div > a {
        padding: 0;
        font-size: 3em;
    }
}

/* ================================= Menu styles ================================= */
menu {
    > ul {
        display: flex;
        justify-content: center;
        font-size: 1.5em;
    }
    input[type="checkbox"] {
        display: none;
    }
    ul {
        list-style: none;
        padding: 0;
    }
    li:has(ul):after {
        content: '\25BC';
        color: var(--primary);
        position: absolute;
        right: -0.5em;
    }
    li {
        position: relative;
        padding: 0.4em 1em;
        margin-right: 1em;
        > ul {
            display: none;
            position: absolute;
            top: 2em;
            left: 0;
            border-top: 2px solid var(--accent);
            line-height: 1.45;
            width: 100%;
            min-width: 11em;
            box-shadow: 0 4px 10px -2px rgba(0,0,0,.1);
            background-color: var(--menu-back);
            z-index: 1;
        }
        > a {
            color: var(--primary);
            text-decoration: none;
            transition: all .2s linear;
            padding: 1em 0 0 0;
        }
    }
    li:hover {
        > ul {
            display: block;
        }
    }
    a:hover, a:focus {
        color: var(--accent);
    }
}
@media (min-resolution: 250dpi) {
    menu > input[type="checkbox"] {
        display: block;
        margin: 1.5em;
        &:checked {
            filter: hue-rotate(60deg);
            + ul {
                display: block;
                text-align: left;
            }
        }
        &:after {
            position: relative;
            top: -0.5em;
            left: -1.5em;
            display: block;
            width: 3em;
            height: 3em;
            content: "";
            background: var(--background);
            background-image: url('./illustrations/menu.svg');
            background-repeat: no-repeat;
            background-size: cover;
        }
    }
    menu {
        font-size: 1.5em;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0;
        ul {
            display: none;
            flex-direction: column;
            align-items: flex-start;
            width: 90%;
            font-size: 1em;
        }
        li:has(ul):after {
            right: 0;
        }
        li:hover {
            margin-right: 0;
            > a {
                color: var(--accent);
                font-weight: bold;
            }
            > ul {
                position: relative;
                top: 1em;
                left: -1em;
                border-bottom: 2px solid var(--accent);
            }
            &:after{
                display: none;
            }
        }
    }
}


/* ================================= Footer styles ================================= */
#footer {
    width: 100%;
    height: 3.5em;
    position: fixed;
    bottom: 0;
}
body:has(footer) {
    background-color: var(--foot-back);
}
footer{
    ul {
        list-style: none;
        display: flex;
        justify-content: center;
        padding: 0;
        margin: 0;
    }
    svg {
        fill: var(--accent);
        width: 1em;
        height: 1em;
    }
    li {
        padding: 1em;
        margin-right: 1em;
    }
}
#social {
    position: absolute;
    right: 0;
    > a {
        padding-left: 1em;
    }
}
@media (min-resolution: 250dpi) {
    #footer {
        height: 20em;
        position: relative;
    }
    footer > ul {
        flex-direction: column;
        align-items: center;
        font-size: 1.5em;
        > li {
            padding: 0.5em;
        }
    }
    #social {
        width: 1em;
        height: 5em;
        display: grid;
    }
}

/* ================================= Main Styles ================================= */
/*generic styles for all pages*/
main{
    padding: 3em 10%;
    text-align: center;
    line-height: 1.5em;
    font-size: 1.2em;
}
.title {
    font-family: "Bona Nova", Sans-serif;
    font-size: 3em;
    color: var(--primary);
    line-height: 1.5em;
    text-shadow: -5px -7px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
.leaf {
    padding: 1.5em;
}
.thumbnails{
    font-family: "Yeseva_One",display;
    margin-bottom: 4em;
    display: flex;
    justify-content: space-around;
    img {
        display: block;
        padding: 1em 0;
    }
    a {
        text-decoration: none;
        color: black;
        font-size: 1em;
        display: inline-grid;
        justify-items: center;
    }
    a:hover {
        color: var(--accent-color);
    }
}
h3 {
    font-family: "Yeseva_One",display;
    font-weight: 400;
    font-size: 1.8rem;
    text-align: left;
    padding: 1em 0em 1em 1em;
    margin: 0;
    line-height: 1.5em;
}
iframe {
    width:100%;
}


/*styles for checkbox*/
#article{
    input[type=checkbox]{
        appearance: none;
        cursor: pointer;
    }
    input[type=checkbox]::before {
        content: "";
        display: inline-block;
        width: 1.5em;
        height: 1.5em;
        margin-right: 0.5em;
        vertical-align: bottom;
        background-image: url('./illustrations/checkbox.svg');
        background-size: cover;
    }
    input[type=checkbox]:checked::before{
        background-image: url('./illustrations/checkbox_checked.svg');
    }
    input[type=checkbox]:hover::before{
        filter: invert(1);
    }
    input[type=checkbox]:checked:hover::before{
        filter: invert(1);
    }
}


/*Recipe styles*/
#flex{
    display: flex;
}
#article{
    flex-basis: 75%;
    margin: 1em 1em 1em 15%;
    p, ol{
        text-align: justify;
    }
}
h4{
    text-align:center;
}
#center_img{
    text-align:center;
}
#print {
    display: flex;
    > a {
        flex: 1;
        color: var(--menu-back);
        background-color: var(--accent);
        border-radius: 0.5em;
        padding: 0.7em;
        margin: 1em;
        text-decoration: none;
        font-weight: bold;
        text-align: center;
    }
    > a:hover {
        background-color: var(--divider);
    }
    > a > img {
        vertical-align: middle;
        padding-right: 1em;
    }
}
.divider {
    border-top: 1px solid var(--divider);
    margin: 1em 0;
    > img {
        height: 1.5em;
        background-color: var(--background);
        position: relative;
        top: -0.75em;
        border-left: 0.75em solid var(--background);
        border-right: 0.75em solid var(--background);
    }
}
.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2em;
    > span > div:first-child {
        color: var(--divider);
        margin-bottom: 0.5em;
    }
}

/*Recipe instruction step list*/
#article{
    label{
        display: block;
    }
    li::before {
        content: counter(li);
        position: absolute;
        left: -1.5em;
        top: 1em;
        width: 1.5em;
        height: 1.5em;
        background: var(--accent);
        color: white;
        border-radius: 50%;
        text-align: center;
        align-content: center;
    }
    li{
        list-style-type: none;
        position: relative;
        counter-increment: li;
        margin-bottom: 0.5em;
        padding: 1em;
    }
    .image-container{
        display: flex;
        justify-content: space-evenly;
    }
}


/*Mobile styles for article and sidebar*/
@media (min-resolution: 250dpi) {
    h3{
        font-size: 1rem;
    }
    .thumbnails{
        flex-direction: column;
    }
    .title{
        font-size: 2em;
        flex-direction: column;
        img{
            display: none;
        }
    }
    main{
        font-size: 1em;
        padding: 1em;
    }
    #article {
        margin: 0;
        ol{
            padding: 0;
        }
        label{
            margin-bottom: 0.5em;
        }
        li::before {
            left: -0.7em;
        }
    }
    #flex{
        flex-direction: column;
    }
    #sidepanel{
        min-height: 15em;
    }
    #sidebar{
        display: grid;
        img, h3, hr{
            display:none;
        }
        a{
            font-size: 1.2em;
            font-weight: bold;
        }
    }
    #about{
        #maria-img{
            width: 100%;
        }
        >img{
            width: 100%;
        }
    }
}


/*Sidebar styles*/
hr{
    height:0.2em;
    background: var(--accent);
}
#sidepanel{
    flex-basis: 25%;
    min-width: 100px;
}
#sidebar{
    text-align:center;
    img{
        margin-bottom: 1em;
        width: 100%;
    }
    h3{
        font-size: 1.2em;
    }
}


/*Link styles*/
a{
    color: var(--accent);
    text-decoration: none;
}
a:hover{
    color: var(--primary);
}


/*style for about*/
#about {
    margin-bottom: 2em;
    >div{
        align-content: center;
        .title{
            display: inline;
        }
    }
    p{
        text-align: justify;
    }
    #contact-eml{
        text-align: center;
    }
}
#maria-img{
    float:left;
    margin: 0 1em 1em 0;
}
