/* グローバルナビゲーション
-クリックしたらナビが右から左に出現- */
/*========= ナビゲーションのためのCSS ===============*/

#g-nav {
	/*position:fixed;にし、z-indexの数値を大きくして前面へ*/
	position: fixed;
	z-index: 999;
	/*ナビのスタート位置と形状*/
	top: 0;
	right: -120%;
	width: 100%;
	height: 100vh; /*ナビの高さ*/
	background: rgba(228, 241, 252, 0.9);
	/*動き*/
	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;
}

/*ナビゲーション*/
#g-nav .nav_sidebar_wrapper {
	/*ナビゲーション天地中央揃え*/
	position: absolute;
	z-index: 999;
	top: 8%;
	left: 50%;
	transform: translate(-50%, 0%);
	width: 90%;
	padding-bottom: 20px;
}

/*リストのレイアウト設定*/

#g-nav li {
	list-style: none;
	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;
}

/*========= ボタンのためのCSS ===============*/
.openbtn {
	display: none;
	position: fixed;
	z-index: 9999; /*ボタンを最前面に*/
	top: 10px;
	right: 10px;
	cursor: pointer;
	width: 35px;
	height: 35px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 5px;
}

@media screen and (max-width: 1000px) {
	.openbtn {
		display: block;
	}
}

/*×に変化*/
.openbtn span {
	display: inline-block;
	transition: all 0.4s;
	position: absolute;
	left: 8.5px;
	height: 1.5px;
	border-radius: 2px;
	background-color: #fff;
	width: 50%;
}

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

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

.openbtn span:nth-of-type(3) {
	top: 25px;
}

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

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

.openbtn.active span:nth-of-type(3) {
	top: 23px;
	left: 10px;
	transform: translateY(-6px) rotate(45deg);
	width: 45%;
}
