@charset "utf-8";

/*==========================
基本設定
============================*/
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 100px;
}

/*body {
	min-height: 100%;
	font-size: 87.5%; /* 14px 
	font-family: "M PLUS Rounded 1c", sans-serif;
	font-weight: 500;
	color: #262626;
	background: #FFF url("../img/star.png") repeat;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;/*フォントのシャギー防止
	text-rendering: geometricPrecision;/*フォントのシャギー防止
}*/

/*add*/
body {
	font-size: 87.5%; /* 14px */
	font-family: "M PLUS Rounded 1c", sans-serif;
	font-weight: 500; /* 400 → 500 に変更 */
	color: #262626;
	background: #FFF; /* 背景画像は擬似要素へ移動 */
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: geometricPrecision;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background: url("../img/star.png") repeat;
	z-index: -1;
}

header {
	width: 1200px;
	max-width: 100%;
	height: 100px;
	margin: 0 auto;
	position: relative;
	overflow: visible;
}

#navi,
#menu {
	overflow: visible;
}

header::after {
	content: "";
	display: table;
	clear: both;
}

footer {
	background: #282d5a;
	text-align: center;
	width: 100%;
	color: #fff;
	padding: 10px 0;
	/*margin-top: 50px; #ftnav下の余白を削除（モバイルでは非表示）*/
}

#navi ul {
	list-style: none;
}

#navi {
	background-color: #fff;
	padding: 1em;
	margin: 0 auto;
}

.logo {
	float: left;
	line-height: 60px;
	/*font-size: 24px;
	font-weight: bold;
	color: #333;
	text-decoration: none;*/
}

.logo:hover, .menu-link:hover, .link:hover {
	opacity: 0.7;
}

/*main {
	width: 1200px;
	max-width: 95%;
	margin: 0 auto;
}

main h2 {
	background: #ccc;
	padding: 0.5em;
	margin-bottom: 1em;
}

main p {
	padding: 0 1em;
	line-height: 1.6;
}

.content-section {
	min-height: 400px;
	padding: 40px;
}

.content-section--1 {
	background: #f5f5f5;
}

.content-section--2 {
	background: #e8e8e8;
}

.content-section--3 {
	background: #ddd;
}*/

#menu-navibtn {
	display: none;
}

/*==========================
PC版メニュー
============================*/
#menu {
	float: right;
	margin-right: 10px;
	position: relative;
}

#menu > li {
	float: left;
	margin: 0 15px;
	line-height: 60px;
	font-size: 17px;
	font-weight: bold;
	position: static;
}

.menu-title {
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
}

.menu-title a {
	text-decoration: none;
	color: #333;
	font-weight: bold;
}

.menu-arrow {
	font-size: 12px;
	transition: 0.3s;
	color: #999;
}

.mega-container {
	display: none;
}

/* メガメニュー（PC：クリックしたメニュー直下に表示） */
@media screen and (min-width: 1200px) {
	#menu > li {
		position: relative;
	}

	#menu > li.has-mega.mega-hover,
	#menu > li.has-mega:hover,
	#menu > li.has-mega:focus-within {
		z-index: 1001;
	}

	.mega-container {
		position: absolute;
		top: 100%;
		left: 0;
		right: auto;
		transform: none;
		width: min(280px, calc(100vw - 32px));
		margin-top: 0;
		background: #fff;
		border: 1px solid #ccc;
		border-radius: 0 0 6px 6px;
		padding: 8px 0;
		z-index: 1000;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
	}

	#menu > li > .dropdown-container {
		top: 100%;
		left: 0;
		margin-top: 0;
		border-radius: 0 0 6px 6px;
	}

	/* トリガーとパネル間の透明ブリッジ（斜め移動でも hover が切れにくく） */
	#menu > li.has-mega.mega-hover::after,
	#menu > li.has-mega:hover::after,
	#menu > li.has-mega:focus-within::after {
		content: "";
		position: absolute;
		top: 100%;
		left: 0;
		width: min(280px, calc(100vw - 32px));
		height: 20px;
		z-index: 999;
	}

	.mega-container::before,
	#menu > li > .dropdown-container::before {
		content: "";
		position: absolute;
		top: -16px;
		left: 0;
		width: 100%;
		height: 16px;
	}

	#menu > li.has-mega .mega-row {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 0;
		max-width: none;
	}

	#menu > li.has-mega .mega-col {
		flex: none;
		width: 100%;
	}

	#menu > li.has-mega .mega-col > .menu-title {
		margin-bottom: 0;
		padding: 12px 20px;
		border-bottom: 1px solid #eee;
	}

	#menu > li.has-mega .mega-col:last-child > .menu-title {
		border-bottom: none;
	}

	#menu > li.has-mega .mega-col .dropdown-container a {
		padding-left: 32px;
	}

	/* PC：hover / focus / JS の mega-hover でメニューを開く */
	#menu > li.mega-hover > .mega-container,
	#menu > li:hover > .mega-container,
	#menu > li:focus-within > .mega-container,
	#menu > li:hover > .dropdown-container,
	#menu > li:focus-within > .dropdown-container {
		display: block;
	}

	#menu > li.mega-hover > .menu-title .menu-arrow,
	#menu > li:hover > .menu-title .menu-arrow,
	#menu > li:focus-within > .menu-title .menu-arrow {
		transform: rotate(180deg);
	}

	#menu > li.mega-hover .mega-col:hover > .dropdown-container,
	#menu > li.mega-hover .mega-col:focus-within > .dropdown-container,
	#menu > li:hover .mega-col:hover > .dropdown-container,
	#menu > li:hover .mega-col:focus-within > .dropdown-container,
	#menu > li:focus-within .mega-col:hover > .dropdown-container,
	#menu > li:focus-within .mega-col:focus-within > .dropdown-container {
		display: block;
	}

	#menu > li.mega-hover .mega-col:hover > .menu-title .menu-arrow,
	#menu > li.mega-hover .mega-col:focus-within > .menu-title .menu-arrow,
	#menu > li:hover .mega-col:hover > .menu-title .menu-arrow,
	#menu > li:hover .mega-col:focus-within > .menu-title .menu-arrow,
	#menu > li:focus-within .mega-col:hover > .menu-title .menu-arrow,
	#menu > li:focus-within .mega-col:focus-within > .menu-title .menu-arrow {
		transform: rotate(180deg);
	}
	
