h1#Logo {
    position: absolute;
    top: -10px;
    left: 20px;
    z-index: 1;
    color: #999;
    border-bottom: none;
}

header#header2 {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}
  
#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;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1
}

@keyframes DownAnime {
  from {
    opacity: 0;
    transform: translateY(-100px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#header a img {
  transition: transform 0.5s ease-in-out
}

#header a img:hover {
  transform: rotateX(360deg)
}

.entry-content nav-main>ul {
  margin: 0;
}

header#header>a {
  position: fixed;
  top: 18px;
  left: 15px;
  z-index: 1;
}

/*========= ナビゲーションドロップダウンのためのCSS ===============*/

/*==ナビゲーション全体の設定*/
nav-main {
  background: #333;
  color: #fff;
  text-align: center;
}

/*ナビゲーションを横並びに　背景*/
nav-main ul {
  list-style: none;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width:1920px;
 /* position: fixed;*/
  left: 0;
  background: #ffffff;
  margin: 0;
  z-index: 2;
  height: 50px;
  font-size: 17px;
  color:#333;
}

/*2階層目以降は横並びにしない*/
nav-main ul ul {
  display: block;
}

/*下の階層のulや矢印の基点にするためliにrelativeを指定*/
nav-main ul li {
  position: relative;
  /*width: 14%;*/
}

/*ナビゲーションのリンク設定*/
nav-main ul li a {
  display: block;
  text-decoration: none;
  color: #999;
  padding: 5px 30px;
  transition: all .3s;
  color: #333;
}

nav-main ul li li a {
  padding: 10px 35px;
}

nav-main ul li a:hover {
  color: #fff;
}

/*==矢印の設定*/

/*2階層目を持つliの矢印の設定*/
nav-main ul li.has-child::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: rotate(135deg);
}

/*3階層目を持つliの矢印の設定*/
nav-main ul ul li.has-child::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の指定*/
nav-main li.has-child ul {
  position: absolute;
  left: 20px;
  top: 51px;
  z-index: 4;
  background: #28BFE7;
  width: 200px;
  visibility: hidden;
  opacity: 0;
  transition: all .3s;
  margin: 0;
}

/*hoverしたら表示*/
nav-main li.has-child:hover>ul,
nav-main li.has-child ul li:hover>ul,
nav-main li.has-child:active>ul,
nav-main li.has-child ul li:active>ul {
  visibility: visible;
  opacity: 1;
}

/*ナビゲーションaタグの形状 チャイルド背景*/
nav-main li.has-child ul li a {
  color: #333;
  border-bottom: solid 1px rgba(255, 255, 255, 0.6);
  background: #fed978;
}

nav-main li.has-child ul li:last-child a {
  border-bottom: none;
}

nav-main li.has-child ul li a:hover,
nav-main li.has-child ul li a:active {
  background: #3577CA;
}

/*==3階層目*/

/*3階層目の位置*/
nav-main li.has-child ul ul {
  top: 0;
  left: 182px;
  background: #66ADF5;
}

nav-main li.has-child ul ul li a:hover,
nav-main li.has-child ul ul li a:active {
  background: #448ED3;
}


/* スマホ */
@media (max-width:768px) {

  h1#Logo {
    display: none;
  }

  a.top-button {
    scale: .7;
    right: 0;
  }

  ul#g-nav-maini {
    display: none;
    width: 100%;
    z-index: 2;
  }

  .openbtn1 span {
    display: inline-block;
    transition: all 0.4s;
    position: absolute;
    left: calc(50% + -13px);
    height: 3px;
    border-radius: 2px;
    background-color: #fff;
    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: absolute;
    z-index: 9999;
    top: 20px;
    right: 20px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    background: #fecb6e;
    border-radius: 0 0 0 7px
  }

  header#header>a {
    display: none
  }

  nav-main {
    padding: 0;
    display: none;
  }

  nav-main li.has-child ul,
  nav-main 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のアニメーションを切る*/
  }

  nav-main ul li a {
    border-bottom: 1px solid #ccc;
  }

  /*矢印の位置と向き*/

  nav-main ul li.has-child::before {
    left: 20px;
  }

  nav-main ul ul li.has-child::before {
    transform: rotate(135deg);
    left: 20px;
  }

  nav-main ul li.has-child.active::before {
    transform: rotate(-45deg);
  }

}