:root{
    --black: #000000;
    --blue: #14213D;
    --yellow: rgb(252, 163, 17);
    --grey: #e5e5e5;
    --white: #ffffff;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    font-size: 10px;
}

body{
    background: var(--grey) url('./images/five-white-plates-with-different-kinds-of-dishes-54455.jpg') center no-repeat;
    background-size: cover;
    height: 100vh;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    font-family: 'Poppins', sans-serif,arial;
}

a{
    text-decoration: none;
}

.container{
    margin: 3rem auto;
}
section{
    padding: 5rem 0;
}

.preloader{
    background-color: var(--white);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    z-index: 999;
}

.preloader img{
    height: 15rem;
    width: 15rem;
}
/* header style */
header{
    height: 20rem;
    width: 100%;
    position: absolute;
    top: 0;
    
}

header .container{
    padding: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-name{
    color: var(--yellow);
    font-size: 3.4rem;
    font-weight: bold;
}

header form{
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
}

header input{
    width: 20rem;
    padding: 0.5rem 2rem;
   border-radius: 0.3rem;
    border: 0;
}

header input:focus{
    outline: none;
}

.fa-search{
    color: var(--blue);
    background-color: var(--white);
    font-size: 1.6rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0.3rem;
    margin-left: 1rem;
}

.fa-random{
    color: var(--blue);
    background-color: var(--white);
    font-size: 1.6rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-left: 1rem;
    border-radius: 0.3rem;
}

/* header style ends */


.alert{
    background-color: var(--blue);
    color:var(--white);
    font-size: 2rem;
    border-radius:0.4rem;;
    padding:3rem 2rem;
    margin-top: 2rem;
    z-index:100;
    display:none;
}

/* welcome content */
.welcome-content{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0; 
    margin-top: 3rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    font-weight: bold;
}

.welcome-content h1{
    font-size: 4rem;
    color: var(--white);
    animation: text 3s ease-in-out infinite;
}

@keyframes text{
    0%{
       opacity: 0
    }
    100%{
      opacity: 1;
    }
}

.welcome-content p{
    font-size: 1.5rem;
    padding: 1rem 0;
    color: var(--yellow);
}
/* results section style start */
.results{
    margin: 15rem 0;
}
 
 .results-title{
     text-align: center;
     font-size: 2rem;
     color: var(--blue);
     margin: 0 2rem;
    }
 
 .results .container{
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     position: relative;
 }
 
 .results-grid{
     display: grid;
     grid-template-columns: 1 1fr;
     grid-gap: 1.5rem;
     margin-top: 3rem;
 }
 
 .results-grid-item{
     height: 18rem;
     width: 28rem;
     background: var(--black);
     border-radius: 0.5rem;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     position: relative;
     box-shadow: 1rem 1.5rem 1rem 0 rgba(0,0,0,0.5);
 }
 
 .results-grid-item img{
     height: 100%;
     width: 100%;
     border-radius: inherit;
 }
 .meal-info{
    position:absolute;
    bottom:0;
    left:0;
    height:100%;
    width:100%;
    background:rgba(0,0,0,0.7);
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    transition:opacity 0.2s  ease-in;
}

.results-grid-item:hover .meal-info{
  opacity:1;
}

.meal-info h3{
    font-size:2rem;
    text-align:center;
    font-family: Calibri, sans-serif;
    color: var(--white);
}


.single-meal{
    margin: 3rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.single-meal h2{
   font-size: 3.2rem;
   text-align: center;
}

.single-meal img{
    width: 27rem;
    height: 27rem;
    margin: 1.5rem;
    border: 0.4rem dashed var(--yellow);
    border-radius: 0.3rem;
}

.single-meal-info{
    background-color: var(--yellow);
    width: 90%;
    margin:auto;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.single-meal-info p{
    font-size: 1.5rem;
    font-weight: bold;
}
.single-meal .inst{
    margin: 1rem 3rem;
    letter-spacing: 0.05rem;
    line-height: 1.5;
    text-align: justify;
    font-size: 1.2rem;
}

.instructions{
    display: block;
    font-size: 3rem;
    font-weight: bold;
    text-decoration: underline;
    text-align: center;
}

.fa-share-square{
    position: absolute;
    top: 0;
    right: 0;
    font-size: 3rem;
    color: var(--yellow);
    margin-right: 1rem;
    cursor: pointer;
    animation: move 0.5s infinite;
}

@keyframes move{
    from{
        transform:scale(1);
    }
    to{
        transform: scale(1.08);
    }
}
.main{
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.main h3{
    text-align: center;
    background-color: var(--yellow);
    width: 90%;
    margin:auto;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.main ul{
   list-style-type: circle;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: flex-start;
}

.single-meal ul li{
    color:#2d2013;
    font-size: 1.2rem;
    padding: 0.2rem;
    margin: 1rem 5rem;
}
 /* results section style ends */


 /* media queries */
@media only screen and (max-width: 600px){
    .preloader img{
        height: 20rem;
        width: 20rem;
    }
     .results-grid-item{
        cursor: default;
     }

   .meal-info{
       opacity: 1;
       height: 30%;
       background-color: var(--blue);
       z-index: 1;
       cursor: pointer;
   }
 }
@media only screen and (min-width: 600px) and (max-width: 800px){
    header{
        height: 20rem;
    }
    .brand-name{
        font-size: 5rem;
    }
    header input{
        width: 40rem;
    }
    .results-grid{
        grid-template-columns: repeat(2,1fr);
    }
    .single-meal img{
        width: 40rem;
    }
    .single-meal-info p{
        font-size: 2rem;
    }
    .main p{
        font-size: 1.5rem;
    }
    .main h3{
        font-size: 2rem;
    }

    .single-meal ul li{
        font-size: 1.5rem;
    }
    .welcome-content h1{
        font-size: 6rem;
    }
}


@media only screen and (min-width: 801px){
    .preloader img{
        height: 30rem;
        width: 30rem;
    }
    .results-grid{
        grid-template-columns: repeat(3,1fr);
    }
    header{
        height: 20rem;
    }
    .brand-name{
        font-size: 5rem;
    }
    header input{
        width: 40rem;
    }
    .single-meal img{
        height: 35rem;
        width: 60rem;
    }
    .single-meal-info p{
        font-size: 2rem;
    }
    .main p{
        font-size: 1.5rem;
        margin-left: 10rem;
        margin-right: 10rem;
    }
    .main h3{
        font-size: 2rem;
    }

    .single-meal ul li{
        font-size: 1.5rem;
        margin: 1rem 10rem;
    }
    .welcome-content h1{
        font-size: 6rem;
    }
}