/* ======================================
   PC版 hover安定化
====================================== */

/* 親 */
#menu > li.has-mega .mega-col {
	position: relative;
}

/* submenu */
#menu > li.has-mega .mega-col > .dropdown-container {
	position: absolute;
	top: 0;
	left: 100%;

	display: none;

	min-width: 220px;

	background: #fff;
	border: 1px solid #ccc;
	box-shadow: 0 5px 10px rgba(0,0,0,.1);

	z-index: 1002;
}

/* hoverで表示 */
#menu > li.has-mega .mega-col:hover > .dropdown-container,
#menu > li.has-mega .mega-col:focus-within > .dropdown-container {
	display: block;
}

/* hover切れ防止 */
#menu > li.has-mega .mega-col > .menu-title {
	margin-bottom: 0;
	position: relative;
}

/* invisible bridge */
#menu > li.has-mega .mega-col > .menu-title::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	width: 24px;
	height: 100%;
}
}

.mega-row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px 32px;
	max-width: 1200px;
	margin: 0 auto;
}

.mega-col {
	flex: 1 1 180px;
	min-width: 0;
	position: relative;
}

.mega-col > .menu-title {
	line-height: 1.4;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 2px solid #eee;
	font-size: 16px;
}

.mega-col > .menu-title .menu-link {
	font-size: 16px;
}

.mega-col .dropdown-container a {
	font-size: 16px;
}

.mega-col .dropdown-container {
	position: static;
	display: none;
	border: none;
	box-shadow: none;
	min-width: 0;
	background: transparent;
}

.mega-col-title {
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 2px solid #eee;
	font-size: 16px;
	font-weight: bold;
}

.mega-col-title a {
	text-decoration: none;
	color: #333;
}

.mega-col-title a:hover {
	color: #000;
	text-decoration: underline;
}

.mega-col-list {
	list-style: none;
}

.mega-col-list li {
	padding: 6px 0;
}

.mega-col-list a {
	text-decoration: none;
	color: #555;
	font-size: 14px;
	font-weight: normal;
	line-height: 1.5;
}

.mega-col-list a:hover {
	color: #333;
	text-decoration: underline;
}

.dropdown-container {
	display: none;
	position: absolute;
	top: 60px;
	left: 0;
	background: #fff;
	border: 1px solid #ccc;
	min-width: 180px;
	z-index: 1000;
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
	list-style: none;
}

.dropdown-container a {
	display: block;
	padding: 10px 20px;
	text-decoration: none;
	color: #555;
	font-size: 14px;
	font-weight: normal;
	line-height: 1.4;
}

.dropdown-container a:hover {
	background: #eee;
	color: #333;
}

#navi #navibtn {
	display: none;
}


