/*==============================
        header
==============================*/
#header {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 99;
  background-color: #FFFFFF;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}
#header .header .header_inner {
  width: calc(100% - 60px);
  max-width: 1100px;
  height: 80px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-column-gap: 30px;
  align-items: center;
  position: relative;
}
@media (hover: hover) {
  #header .gmenu .menu_inner > li > a:hover {
    opacity: 1;
    color: var(--color_main);
  }
  #header .gmenu .menu_inner > li > a:hover::after {
    opacity: 1;
  }
  #header .gmenu .menu_inner > li > a::after {
    transition: 0.3s;
  }
  #header .megamenu .menu_wrap .menu_content .child .sub-menu li a:hover {
    opacity: 1;
    color: var(--color_main);
  }
}
@media screen and (min-width: 769px) {
  #header .gmenu .menu_inner {
    display: flex;
    align-items: center;
    justify-content: end;
    font-size: 1.6rem;
  }
  #header .gmenu .menu_inner > li {
    padding: 0 1em;
  }
  #header .gmenu .menu_inner > li > a {
    display: block;
    line-height: 80px;
    font-weight: 600;
    position: relative;
  }
  #header .gmenu .menu_inner > li > a::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333333;
    opacity: 0;
    position: absolute;
    left: 0;
    top: calc(50% + 1em);
  }
  #header .gmenu .menu_inner > li:last-child {
    padding-right: 0;
  }
  #header .gmenu .menu_inner .arrow {
    display: none;
  }
  #header .megamenu.open .menu_wrap {
    opacity: 1;
    z-index: 99;
    pointer-events: all;
  }
  #header .megamenu .menu_wrap {
    position: fixed;
    transition: 0.3s;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    width: 100%;
    left: 0;
    top: 80px;
    background-color: rgba(236, 236, 236, 0.9);
  }
  #header .megamenu .menu_wrap .menu_content {
    max-width: 1100px;
    margin: 0 auto;
    min-height: 500px;
    display: grid;
    grid-template-columns: 400px 1fr;
    align-items: start;
    grid-gap: 90px;
  }
  #header .megamenu .menu_wrap .menu_content .parent {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    background-color: #FFFFFF;
    height: 100%;
  }
  #header .megamenu .menu_wrap .menu_content .parent .sub-menu {
    display: none;
  }
  #header .megamenu .menu_wrap .menu_content .parent li a {
    font-weight: 600;
    background-color: #FFFFFF;
    height: 90px;
    display: grid;
    grid-template-columns: 1fr 1.5em;
    align-items: center;
    padding: 0 2em;
    border-bottom: 1px solid #cccccc;
  }
  #header .megamenu .menu_wrap .menu_content .parent li a::after {
    content: "";
    width: 1.5em;
    height: 1.5em;
    background: url(../img/common/icon-arrow.svg) no-repeat center center/contain;
    transform-origin: bottom right;
  }
  #header .megamenu .menu_wrap .menu_content .parent li.active a {
    background-color: var(--color_main);
    color: #FFFFFF;
    opacity: 1;
  }
  #header .megamenu .menu_wrap .menu_content .parent li.active a::after {
    background: url(../img/common/icon-arrow-w.svg) no-repeat center center/contain;
  }
  #header .megamenu .menu_wrap .menu_content .child {
    padding: 40px 0;
  }
  #header .megamenu .menu_wrap .menu_content .child .menu {
    position: relative;
  }
  #header .megamenu .menu_wrap .menu_content .child .menu .menu-item-has-children > a {
    display: none;
  }
  #header .megamenu .menu_wrap .menu_content .child .sub-menu {
    display: grid;
    grid-gap: 2em;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    display: none;
  }
  #header .megamenu .menu_wrap .menu_content .child .sub-menu li a {
    font-weight: 600;
  }
  #header .megamenu .menu_wrap .menu_content .child .active .sub-menu {
    display: grid;
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
  }
  #header .megamenu:not(.open) .child .sub-menu {
    pointer-events: none !important;
  }
}
@media screen and (max-width: 1024px) {
  #header .header .header_inner {
    grid-template-columns: 160px 1fr;
    grid-column-gap: 20px;
  }
  #header .gmenu .menu_inner {
    font-size: 1.5rem;
  }
  #header .gmenu .menu_inner > li {
    padding: 0 0.75em;
  }
  #header .megamenu .menu_wrap .menu_content {
    grid-template-columns: 320px 1fr;
    grid-gap: 60px;
  }
}
@media screen and (min-width: 769px) and (max-width: 1024px) {
  #header .gmenu .menu_inner {
    font-size: 1.5rem;
  }
  #header .gmenu .menu_inner > li {
    padding: 0 0.75em;
  }
  #header .megamenu .menu_wrap .menu_content {
    grid-template-columns: 320px 1fr;
    grid-gap: 60px;
  }
}
@media screen and (max-width: 768px) {
  #header .header .header_inner {
    width: 100%;
    height: 50px;
    grid-template-columns: 100px 50px;
    padding-left: 20px;
    grid-column-gap: 0;
    align-items: center;
    justify-content: space-between;
  }
  #header .spbtn {
    height: 50px;
    position: relative;
    background-color: var(--color_main);
  }
  #header .spbtn::before {
    content: "";
    display: block;
    width: 46%;
    height: 2px;
    background-color: #ffffff;
    position: absolute;
    top: 15px;
    left: 50%;
    transition: 0.5s;
    transition-timing-function: ease-in-out;
    transform-origin: center center;
    transform: translateX(-50%);
  }
  #header .spbtn::after {
    content: "";
    display: block;
    width: 46%;
    height: 2px;
    background-color: #ffffff;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transition: 0.5s;
    transition-timing-function: ease-in-out;
    transform-origin: center center;
    transform: translateX(-50%);
  }
  #header .spbtn span {
    display: block;
    width: 46%;
    height: 2px;
    background-color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.5s;
    transition-timing-function: ease-in-out;
  }
  body.menuopen {
    overflow: hidden;
  }
  body.menuopen #header .header .spbtn::before {
    transform: translateX(-50%) rotate(45deg);
    top: 24px;
  }
  body.menuopen #header .header .spbtn::after {
    transform: translateX(-50%) rotate(-45deg);
    bottom: 24px;
  }
  body.menuopen #header .header .spbtn span {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0);
  }
  body.menuopen #header .gmenu {
    right: 0;
    opacity: 1;
  }
  body.menuopen .spmenu {
    opacity: 1;
    top: 50px;
  }
  #header .gmenu {
    position: fixed;
    top: 50px;
    right: -105vw;
    opacity: 0;
    width: 100%;
    background-color: #FFFFFF;
    z-index: 990;
    text-align: center;
    transition: 0.5s;
    height: calc(100vh - 50px);
    height: calc(100dvh - 50px);
    overflow: auto;
  }
  #header .gmenu .menu_inner {
    border-bottom: 1px solid #cccccc;
  }
  #header .gmenu .menu_inner li {
    padding: 0;
    font-weight: 500;
  }
  #header .gmenu .menu_inner li .arrow {
    display: grid;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  #header .gmenu .menu_inner > li > a {
    display: grid;
    grid-template-columns: auto 50px;
    justify-content: space-between;
    height: 50px;
    padding-left: 1.5em;
    align-items: center;
    border-top: 1px solid #cccccc;
  }
  #header .gmenu .menu_inner > li > a .arrow {
    height: 50px;
  }
  #header .gmenu .menu_inner > li > a .arrow::after {
    content: "";
    display: block;
    width: 0.75em;
    height: 0.5em;
    background-color: var(--color_main);
    -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
  }
  #header .gmenu .menu_inner > li:not(.haschild) a .arrow::after {
    transform: rotate(-90deg);
  }
  #header .gmenu .menu_inner .menu_wrap, #header .gmenu .menu_inner .sub-menu {
    display: none;
  }
  #header .megamenu .menu_wrap .menu_content .parent .menu > li > a {
    display: grid;
    grid-template-columns: auto 40px;
    justify-content: space-between;
    height: 40px;
    padding-left: 2em;
    align-items: center;
    border-bottom: 1px solid #FFFFFF;
    background-color: var(--color_main);
    color: #FFFFFF;
  }
  #header .megamenu .menu_wrap .menu_content .parent .menu > li > a .arrow {
    height: 40px;
  }
  #header .megamenu .menu_wrap .menu_content .parent .menu > li > a .arrow::after {
    content: "";
    display: block;
    width: 0.75em;
    height: 0.5em;
    background-color: #FFFFFF;
    -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
  }
  #header .megamenu .menu_wrap .menu_content .parent .menu > li li a {
    display: grid;
    justify-content: center;
    background-color: #efefef;
    font-size: 1.5rem;
    height: 35px;
    padding: 0 1.5em;
    align-items: center;
    border-top: 1px solid #ffffff;
  }
  #header .megamenu .menu_wrap .menu_content .child {
    display: none;
  }
}