header#header {
  top: 0;
  left: 0;
  z-index: 10;
  font-size: 16px;
  color: var(--color);
  background-color: #fff;
  border-bottom: 1px solid #ddd;
}

header#header .header__inner {
  padding: 0 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

#header.UpMove {
  animation: UpAnime 0.5s forwards;
}

@keyframes UpAnime {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-100px);
  }
}

#header.DownMove {
  animation: DownAnime 0.5s forwards;
  width: 100%;
}

@keyframes DownAnime {
  from {
    opacity: 0;
    transform: translateY(-100px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#header a {
  color: var(--color);
  font-weight: var(--bolder);
  line-height: 1.5;
  display: flex;
  align-items: center;
}

#header .language {
  margin-left: 1.5em;
  background-color: #e6e6e6;
  border-radius: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

#header .language a {
  padding: .4em;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 400;
}

#header .language a {
  line-height: 1;
}


#header .language a.current {
  background: var(--gradation-horizontal);
  color: var(--light-color);
  border-radius: 50%;
}

#header a img:hover {
  transform: rotateX(360deg)
}

.entry-content header nav>ul {
  margin: 0;
}

header#header>a {
  position: fixed;
  top: 18px;
  left: 15px;
  z-index: 1;
}

/*========= ナビゲーションドロップダウンのためのCSS ===============*/

header h1 {
  width: 357px;
}

header nav {
  width: calc(100% - 357px);
}

/*ナビゲーションを横並びに*/
header nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  top: 0;
  left: 0;
  background: var(--background-color);
  margin: 0;
}

/*2階層目以降は横並びにしない*/
header nav ul ul {
  display: block;
}

/*下の階層のulや矢印の基点にするためliにrelativeを指定*/
header nav ul li {}

/*ナビゲーションのリンク設定*/
header nav ul li a {
  display: block;
  text-decoration: none;
  color: #999;
  padding: 1em 1.5em;
  transition: var(--transition);
  position: relative;
}

header nav ul li a.level1 {
  height: 3em;
}


/*==矢印の設定*/

/*2階層目を持つliの矢印の設定*/
header nav ul li.has-child a.level1::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 2px solid #999;
  border-right: 2px solid #999;
  transform: translateY(-3px) rotate(135deg);
}

/*3階層目を持つliの矢印の設定*/
header nav ul ul li.has-child a.level2::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 17px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
}

/*== 2・3階層目の共通設定 */

/*下の階層を持っているulの指定*/
header nav li.has-child ul {
  position: absolute;
  left: 0;
  top: 6em;
  z-index: 4;
  background: var(--gradation-horizontal);
  width: 100%;
  visibility: hidden;
  opacity: 0;
  transition: all .3s;
  margin: 0;
  display: flex;
  justify-content: flex-start;
}

header nav li.has-child ul a {
  color: var(--light-color) !important;
}

/*hoverしたら表示*/
header nav li.has-child:hover>ul,
header nav li.has-child ul li:hover>ul,
header nav li.has-child:active>ul,
header nav li.has-child ul li:active>ul {
  visibility: visible;
  opacity: 1;
}

/*ナビゲーションaタグの形状*/
header nav li.has-child ul li a {
  color: #fff;
}

header nav li.has-child ul li:last-child a {
  border-bottom: none;
}

header nav li.has-child ul li a:hover,
header nav li.has-child ul li a:active {
  background: #3577CA;
}

/*==3階層目*/

/*3階層目の位置*/
header nav li.has-child ul ul {
  top: 0;
  left: 182px;
  background: #66ADF5;
}

header nav li.has-child ul ul li a:hover,
header nav li.has-child ul ul li a:active {
  background: #448ED3;
}



/* スマホ */
@media (max-width:1255px) {

  #g-navi {
    height: calc(100dvh - 81px);
    overflow-y: scroll;
  }

  #header {
    border-bottom: var(--border);
    position: fixed;
    width: 100%;
  }

  #header h1 {
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 84px;
  }

  header nav ul {
    position: absolute;
    top: 81px;
    width: 100%;
    z-index: 2;
    flex-wrap: wrap;
  }

  header nav ul li {
    width: 100%;
  }

  header nav ul li.language {
    width: fit-content;
  }

  header#header .header__inner {
    flex-direction: column;
    padding: 0;
    height: 80px;
  }

  a.top-button {
    scale: .7;
    right: 0;
  }


  .openbtn1 span {
    display: inline-block;
    transition: all 0.4s;
    position: absolute;
    left: calc(50% + -13px);
    height: 2px;
    background-color: #3366cc;
    width: 26px;
  }

  .openbtn1 span:nth-of-type(1) {
    top: calc(31% - 1px)
  }

  .openbtn1 span:nth-of-type(2) {
    top: calc(50% - 1px)
  }

  .openbtn1 span:nth-of-type(3) {
    top: calc(69% - 1px)
  }

  .openbtn1.active span:nth-of-type(1) {
    top: 15px;
    left: 9px;
    transform: translateY(6px) rotate(-45deg);
    width: 60%
  }

  .openbtn1.active span:nth-of-type(2) {
    opacity: 0
  }

  .openbtn1.active span:nth-of-type(3) {
    top: 27px;
    left: 9px;
    transform: translateY(-6px) rotate(45deg);
    width: 60%
  }

  .openbtn1 {
    position: fixed;
    z-index: 9999;
    top: calc(calc(80px - 44px) / 2);
    right: 3vw;
    cursor: pointer;
    width: 44px;
    height: 44px;
    background: transparent;
    border-radius: 50%;
  }

  header#header>a {
    display: none
  }

  header nav {
    padding: 0;
    width: 100%;
  }

  header nav ul li.has-child a.level1::before {
    right: 1em;
  }

  header nav li.has-child ul,
  header nav li.has-child ul ul {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    visibility: visible;
    /*JSで制御するため一旦表示*/
    opacity: 1;
    /*JSで制御するため一旦表示*/
    display: none;
    /*JSのslidetoggleで表示させるため非表示に*/
    transition: none;
    /*JSで制御するためCSSのアニメーションを切る*/
  }

  header nav ul li a {
    border-bottom: 1px solid #ccc;
  }
  header nav ul li.language {
    margin-top: 1em;
  }
  header nav ul li.language a {
    border: none;
  }

  /*矢印の位置と向き*/

  header nav ul li.has-child::before {
    left: 20px;
  }

  header nav ul ul li.has-child::before {
    transform: rotate(135deg);
    left: 20px;
  }

  header nav ul li.has-child.active::before {
    transform: rotate(-45deg);
  }

}