/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, 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;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/*-------------------------Root-------------------------*/
:root{
    --night: #0d0d0d;
    --smoke: #f2f2f2;
    --tiff: #7abfbf;
    --t-tiff: rgba(122, 191, 191, .5);
    --flame: #EB5428;
    --fonts-b: 'Bebas Neue', sans-serif;
    --fonts-m: 'Montserrat', sans-serif;
}

/*-------------------------Whole Document-------------------------*/
html{
    background-color: var(--t-tiff);
}
body{
    margin: 0 auto;
    background-color: var(--smoke);
    width: 414px;
    display: flex;
    flex-direction: column;
}
h1{
    font-size: 40px;
    font-family: var(--fonts-b);
}
h2{
    font-size: 30px;
    font-family: var(--fonts-b);
    text-align: center;
    padding: 15px 0;
}
h3{
    font-size: 25px;
    font-family: var(--fonts-b);
}
nav a, nav span, menu li, #social li, footer{
    font-size: 20px;
    font-family: var(--fonts-b);
}
p, dd, li, nav, input{
    font-size: 16px;
    line-height: 20px;
    font-family: var(--fonts-m);
}
dt{
    font-size: 16px;
    font-family: var(--fonts-m);
    font-weight: bold;
}
/*-------------------------Header-------------------------*/
header{
    order: 1;
}
nav a{
    text-decoration: none;
    color: var(--flame)
}
nav h2{
    display: none;
}
nav label{
    position: absolute;
    left: 103px;
    padding: 13px 24px;
    background-color: white;
}
nav span{
    display: flex;
    flex-direction: column;
    align-items: center;
}
nav li:nth-child(n+2){
    position: relative;
    top: 25px;
}
nav ul {
    display: flex;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    transition: max-height .2s ease-out;
}
nav li{
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
}
li img{
    width: 78px;
}
nav input:checked ~ ul {
    max-height: 500px;
}
nav input {
    display: none;
}
nav li:nth-child(n+2){
    position: relative;
    top: 96px;
}
nav li:first-of-type{
    position: absolute;
    align-self: center;
    background-color: var(--flame);
    padding: 10px 90px 15px;
}
[href="#home"]{
    display: none;
}
nav li:last-of-type{
    position: absolute;
    top: 0;
    left: 428px;
    background-color: white;
    padding: 10px 10px 15px 12px;
    color: var(--night);
}
[href="#user"]{
    color: var(--night);
}
.search{
    margin: 20px auto;
}
.search input, .search button{
    position: relative;
}
.search input{
    left: 50px;
    border: 3px solid;
    border-color: var(--flame);
    width: 261px;
    height: 41px;
    top: 75px;
}
.search button{
    top: 90px;
    left: 46px;
    height: 41px;
    background: var(--flame);
    border: none;
}
.search svg{
    stroke: var(--smoke);
}

/*-------------------------Main-------------------------*/
main{
    position: relative;
    order: 2;
    top: 61px;
}
h1{
    text-align: center;
}
menu{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
}
menu li{
    list-style: none;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    margin: 20px 5px 20px 0;
    color: var(--flame);
}
#intro img{
    width: 414px;
    height: 621px;
    padding: 8px 0;
}
#intro p{
    padding: 4px 10px 10px;
}
#detail div{
    display: grid;
    grid-template-rows: repeat(5, 1fr);
}
dl{
    margin: 2px 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}
#ingredient ul{
    list-style: square;
    margin: 0 20px 20px 5px;
}
#ingredient li{
    padding-left: 10px;
    margin: 20px;
}
#direct ol{
    margin: 10px 23px 23px 23px;
}
#direct li{
    padding: 10px ;
}
#side{
    background-color: var(--tiff);
    padding: 10px;
}
#side img{
    width: 99px;
    grid-column: 1/2;
    grid-row: 1/-3;
}
#side h3{
    grid-column: 2/-1;
    padding-left: 4px;
}
#dishes{
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#dishes section{
    display: grid;
    grid-template-columns: 1fr 3fr;
    row-gap: 10px;
    margin: 10px 5px;
}
#dishes p{
    padding: 5px;
}
#dishes p:nth-of-type(even){
    font-weight: bold;
}

/*-------------------------Footer-------------------------*/
#social{
    background-color: white;
    margin: 20px 0;
}
#social h2{
    display: none;
}
#social ul{
    position: relative;
    top: 24px;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    width: 414px;
}
#social li{
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    color: var(--flame);
}
footer{
    order: 3;
    background-color: white;
    padding: 20px 0 0;
    margin-top: 41px;
}
footer div{
    display: flex;
    flex-direction: column;
    align-items: center;
}
footer img{
    order: 1;
    width: 249px;
    padding: 20px;
}
#fir{
    order: 2;
}
#sec{
    order: 3;
}

