.mainmenu{ width: 100%; background-color: var(--black-2); display: flex; flex-direction: row; padding: 20px 16px; justify-content: space-between; align-items: center; } .logo{ max-width: 36px; margin-bottom: -14px; margin-right: 12px; } .logoText{ color: var(--primary-color); font-size: 18px; } .nav{ position: absolute; top: 0; left: -100%; background-color: var(--black-2); height: 100%; width: 100%; } .navList{ list-style: none; display: flex; flex-direction: column; } .navItem:nth-child(2){ margin: 0 48px; } .navAnchor{ color: var(--purewhite); transition: var(--transition); position: relative; } .navAnchor:hover{ color: var(--primary-color); } .navAnchor::after{ position: absolute; content: ""; left: auto; height: 2px; background-color: var(--primary-color); width: 0; right: 0; bottom: -2px; transition: var(--transition); } .navAnchor:hover::after{ width: 100%; left: 0; right: auto; } .active{ color: var(--primary-color); } .navCTA{ display: none; } .mobileToggle{ display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 48px; background-color: transparent; } .menuBurger{ width: 20px; background-color: var(--purewhite); height: 3px; border-radius: 1.5px; } .menuBurger:nth-child(2){ margin: 5px 0; } @media screen and (min-width: 768px){ .mainmenu{ padding: 40px 60px; } .nav{ position: relative; top: auto; left: auto; background-color: none; height: auto; width: auto; } .navList{ list-style: none; display: flex; flex-direction: row; } .navItem:nth-child(2){ margin: 0 48px; } .navCTA{ display: block; } .mobileToggle{ display: none; } } @media screen and (min-width: 980px){ .mainmenu{ padding: 40px 120px; } .navList{ list-style: none; display: flex; flex-direction: row; } .navItem:nth-child(2){ margin: 0 48px; } }