/**
 * hamburger-b.css — 햄버거B (풀메뉴 컬럼형)
 * 템플릿 레이아웃 샘플 welfare-N1 .header-fullmenu 이식 (샘플 rem 10px 기준 → px 환산)
 * CSWP_THEME_01
 */

.fullmenu-b {
	--fullmenu-b-bg: #000000;
	--fullmenu-b-text: #ffffff;
	--fullmenu-b-sub: #a2a2a2;
	--fullmenu-b-line: rgba(255, 255, 255, 0.2);

	position: fixed;
	z-index: var(--z-modal, 400);
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	background: var(--fullmenu-b-bg);
	color: var(--fullmenu-b-text);
	transition: width 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s;
}

/* 열림 방향 — 위·아래는 높이, 좌·우는 너비가 펼쳐진다 */
.fullmenu-b--top,
.fullmenu-b--bottom {
	left: 0;
	width: 100%;
	height: 0;
}

.fullmenu-b--top { top: 0; }
.fullmenu-b--bottom { bottom: 0; }

.fullmenu-b--left,
.fullmenu-b--right {
	top: 0;
	width: 0;
	height: 100vh;
	height: 100dvh;
}

.fullmenu-b--left { left: 0; }
.fullmenu-b--right { right: 0; }

.fullmenu-b.is-active {
	visibility: visible;
	opacity: 1;
	width: 100%;
	height: 100vh;
	height: 100dvh;
}

/* 내용이 화면보다 길면 메뉴 안에서 스크롤 */
.fullmenu-b__scroll {
	display: flex;
	width: 100vw;
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 80px 24px;
	box-sizing: border-box;
}

.fullmenu-b--right .fullmenu-b__scroll {
	margin-left: auto;
}

.fullmenu-b__wrapper {
	width: 100%;
	max-width: 1280px;
	margin: auto; /* 세로 · 가로 가운데 */
}

/* ── 로고 ────────────────────────────────────────────── */

.fullmenu-b__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 100px;
}

.fullmenu-b__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.fullmenu-b__title a {
	display: inline-flex;
	align-items: center;
	height: 43px;
	color: var(--fullmenu-b-text);
	text-decoration: none;
}

.fullmenu-b__title img {
	display: block;
	width: auto;
	height: 100%;
	max-width: 240px;
	object-fit: contain;
}

/* ── 1차 메뉴 (컬럼) ─────────────────────────────────── */

.fullmenu-b__gnblist {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 56px 40px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fullmenu-b__gnbitem {
	flex: 1 1 160px;
	max-width: 240px;
	min-width: 0;
	opacity: 0;
	translate: 0 16px;
	transition: opacity 0.4s ease, translate 0.4s ease;
}

.fullmenu-b.is-active .fullmenu-b__gnbitem {
	opacity: 1;
	translate: 0 0;
	transition-delay: calc(0.15s + var(--i, 0) * 0.05s);
}

.fullmenu-b__gnblink {
	position: relative;
	display: block;
	width: 100%;
	padding-bottom: 40px;
	border-bottom: 1px solid var(--fullmenu-b-line);
	color: var(--fullmenu-b-text);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	word-break: keep-all;
}

/* hover 시 밑줄 확장 */
.fullmenu-b__gnblink::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 0;
	height: 1px;
	background: var(--fullmenu-b-text);
	transition: width 0.2s;
}

.fullmenu-b__gnbitem:hover > .fullmenu-b__gnblink::after,
.fullmenu-b__gnbitem:focus-within > .fullmenu-b__gnblink::after,
.fullmenu-b__gnblink[aria-current="page"]::after {
	width: min(180px, 100%);
}

.fullmenu-b__gnblink:hover,
.fullmenu-b__gnblink:focus-visible {
	color: var(--fullmenu-b-text);
}

/* ── 2 · 3차 메뉴 ───────────────────────────────────── */

