@charset "utf-8";

/* ==========================================================================
   コンポーネント: ハンバーガーメニュー
   ========================================================================== */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100;
	width: 100%;
	background-color: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.site-header__inner {
	background-color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
}

.site-logo {
	z-index: 130;
	margin-left: 2.0833%;
}

.site-logo img {
	max-height: 40px;
}

.hamburger-btn {
	position: relative;
	z-index: 150;
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	width: 60px;
	height: 60px;
	padding: 15px;
	background-color: var(--color-primary);
	cursor: pointer;
}

.hamburger-btn__bar {
	display: block;
	width: 100%;
	height: 1px;
	background-color: #fff;
	transition: transform 0.4s ease, background-color 0.4s ease;
}

.hamburger-btn.is-active .hamburger-btn__bar:nth-of-type(1) {
	transform: translateY(10px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-btn__bar:nth-of-type(2) {
	transform: scaleX(0);
}

.hamburger-btn.is-active .hamburger-btn__bar:nth-of-type(3) {
	transform: translateY(-10px) rotate(-45deg);
}

/* --- グローバルナビゲーション (モバイル) --- */
.global-nav {
	position: fixed;
	top: 60px;
	right: 0;
	z-index: 120;
	display: block; /* flexからblockに変更 */
	width: 100%;
	height: 100%;
	padding: 0 0 60px;
	background-color: rgba(255, 255, 255, 0.95);
	overflow-y: auto; /* スクロールを許可 */
	backdrop-filter: blur(5px);
	transform: translateX(100%);
	transition: transform 0.4s ease;
}

.global-nav.is-active {
	transform: translateX(0);
}

.global-nav__list {
	text-align: center;
	border-top: 1px solid #ddd;
}

.global-nav__item {
	border-bottom: 1px solid #ddd;
}

.global-nav__link {
	display: block;
	padding: 1.25em 1em;
	color: var(--color-primary);
	font-size: 1.6rem;
	font-weight: bold;
	line-height: 1;
	transition: color 0.3s ease;
}

body.no-scroll {
	overflow: hidden;
}

/* ==========================================================================
   コンポーネント: 多階層ナビゲーション (ドロップダウン)
   ========================================================================== */
.global-nav__item.has-submenu {
	position: relative;
}

.submenu {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

.submenu__link {
	display: block;
	padding: 1em;
	border-top: 1px solid #eee;
	background-color: #f7f7f7;
	font-size: 1.5rem;
	line-height: 1;
}

.submenu-toggle {
	position: relative;
	display: block; /* モバイルでは常に表示 */
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	color: #fff;
	background-color: var(--color-primary);
	cursor: pointer;
}

.submenu-toggle::before,
.submenu-toggle::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 2px;
	background-color: #fff;
	transition: transform 0.3s ease;
}

.submenu-toggle::before {
	transform: translate(-50%, -50%);
}

.submenu-toggle::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.global-nav__item-main {
	position: relative;
}

.global-nav__item.has-submenu .submenu-toggle {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
}

.global-nav__item.has-submenu.is-open .submenu-toggle::after {
	display: none;
}

.global-nav__item.has-submenu .submenu {
	width: 100%;
}

/* --- PC (1200px以上) のスタイル --- */
@media (min-width: 1200px) {
	.site-header__inner {
		height: 100px;
	}

	.site-header--fixed .site-header__inner {
		height: 60px;
	}

	.site-logo img {
		max-height: 60px;
	}

	.site-header--fixed .site-logo img {
		max-height: 40px;
	}

	.hamburger-btn {
		display: none;
	}

	.global-nav {
		position: static;
		display: flex;
		justify-content: center;
		align-items: center;
		width: auto;
		height: 100%;
		padding: 0;
		background-color: transparent;
		overflow-y: visible;
		backdrop-filter: none;
		transform: none;
	}

	.global-nav__list {
		display: flex;
		align-items: center;
		gap: var(--space-6);
		height: 100%;
		border: none;
	}

	.global-nav__item {
		display: flex;
		align-items: center;
		height: 100%;
		border: none;
	}

	.global-nav__link {
		padding: 0;
		font-size: 1.6rem;
	}

	.global-nav__item-main {
		padding: 0;
	}

	.submenu-toggle {
		display: none !important;
	}

	.global-nav__item--contact {
		justify-content: normal; /* 中央揃えを解除 */
		width: 240px;
	}

	.global-nav__item--contact .global-nav__link {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
		color: #fff;
		background-color: var(--color-primary);
		transition: background-color 0.3s ease;
	}

	.global-nav__item--contact .global-nav__link:hover {
		background-color: var(--color-primary-dark);
	}

	.global-nav__item.has-submenu .global-nav__link::after {
		content: '\f078';
		margin-left: 0.5em;
		font-family: var(--font-icon);
		font-size: 1.2rem;
		font-weight: 900;
		transition: transform 0.3s ease;
	}

	.global-nav__item.has-submenu:hover .global-nav__link::after {
		transform: rotate(180deg);
	}

	.submenu {
		position: absolute;
		top: 100%;
		left: 50%;
		width: 200px !important;
		height: auto;
		margin-top: -20px;
		max-height: none;
		background-color: #fff;
		box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
		opacity: 0;
		visibility: hidden;
		overflow: visible;
		transform: translateX(-50%) translateY(10px);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
	}

	.global-nav__item.has-submenu:hover>.submenu,
	.global-nav__item.has-submenu:focus-within>.submenu {
		opacity: 1;
		visibility: visible;
		transform: translateX(-50%) translateY(0);
	}

	.global-nav__item.has-submenu:hover .global-nav__link,
	.global-nav__item.has-submenu:focus-within .global-nav__link {
		color: var(--color-primary);
	}

	.submenu__item {
		height: auto;
	}

	.submenu__link {
		display: block;
		border-top: none;
		background-color: transparent;
		font-size: 1.5rem;
		transition: background-color 0.3s;
	}

	.submenu__link:hover {
		background-color: var(--color-bg-light);
	}
}