@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'poppins', Courier, monospace;
    list-style: none;
    text-decoration: none;
}


:root {
    --primary-color: #0F2847;
    --secondary-color: #1D3557;
    --ternary-color: #3E2100;
    --accent-color: #e7e7e7;
    --text-light: #fff;
    --background-color: #fff;
    --sideText-color: #ababab;
}

/* smooth scrolling */

html {
  scroll-behavior: smooth;
}

header nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2.5rem;
    background-color: #ffffffc9;
    z-index: 2;
    box-shadow: 0px -4px 13px 2px black;
}

nav .logo {
    font-size: 26px;
    font-weight: 600;
    color: #000;

    & span {
        color: var(--primary-color);
    }
}


nav .menuSection .menuIcon {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

nav .menuSection .menuIcon span {
    display: block;
    width: 32px;
    height: 4px;
    border-radius: 25px;
    background-color: #000;
    margin: 4px 0;
    transition: all 0.3s ease;
}

nav .menuSection.active .menuIcon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

nav .menuSection.active .menuIcon span:nth-child(2) {
    opacity: 0;
}

nav .menuSection.active .menuIcon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

nav .menuSection ul {
    display: flex;
    gap: 30px;
}

nav .menuSection ul li a {
    font-size: 18px;
    font-weight: 400;
    color: #000;
    padding: 0 5px;
    transition: 0.3s ease;
    position: relative;

    &:hover {
        color: var(--primary-color);
    }
}

nav .menuSection ul li:last-child a {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 15px;
    border-radius: 4px;
}

nav .menuSection ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* removing underline from creater link on hover */

nav .menuSection ul li:last-child a::after {
    display: none;
}

nav .menuSection ul li a:hover::after {
    transform: scaleX(1);
}



@media (max-width: 1020px) {
    nav .menuSection .menuIcon {
        display: block;
    }

    nav .menuSection ul {
        position: absolute;
        top: 54px;
        right: -360px;
        background-color: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        border-radius: 4px;
        min-width: 260px;
        transition: all 0.5s ease;
        /* display: none; */
        opacity: 0;
        z-index: 100;
        gap: 15px;
        box-shadow: -6px 8px 18px 5px #00000080;
    }

    nav .menuSection.active ul {
        right: 0;
        display: flex;
        opacity: 1;
    }

    nav .menuSection ul li {
        width: 100%;
    }

    nav .menuSection ul li a {
        padding-bottom: 10px;
        display: block;
        width: 100%;
        border-bottom: 2px solid rgb(87 87 87 / 20%);
    }

    nav .menuSection ul li:last-child a {
        margin-top: 12px;
        text-align: center;
        letter-spacing: 1.2px;
        padding: 6px 12px;
    }

    nav .menuSection ul li a::after {
        display: none;
    }
}

@media (max-width: 650px) {
    header nav {
        padding: 0.5rem 1.5rem;
    }
}

@media (max-width: 550px) {
    header nav {
        padding: 0.5rem 1rem;
    }
}