.menu-button {
background-color: transparent;
border: none;
outline: none;
display: flex;
flex-direction: column;
align-items: end;
gap: 6px;
cursor: pointer;
position: relative;
.line {
display: block;
background-color: var(--black-color);
width: 24px;
height: 4px;
border-radius: 2px;
transition: all 0.3s ease-in-out;
transform-origin: center;
&:nth-of-type(2) {
width: 32px;
}
}
}
.menu-button.active {
.line {
&:nth-of-type(1) {
transform: translateY(10px) rotate(45deg);
width: 32px;
}
&:nth-of-type(2) {
opacity: 0;
transform: scaleX(0);
}
&:nth-of-type(3) {
transform: translateY(-10px) rotate(-45deg);
width: 32px;
}
}
}
.menu-container {
position: absolute;
top: 100%;
left: 0;
width: 90%;
height: 100vh;
overflow-y: auto;
overflow-x: hidden;
padding: 1.5rem;
background-color: var(--white-color);
z-index: 100;
transform: translateX(-100%);
opacity: 0;
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; .menu {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0;
} .menu-item {
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
> a {
flex: 1;
font: 600 2rem/1.2 var(--primary-font);
color: var(--secondary-color);
padding: 1rem 0;
text-decoration: none;
position: relative;
min-width: 0;
} &.current-menu-item > a::before,
&.current-menu-parent > a::before,
&.current-page-ancestor > a::before {
content: "";
position: absolute;
top: -20px;
left: 50%;
transform: translateX(-50%);
width: 26px;
height: 26px;
background-image: url(//notagency.com.br/wp-content/themes/notagency/assets/images/estrela-not.svg);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
}
.submenu-toggle {
background: none;
border: none;
padding: 0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
flex-shrink: 0;
margin-left: 1rem;
svg {
width: 24px;
height: 24px;
stroke: var(--secondary-color);
transition: transform 0.3s ease;
}
&.active svg {
transform: rotate(180deg);
}
}
.sub-menu {
list-style: none;
padding: 0;
margin: 0;
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease-in-out;
background-color: rgba(0, 0, 0, 0.02);
width: 100%;
order: 999;
&.active {
max-height: 1000px;
}
> .menu-item {
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
padding-left: 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
> a {
flex: 1;
font: 600 1.5rem/1.2 var(--primary-font);
padding: 0.75rem 0;
min-width: 0;
} &.current-menu-item > a::before,
&.current_page_item > a::before {
left: -1.5rem;
width: 3px;
height: 60%;
}
}
.sub-menu {
background-color: rgba(0, 0, 0, 0.04);
width: 100%;
order: 999;
> .menu-item {
padding-left: 2rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
> a {
flex: 1;
font: 500 1rem/1.2 var(--secondary-font);
padding: 0.5rem 0;
min-width: 0;
} &.current-menu-item > a::before,
&.current_page_item > a::before {
left: -2.5rem;
width: 2px;
height: 50%;
}
}
}
}
}
.menu-container.active {
transform: translateX(0);
opacity: 1;
}
.menu-container + .menu-overlay {
display: none;
}
.menu-container.active + .menu-overlay {
display: block;
position: fixed;
top: 100%;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 99;
}
.menu-open {
overflow: hidden;
}
.search-button {
cursor: pointer;
background-color: transparent;
outline: none;
border: none;
display: inline-flex;
vertical-align: middle;
height: 110px;
margin-top: 40px;
width: 45%;
}
.header__link-wrapper {
display: inline-flex;
align-items: center;
gap: 0.5rem;
} @media (min-width: 1024px) {
.search-button {
cursor: pointer;
display: block;
height: auto;
margin-top: 0;
width: auto;
}
.menu-button {
display: none;
}
.menu-container {
position: static;
width: auto;
height: auto;
overflow: visible;
padding: 0;
background-color: transparent;
transform: translateX(0);
opacity: 1;
display: flex;
align-items: center;
gap: 1.5rem;
.menu-item {
border-bottom: none;
display: block;
position: relative;
width: auto;
justify-content: initial;
> a {
font: 400 2rem/1 var(--primary-font);
padding: 0.5rem 0;
white-space: nowrap;
transition: color 0.3s ease;
min-width: initial;
&:hover {
color: var(--primary-color);
}
}
.submenu-toggle {
width: 20px;
height: 20px;
margin-left: 0.25rem;
display: inline-flex;
vertical-align: middle;
svg {
width: 16px;
height: 16px;
}
}
&.current-menu-item > a::before,
&.current-menu-parent > a::before,
&.current-page-ancestor > a::before {
content: "";
position: absolute;
top: 0;
left: 100%;
transform: translateX(-50%);
width: 16px;
height: 16px;
background-image: url(//notagency.com.br/wp-content/themes/notagency/assets/images/estrela-not.svg);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
}
.header__link-wrapper {
margin-top: 0;
}
.sub-menu {
position: absolute;
top: 100%;
left: 0;
max-width: 280px;
max-height: none;
background-color: #fff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border-radius: 4px;
padding: 0.5rem 0;
margin-top: 0.5rem;
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: all 0.3s ease;
z-index: 1000;
width: auto;
order: initial;
&.active {
opacity: 1;
visibility: visible;
transform: translateY(0);
max-height: none;
}
> .menu-item {
padding-left: 0;
display: block;
border-bottom: none;
width: auto;
justify-content: initial;
> a {
font: 600 1.25rem/1.4 var(--primary-font);
padding: 0.75rem 1.5rem;
display: block;
min-width: initial;
&:hover {
background-color: rgba(180, 201, 65, 0.1);
}
} &.current-menu-item > a::before,
&.current_page_item > a::before {
left: 0;
width: 3px;
height: 100%;
top: 0;
transform: none;
}
}
.sub-menu {
position: absolute;
top: 0;
left: 100%;
margin-top: 0;
margin-left: 0.5rem;
width: auto;
order: initial;
> .menu-item {
padding-left: 0;
display: block;
width: auto;
justify-content: initial;
> a {
font: 500 1.25rem/1.4 var(--secondary-font);
padding: 0.5rem 1.5rem;
min-width: initial;
}
&.current-menu-item > a::before,
&.current_page_item > a::before {
left: 0;
width: 2px;
height: 100%;
}
}
}
}
}
.menu {
flex-direction: row !important;
gap: 2rem !important;
align-items: center;
}
.menu-item:hover > .sub-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.menu-overlay {
display: none !important;
}
.menu-open {
overflow: auto;
}
}