@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', sans-serif;
}

body{
    background: white;
    min-height: 100vh;
    overflow-x: hidden;

    display: flex;
    flex-direction: column;
}

/* NAVBAR */

header{
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #65B741;
    padding: 20px 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.05);

}

.logo{
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1ems;
}

.group{
    display: flex;
    align-items: center;
}

header ul{
    position: relative;  
    display: flex;
    gap: 30px;
}

header ul li{
    list-style: none;
}

header ul li a{
    position: relative;
    text-decoration: none;
    font-size: 1em;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

header ul li a::before{
    content: ' ';
    position: absolute;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: white;
    transform: scaleX(0);
    transition: transform 0.5s ease-in-out;
    transform-origin: right;
}

header ul li a:hover::before{
    transform: scaleX(1);
    transform-origin: left;
}

/* SUBNAVBAR */
header ul li ul.home{
    position: absolute;
    top: 20px;
    left: -10px;
    padding: 10px;
    width: 370px;
    background: #FFB534;
    border-radius: 10px;
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.05);
    
    flex-direction: column;
    display: none;
}

header ul li ul.informasi-pangan{
    position: absolute;
    top: 20px;
    left: 80px;
    padding: 10px;
    width: 412px;
    background: #FFB534;
    border-radius: 10px;
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.05);
    
    flex-direction: column;
    display: none;
}

header ul li:hover ul.home{
    display: flex;
    gap: 10px;    
} 

header ul li:hover ul.informasi-pangan{
    display: flex;
    gap: 10px;    
} 

header ul li ul li.home{
    position: relative;
    width: 100%;
}

header ul li ul li.informasi-pangan{
    position: relative;
    width: 100%;
}
/* SUB NAV */


header .search{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    z-index: 10;
    cursor: pointer;
}

.searchBox{
    position: absolute;
    right: -100%;
    width: 100%;
    height: 100%;
    display: flex;
    background: #65B741;
    align-items: center;
    padding: 0 30px;
    transition: 0.5s ease-in-out;
}

.searchBox.active{
    right: 0;
}

.searchBox input{
    width: 100%;
    border: none;
    outline: none;
    height: 50px;
    color: white;
    font-size: 1.25em;
    background: #65B741;
    border-bottom: 1px solid rgb(255, 255, 255);
}

input::placeholder{
    color: white;
}

.searchBtn{
    position: relative;
    left: 30px;
    top: 2.5px;
    transition: 0.5s ease-in-out;
    color: white;
}

.searchBtn.active{
    left: 0;
}

.closeBtn{
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
    scale: 0;
    color: white;
}

.closeBtn.active{
    opacity: 1;
    visibility: visible;
    transition: 0.5s;
    scale: 1;
}

.menuToggle{
    position: relative;
    display: none;
    color: white;
}


/* MAIN */
main{
    max-width: 1200px;
    width: 100%;
    margin-inline: auto;
    padding: 1rem 0 2rem 0;
    flex: 1;

    display: flex;
    flex-direction: column;
}

main .title{
    font-size: 2.6rem;
    color: #FFB534;
}

main .content{
    flex: 1;
    padding: 0 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

main .content .content-description{
    flex: 1 1;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.05);
}

main .content .content-description .title-content{
    font-size: 2.5rem;
    margin-block: 1rem;
    color: #65B741;
}

main .content .content-description p{
    line-height: 1.7rem;
    font-size: 1.2rem;
    text-align: justify;
}

main .content .sub-content-description{
    padding: 1rem 3rem;
    border-radius: 20px;
    width: 55%;
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.05);
}

main .content .sub-content-description h2{
    color: #FFB534;
}

main .content .sub-content-description p{
    text-align: start;
}

main .content .content-image {
    flex: 1;
    display: flex;
}

main .content .content-image img {
    margin: auto;
    min-width: 250px;
    width: 500px;
}


/* RESPONSIF*/
@media (max-width: 800px){

    .searchBtn{
        left: 0;
    }

    .menuToggle{
        position: absolute;
        display: block;
        font-size: 2em;
        cursor: pointer;
        transform: translateX(30px);
        z-index: 10;
    }

    header .navigation{
        position: absolute; 
        opacity: 0;
        visibility: hidden;
        left: 100%;
    }

    header ul li a{
        color: #65B741;
    }

    header ul li a::before{
        background: #65B741;
    }

    header.open .navigation{
        top: 80px;
        opacity: 1;
        visibility: visible;
        left: 0;
        display: flex;
        flex-direction: column;
        background: white;
        width: 100%;
        height: calc(100vh - 80px);
        padding: 40px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    header.open .navigation li a{
        font-size: 1.25em;
    }

    .hide{
        display: none;
    }

    /* SUBNAVBAR */
    header ul li ul.home {
        position: relative;
        top: 0;
        left: 0;
        padding: 10px 0;
        background: white;
        border-radius: 0;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        width: 100%;

        flex-direction: column;
        display: none;
    }

    header ul li ul.informasi-pangan{
        position: relative;
        top: 0;
        left: 0;
        padding: 10px 0;
        width: 100%;
        background: white;
        border-radius: 0;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        
        flex-direction: column;
        display: none;
    }

    /* MAIN */
    main{
        padding: 1rem 3rem;
    }

    main .content {
        padding: 0;
        flex-direction: column;
        gap: 2rem;
    }

    main .content .content-description .title {
        font-size: 2.5rem;
    }

    main .content .content-description p {
        font-size: 1rem;
    }

    main .content .sub-content-description{
        width: 100%;
    }

    main .content .content-image {
        order: -1;
    }

    main .content .content-image img {
        margin: auto;
    }

}

@media (max-width: 600px){
    main .content .content-image img {
        margin: auto;
        width: 450px;
    }
}