/* ============================================
   header.css
   共通ヘッダー 3状態
   ① 通常（FV上）: fixed / top:15px / glassmorphism
   ② スクロール後: .is-scrolled / top:0 / 全幅 / 白不透明
   ③ ドロップダウン: .is-open / .has-dropdown-open
   ============================================ */

/* --- ヘッダー本体 --- */

.header {
	left: 50%;
	position: fixed;
	top: 15px;
	transform: translateX(-50%);
	width: min(1370px, calc(100vw - 30px));
	z-index: 100;
}

body.has-dropdown-open .header {
	background: var(--color-white-1);
	border-radius: 0 0 5px 5px;
	height: 334px;
	left: 0;
	overflow: hidden;
	top: 0;
	transform: none;
	width: 100%;
}

body.has-dropdown-open .header::before {
	content: none;
}

/* ② スクロール後 */
.header.is-scrolled {
	left: 50%;
	top: 15px;
	transform: translateX(-50%);
	width: min(1370px, calc(100vw - 30px));
}

/* --- ヘッダーバー --- */

.header__inner {
	align-items: center;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	background: rgba(255, 255, 255, 0.6);
	border-radius: 5px;
	display: flex;
	height: 76px;
	padding-inline: clamp(20px, 2.55vw, 35px);
}

.header.is-scrolled .header__inner {
	background: rgba(255, 255, 255, 0.6);
	box-shadow: none;
	height: 76px;
	padding-inline: clamp(20px, 2.55vw, 35px);
}

/* --- ロゴ --- */

.header__logo {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	height: 34px;
	width: 201px;
}

.header__logo img {
	height: 34px;
	object-fit: contain;
	width: 201px;
}

/* --- ナビゲーション --- */

.header__nav {
	margin-inline-start: auto;
	padding-inline: 0 clamp(18px, 2.2vw, 30px);
}

.header__nav-list {
	align-items: center;
	display: flex;
	gap: clamp(14px, 1.6vw, 22px);
}

.header__nav-item {
	position: relative;
}

.header__nav-item--has-dropdown {
	position: static;
}

.header__nav-link,
.header__nav-btn {
	align-items: center;
	background: none;
	border: none;
	color: var(--color-navy-2);
	cursor: pointer;
	display: flex;
	font-family: var(--font-family-noto-sans-jp);
	font-size: var(--font-size-14);
	font-weight: var(--font-weight-700);
	gap: 6px;
	line-height: var(--line-height-160);
	padding: 0;
	text-decoration: none;
	transition: opacity 0.25s ease;
	white-space: nowrap;
}

.header__nav-link:hover,
.header__nav-btn:hover,
.header__nav-link:focus-visible,
.header__nav-btn:focus-visible,
.header__nav-item--has-dropdown.is-open .header__nav-btn {
	color: var(--color-navy-2);
	opacity: 0.7;
}

body.has-dropdown-open .header__inner {
	background: transparent;
	border-radius: 0;
	box-sizing: border-box;
	margin-inline: auto;
	max-width: 1370px;
	position: relative;
	width: 100%;
	z-index: 1;
}

/* ▼ドロップダウン用アイコン */
.header__nav-icon {
	align-items: center;
	background: transparent;
	border: 1px solid var(--color-navy-2);
	border-radius: 2px;
	box-sizing: border-box;
	display: inline-flex;
	flex-shrink: 0;
	height: 22px;
	justify-content: center;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	width: 22px;
}

.header__nav-btn:hover .header__nav-icon,
.header__nav-item--has-dropdown.is-open .header__nav-icon {
	background: transparent;
}

.header__nav-arrow {
	height: 8px;
	position: relative;
	transition: transform 0.2s ease;
	width: 8px;
}

.header__nav-arrow::before {
	background-color: var(--color-navy-2);
	content: "";
	height: 100%;
	inset: 0;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	position: absolute;
	transform: rotate(90deg);
	width: 100%;
}

