@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

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

body {
    background-color: #f8f8f8;
}

header {
    width: 100%;
    height: 60px;
    background: #f8f8f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1em;
    position: relative;
}

.Logo {
    color: rgb(44, 44, 44);
    font-size: 1.5em;
}

.nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav ol {
    display: flex;
    list-style: none;
}

.nav ol li {
    margin: 0 1em;
}

.nav ol li a {
    text-decoration: none;
    padding: 0.2em 1.2em 0.9em 1.2em;
    border-radius: 10px 10px 0 0;
    color: rgb(39, 39, 39);
    transition: all 0.4s;
    position: relative;
    z-index: 1;
}

.nav ol li a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 41px;
    border-radius: 10px 10px 0 0;
    background: #853333;
    transform-origin: bottom;
    background: linear-gradient(to right, #2c6440, #3c4320, #170f27);
    transform: scaleY(0.05);
    z-index: -1;
    transition: all 0.4s;
}

.nav ol li a:hover::before {
    transform: scaleY(1.1);
}

.nav ol li a:hover {
    color: white;
}

input[type="checkbox"] {
    display: none;
}

.btn {
    display: none;
}

/* Hamburger Icon */
.btn-icon {
    display: none;
    width: 35px;
    height: 30px;
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    z-index: 2;
}

.btn-icon::before {
    content: "";
    display: block;
    width: 35px;
    height: 5px;
    background-color: #333333;
    border-radius: 5px;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.3s ease-in-out;
}

.btn-icon::after {
    content: "";
    display: block;
    width: 35px;
    height: 5px;
    background-color: #333333;
    border-radius: 5px;
    position: absolute;
    top: 15px;
    left: 0;
    transition: all 0.3s ease-in-out;
}

/* Change the hamburger to close (X) icon when checked */
#toggle-menu:checked + .btn-icon::before {
    transform: rotate(45deg);
    top: 10px;
}

#toggle-menu:checked + .btn-icon::after {
    transform: rotate(-45deg);
    top: 10px;
}

.nav {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #f8f8f8;
    transform: translateY(-100%);
    transition: all 0.4s;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#toggle-menu:checked ~ .nav {
    transform: translateY(0);
}

.nav ol {
    flex-direction: column;
    text-align: center;
    padding: 0;
    margin: 0;
}

.nav ol li {
    margin: 1em 0;
}

.nav ol li a {
    font-size: 1.2em;
    padding: 1em;
}

@media (max-width: 768px) {
    .btn {
        display: block;
    }

    .btn-icon {
        display: block;
    }

    .Logo {
        font-size: 1.2em;
    }

    .nav {
        display: none;
    }

    #toggle-menu:checked ~ .nav {
        display: flex;
    }
}

@media (min-width: 768px) {
    .nav {
        position: static;
        transform: none;
        display: flex;
        justify-content: flex-end;
    }

    .nav ol {
        flex-direction: row;
    }

    .btn-icon {
        display: none;
    }
}