/* menu */
#menu-primary {
    display: flex;
    align-items: flex-start;
    gap: 2em;
}

#menu-primary .menu-link-depth-0 > .menu-link-title{
    color: var(--wp--preset--color--primary);
}

/* menu-item-depth-0 */
#menu-primary .menu-item-depth-0 {
    position: relative;
}

/* menu-link-depth-0 */
#menu-primary .menu-link-depth-0 {
    position: relative;
    padding: 0.75em 0em;
    color: var(--wp--preset--color--text-secondary);
    text-decoration: none;
    width: fit-content;
    text-align: center;
    text-align: left;
}

#menu-primary button.menu-link-depth-0 {
    padding: 1em 0em 0em 0em;
}

#menu-primary .menu-item-depth-0.menu-item-has-icon button.menu-link i,
#menu-primary .menu-item-depth-0.menu-item-has-icon a.menu-link i {
    font-size: var(--wp--preset--font-size--large);
    font-weight: 300;
    color: var(--wp--preset--color--primary);
}

#menu-primary .menu-item-depth-1 {
    max-width:140px;
}

/* menu-link-title */
#menu-primary .menu-link-depth-0 .menu-link-title {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    position: relative;
}

#menu-primary .menu-link-depth-0 .menu-link-title::before,
#menu-primary .menu-link-depth-0 .menu-link-icon::before {
    position: absolute;
    content: '';
    display: block;
    left: 0;
    right: 0;
    width: 100%;
    height: 2.5px;
    background: var(--wp--preset--color--secondary);
    position: absolute;
    bottom: -0.25em;
    opacity: 0;
    transition: ease .3s;
}

#menu-primary .current-menu-item .menu-link-depth-0 .menu-link-title::before,
#menu-primary .current-menu-ancestor .menu-link-depth-0 .menu-link-title::before,
#menu-primary .current-menu-item .menu-link-depth-0 .menu-link-icon::before,
#menu-primary .current-menu-ancestor .menu-link-depth-0 .menu-link-icon::before {
    opacity: 1;
}

#menu-primary .menu-link-depth-0:hover .menu-link-title::before{
    opacity: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: ease .3s;
} 

#menu-primary .menu-depth-1 {
    padding: 0.5em 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 99;
    opacity: 0;
    min-width: 240px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translate(0, -0.5em);
    pointer-events: none;
}

#menu-primary .menu-item-depth-0:not(.menu-item-is-toggler):hover > .menu-depth-1,
#menu-primary .menu-item-depth-0.menu-item-is-toggler.is-active > .menu-depth-1 {
    display: flex;
    opacity: 1;
    transform: translate(0, 0);
    pointer-events: auto;
}

#menu-primary .menu-item-depth-0:nth-last-child(-n+2) .menu-depth-1 {
    left: auto;
    right: 0;
    text-align: right;
}

#menu-primary .menu-item-depth-0:nth-last-child(-n+2) .menu-depth-1 .menu-item-depth-1 {
    max-width: 100%;
}

#menu-primary .menu-depth-1 .menu-item {
    position: relative;
}

#menu-primary .menu-depth-1 .menu-label {
    padding: 0.5em 0.5em;
}

#menu-primary .menu-depth-1 .menu-link {
    position: relative;
    font-size: var(--wp--preset--font-size--small);
    padding: 0.2em 0.2em;
    color: var(--wp--preset--color--primary); 
    text-decoration: none;
}

#menu-primary .menu-depth-1 .menu-item:not(.menu-item-is-toggler):hover > .menu-link,
#menu-primary .menu-depth-1 .menu-item.menu-item-is-toggler > .menu-link:hover {
    color: var(--wp--preset--color--secondary);
}

#menu-primary .menu-depth-1 .current-menu-ancestor > .menu-link,
#menu-primary .menu-depth-1 .current-menu-item > .menu-link,
#menu-primary .menu-depth-1 .menu-item-is-toggler.is-active > .menu-link {
    color: var(--wp--preset--color--secondary);
}

#menu-primary .menu-depth-1 .menu-item-has-icon > .menu-link {
    gap: 0.5em;
}

#menu-primary .menu-depth-1 .menu-item-has-children:not(.menu-item-is-toggler) > .menu-link::before {
    z-index: 98;
    box-shadow: var(--wp--custom--box-shadow--regular);
}

#menu-primary .menu-depth-1 .menu-item-has-children:not(.menu-item-is-toggler) > .menu-link::after {
    z-index: 100;
}

#menu-primary .menu-depth-1 .menu-item-has-children:not(.menu-item-is-toggler):hover > .menu-link::before,
#menu-primary .menu-depth-1 .menu-item-has-children:not(.menu-item-is-toggler):hover > .menu-link::after {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

#menu-primary .menu-depth-1 .menu-item-has-children > .menu-link .menu-link-title {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

#menu-primary .menu-depth-1 .menu-item-has-children > .menu-link .menu-link-title::after {
    font-family: "Font Awesome 6 Pro";
    font-weight: 400;
}

#menu-primary .menu-depth-1 .menu-item-has-children:not(.menu-item-is-toggler) > .menu-link .menu-link-title::after {
    content: '\f105';
}

#menu-primary .menu-depth-1 .menu-item-has-children.menu-item-is-toggler > .menu-link .menu-link-title::after {
    content: '\f067';
}

#menu-primary .menu-depth-1 .menu-item-has-children.menu-item-is-toggler.is-active > .menu-link .menu-link-title::after {
    content: '\f068';
}

#menu-primary .menu-depth-1 .menu-item:not(.menu-item-is-toggler) > .menu {
    position: absolute;
    top: 0;
    left: 100%;
    width: fit-content;
    /* background: var(--wp--preset--color--text-primary); */
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    z-index: 99;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translate(-0.5em, 0);
    pointer-events: none;
}

#menu-primary .menu-depth-1 .menu-item.menu-item-is-toggler > .menu {
    margin: 0.25em;
    margin-left: 0.5em;
    padding: 0;
    padding-left: 0.25em;
    display: none;
    flex-direction: column;
    gap: 0.25em;
    z-index: 99;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translate(0, 0.5em);
    pointer-events: none;
    border-left: 4px solid var(--wp--preset--color--primary);
}

#menu-primary .menu-depth-1 .menu-item:not(.menu-item-is-toggler):hover > .menu,
#menu-primary .menu-depth-1 .menu-item.menu-item-is-toggler.is-active > .menu {
    display: flex;
    opacity: 1;
    transform: translate(0, 0);
    pointer-events: auto;
} 

#menu-primary .menu-depth-1 .menu-item > .menu em{
    white-space: nowrap;
}

.site-header > .wp-block-group {
  transition: height 0.3s ease;
  overflow: hidden;
}
