/* ========================================
   [Header] START
   ======================================== */

/* --- PC (default) --- */
.ido-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
}

.ido-header__bar {
	height: 100px;
	background: transparent;
	transition:
		transform 0.35s ease,
		background 0.3s ease,
		box-shadow 0.3s ease,
		backdrop-filter 0.3s ease,
		-webkit-backdrop-filter 0.3s ease;
	will-change: transform;
}

.ido-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* max-width: 1920px; */
	height: 100%;
	margin: 0 auto;
	padding: 0 40px;
}

.ido-header__nav {
	flex: 1;
	min-width: 0;
}

.ido-header__nav--left {
	display: flex;
	justify-content: flex-start;
}

.ido-header__nav--right {
	display: flex;
	justify-content: flex-end;
}

.ido-header__menu {
	display: flex;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ido-header__item {
	position: relative;
	display: flex;
	align-items: stretch;
}

.ido-header__link {
	display: flex;
	align-items: center;
	justify-content: center;
	/* min-width: 168px; */
	height: 60px;
	padding: 0 24px;
	border: 0;
	background: transparent;
	color: var(--white);
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.25s ease, opacity 0.25s ease;
}

.ido-header__link:hover,
.ido-header__item.is-open .ido-header__link {
	opacity: 0.75;
}

.ido-header__logo {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ido-header__logo-link,
.ido-header__mobile-logo {
	display: block;
	line-height: 0;
}

.ido-header__logo-img {
	display: block;
	width: auto;
	height: 44px;
}

.ido-header__logo-img--light {
	display: block;
}

.ido-header__logo-img--dark {
	display: none;
}

.ido-header__aside {
	display: flex;
	align-items: center;
	flex: 1;
	justify-content: flex-end;
	min-width: 0;
}

.ido-header__utils {
	display: flex;
	align-items: center;
	gap: 24px;
}

.ido-header__global {
	position: relative;
}

.ido-header__global-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-width: 168px;
	height: 100px;
	padding: 8px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.ido-header__global-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 999px;
}

.ido-header__global-icon img {
	display: block;
	width: 36px;
	height: 36px;
}

.ido-header__global-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 8px;
	height: 8px;
}

.ido-header__global-arrow img {
	display: block;
	width: 8px;
	height: 8px;
}

.ido-header__global-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 160px;
	padding: 8px;
	border-radius: 8px;
	background: var(--gray-0);
	box-shadow: 0 8px 12px rgba(0, 0, 0, 0.09);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ido-header__global.is-open .ido-header__global-panel {
	opacity: 1;
	visibility: visible;
}

.ido-header__global-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 8px;
	border-radius: 12px;
	background: var(--gray-0);
}

.ido-header__global-item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
}

.ido-header__global-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 0;
	background: transparent;
	color: var(--neutral-500);
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease;
}

.ido-header__global-link:hover,
.ido-header__global-link.is-active {
	color: var(--point);
}

.ido-header__sitemap-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 35px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.ido-header__sitemap-line {
	display: block;
	width: 35px;
	height: 1px;
	background: var(--white);
	transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.ido-header__submenu {
	position: absolute;
	top: 80%;
	    left: 50%;
    transform: translateX(-50%);
    width: 200px;
	padding: 10px 0 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ido-header__item.is-open .ido-header__submenu {
	opacity: 1;
	visibility: visible;
}

.ido-header__submenu-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 8px;
	border-radius: 8px;
	background: var(--gray-0);
	box-shadow: 0 8px 12px rgba(0, 0, 0, 0.09);
}

.ido-header__submenu-item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
}

.ido-header__submenu-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 0;
	background: transparent;
	color: var(--neutral-500);
	text-align: center;
	white-space: normal;
	word-break: keep-all;
	cursor: pointer;
	transition: color 0.2s ease;
}

.ido-header__submenu-item:first-child .ido-header__submenu-link {
	color: var(--point);
}

.ido-header__submenu-link:hover {
	color: var(--point);
}

.ido-header__mobile {
	display: none;
	align-items: center;
	justify-content: space-between;
	width: 100vw;
}

.ido-header__mobile-utils {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
}

.ido-header__global-btn--mobile {
	min-width: auto;
	height: auto;
	padding: 0;
}

.ido-header__global-panel--mobile {
	display: none;
}

.ido-header__overlay {
	display: none;
}

/* --- Sitemap --- */
.ido-header__sitemap {
	position: fixed;
	inset: 0;
	z-index: 1002;
	display: flex;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* 좌측: 배경 비주얼 — /images/sitemap-visual-bg.png */
.ido-header__sitemap-visual {
	position: relative;
	flex-shrink: 0;
	width: 36.82%;
	max-width: 707px;
	min-width: 280px;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
	background-color: var(--sub-color);
}

.ido-header__sitemap-visual::before {
	content: "";
	position: absolute;
	inset: -18%;
	/* background-image: url('/images/sitemap-visual-bg.png'); */
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	transform: scale(1.12) translate(0, 0);
	will-change: transform;
}

.ido-header.is-menu-open .ido-header__sitemap-visual::before {
	animation: ido-sitemap-visual-drift 28s ease-in-out infinite alternate;
}

.ido-header__sitemap-visual::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.18) 100%);
	pointer-events: none;
}