/*==========================
レスポンシブ（1199px以下）
============================*/
@media screen and (max-width: 1199px) {
	#menu > li.open > .mega-container,
	#menu > li.open > .dropdown-container {
		display: block;
	}

	#menu > li.open > .menu-title .menu-arrow {
		transform: rotate(180deg);
	}

	/* メガ内の列：クリックした列だけ dropdown を表示 */
	#menu > li.open .mega-col.open > .dropdown-container {
		display: block;
	}

	.mega-col.open > .dropdown-container {
		display: block;
	}

	.mega-col.open > .menu-title .menu-arrow {
		transform: rotate(180deg);
	}

	header {
		width: 100%;
		position: sticky;
		top: 0;
		z-index: 1000;
		background: #fff;
		height: auto;
		min-height: 70px;
	}

	#navi #navibtn {
		display: block;
		position: absolute;
		top: 15px;
		right: 15px;
		z-index: 10001;
		cursor: pointer;
	}

	#navibtn > span {
		display: block;
		width: 40px;
		height: 40px;
		background-color: #333;
		border-radius: 4px;
		position: relative;
	}

	#navibtn span span {
		display: none !important;
	}

	#navibtn > span::before {
		position: absolute;
		left: 10px;
		top: 10px;
		content: "";
		width: 20px;
		height: 3px;
		background-color: #fff;
		box-shadow: 0 8px 0 #fff;
		transition: 0.3s;
	}

	#navibtn > span::after {
		position: absolute;
		left: 10px;
		bottom: 10px;
		content: "";
		width: 20px;
		height: 3px;
		background-color: #fff;
		transition: 0.3s;
	}

	#menu-navibtn:checked ~ #navi {
		position: relative;
		top: 0;
		left: 0;
		width: 100%;
		height: 100vh;
		background: #fff;
		overflow-y: auto;
		z-index: 9999;
		padding: 1em;
	}

	#menu-navibtn:checked ~ #navi #menu {
		display: block;
		/*margin-top: 70px; 上部余白は不要のため */
	}

	#menu-navibtn:checked ~ #navi #navibtn {
		/* position: fixed; */
		/* top: 15px;
		right: 15px; */
		z-index: 10000;
	}

	#menu-navibtn:checked ~ #navi #navibtn > span::before {
		top: 18px;
		transform: rotate(-45deg);
		box-shadow: none;
	}

	#menu-navibtn:checked ~ #navi #navibtn > span::after {
		bottom: 18px;
		transform: rotate(45deg);
	}

	#navi {
		padding: 0.5em 1em;
	}

	.navi-inner {
		position: relative;
		min-height: 60px;
	}
	.logo {
		float: none;
		display: inline-block;
		line-height: 60px;
	}

	#menu {
		display: none;
		float: none;
		margin-right: 0;
		padding: 0;
		width: 100%;
	}

	#menu > li {
		float: none;
		margin: 0;
		line-height: normal;
		border-bottom: 1px solid #eee;
	}

	.menu-title {
		justify-content: space-between;
		padding: 15px 20px;
	}

	.menu-title a {
		font-size: 16px;
	}

	.mega-container {
		position: static;
		left: auto;
		transform: none;
		width: 100%;
		padding: 0;
		border: none;
		box-shadow: none;
		background: #fafafa;
	}

	.mega-row {
		display: block;
	}

	.mega-col {
		border-bottom: 1px solid #eee;
	}

	.mega-col > .menu-title {
		margin-bottom: 0;
		padding: 12px 20px 12px 35px;
		background: #f0f0f0;
		border-bottom: 1px solid #eee;
	}

	.mega-col > .menu-title .menu-link {
		font-size: 14px;
	}

	.mega-col .dropdown-container a {
		font-size: 14px;
	}

	.mega-col .dropdown-container a {
		padding-left: 50px;
	}

	.mega-col-title {
		margin: 0;
		padding: 12px 20px 12px 35px;
		background: #f0f0f0;
		border-bottom: 1px solid #eee;
		font-size: 14px;
	}

	.mega-col-title a {
		display: block;
		color: #333;
	}

	.mega-col-list li {
		padding: 0;
		border-bottom: 1px solid #eee;
		background: #fff;
	}

	.mega-col-list a {
		display: block;
		padding: 14px 20px 14px 50px;
		font-size: 15px;
	}

	.dropdown-container {
		position: static;
		border: none;
		box-shadow: none;
		background: #fafafa;
	}

	.dropdown-container a {
		padding: 14px 20px 14px 35px;
		border-bottom: 1px solid #eee;
		background: #fafafa;
	}
}

@media screen and (max-width: 768px) {
	.mega-col-title {
		padding-left: 30px;
	}

	.mega-col-list a,
	.dropdown-container a {
		padding-left: 40px;
		padding-right: 15px;
	}
}