/*-------------------------Media Queries-------------------------*/
@media screen and (min-width: 768px){
    body{
        width: 768px;
    }
    header{
        background-color: white;
    }
    nav{
        background-color: white;
        padding: 28px 0;
    }
    nav ul{
        overflow: visible;
        padding: 20px 0;
        width: 768px;
        background-color: white;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 31px
    }
    nav label, nav span, nav input {
        display: none;
    }
    nav li:first-of-type{
        position: absolute;
        top: -9px;
        left: 27px;
        width: 76px;
        padding: 10px 0;
    }
    nav li:last-of-type{
        position: absolute;
        top: -10px;
        left: 698px;
        padding: 10px;
        margin: 10px;
    }
    .search button{
        position: relative;
        top: -93px;
        left: 331px;
    
    }
    .search input{
        position: relative;
        top: -108px;
        left: 335px;
    }
    h1{
        position: relative;
        top: -46px;
        left: -276px;
    }
    menu{
        width: 768px;
        position: absolute;
        top: 5px;
        background-color: rgba(242, 242, 242, .5);
        z-index: 2;
    }
    #intro img{
        position: relative;
        width: 768px;
        height: 1152px;
        top: -43px;
        z-index: 1;
    }
    #intro p{
        position: relative;
        padding: 4px 10px 10px;
        top: -35px;
    }
    #detail{
        position: relative;
        top: -32px;
    }
    dl{
        justify-content: center;
    }
    #recipe{
        display: grid;
        grid-template-columns: 1fr 2fr;
    }
    #ingredient li{
        margin: 10px 20px
    }
    #dishes{
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    #social ul{
        width: 385px;
    }
    footer{
        display: flex;
        flex-direction: row-reverse;
        gap: 55px;
    }
}

@media screen and (min-width: 1280px) {
    body{
        width: 1280px;
    }
    header{
        height: 110px;
    }
    nav li:first-of-type{
        left: 0px;
        top: 50px;
        padding: 25px 15px;
    }
    nav li:last-of-type{
        left: 1210px;
        top: 40px;
        padding: 0;
    }
    nav ul{
        width: 1280px;
        top: -50px;
        position: absolute;
    }
    li img{
        width: 52px;
    }
    .search input{
    position: relative;
    display: block;
    left: auto;
    top: 72px;
    margin: 0 auto;
    }
    .search button{
        top: 31px;
        left: 770px;
    }
    main{
        top: 151px;
    }
    h1{
        left: auto;
    }
    #intro img{
        width: 512px;
        height: 768px;
        grid-column: 1/2;
        grid-row: 1/3;
    }
    #intro p{
        grid-column: 2/-1;
    }
    #intro{
        display: grid;
        grid-template-rows: 1fr 1fr;
        grid-template-columns: 1fr 1fr;
        justify-items: end;
    }
    menu{
        height: 768px;
        width: 128px;
        display: flex;
        flex-direction: column;
        background-color: var(--smoke);
        border: 2px solid var(--flame);
    }
    #detail{
        background-color: var(--night);
        color: var(--tiff);
        padding: 5px;
        top: -51px;
    }
    #detail h2{
        padding: 10px 0 25px;
    }
    #detail div{
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        grid-template-rows: 1fr;
    }
    dl{
        display: flex;
        flex-direction: column;
        align-content: space-around;
        flex-wrap: wrap;
        align-items: center;
    }
    #recipe{
        position: relative;
        top: -53px;
        display: grid;
        grid-template-columns: 1fr 3fr;
    }
    #side{
        position: relative;
        top: -58px;
    }
    #dishes{
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }
    #dishes section{
    gap: 10px;
    margin: 10px 5px;
    display: flex;
    flex-direction: column;
    }
    #dishes img{
        order: 1;
        width: 234px;

    }
    #dishes h3{
        order: 2;
    }
    #dishes div{
        order: 3;
    }
    #social ul{
        width: 640px;
    }
    footer{
        display: flex;
        gap: 55px;
        flex-wrap: wrap;
        justify-content: space-evenly;
        align-content: space-between;
        flex-direction: row-reverse;
    }
    footer div{
        display: flex;
        position: relative;
        flex-direction: column;
        align-items: flex-end;
        align-content: flex-end;
        left: 20px;
        flex-wrap: wrap;
    }
    small{
        position: relative;
        top: -173px;
        left: -18px;  
    }

    footer img{
        left: -114px;
        top: 33px;
    }
}