@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

:root{
    --Rivik: #9e725b;
    --Ritvik-dark: #724228;
}

body{
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.6;
    font-family: 'Lora', sans-serif;
}
.pimg1, .pimg2, .pimg3{
    position: relative;
    opacity: 0.90;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment:fixed;
}

.pimg1{
    background-image: url('images/pimg3.jpg');
    height: 450px;
    width: 100%;
}
.pimg2{
    background-image: url('images/pimg4.jpg');
    height: 450px;
    width: 100%;
}
.ptext{
    position:absolute;
    top: 30%;
    width: 65%;
    text-align: center;
    color: black;
    letter-spacing: 5px;
    font-size: 30px;
    text-transform: uppercase;
    font-weight: 600;
}
/*  */
.btn{
    font-family: inherit;
    cursor: pointer;
    outline: 0;
    font-size: 1.05rem;
}
.text{
    opacity: 0.8;
}
.title{
    font-size: 2rem;
    margin-bottom: 1rem;
}

/*  */
.container{
    min-height: 50vh;
}
.meal-wrapper{
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    background-color:transparent;
    text-align: center;
}

.bg-color{
    background-color: white;
}

.meal-search{
    margin: 2rem 0;
}
.meal-search cite{
    font-size: 1rem;
}
.meal-search-box{
    margin: 1.2rem 0;
    display: flex;
    align-items: stretch;
}
.search-control, .search-btn{
    width: 100%;
}
.search-control{
    padding: 0 1rem;
    font-size: 1.1rem;
    font-family: inherit;
    border: 1px solid var(--Rivik);
    color: var(--Rivik);
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
}
.search-control::placeholder{
    color: var(--Rivik);
}

.search-btn{
    width: 55px;
    height: 55px;
    font-size: 1.8rem;
    background-color: var(--Rivik);
    color: white;
    border: none;
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
    transition: all 0.4s linear;
    -webkit-transition: all 0.4s linear;
    -moz-transition: all 0.4s linear;
    -ms-transition: all 0.4s linear;
    -o-transition: all 0.4s linear;
}
.search-btn:hover{
    background-color: var(--Ritvik-dark);
}

.meal-result{
    margin-top: 4rem;
}

#meal{
    margin : 2.4rem 0;
}

.meal-item{
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 21px -12px rgba(0, 0, 0, 0.79);
    margin: 2rem 0;
}

.meal-img img{
    width: 100%;
    display: block;
}

.meal-name{
    padding: 1.5rem 0.5rem;
}
.meal-name{
    font-size: 1.4rem;
}
.recipe-btn{
    text-decoration: none;
    color: white;
    background-color: var(--Rivik);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 0;
    display: block;
    margin: 1rem auto;
    width: 175px;
    border-radius: 2rem;
    transition: all 0.4s linear;
}
.recipe-btn:hover{
    background-color: var(--Ritvik-dark);
}

/* meal details */
.meal-details{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: var(--Rivik);
    border-radius: 1rem;
    width: 90%;
    height: 90%;
    overflow-y: scroll;
    display: none;
    padding: 2rem 0;
}
.meal-details::-webkit-scrollbar{
    width: 10px;
}
.meal-details::-webkit-scrollbar-thumb{
    background-color: white;
    border-radius: 2rem;
}

/* related to JS */
.showRecipe{
    display: block;
}
.meal-details-content{
    margin: 2rem;
}

.meal-details-content p:not(.recipe-category){
    padding: 1rem 0;
}

.recipe-close-btn{
    position: absolute;
    right: 2rem;
    top: 2rem;
    font-size: 1.8rem;
    background-color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.recipe-title{
    letter-spacing: 1px;
    padding-bottom: 1rem;
}
.recipe-category{
    background-color: white;
    font-weight: 600;
    color: var(--Rivik);
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
}

.recipe-category{
    background-color: white;
    font-weight: 600;
    color: var(--Rivik);
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
}
.recipe-instruct{
    padding: 1rem 0;
}
.recipe-meal-img img{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
    display: block;
}
.recipe-link{
    margin: 1.4rem 0;
}
.recipe-link a{
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.4s linear;
}

.recipe-link a:hover{
    opacity: 0.8;
}

/*  */
.notFound{
    grid-template-columns: 1fr!important;
    color: var(--Rivik);
    font-size: 1.8rem;
    font-weight: 600;
    width: 100%;
}

/* conatct section */
.section{
    text-align: center;
    padding: 3em 2em;
    width: 100%;
    height: fit-content;
    background-color: #282e34; 
    color: #ddd;
}

.heading-style{
    font-size: 40px;
    font-family: "Cardo", serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.90;
    margin-top: 3em;
  }

.contact-style{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2em;
    height: fit-content;
    margin-top: 2em;
}

a, ul{
    display: flex;
    flex-direction: row;
    justify-content: center;
    list-style: none;
    text-decoration: none;
    color: #f4f4f4;
    opacity: 0.90;
    font-weight: unset;
    font-family: "Cardo", serif;
    letter-spacing: 2px;
}
a:hover{
    border: none;
    outline: none;
    border-radius: 10px;
    text-decoration: none;
    color:  rgb(6, 17, 27);
}
li{
    margin: 1rem;
}
.contacts{
    display: flex;
    justify-content: center;
    flex-direction: row;
    color: #f4f4f4;
    transition: transform 0.3s ease-out;
    transform: translateY(0);
}
.contacts:hover{
    color: #f4f4f4;
    transform: translateY(10px);
}
.lastfooter{
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    margin: 0 auto;
    padding: 2em 0;
    border-top: 4px solid rgb(204, 94, 94);
    width: fit-content;
}



/* Media Queries to make responsive */
@media screen and (min-width: 600px){
    .meal-search-box{
        width: 540px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (min-width: 768px) {
    #meal{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .meal-item{
        margin: 0;
    }
    .meal-details{
        width: 700px;
    }
}

@media screen and (min-width: 992px) {
    #meal{
        grid-template-columns: repeat(3, 1fr);
    }
    
}

@media screen and (max-width: 600px){
    .ptext{
        font-size: 20px;
    }
}