.header__nav-item--has-dropdown.is-open .header__nav-arrow {
	transform: rotate(180deg);
}

.chevron-icon--navy {
	color: var(--color-navy-2);
}

.chevron-icon--light {
	color: var(--color-white-1);
}

/* --- アクションボタン --- */

.header__actions {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	gap: clamp(10px, 1.1vw, 15px);
	margin-inline-start: 0;
}

.header__actions .btn {
	width: clamp(175px, 14.6vw, 200px);
}

.header__actions .btn__label {
	padding-inline-start: clamp(14px, 1.5vw, 20px);
}

.header__actions .header__action--recruit {
	background-color: var(--color-white-1);
}

.header__actions .btn__icon-square {
	border: 1px solid transparent;
	isolation: isolate;
	overflow: hidden;
	transition: color 0.18s ease 0.12s, border-color 0.2s ease;
}

.header__actions .btn__icon-square::before {
	border-radius: inherit;
	content: "";
	inset: 0;
	position: absolute;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.28s ease;
	z-index: 0;
}

.header__actions .btn__arrow {
	position: relative;
	z-index: 1;
}

.header__actions .header__action--recruit .btn__icon-square::before {
	background-color: var(--color-white-1);
}

.header__actions .header__action--contact .btn__icon-square {
	border-color: var(--color-white-1);
}

.header__actions .header__action--contact .btn__icon-square::before {
	background-color: var(--color-navy-2);
}

.header__actions .header__action--recruit:hover .btn__icon-square,
.header__actions .header__action--recruit:focus-visible .btn__icon-square {
	border-color: var(--color-navy-2);
	color: var(--color-navy-2);
}

.header__actions .header__action--contact:hover .btn__icon-square,
.header__actions .header__action--contact:focus-visible .btn__icon-square {
	color: var(--color-white-1);
}

.header__actions .btn:hover .btn__icon-square::before,
.header__actions .btn:focus-visible .btn__icon-square::before {
	transform: scaleX(1);
}

/* --- ③ ドロップダウンパネル --- */

.header__dropdown-panel {
	background: transparent;
	border-radius: 0;
	left: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	top: 0;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	visibility: hidden;
	width: 100%;
	z-index: 0;
}

.header__dropdown-panel::before {
	background-color: var(--color-navy-2);
	content: "";
	height: 1px;
	left: 35px;
	position: absolute;
	right: 35px;
	top: 76px;
}

/* open状態 */
body.has-dropdown-open .header__dropdown-panel,
.header__nav-item--has-dropdown.is-open .header__dropdown-panel {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
}

.header__dropdown-inner {
	margin-inline: auto;
	max-width: 1340px;
	padding-block: 97px 20px;
	padding-inline: 57px 35px;
}

.header__dropdown-heading {
	color: var(--color-navy-2);
	font-size: var(--font-size-20);
	font-weight: var(--font-weight-700);
	line-height: normal;
	margin: 0;
	padding-block-start: 16px;
}

.header__dropdown-cols {
	align-items: start;
	display: grid;
	grid-template-columns: 108px 1px 280px 280px;
	column-gap: 35px;
}

body.has-dropdown-open .header__dropdown-panel,
.header__nav-item--has-dropdown.is-open .header__dropdown-panel {
	height: 334px;
}

.header__dropdown-item {
	align-content: start;
	align-items: start;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 0;
	min-width: 0;
	padding: 0;
	position: relative;
	text-decoration: none;
	width: 280px;
}

.header__dropdown-item img {
	border-radius: 10px;
	display: block;
	flex-shrink: 0;
	height: 160px;
	object-fit: cover;
	width: 280px;
}

.header__dropdown-item-label {
	color: var(--color-navy-2);
	font-size: var(--font-size-14);
	font-weight: var(--font-weight-700);
	line-height: normal;
	max-width: calc(100% - 38px);
	padding-block-start: 0;
}