.fullmenu-b__sublist {
	margin: 0;
	padding: 40px 0 0;
	list-style: none;
}

.fullmenu-b__subitem + .fullmenu-b__subitem {
	padding-top: 8px;
}

.fullmenu-b__sublist--l3 {
	padding: 8px 0 4px 12px;
}

.fullmenu-b__sublink {
	position: relative;
	display: inline-block;
	padding-bottom: 5px;
	color: var(--fullmenu-b-sub);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
	transition: color 0.3s;
}

.fullmenu-b__sublink--l3 {
	font-size: 14px;
}

/* hover 시 밑줄 왼쪽 → 오른쪽 */
.fullmenu-b__sublink::before {
	content: "";
	position: absolute;
	top: 100%;
	right: 0;
	width: 0;
	height: 1px;
	background-color: var(--fullmenu-b-text);
	transition: width 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.fullmenu-b__sublink:hover,
.fullmenu-b__sublink:focus-visible,
.fullmenu-b__sublink[aria-current="page"] {
	color: var(--fullmenu-b-text);
}

.fullmenu-b__sublink:hover::before,
.fullmenu-b__sublink:focus-visible::before {
	right: auto;
	left: 0;
	width: 100%;
}

.fullmenu-b__empty {
	margin: 0;
	text-align: center;
	color: var(--fullmenu-b-sub);
}

/* ── 닫기 ────────────────────────────────────────────── */

.fullmenu-b__close {
	position: absolute;
	top: 24px;
	right: 80px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.fullmenu-b__close-icon {
	position: relative;
	display: block;
	width: 28px;
	height: 28px;
}

.fullmenu-b__close-icon::before,
.fullmenu-b__close-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	margin-top: -1px;
	background: var(--fullmenu-b-text);
	transition: transform 0.3s;
}

.fullmenu-b__close-icon::before { transform: rotate(45deg); }
.fullmenu-b__close-icon::after  { transform: rotate(-45deg); }

.fullmenu-b__close:hover .fullmenu-b__close-icon::before { transform: rotate(135deg); }
.fullmenu-b__close:hover .fullmenu-b__close-icon::after  { transform: rotate(45deg); }

.fullmenu-b__close:focus-visible {
	outline: 2px solid var(--fullmenu-b-text);
	outline-offset: 2px;
}

/* 관리 툴바(로그인) 아래로 닫기 버튼 내림 */
body.admin-bar .fullmenu-b__close {
	top: calc(24px + var(--wp-admin-bar-height, 0px));
}

/* ── 태블릿 ──────────────────────────────────────────── */

@media (max-width: 1279px) {
	.fullmenu-b__close {
		right: 24px;
	}
}

@media (max-width: 1023px) {
	.fullmenu-b__scroll {
		padding: 72px 20px 48px;
	}

	.fullmenu-b__wrapper {
		margin: 0 auto;
	}

	.fullmenu-b__head {
		margin-bottom: 48px;
	}

	.fullmenu-b__title a {
		height: 34px;
	}

	.fullmenu-b__gnblist {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px 24px;
	}

	.fullmenu-b__gnbitem {
		max-width: none;
	}

	.fullmenu-b__gnblink {
		padding-bottom: 16px;
		font-size: 19px;
	}

	.fullmenu-b__sublist {
		padding-top: 16px;
	}

	.fullmenu-b__close {
		top: 12px;
		right: 12px;
	}

	body.admin-bar .fullmenu-b__close {
		top: calc(12px + var(--wp-admin-bar-height, 0px));
	}
}

/* ── 모바일 ──────────────────────────────────────────── */

@media (max-width: 599px) {
	.fullmenu-b__gnblist {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.fullmenu-b__sublink {
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fullmenu-b,
	.fullmenu-b__gnbitem,
	.fullmenu-b__sublink::before,
	.fullmenu-b__gnblink::after {
		transition: none !important;
	}
}
