@import url('https://fonts.googleapis.com/css2?family=Courgette&family=Lobster&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

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

body {
    background: linear-gradient(to bottom right, #fbdbad, #f38e82);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;

}

button {
    cursor: pointer;
}

.container {
    background: #f9f7f6;
    width: 92%;
    margin-top: 25px;
    height: auto;
    min-height: 110vh;
    border-radius: 15px;
}

header {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    margin-top: 15px;
    font-family: "Nunito Sans", sans-serif;
    padding: 0 30px;
    height: 70px;
}

header div {
    display: flex;
    align-items: center;
    height: 80%;
}

.logo {
    width: 15%;
    gap: 15px;

}

.icons {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom right, #fbdbad, #f38e82);
    width: 30%;
    height: 100%;
    border-radius: 50%;
    color: #f9f7f6;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.text {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-family: "Lobster", sans-serif;
    font-weight: 400;
    color: #615551;
}

.searchBox {
    display: flex;
    align-items: center;
    width: 40%;
    position: relative;
}

#searchInput {
    width: 70%;
    border-radius: 25px;
    border: none;
    height: 90%;
    padding: 15px 25px;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #615551;

}

#searchInput::placeholder {
    color: #b4b4b4;
}

#searchInput:focus {
    outline: none;

}

#searchBtn {
    width: 30%;
    height: 90%;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border: none;
    background: linear-gradient(to bottom right, #fbdbad, #f38e82);
    color: #f9f7f6;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    font-weight: 700;
    font-family: "Nunito Sans", sans-serif;
    position: absolute;
    left: 65%;
    text-transform: uppercase;
    transition: transform .3s ease-in-out;
}

#searchBtn:hover {
    transform: scale(1.03);
}

.others {
    width: 30%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    font-size: clamp(0.9rem, 1.6vw, 1.3rem);
    gap: 15px;
}

.others div {
    display: flex;
    gap: 10px;
    width: 45%;
    opacity: 0.5;
    cursor: not-allowed;
}

.others div i {
    color: #f38e82;
}

main {
    margin-top: 35px;
    width: 100%;
    height: calc(100vh - 90px);
    display: flex;
    overflow: hidden;
    font-family: "Nunito Sans", sans-serif;

}

.recipesSide {
    width: 40%;
    min-width: 320px;
    background: #ffffff;
    padding: 15px 20px;
    overflow-y: auto;
    margin-bottom: 50px;
}

.recipesSide::-webkit-scrollbar {
    width: 8px;
}

.recipesSide::-webkit-scrollbar-track {
    background: transparent;
}

.recipesSide::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #fbdbad, #f38e82);
    border-radius: 10px;
}

.recipesSide::-webkit-scrollbar-thumb:hover {
    background: #f38e82;
}

.recipe {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    cursor: pointer;
    transition: transform .3s ease-in-out;

}

.recipe:hover {
    background: #fafafa;
    transform: scale(1.03);
}

.recipe:not(:last-child) {
    border-bottom: 1px solid #f1f1f1;
}

.recipeImg {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
}

.recipeImg img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.recipeTxt h2 {
    font-size: 1rem;
    color: #f38e82;
    font-weight: 700;
}

.recipeTxt p {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

/* .recipesDetails {
    width: 60%;
    background: #f9f5f3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1rem;
} */
.recipesDetails {
    width: 60%;
    background: #f9f5f3;
    overflow-y: auto;
    padding-bottom: 30px;
    height: auto;

}

/* HERO */
.recipeHero {
    position: relative;
    height: 320px;
}

.recipeHero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, #f7c59f65, #f38d8259);

}

.recipeHero img {
    width: 100%;
    height: 100%;
    object-position: center;
    object-fit: cover;
}


.recipeTitle {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(-10deg) skewX(5deg);
    background: linear-gradient(to right, #fbdbad, #f38e82);
    padding: 12px 42px;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    z-index: 10;
}


/* META */
.recipeMeta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 50px;
    background: #fff;
}

.metaItem {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f38e82;
    font-weight: 600;
}

.metaItem i {
    font-size: 1.2rem;
}

.servingBtns button {
    border: 1px solid #f38e82;
    background: transparent;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
}


/* INGREDIENTS */
.ingredients {
    padding: 50px 80px;
}

.ingredients h3 {
    text-align: center;
    color: #f38e82;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.ingredientsGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 60px;
}

.ingredientsGrid p {
    position: relative;
    padding-left: 30px;
    color: #666;
    line-height: 1.6;
}

.ingredientsGrid p::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #f38e82;
    font-weight: 700;
}


/* HOW TO COOK */
.howToCook {
    background: #fff;
    padding: 50px 80px;
    text-align: center;
}

.howToCook h3 {
    color: #f38e82;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.howToCook p {
    color: #777;
    line-height: 1.7;
    max-width: 650px;
    margin: auto;
}

.backBtn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: none;
    background: #f38d82;
    color: #f1f1f1;
    font-weight: 700;
    font-family: "Nunito Sans", sans-serif;
}

.hidden {
    display: none !important;
}




@media (max-width: 992px) {

    header {
        height: 65px;
        padding: 0 20px;
    }

    .logo {
        width: 18%;
    }

    .searchBox {
        width: 42%;
    }

    .others {
        width: 28%;
    }

    main {
        flex-direction: column;
    }

    .recipesSide {
        width: 100%;
        height: 45vh;
    }

    .recipesDetails {
        width: 100%;
        height: 55vh;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: stretch;
        padding: 0 15px;
        gap: 15px;
        height: auto;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    .icons {
        width: 45px;
        height: 45px;
    }

    .searchBox {
        width: 100%;
    }

    #searchInput {
        width: 100%;
        padding-right: 120px;
    }

    #searchBtn {
        width: 110px;
        left: auto;
        right: 0;
    }

    .others {
        width: 100%;
        justify-content: center;
    }

    .others div {
        width: auto;
    }

    main {
        flex-direction: column;

    }

    .recipesSide {
        width: 100%;
        height: 100%;
        padding-bottom: 90px;
    }

    .recipesDetails {
        width: 100%;
        height: 100%;
        display: none;
    }

    .recipesDetails.active {
        display: block;
    }

    .recipesSide.hidden {
        display: none;
    }

    .backBtn {
        display: block;
        z-index: 100;
    }
}