.header__dropdown-item::before,
.header__dropdown-item::after {
	bottom: 0;
	content: "";
	position: absolute;
	right: 0;
	transition: transform 0.2s ease;
}

.header__dropdown-item::before {
	background: var(--color-navy-2);
	border: 1px solid var(--color-navy-2);
	border-radius: 3px;
	height: 25px;
	transition: background-position 0.28s ease;
	width: 25px;
	background-image: linear-gradient(
		90deg,
		var(--color-white-1) 0,
		var(--color-white-1) 50%,
		var(--color-navy-2) 50%,
		var(--color-navy-2) 100%
	);
	background-position: right;
	background-size: 200% 100%;
}

.header__dropdown-item::after {
	background-color: var(--color-white-1);
	height: 8px;
	right: 8px;
	top: calc(100% - 12px);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	transform: translateY(-50%);
	transition: background-color 0.18s ease 0.12s, transform 0.2s ease;
	width: 8px;
}

.header__dropdown-item:hover::before {
	background-position: left;
}

.header__dropdown-item:hover::after {
	background-color: var(--color-navy-2);
	transform: translateY(-50%);
}

/* 縦区切り線 */
.header__dropdown-divider {
	align-self: start;
	background-color: var(--color-navy-2);
	flex-shrink: 0;
	height: 135px;
	width: 1px;
}

/* --- ハンバーガーボタン (SP) --- */

.header__hamburger {
	align-items: center;
	background: none;
	border: none;
	cursor: pointer;
	display: none;
	flex-direction: column;
	gap: 6.75px;
	justify-content: center;
	margin-inline-start: auto;
	padding: 8px;
}

.header__hamburger-bar {
	background-color: var(--color-navy-2);
	display: block;
	height: 1.5px;
	transition: transform 0.3s ease, opacity 0.3s ease;
	width: 18px;
}

/* × 状態 */
.header__hamburger.is-open .header__hamburger-bar:nth-child(1) {
	transform: translateY(8.25px) rotate(45deg);
}

.header__hamburger.is-open .header__hamburger-bar:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

.header__hamburger.is-open .header__hamburger-bar:nth-child(3) {
	transform: translateY(-8.25px) rotate(-45deg);
}

/* --- SP ナビメニュー --- */

.header__sp-nav {
	background: transparent;
	box-shadow: none;
	display: none;
	left: calc(-50vw + 50%);
	opacity: 0;
	overflow-y: auto;
	padding: 10px 15px 0;
	position: absolute;
	top: 100%;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	visibility: hidden;
	width: 100vw;
}

.header__sp-nav.is-open {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
}

.header__sp-nav-panel {
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	background: rgba(255, 255, 255, 0.72);
	border-radius: 0 0 5px 5px;
	padding: 14px 19px 20px;
	position: relative;
}

