/* 메가 메뉴 */
#megaMenuButton {
  width: 46px;
  height: 46px;
  align-self: center;
  justify-self: flex-end;
  border: none;
  background: none;
  position: relative;
  z-index: 99998;
  cursor: pointer;
}
#megaMenuButton span {
  display: block;
  width: 22px;
  height: 1px;
  border-radius: 1px;
  background-color: var(--color-primary, #222);
  margin: 8px auto;
  transition: background-color 0.3s, transform 0.3s, height 0.3s, margin 0.3s;
}
/* header:hover #megaMenuButton span,
.et-fixed-header #megaMenuButton span {
  background-color: #222;
} */
.menu-opened #megaMenuButton span {
  background-color: #fff !important;
}
#megaMenuButton:hover span {
  animation: megaButton 0.6s 1;
}
#megaMenuButton:hover span:nth-child(2) {
  animation-delay: 0.2s;
}
#megaMenuButton:hover span:nth-child(3) {
  animation-delay: 0.4s;
}
.menu-opened #megaMenuButton span {
  animation: none;
  margin: 0;
}
.menu-opened #megaMenuButton span:nth-child(1) {
  /* transform: rotate(45deg) translateY(1px); */
  animation: megaButtonRotate1 0.3s 1 forwards;
  animation-delay: 0.3s;
}
.menu-opened #megaMenuButton span:nth-child(2) {
  height: 0;
}
.menu-opened #megaMenuButton span:nth-child(3) {
  /* transform: rotate(-45deg) translateY(-1px); */
  animation: megaButtonRotate2 0.3s 1 forwards;
  animation-delay: 0.3s;
}

@keyframes megaButton {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes megaButtonRotate1 {
  0% {
    transform: rotate(0) translateY(0);
  }
  100% {
    transform: rotate(45deg) translateY(1px);
  }
}
@keyframes megaButtonRotate2 {
  0% {
    transform: rotate(0) translateY(0);
  }
  100% {
    transform: rotate(-45deg) translateY(-2px);
  }
}
/* 메가메뉴 */
#megaMenu {
  display: flex;
  align-items: center;
  width: 100%;
  height: auto;
  padding: calc(var(--wp-admin--admin-bar--height, 0px) + var(--h-header) + 24px) 0 24px;
  position: fixed;
  top: 0;
  right: 0;
  background: #3c3d3d;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path 0.6s;
  z-index: -1;
}
#megaMenu:before {
  content: '';
  display: block;
  width: 100vw;
  border-bottom: 1px solid #fff;
  position: absolute;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--h-header) - 1px);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.2;
}
.menu-opened #megaMenu {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
#megaMenu .container {
  display: block;
  height: auto;
  color: #fff;
}
#megaGnb {
  line-height: 1;
}
#megaGnb a {
  color: #fff;
  padding: 8px 0;
  display: block;
}
#megaGnb > li > a {
  pointer-events: none;
}
#megaGnb > li > .sub-menu > li ~ li {
  margin-top: 1em;
}
#megaGnb .sub-menu > li > a {
  display: block;
  transition: opacity 0.3s;
  font-weight: 500;
  opacity: 1;
}
#megaGnb .sub-menu > li:hover > a {
  opacity: 0.8;
}
#megaGnb .sub-menu > li li a {
  font-weight: 300;
}
@media (min-width: 1281px) {
  #megaMenu .container {
    padding: 0 204px 40px;
  }
}
@media (min-width: 981px) {
  #megaGnb {
    display: flex;
    justify-content: center;
    gap: 12px;
  }
  #megaGnb > li {
    flex-basis: 200px;
    text-align: center;
  }
  #megaGnb > li > a {
    display: none;
  }
}
@media (max-width: 1280px) {
  #megaMenu {
    padding: calc(var(--wp-admin--admin-bar--height, 0px) + var(--h-header)) 0 24px;
    height: 100%;
  }
  #megaMenu .container {
    width: 100%;
    height: 100%;
    padding: 0 5vw;
    overflow: auto;
  }
  #megaMenu .container::-webkit-scrollbar {
    display: none;
  }
  #megaGnb {
    padding: 24px 0;
  }
  #megaGnb > li {
    padding-bottom: 2em;
  }
  #megaGnb > li > a {
    font-size: 1.2em;
  }
  #megaGnb > li > ul {
    padding-left: 1em;
  }
  #megaGnb .sub-menu > li li a {
    font-size: 14px;
    padding-left: 1em;
  }
}
