/*======================================
  ドロワーメニュー＋アコーディオン
=======================================*/

/* :::::: toggle button :::::: */
#drawer {
	display: none;
}

label.open,
label.close {
	cursor: pointer;
	position: fixed;
	margin-bottom: 0;
}

.open {
	z-index: 1002;
	top: 30px;
	right: 15px;
	width: 50px;
	height: 50px;
	border-radius: 5px;
	background: linear-gradient(180deg, rgba(38, 97, 168, 1) 0%, rgba(71, 195, 220, 1) 100%);
	transition: background .6s, transform .6s cubic-bezier(.215, .61, .355, 1);
}

.open::before,
.open::after,
.open span {
	content: "";
	position: absolute;
	top: calc(50% - 1px);
	left: 30%;
	width: 40%;
	border-bottom: 2px solid #fff;
	transition: transform .6s cubic-bezier(.215, .61, .355, 1);
}

.open::before {
	transform: translateY(-8px);
}

.open::after {
	transform: translateY(8px);
}

.open .button-menu {
	position: absolute;
	top: 50px;
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
	color: #007660;
	font-size: 13px;
}

#drawer:checked + .open div {
	display: none;
}

.close {
	z-index: 1001;
	inset: 0;
	pointer-events: none;
	transition: background .6s;
}

#drawer:checked + .open {
	background: linear-gradient(180deg, rgba(38, 97, 168, 1) 0%, rgba(71, 195, 220, 1) 100%);
	transform: translateX(-260px);
}

#drawer:checked + .open span {
	transform: scaleX(0);
}

#drawer:checked + .open::before {
	transform: rotate(135deg) scaleX(1.2);
}

#drawer:checked + .open::after {
	transform: rotate(-135deg) scaleX(1.2);
}

#drawer:checked ~ .close {
	pointer-events: auto;
	background: rgba(0, 0, 0, .3);
}

/* :::::: drawer menu :::::: */
.drawer-nav {
	z-index: 1001;
	position: fixed;
	top: 0;
	right: 0;
	width: 260px;
	height: 100vh;
	height: 100dvh;
	margin: 0;
	padding: 10px;
	box-sizing: border-box;
	background: #fff;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-gutter: stable;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	transform: translateX(100%);
	transition: transform .6s cubic-bezier(.215, .61, .355, 1);
}

.drawer-nav h1.sp-logo {
	margin: 20px;
	text-align: center;
	float: none;
}

.drawer-nav h1 img {
	width: 100%;
	height: auto;
	float: none;
}

.drawer-nav ul {
	margin: 0 0 20px;
	padding: 0;
	border-top: 1px solid #aaa;
}

.drawer-nav li {
	line-height: 1.4;
	border-bottom: 1px solid #aaa;
	list-style: none;
}

.drawer-nav li a,
.drawer-nav .accordion-toggle {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border: 0;
	background: transparent;
	color: #2d2e2e;
	font: inherit;
	font-size: 18px;
	font-weight: bold;
	line-height: 1.4;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s ease;
}

.drawer-nav li a:hover,
.drawer-nav .accordion-toggle:hover {
	background-color: #f7f7f7;
}

/* 親メニュー */
.drawer-nav .menu-item-has-children {
	position: relative;
}

.drawer-nav .accordion-toggle {
	position: relative;
	padding-right: 42px;
}

/* CSSだけで描く「＞」を下向きにしたアイコン */
.drawer-nav .accordion-toggle::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .25s ease;
}

/* 展開時は上向き */
.drawer-nav .accordion-toggle[aria-expanded="true"]::after {
	transform: translateY(-30%) rotate(225deg);
}

/* 子メニュー */
.drawer-nav .sub-menu {
	max-height: 0;
	margin: 0;
	padding: 0;
	border-top: 0;
	overflow: hidden;
	visibility: hidden;
	transition: max-height .35s ease, visibility 0s linear .35s;
}

.drawer-nav .sub-menu.is-open {
	visibility: visible;
	transition: max-height .35s ease, visibility 0s;
}

.drawer-nav .sub-menu li {
	border-bottom: 0;
	border-top: 1px dotted #ccc;
}

.drawer-nav .sub-menu a {
	padding: 9px 10px 9px 24px;
	font-size: 15px;
	font-weight: normal;
}

#drawer:checked ~ .drawer-nav {
	transform: translateX(0);
}

/* 背面ページのスクロール固定時 */
body.is-drawer-open {
	position: fixed;
	left: 0;
	width: 100%;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.open,
	.open::before,
	.open::after,
	.open span,
	.close,
	.drawer-nav,
	.drawer-nav .accordion-toggle::after,
	.drawer-nav .sub-menu {
		transition-duration: .01ms;
	}
}


/* ======================================
   ドロワー内アコーディオン
====================================== */

.drawer-nav .has-submenu {
	position: relative;
}

/* 親メニューボタン */
.drawer-nav .drawer-accordion-toggle {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 40px 10px 10px;
	border: 0;
	background: transparent;
	color: #2d2e2e;
	font-family: inherit;
	font-size: 18px;
	font-weight: bold;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.25s ease;
}

.drawer-nav .drawer-accordion-toggle:hover {
	background-color: #f7f7f7;
}

/* CSSで描画する矢印 */
.drawer-nav .drawer-accordion-toggle::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 8px;
	height: 8px;
	border-right: 2px solid #2d2e2e;
	border-bottom: 2px solid #2d2e2e;
	transform: translateY(-70%) rotate(45deg);
	transition: transform 0.25s ease;
}

/* 展開時は上向き */
.drawer-nav .has-submenu.is-open > .drawer-accordion-toggle::after {
	transform: translateY(-30%) rotate(225deg);
}

/* 子メニュー */
.drawer-nav .drawer-submenu {
	display: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid #ddd;
	background-color: #f5f5f5;
}

.drawer-nav .drawer-submenu li {
	border-bottom: 1px solid #ddd;
}

.drawer-nav .drawer-submenu li:last-child {
	border-bottom: 0;
}

.drawer-nav .drawer-submenu li a {
	display: block;
	padding: 10px 10px 10px 25px;
	color: #2d2e2e;
	font-size: 15px;
	font-weight: normal;
}

/* ドロワー内のみスクロール */
.drawer-nav {
	overflow-y: auto;
	overflow-x: hidden;
	height: 100dvh;
	scrollbar-gutter: stable;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}