/****************/
/* Header + Nav */
/****************/

header {
    padding: 1rem 3rem;
    font-size: var(--fs-md);
    background-color: var(--clr-primary-50);
}

nav,
nav .menu-items,
nav ul {
    display: flex;
    gap: 3rem;
    align-items: center;
}

nav .logo {
    width: 180px;
    margin-right: auto;
    line-height: 0;
}

nav ul li {
    transition: var(--timing-function) 0.2s;
}

nav ul li:hover {
    color: var(--clr-primary-700);
}

nav #btn-translate {
    display: grid;
    place-items: center;
}

/* Hiding Elements by Google Translate */
nav #google-translate,
.skiptranslate {
    display: none;
}

nav #btn-sign-in {
    padding: 0.375rem 1.25rem 0.5rem;
    border-radius: var(--br-small);
    font-family: var(--ff-satoshi-medium);
    font-size: var(--fs-md);
    background-color: var(--clr-primary-600);
    color: var(--clr-primary-50);
    transition: var(--timing-function) 0.2s;
}

nav #btn-sign-in:hover {
    background-color: var(--clr-primary-700);
}

/* Sticky Nav */
header.sticky {
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: rgba(254, 241, 249, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header.sticky ~ main > .hero-section {
    /* Adding original height of nav to the padding-top of .hero-section (so that the elements does not shift abruptly and transition occurs smoothly ) */
    padding-top: 65px;
}

/* Hamburger Menu */
nav .menu-hamburger {
    position: relative;
    display: none;
    height: 40px;
    width: 40px;
    place-items: center;
    cursor: pointer;
}

nav .menu-hamburger span {
    position: absolute;
    display: block;
    height: 2px;
    width: 30px;
    background-color: var(--clr-primary-700);
    border-radius: 28px;
    transform: translateY(10px);
    transition: var(--timing-function) 0.5s;
}

nav.active .menu-hamburger span {
    transform: translateY(0) rotate(-45deg);
}

nav .menu-hamburger::before {
    content: "";
    position: absolute;
    height: 2px;
    width: 30px;
    background-color: var(--clr-primary-700);
    border-radius: 28px;
    transform: translateY(-10px);
    box-shadow: 0 10px var(--clr-primary-700);
    transition: var(--timing-function) 0.5s;
}

nav.active .menu-hamburger::before {
    transform: translateY(0) rotate(45deg);
    box-shadow: none;
}

/*****************/
/* Media Queries */
/*****************/

@media only screen and (max-width: 900px) {
    nav .menu-items {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100svh;
        transform: translate(120%);
        flex-direction: column;
        justify-content: center;
        background-color: var(--clr-neutral-50);
        font-family: var(--ff-satoshi-medium);
        font-size: var(--fs-lg);
        opacity: 0;
        transition: var(--timing-function) 0.5s;
    }

    nav.active .menu-items {
        transform: translate(0);
        opacity: 1;
    }

    nav ul {
        flex-direction: column;
    }

    nav .menu-hamburger {
        display: grid;
    }
}

@media only screen and (max-width: 680px) {
    header {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}
