.navbar { display: flex; justify-content: center; align-items: center; background-color: var(--white); } .navContent { display: flex; flex-direction: row; flex-wrap: none; justify-content: space-between; align-items: center; width: stretch; max-width: calc(1440rem / 16); height: auto; padding: calc(28rem / 16) calc(136rem / 16); } .logo { display: flex; justify-content: center; align-items: center; } .logo:hover { cursor: pointer; } .logo img { width: calc(96rem / 16); } .navMenu { display: inline-flex; flex-direction: row; flex-wrap: none; justify-content: space-between; align-items: baseline; margin: 0; padding: 0; width: calc(512rem / 16); } .navMenu li { list-style: none; text-align: center; } .navMenu a { color: var(--purple-2); text-decoration: none; } .navMenu a.currentPage { color: var(--blue-2); } .navMenu > li:hover > a { color: var(--blue-2); font-weight: 600; } /* Prevents the menu items from shifting when made bold on hover */ .navMenu > li > a::before { display: block; content: attr(title); font-weight: 600; height: 0; overflow: hidden; visibility: hidden; } .navMenu > li > a { padding: 1rem; } .dropdownWrapper { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; } .dropdown { visibility: visible; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; position: absolute; margin: 0; margin-top: calc(48rem / 16); padding: 0; border-radius: calc(8rem / 16); background-color: var(--white); box-shadow: 0 calc(8rem / 16) 1rem var(--blue-1-20); font-size: calc(14rem / 16); } .dropdown > li { width: 100%; } .dropdown > li > a { padding: calc(8rem / 16); width: 100%; box-sizing: border-box; } .dropdown > li:hover > a, .dropdown > li > a:focus { background-color: var(--blue-1-20); } .dropdown > li:first-child > a { padding-top: 1rem; border-radius: calc(8rem / 16) calc(8rem / 16) 0 0; } .dropdown > li:last-child > a { padding-bottom: 1rem; border-radius: 0 0 calc(8rem / 16) calc(8rem / 16); } .navMenu > li .dropdown { visibility: hidden; } .navMenu > li:hover .dropdown, .navMenu > li:focus-within .dropdown { visibility: visible; } /* On a smaller desktop screen, keep the same navbar layout but decrease the * horizontal padding so it still fits */ @media screen and (max-width: calc(960rem / 16)) { .navContent { padding: calc(28rem / 16) calc(64rem / 16); } }