
@media (min-width: 980px){

#checked,
.menu-btn,
.close-menu,
.drawer-menu {
	display:none;
}
}

@media (max-width: 980px){

.menu-item-has-children > a {
    pointer-events: none;
}

/* ------------------------------------------------ drawer menu */
.drawer-menu {
	display:inherit;
	box-sizing: border-box;
	position: fixed;
	top: 0;
	right: 0;
	width: 300px;
	height: 100%;
	padding: 75px 0 75px 0;
	background: #222;
	-webkit-transition-property: all;
	transition-property: all;
	-webkit-transition-duration: .5s;
	transition-duration: .5s;
	-webkit-transition-delay: 0s;
	transition-delay: 0s;
	-webkit-transform-origin: right center;
	-ms-transform-origin: right center;
	transform-origin: right center;
	-webkit-transform: perspective(500px) rotateY(-90deg);
	transform: perspective(500px) rotateY(-90deg);
	opacity: 0;
	z-index:15;
	overflow:auto;
}

.drawer-menu ul {
	width:100%;
}

.drawer-menu > ul > li {
	text-align: center;
	border-bottom:1px solid #777;
	position:relative;
}

.drawer-menu li a {
	display: block;
	height: 40px;
	line-height: 40px;
	font-size: 14px;
	color: #fff;
	-webkit-transition: all .8s;
	transition: all .8s;
	background:#333;
	text-decoration:none;
}

.drawer-menu li span {
	display: block;
	height: 40px;
	line-height: 40px;
	font-size: 14px;
	color: #fff;
	-webkit-transition: all .8s;
	transition: all .8s;
	background:#333;
}

.drawer-menu li span:before {
    position: absolute;
    top: 13px;
    right: 15px;
    display: block;
    width: 7px;
    height: 7px;
    margin: auto;
    content: '';
    transform: rotate(135deg);
    border-top: 2px solid #FFF;
    border-right: 2px solid #FFF;
}

.drawer-menu li.open span:before {
    transform: rotate(-45deg);
}


.drawer-menu li ul.sub-menu {
	border-top:1px solid #777;
}

.drawer-menu li ul.sub-menu li a {
	background:#555;
	border-bottom:1px solid #999;
}

.drawer-menu li ul.sub-menu li:last-child a {
	border-bottom:none;
}


.drawer-menu li a:hover {
	color: #1a1e24;
	background: #fff;
}

.drawer-menu li .sub-menu {
	background:#444;
	display:flex;
	-webkit-flex-wrap: wrap; /* Safari */
	flex-wrap:         wrap;
	-webkit-justify-content: space-between;
	justify-content: space-between;
}

.drawer-menu li .sub-menu li {
	text-align:left;
	width:100%;
}

.drawer-menu li .sub-menu li a {
	height:auto;
	line-height:1.6;
	display:block;
	padding:1rem 1.5rem 0.5rem 1.5rem;
	width:100%;
}

.drawer-menu li .sub-menu li a:before {
    content: "\f105";
    font-family: FontAwesome;
    margin-right:0.5rem;
}

/* ------------------------------------------------ checkbox */
.check {
	display: none;
}

/* ------------------------------------------------ menu button */
.menu-btn {
	position: fixed;
	display: block;
	top: 15px;
	right: 15px;
	display: block;
	width: 50px;
	height: 50px;
	font-size: 10px;
	text-align: center;
	cursor: pointer;
	z-index: 30;
	padding:10px;
	background:#222222;
    box-sizing: border-box;
}

.bar {
	position: absolute;
	top: 8px;
	left: 5px;
	display: block;
	width: 40px;
	height: 1px;
	background: #FFF;
	-webkit-transition: all .5s;
	transition: all .5s;
	-webkit-transform-origin: left top;
	-ms-transform-origin: left top;
	transform-origin: left top;
}

.bar.middle {
	top: 16px;
	opacity: 1;
}

.bar.bottom {
	top: 24px;
	-webkit-transform-origin: left bottom;
	-ms-transform-origin: left bottom;
	transform-origin: left bottom;
}

.menu-btn__text {
	position: absolute;
	bottom: 3px;
	left: 0;
	right: 0;
	margin: auto;
	color: #FFF;
	-webkit-transition: all .5s;
	transition: all .5s;
	display: block;
	visibility: visible;
	opacity: 1;
}

.menu-btn:hover .bar {
	background: #FFF;
}

.menu-btn:hover .menu-btn__text {
	color: #FFF;
}

.close-menu {
	position: fixed;
	top: 0;
	right: 300px;
	width: 100%;
	height: 100vh;
	background: rgba(0,0,0,0);
	-webkit-transition-property: all;
	transition-property: all;
	-webkit-transition-duration: .3s;
	transition-duration: .3s;
	-webkit-transition-delay: 0s;
	transition-delay: 0s;
	visibility: hidden;
	opacity: 0;
}

/* ------------------------------------------------ checked */
.check:checked ~ .drawer-menu {
	-webkit-transition-delay: .3s;
	transition-delay: .3s;
	-webkit-transform: none;
	-ms-transform: none;
	transform: none;
	opacity: 1;
	z-index: 20;
}

.check:checked ~ .contents {
	-webkit-transition-delay: 0s;
	transition-delay: 0s;
	-webkit-transform: translateX(-300px);
	-ms-transform: translateX(-300px);
	transform: translateX(-300px);
}

.check:checked ~ .menu-btn .menu-btn__text {
	visibility: hidden;
	opacity: 0;
}

.check:checked ~ .menu-btn .bar {
	left:10px;
}

.check:checked ~ .menu-btn .bar.top {
	width: 45px;
	-webkit-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
}

.check:checked ~ .menu-btn .bar.middle {
	opacity: 0;
}

.check:checked ~ .menu-btn .bar.bottom {
	width: 45px;
	top: 40px;
	-webkit-transform: rotate(-45deg);
	-ms-transform: rotate(-45deg);
	transform: rotate(-45deg);
}

.check:checked ~ .close-menu {
	-webkit-transition-duration: 1s;
	transition-duration: 1s;
	-webkit-transition-delay: .3s;
	transition-delay: .3s;
	background: rgba(0,0,0,.5);
	visibility: visible;
	opacity: 1;
	z-index: 30;
}
}