.menu-wrapper { text-align: center; border-bottom: 1px solid $border-color; background-color: $white-color; position: relative; } .main-navigation { ul { @include display-flex(flex); @include justify-content-center; @include align-items-center; @include flex-wrap(wrap); li { position: relative; a { color: $heading-color; padding: 1.5rem 1rem; font-size: 1rem; font-weight: 600; @include transition(all .3s ease-in-out); text-transform: uppercase; display: block; font-family: $heading-fonts; } &.menu-item-has-current, &.page_item_has_current, &.current-menu-item, &:hover { a { color: $secondary-color; } ul { a { color: $heading-color; } } } &.menu-item-has-children, &.page_item_has_children { a { padding-right: 1.5rem; position: relative; &::after { content: "\f0d7"; font-family: "Font Awesome 5 Free"; margin-left: .6125rem; margin-right: 0; position: absolute; right: 5px; top: 50%; @include transform(translateY(-50%)); @include transition(all .3s ease-in-out); font-size: 1rem; font-weight: 900; text-transform: initial; } } ul { background-color: $white-color; text-align: left; visibility: hidden; @include transition(all 500ms ease); top: 120%; left: 0; @include box-shadow(0 0px 20px rgba(166, 166, 166, .25)); width: 200px; position: absolute; -webkit-transform-origin: top; transform-origin: top; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; @include transform(scale(1, 0)); opacity: 0; @include radius(5px); margin: 0; float: none; li { a { display: block; padding: .5rem .6125rem; border: 1px solid $border-color; font-size: .875rem; text-transform: capitalize; &::after { display: none; } &:hover, &:focus-within { background-color: $secondary-color; color: $white-color; } } &.menu-item-has-children, &.page_item_has_children { position: relative; &::after { display: block; content: "\f0da"; font-family: 'Font Awesome 5 Free'; margin-left: .6125rem; margin-right: 0; position: absolute; right: 5px; top: 50%; @include transform(translateY(-50%)); @include transition(all .3s ease-in-out); font-size: 1rem; font-weight: 900; text-transform: initial; } &:hover, &:focus-within { a { &::after { content: '\f0d8'; } } } } ul { left: 100%; } &:hover, &:focus-within { ul { top: 0; opacity: 1; z-index: 1000; @include transform(scale(1, 1)); transition: transform 0.3s ease, opacity 0.2s ease .1s; -webkit-transition: -webkit-transform 0.3s ease, opacity 0.2s ease .1s; visibility: visible; li{ a{ &::after{ display: none; } } } } } } } &:hover, &:focus-within { a { &::after { content: '\f0d8'; } } ul { top: 100%; opacity: 1; z-index: 1000; @include transform(scale(1, 1)); transition: transform 0.3s ease, opacity 0.2s ease .1s; -webkit-transition: -webkit-transform 0.3s ease, opacity 0.2s ease .1s; visibility: visible; ul{ opacity: 0; visibility: hidden; @include transform(scale(1, 0)); top:120%; } } } } } } } .toggle-button { position: relative; width: 30px; height: 30px; @include transition(all .5s ease-in-out); display: none; background-color: transparent; border: none; -webkit-appearance: none; appearance: none; padding: 0; position: absolute; left: 30px; top: 45px; z-index: 99; &:focus { background-color: transparent; border-color: $orange-color; } span { position: absolute; height: 4px; border-radius: 4px; width: 100%; background-color: $secondary-color; top: 0; transition: transform .2s ease-in-out, opacity .2s ease-in-out; z-index: 1101; left: 0; right: 0; &:nth-child(1) { top: 0; } &:nth-child(2), &:nth-child(3) { top: 10px; } &:nth-child(4) { top: 20px; } } &.active { position: absolute; top: 15px; right: 15px; z-index: 1000; span { &:nth-child(1), &:nth-child(4) { opacity: 0; } &:nth-child(2) { transform: rotate(45deg); background-color: $secondary-color; } &:nth-child(3) { transform: rotate(-45deg); background-color: $secondary-color; } } } } @media #{$breakpoint-lg} { .menu-wrapper { @include display-flex(flex); @include justify-content-between; @include align-items-center; } .toggle-button { display: block; } .main-navigation { position: fixed; height: 100%; max-width: 280px; padding: 15px; padding-top: 50px; width: 100%; background-color: $heading-color; z-index: 999; top: 0; left: -100%; right: auto; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; -ms-overflow-style: -ms-autohiding-scrollbar; @include transition(all .5s ease-in-out); &::-webkit-scrollbar { width: 4px; background: $border-color; @include radius(4px); } &::-webkit-scrollbar-track { background-color: $border-color; @include radius(4px); } &::-webkit-scrollbar-thumb { @include radius(4px); background: $border-color; } ul { display: initial; width: 100%; @include justify-content-start; text-align: left; li { display: block; border-bottom: 1px solid $body-color; a { color: $white-color; padding: .5rem .6125rem; display: block; font-size: .875rem; } &.menu-item-has-children, &.page_item_has_children { position: relative; a { &::after { display: none; } } .dropdown-icon { position: absolute; right: 0; top: 5px; a { width: 28px; height: 28px; color: $white-color; border: 1px solid $body-color; @include radius(5px); z-index: 999; @include display-flex(flex); @include justify-content-center; @include align-items-center; @include flex-direction-column(column); padding: 0; &:hover { background-color: transparent; } } } ul { display: none; transition: initial; position: initial; top: initial; left: initial; display: none; transform: none; opacity: 1; transform-origin: initial; width: 100%; visibility: initial; background-color: transparent; li { width: 100%; border: 0; a { width: 100%; border: 0; color: $white-color; } &.menu-item-has-children, &.page_item_has_children { a { &::after { display: none; } } &::after { display: none; } } ul{ float: none; } } } &:hover, &:focus-within { a { &::after { display: none; } } ul { display: none; transition: initial; position: initial; top: initial; left: initial; display: none; transform: none; visibility: initial; transform-origin: initial; } } } &:hover { a { color: $secondary-color; } } } } } } @media #{$breakpoint-lg} { .Is-toggle { .site-header { .main-navigation { left: 0; } } } }