@keyframes ido-sitemap-visual-drift {
	0% {
		transform: scale(1.12) translate(4%, 3%);
	}

	100% {
		transform: scale(1.24) translate(-6%, -5%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ido-header.is-menu-open .ido-header__sitemap-visual::before {
		animation: none;
		transform: scale(1.1);
	}
}

.ido-header__sitemap-panel {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	padding: 40px;
	background: var(--main-color);
	overflow: hidden;
	pointer-events: auto;
}

.ido-header__sitemap-top {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
	flex-shrink: 0;
}

.ido-header__sitemap-location {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.ido-header__sitemap-subway {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.ido-header__sitemap-subway-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 999px;
	color: var(--gray-0);
	font-family: "Gowun Dodum", sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 120%;
	letter-spacing: -0.02em;
}

.ido-header__sitemap-subway-badge--5 {
	background: #833edb;
}

.ido-header__sitemap-subway-badge--6 {
	background: #b5500c;
}

.ido-header__sitemap-location-text {
	color: var(--white);
	white-space: nowrap;
}

.ido-header__sitemap-close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.ido-header__sitemap-close img {
	display: block;
	width: 46px;
	height: 46px;
}

.ido-header__sitemap-body {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 215px));
	gap: 60px;
	flex: 1;
	min-height: 0;
	margin-top: 40px;
	padding: 0 20px 0 100px;
	overflow-y: auto;

	/* 모바일 내부 스크롤 — Lenis 정지 중에도 동작하도록 */
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
}

.ido-header__mobile {
	width: 100vw;   /* ← 문제 */
}

.ido-header__sitemap-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ido-header__sitemap-group-title {
	margin: 0 0 15px;
	padding: 0;
	color: var(--white);
}

.ido-header__sitemap-sublist {
	display: flex;
	flex-direction: column;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

.ido-header__sitemap-subitem {
	display: flex;
	align-items: center;
	min-height: 27px;
}

.ido-header__sitemap-sublink {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 27px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--neutral-400);
	text-align: left;
	cursor: pointer;
	transition: color 0.2s ease;
}

.ido-header__sitemap-sublink:hover,
.ido-header__sitemap-sublink.is-active {
	color: var(--white);
}

.ido-header__sitemap-watermark {
	position: absolute;
	right: 40px;
	bottom: 40px;
	width: 376px;
	max-width: 40%;
	pointer-events: none;
}

.ido-header__sitemap-watermark-img {
	display: block;
	width: 100%;
	height: auto;
	/* opacity: 0.15; */
}

/* 스크롤 / 메뉴 오픈 상태 */
.ido-header.is-hidden .ido-header__bar {
	transform: translateY(-100%);
}

.ido-header.is-scrolled:not(.is-menu-open) .ido-header__bar {
	background: #00000030;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: none;
}

.ido-header.is-menu-open .ido-header__sitemap {
	opacity: 1;
	visibility: visible;
}

.ido-header.is-menu-open .ido-header__sitemap-line:nth-child(1) {
	transform: translateY(12px) rotate(45deg);
}

.ido-header.is-menu-open .ido-header__sitemap-line:nth-child(2) {
	opacity: 0;
}

.ido-header.is-menu-open .ido-header__sitemap-line:nth-child(3) {
	transform: translateY(-12px) rotate(-45deg);
}

/* --- max-width: 1440px --- */
@media screen and (max-width: 1440px) {
	.ido-header__inner {
		padding: 0 32px;
	}

	.ido-header__link {
		min-width: 140px;
		padding: 0 16px;
	}

	.ido-header__global-btn {
		min-width: 120px;
	}

	.ido-header__sitemap-body {
		padding-left: 60px;
		gap: 48px;
	}
}

/* --- max-width: 1024px --- */
@media screen and (max-width: 1024px) {
	.ido-header__bar {
		height: 72px;
	}

	.ido-header__nav,
	.ido-header__logo,
	.ido-header__aside {
		display: none;
	}

	.ido-header__mobile {
		display: flex;
	}

	.ido-header__logo-img {
		height: 36px;
	}

	.ido-header__global-panel--mobile {
		display: block;
		z-index: 1003;
	}

	.ido-header__mobile-utils.is-global-open .ido-header__global-panel--mobile {
		opacity: 1;
		visibility: visible;
	}

	.ido-header__sitemap {
		flex-direction: column;
	}

	.ido-header__sitemap-visual {
		display: none;
	}

	.ido-header__sitemap-panel {
		padding: 24px 20px 32px;
	}

	.ido-header__sitemap-top {
		gap: 12px;
	}

	.ido-header__sitemap-location-text {
		font-size: 16px;
		white-space: normal;
		text-align: right;
	}

	.ido-header__sitemap-body {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px;
		margin-top: 24px;
		padding: 0;
	}

	.ido-header__sitemap-watermark {
		right: 20px;
		bottom: 24px;
		width: 200px;
	}
}

/* --- max-width: 640px --- */
@media screen and (max-width: 640px) {
	.ido-header__inner {
		padding: 0 20px;
	}

	.ido-header__bar {
		height: 64px;
	}

	.ido-header__logo-img {
		height: 32px;
	}

	.ido-header__sitemap-body {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.ido-header__sitemap-location-text {
		font-size: 14px;
	}

	.ido-header__sitemap-watermark {
		display: none;
	}
}

/* ========================================
   [Header] END
   ======================================== */
