/*========= ナビゲーションのためのCSS ===============*/

#g-nav{
    /*position:fixed;にし、z-indexの数値を大きくして前面へ*/
    position:fixed;
    z-index: 999;
    /*ナビのスタート位置と形状*/
    top:0;
    right: -120%;
    width: 28%;
    min-width:220px;
    height: 100vh;/*ナビの高さ*/
    background:#85A8A4;
    /*動き*/
    transition: all 0.6s;
}
@media (max-width: 1111px) {
   /* 横幅が320px以下の場合に適用するスタイル */
   #g-nav { position:fixed;
            z-index: 999;
    /*ナビのスタート位置と形状*/
            top:0;
            right: -120%;
            width: 38%;
            min-width:220px;
            height: 100vh;/*ナビの高さ*/
            background:#85A8A4;
    /*動き*/
            transition: all 0.6s; }
}
@media (max-width: 800px) {
   /* 横幅が320px以下の場合に適用するスタイル */
   #g-nav { position:fixed;
            z-index: 999;
    /*ナビのスタート位置と形状*/
            top:0;
            right: -120%;
            width: 50%;
            min-width:220px;
            height: 100vh;/*ナビの高さ*/
            background:#85A8A4;
    /*動き*/
            transition: all 0.6s; }
}
@media (max-width: 480px) {
   /* 横幅が320px以下の場合に適用するスタイル */
   #g-nav { position:fixed;
            z-index: 999;
    /*ナビのスタート位置と形状*/
            top:0;
            right: -120%;
            width: 100%;
            min-width:220px;
            height: 100vh;/*ナビの高さ*/
            background:#85A8A4;
    /*動き*/
            transition: all 0.6s; }
}
/*アクティブクラスがついたら位置を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;
}
/*========= ボタンのためのCSS ===============*/
.openbtn{
	position:fixed;
    z-index: 9999;/*ボタンを最前面に*/
	top:20px;
	right: 30px;
	cursor: pointer;
    width: 65px;
    height:50px;
    color: #F6BD60;
}
	
/*×に変化*/	
.openbtn span{
    display: inline-block;
    transition: all .4s;
    position: absolute;
    left: 26px;
    height: 2px;
    border-radius: 5px;
	background-color: #F6BD60;
  	width: 55%;
  }

.openbtn span:nth-of-type(1) {
	top:18px;	
}

.openbtn span:nth-of-type(2) {
	top:29px;
}

.openbtn span:nth-of-type(3) {
	top:40px;
}
.openbtn span:nth-of-type(3)::after {
    content:"Menu";/*3つ目の要素のafterにMenu表示を指定*/
    position: absolute;
    top:10px;
    left:-4px;
    color: #F6BD60;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'Montserrat';
}

/*activeクラスが付与されると線が回転して×になり、Menu⇒Closeに変更*/

.openbtn.active span:nth-of-type(1) {
    top: 14px;
    left: 36px;
    transform: translateY(6px) rotate(-45deg);
    width: 30%;
}

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

.openbtn.active span:nth-of-type(3){
    top: 25px;
    left: 35px;
    transform: translateY(-6px) rotate(45deg);
    width: 30%;
}
.openbtn.active span:nth-of-type(3)::after {
    content:"Close";/*3つ目の要素のafterにClose表示を指定*/
    transform: translateY(0) rotate(-45deg);
    top:17px;
    left:9px;
}