/**
 * Off-Grid Life - モバイルメニュー
 * 配置: wp-content/themes/offgrid-life/assets/css/mobile-menu.css
 */

.ogl-mobile-toggle {
	display: none;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	width: 44px;
	height: 44px;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	align-items: center;
}
.ogl-mobile-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform .25s ease, opacity .25s ease;
}
body.ogl-menu-open .ogl-mobile-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.ogl-menu-open .ogl-mobile-toggle span:nth-child(2) { opacity: 0; }
body.ogl-menu-open .ogl-mobile-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ogl-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .5);
	z-index: 998;
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}
body.ogl-menu-open .ogl-mobile-overlay {
	opacity: 1;
	pointer-events: auto;
}

.ogl-mobile-menu {
	position: fixed;
	top: 0;
	right: 0;
	width: min(320px, 85vw);
	height: 100vh;
	background: #fff;
	box-shadow: -8px 0 32px rgba(0,0,0,.15);
	z-index: 999;
	transform: translateX(100%);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
	overflow-y: auto;
	padding: 0;
}
body.ogl-menu-open .ogl-mobile-menu {
	transform: translateX(0);
}
.ogl-mobile-menu[hidden] { display: block !important; }

.ogl-mobile-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #e5e7eb;
	font-weight: 600;
}
.ogl-mobile-close {
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
	padding: 4px 8px;
}

.ogl-mobile-list {
	list-style: none;
	margin: 0;
	padding: 12px 0;
}
.ogl-mobile-list li {
	border-bottom: 1px solid #f3f4f6;
}
.ogl-mobile-list a {
	display: block;
	padding: 14px 20px;
	color: #1f2937;
	text-decoration: none;
	font-size: 15px;
}
.ogl-mobile-list a:hover {
	background: #f9fafb;
	color: #2e7d32;
}
.ogl-mobile-list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 0 16px;
	background: #f9fafb;
}
.ogl-mobile-list .sub-menu a {
	padding: 12px 20px;
	font-size: 14px;
	color: #6b7280;
}

.ogl-mobile-sns {
	padding: 20px;
	border-top: 1px solid #e5e7eb;
}

/* SNSメニュー共通 */
.ogl-sns-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ogl-sns-menu .ogl-sns-item a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(46,125,50,.08);
	color: #2e7d32;
	transition: background .15s, transform .15s;
	text-decoration: none;
}
.ogl-sns-menu .ogl-sns-item a:hover {
	background: #2e7d32;
	color: #fff;
	transform: translateY(-2px);
}
.ogl-sns-menu .ogl-sns-item svg {
	width: 20px;
	height: 20px;
}
.ogl-sns-menu .ogl-sns-label {
	position: absolute;
	left: -9999px;
}

/* Show hamburger on mobile only */
@media (max-width: 768px) {
	.site-nav > a,
	.site-nav .menu {
		display: none !important;
	}
	.ogl-mobile-toggle {
		display: inline-flex;
	}
}
