@charset "utf-8";
/*
/*
/*========= 上部固定させるためのCSS ===============*/
#header-nav{
  height: 60px;
  width:100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: absolute;
  z-index: 2147483647;
  background:rgba(255,255,255,0.8);
}
#header-nav.fixed{
  position: fixed;
  z-index: 2147483647;
  top:0;
  background:rgba(255,255,255,0.4);
}

/*========= ナビゲーションドロップダウンのためのCSS ===============*/
#g-nav{
  text-align: right;
}
#g-nav ul{
  list-style: none;
  display: flex;
  justify-content: right;
  margin-bottom: 0;
}
/*2階層目以降は横並びにしない*/
#g-nav ul ul{
  display: block;
}
#g-nav ul li{
  position: relative;
}
#g-nav ul li a{
  display: block;
  text-decoration: none;
  color: #999;
  padding:10px 35px;
  transition:all .3s;
}
#g-nav ul li li a{
  padding:10px 25px;
}
#g-nav ul li a:hover{
  color:#eee;
}

/*2階層目を持つliの矢印の設定*/
#g-nav ul li.has-child::before{
  content:'';
  position: absolute;
  left:50%;
  top:35px;
  width:6px;
  height:6px;
  border-top: 2px solid #999;
  border-right:2px solid #999;
  transform: rotate(135deg);
}
/*3階層目を持つliの矢印の設定*/
#g-nav 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階層目の共通設定 */
#g-nav li.has-child ul{
  position: absolute;
  left:-10px;
  top:62px;
  z-index: 4;
  background:#ddd;
  width:150px;
    /*はじめは非表示*/
  visibility: hidden;
  opacity: 0;
    /*アニメーション設定*/
  transition: all .3s;
  text-align: center;
  padding: 0;
}

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

/*ナビゲーションaタグの形状*/
#g-nav li.has-child ul li a{
  color: #ccc;
  border-bottom:solid 1px #ccc;
}
#g-nav li.has-child ul li:last-child a{
  border-bottom:none;
}
#g-nav li.has-child ul li a:hover,
#g-nav li.has-child ul li a:active{
  color: #333;
  background:#eee;
}

/*3階層目の位置*/
#g-nav li.has-child ul ul{
  top:0;
  left:182px;
  background:#ccc;
}
#g-nav li.has-child ul ul li a:hover,
#g-nav li.has-child ul ul li a:active{
  background:#ccc;
}

/*
/*ハンバーガー*/
/*========= ナビゲーションのためのCSS ===============*/
@media screen and (max-width: 768px) {
#g-nav{
  position:fixed;
  z-index: 999;
  top:0;
  right: -120%;
  width:100%;
  height: 100vh;
  background:rgba(0,0,0,0.8);
  transition: all 0.6s;
  padding: 0;
}
/*アクティブクラスがついたら位置を0に*/
#g-nav.panelactive{
  right: 0;
}

/*ナビゲーションの縦スクロール*/
#g-nav.panelactive #g-nav-list{
/*ナビの数が増えた場合縦スクロール*/
  position: fixed;
  z-index: 999;
  width: 100%;
  height: 100vh;/*表示する高さ*/
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#g-nav ul{
  display: block;
  position: absolute;
  width:80%;
  height: 100%;
  padding-top: 60px;
  right: 0;
  background: #fff;
  }
#g-nav li.has-child ul,
#g-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のアニメーションを切る*/
}

/*矢印の位置と向き*/
#g-nav ul li.has-child::before{
top: 20px;
  left:20px;
}
#g-nav ul ul li.has-child::before{
  transform: rotate(135deg);
  left:20px;
}
#g-nav ul li.has-child.active::before{
  transform: rotate(-45deg);
}
/*リストのレイアウト設定*/
#g-nav li{
  text-align: center;
}
#g-nav li a{
  color: #333;
  text-decoration: none;
  padding:10px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: bold;
  border-bottom:1px solid #ccc;
}

/*========= ボタンのためのCSS ===============*/
.openbtn1{
  position:fixed;
  z-index: 9999;/*ボタンを最前面に*/
  top:10px;
  right: 10px;
  cursor: pointer;
  width: 50px;
  height:50px;
}
/*×に変化*/
.openbtn1 span{
  display: inline-block;
  transition: all .4s;
  position: absolute;
  left: 14px;
  height: 3px;
  border-radius: 2px;
  background-color: #666;
  width: 45%;
}
.openbtn1 span:nth-of-type(1) {
  top:15px;
}
.openbtn1 span:nth-of-type(2) {
  top:23px;
}
.openbtn1 span:nth-of-type(3) {
  top:31px;
}
.openbtn1.active span:nth-of-type(1) {
  top: 18px;
  left: 18px;
  transform: translateY(6px) rotate(-45deg);
  width: 30%;
}
.openbtn1.active span:nth-of-type(2) {
  opacity: 0;
}
.openbtn1.active span:nth-of-type(3){
  top: 30px;
  left: 18px;
  transform: translateY(-6px) rotate(45deg);
  width: 30%;
}
}