.header__sp-nav-panel::before {
	background: linear-gradient(
		to right,
		transparent 0,
		transparent 10px,
		rgba(0, 61, 86, 0.64) 10px,
		rgba(0, 61, 86, 0.64) calc(100% - 10px),
		transparent calc(100% - 10px),
		transparent 100%
	);
	content: "";
	height: 1px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.header__sp-section {
	border-top: 1px solid rgba(0, 61, 86, 0.64);
}

.header__sp-section--business {
	border-top: 0;
	padding-top: 0;
}

.header__sp-section-title {
	color: var(--color-navy-2);
	font-size: var(--font-size-16);
	font-weight: var(--font-weight-700);
	line-height: normal;
	margin: 0;
}

.header__sp-business-grid {
	display: grid;
	gap: 14px 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 14px;
}

.header__sp-business-card {
	color: var(--color-navy-2);
	display: block;
	padding-bottom: 4px;
	position: relative;
	text-decoration: none;
}

.header__sp-business-card img {
	border-radius: 5px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
    aspect-ratio: 149 / 95;
}

.header__sp-business-label {
	display: block;
	font-size: var(--font-size-14);
	font-weight: var(--font-weight-700);
	line-height: normal;
	margin-top: 10px;
	padding-right: 24px;
}

.header__sp-business-card::before {
	background-color: var(--color-navy-2);
	border-radius: 2px;
	content: "";
	height: 14px;
	position: absolute;
	width: 14px;
}

.header__sp-business-card::after {
	background-color: var(--color-white-1);
	content: "";
	height: 6px;
	position: absolute;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	width: 6px;
}

.header__sp-business-card::before {
	bottom: 7px;
	right: 0;
}

.header__sp-business-card::after {
	bottom: 11px;
	right: 4px;
}

.header__sp-nav-list {
	margin-top: 16px;
}

.header__sp-nav-item {
	border-top: 1px solid rgba(0, 61, 86, 0.64);
}

.header__sp-nav-link {
	color: var(--color-navy-2);
	display: block;
	font-size: var(--font-size-14);
	font-weight: var(--font-weight-700);
	line-height: normal;
	padding: 19px 24px 19px 0;
	position: relative;
	text-decoration: none;
}

.header__sp-nav-link--arrow::before {
	background: transparent;
	border: 1px solid var(--color-navy-2);
	border-radius: 2px;
	content: "";
	height: 14px;
	right: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 14px;
}

.header__sp-nav-link--arrow::after {
	background-color: var(--color-navy-2);
	content: "";
	height: 6px;
	position: absolute;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23' fill='none'%3E%3Cpath d='M16.9097 9.72217L9.13195 1.94439L11.1111 0L22.2222 11.1111L11.1111 22.2222L9.13195 20.2777L16.9097 12.4999L0 12.4999L0 9.72217L16.9097 9.72217Z' fill='white'/%3E%3C/svg%3E");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 6px;
}

.header__sp-cta {
	border-top: 1px solid rgba(0, 61, 86, 0.64);
	padding-top: 20px;
}

.header__sp-recruit-link {
	align-items: center;
	background: var(--color-white-1);
	border: 1px solid var(--color-navy-2);
	border-radius: 2px;
	color: var(--color-navy-2);
	display: flex;
	font-family: var(--font-family-noto-sans-jp);
	font-size: var(--font-size-14);
	font-weight: var(--font-weight-700);
	height: 50px;
	padding: 0;
	position: relative;
	text-decoration: none;
	box-shadow: none;
}

.header__sp-recruit-link .btn__label {
	flex: 1;
	padding-inline-start: 14px;
}

.header__sp-recruit-link .btn__icon {
	align-items: center;
	display: flex;
	flex: 0 0 44px;
	height: 100%;
	justify-content: center;
	position: relative;
	width: 44px;
}

.header__sp-recruit-link .btn__icon::before {
	background: #ebebeb;
	content: "";
	height: calc(100% - 10px);
	left: 0;
	opacity: 1;
	position: absolute;
	top: 5px;
	transform: none;
	width: 1px;
}

.header__sp-recruit-link .btn__icon-square {
	background-color: var(--color-navy-2);
	border-radius: 2px;
	color: var(--color-white-1);
	height: 14px;
	width: 14px;
}

.header__sp-recruit-link .btn__arrow {
	height: 9.6px;
	width: 9.6px;
}

/* --- レスポンシブ --- */

@media screen and (min-width: 769px) and (max-width: 1100px) {
	.header__inner,
	.header.is-scrolled .header__inner {
		height: 68px;
	}

	.header__logo {
		width: 148px;
	}

	.header__nav {
		padding-inline-end: 14px;
	}

	.header__nav-list {
		gap: 12px;
	}

	.header__nav-link,
	.header__nav-btn {
		font-size: 13px;
		gap: 4px;
	}

	.header__nav-icon {
		height: 20px;
		width: 20px;
	}

	.header__actions {
		gap: 8px;
	}

	.header__actions .btn {
		height: 48px;
		width: 145px;
	}

	.header__actions .btn__label {
		padding-inline-start: 12px;
	}

	.header__actions .btn__icon {
		width: 44px;
	}

	.header__actions .btn__icon::before {
		height: 36px;
	}

	.header__actions .btn__icon-square {
		border-radius: 2px;
		height: 26px;
		width: 26px;
	}
}

@media screen and (min-width: 1025px) and (max-width: 1100px) {
	.header__logo {
		height: 34px;
		width: 201px;
	}

	.header__logo img {
		height: 34px;
		width: 201px;
	}
}

@media screen and (max-width: 768px) {
	.header {
		top: 10px;
		width: calc(100% - 30px);
	}

	.header.is-scrolled {
		left: 50%;
		top: 10px;
		transform: translateX(-50%);
		width: calc(100% - 30px);
	}

	.header__inner {
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		background: rgba(255, 255, 255, 0.6);
		border-radius: 5px;
		height: 56px;
		padding-inline: 15px;
	}

	.header.is-scrolled .header__inner {
		box-shadow: none;
		background: rgba(255, 255, 255, 0.6);
		height: 56px;
		padding-inline: 15px;
	}

	.header.is-sp-nav-open .header__inner {
		border-radius: 5px 5px 0 0;
	}

	.header__logo {
		height: 24px;
		width: 144px;
	}

	.header__logo img {
		height: 24.358px;
		width: 144px;
	}

	.header__actions {
		align-items: center;
		flex: 1;
		gap: 0;
		justify-content: flex-end;
		margin-inline-start: auto;
	}

	/* SP上段は「お問い合わせ」のみ残す */
	.header__nav,
	.header__actions > :not(.header__action--contact) {
		display: none;
	}

	/* SP: お問い合わせボタン小型化 */
	.header__action--contact {
		align-items: center;
		background: var(--color-navy-2);
		border-radius: 3px;
		display: inline-flex;
		font-size: 14px;
		height: 40px;
		max-width: 110px;
		min-width: 110px;
		padding: 0;
		justify-content: center;
		width: 110px;
	}

	.header__action--contact .btn__icon {
		display: none;
	}

	.header__action--contact .btn__label {
		padding-inline: 0;
		text-align: center;
	}

	.header__sp-nav {
		padding: 0;
	}

	/* ハンバーガー表示 */
	.header__hamburger {
		flex: 0 0 auto;
		display: flex;
		height: 40px;
		margin-inline-start: 14px;
		padding: 0;
		position: relative;
		justify-content: center;
		align-items: center;
		width: 40px;
	}

	/* SP ナビ表示 */
	.header__sp-nav {
		display: block;
		left: 0;
		max-height: calc(100vh - 76px);
		width: 100%;
	}

	.header__sp-nav-panel {
		padding-inline: 15px;
	}

    .header__sp-business-grid {
        gap: 10px;
    }

	.header.is-scrolled .header__sp-nav {
		left: 0;
		width: 100%;
	}

	/* ドロップダウンパネル非対応（SP はハンバーガーで代替） */
	.header__dropdown-panel {
		display: none;
	}

	.header__hamburger-bar {
		background-color: var(--color-navy-2);
		height: 1px;
		left: 50%;
		opacity: 1;
		position: absolute;
		transform-origin: center;
		transform: translateX(-50%);
		width: 18px;
	}

	.header__hamburger-bar:nth-child(1) {
		top: 12px;
	}

	.header__hamburger-bar:nth-child(2) {
		top: 19px;
	}

	.header__hamburger-bar:nth-child(3) {
		top: 26px;
	}

	.header__hamburger.is-open .header__hamburger-bar:nth-child(1) {
		transform: translateX(-50%) translateY(7px) rotate(39deg);
	}

	.header__hamburger.is-open .header__hamburger-bar:nth-child(2) {
		opacity: 0;
	}

	.header__hamburger.is-open .header__hamburger-bar:nth-child(3) {
		transform: translateX(-50%) translateY(-7px) rotate(-39deg);
	}
}
