/* 共通 */
header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #595959;
	top: 0;
	z-index: 100;
	width: 100%;
	height: 80px;
	padding-left: 16px;
}

.home header {
	position: absolute;
}

.header__logo {
	width: 100%;
	max-width: 264px;
}

.header__logo a {
	display: block;
}

.header__logo img {
	display: block;
	max-height: 100%;
}

nav {
	height: 100%;
}

nav ul {
	height: 100%;
	display: flex;
	text-align: center;
	justify-content: space-between;
	font-weight: 700;
	letter-spacing: 1px;
	align-items: center;
}

nav ul li {
	display: flex;
	align-items: center;
	padding: 0 16px;
	height: 100%;
}

nav ul li a {
	display: flex;
	align-items: center;
	height: 100%;
	gap: 6px;
}

nav ul li:last-child {
	background-color: #3A3A3A;
	color: #ffffff;
	padding: 0 20px;
}

/* ハンバーガー */
.hamburger {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 24px;
	height: 18px;
	cursor: pointer;
	z-index: 200;
	/* ナビより上に出す */
	position: relative;
}

.hamburger span {
	display: block;
	height: 3px;
	background: #333;
	border-radius: 2px;
	transition: all 0.3s ease;
}

/* --- ハンバーガーのアニメーション（open時に×になる） --- */
.hamburger.open span:nth-child(1) {
	transform: translateY(7.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
	opacity: 0;
}

.hamburger.open span:nth-child(3) {
	transform: translateY(-7.5px) rotate(-45deg);
}

/* スマホ用 */
@media (max-width: 768px) {
	header {
		padding: 0 16px;
	}

	header nav {
		position: fixed;
		top: 0;
		right: -100%;
		/* 初期は画面外に隠す */
		width: 80%;
		/* スライドインの幅 */
		max-width: 300px;
		height: 100%;
		background: #fff;
		display: flex;
		flex-direction: column;
		justify-content: center;
		transition: right 0.3s ease;
		z-index: 150;
	}

	header nav.active {
		right: 0;
		/* 右からスライドイン */
	}

	header nav.active ul {
		height: 40%;
	}

	header nav ul {
		flex-direction: column;
		width: 100%;
	}

	header nav ul li {
		width: 100%;
		justify-content: center;
		border-bottom: 1px solid #eee;
	}

	header nav ul li:first-child {
		border-top: 1px solid #eee;
	}

	header nav ul li a {
		padding: 16px 0;
		height: auto;
	}

	.hamburger {
		display: flex;
	}
}