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

html,body{
    width: 100%;
    height: 100%;
    font-family: 'Roboto', sans-serif;
}

:root{
    --background-color :#F4EDEB;
    --primary-color :#6D7993  ;
    --secondary-color :#CC8E35 ;
}

body{
    
    background-image: url(./assest/bg3.png);
    background-size: cover;
    background-repeat: repeat;
    height: 100vh; /* Set an initial height, this can be any value you prefer */
    transition: height 0.3s; /* Add a transition for smooth resizing */
}

header{
    text-align: center;
    margin-bottom: 4rem;
    background-color:var(--secondary-color);
    padding-block: 1rem;
    opacity: 0.5;
}
h1{
    text-transform: uppercase;
    font-family: 'girloy';
}

.container{
    width: 70%;
    margin: 0 auto;
    position: relative;
   padding: 3rem;
}

#recipe-list{
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    gap: 2rem;
    padding-bottom: 5rem;
    margin-bottom: 3rem;
}

#recipe-list.active{
    display: flex;
}

#recipe-list .recipe-item{
    width: 500px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 10px rgba(199, 186, 186, 0.3);
    padding: 1rem;
    background: rgb(248, 226, 217);
}
.description{
    display: none;
    flex-direction: column;
}
.description.active{
    display: flex;
}
#recipe-list .recipe-item img{
    width: 200px;
    height: 200px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    margin-block: 1.3rem;
    align-self: center;
}
.title{
    font-size: 1rem;
    font-weight: bold;
}
.ingredients{
    display: flex;
    gap: 5px;
    text-align: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--primary-color);
    font-size: 13px;
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
}

.recipe-item .btn {
    text-decoration: none;
    background-color: var(--secondary-color);
    color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    margin-top: 0.5rem;
    font-size: 1rem;
    border: none;
}

.instructions{
    width: 100%;
    height: 200px;
   overflow: hidden;
   margin-top: 20px;
   display: none;
   background-color: var(--primary-color);
   transition: all 0.3s ease-in-out;
   justify-content: center;
   align-items: center;
   padding: 10px;
   list-style: none;
   font-size: 15px;
    color: var(--background-color);
}

.instructions.active{
    list-style: none;
    display: block;
   animation: pop-up 0.3s ease-in-out;
}
/* it should look like it is poping up from inside the recipe-item card not from the outside */

@keyframes pop-up{
    0%{
        transform: scale(0);
    }
    100%{
        transform: scale(1);
    }
}

.showRecipe{
    display: none;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
    height:1000px;
    max-height: 700px;
    padding-block: 2rem;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--primary-color);
    padding-inline: 4rem;
    overflow-y: scroll;
}
.showRecipe.active{
    display: flex;
}

.showRecipe h2{
    font-size: 1.4rem;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--background-color);
}

.showRecipe img{
    width: 200px;
    height: 200px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    margin-block: 1.3rem;
    align-self: center;
}
.close-btn{
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 10px;
    background-color: var(--secondary-color);
    color: var(--background-color);
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 3rem;
}
.showRecipe p{
    color: rgb(238, 223, 195);
    text-align: center;
}
.showRecipe .showRecipeSummary{
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.showRecipe .showRecipeIngredients{
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.showRecipe .showRecipePreparation{
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.refresh-btn{
    text-decoration: none;
    background-color: var(--secondary-color);
    color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    margin-top: 0.5rem;
    font-size: 1rem;
    border: none;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
   margin-bottom: 3rem;
}