@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
	--ep-point: #4a4a4a;   /* 버튼, 강조 */
	--ep-ink: #222222;     /* 본문 글자 */
	--ep-muted: #8a8a8a;   /* 보조 글자 */
	--ep-line: #cfcfcf;    /* 목록 구분선 */
	--ep-rule: #555555;    /* 제목 아래 굵은 선 */
	--ep-mist: #f4f4f4;    /* 행 호버 */
	--ep-field: #e9e9e9;   /* 검색창 */
	--ep-backdrop: #666666;/* 카드 바깥 배경 */
	--ep-paper: #ffffff;
	--ep-max: 1030px;
	--ep-font: 'Jost', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

html, body { margin: 0; }
body { background: var(--ep-backdrop); }

/* ---------- 카드 ---------- */
.ep-wrap {
	box-sizing: border-box;
	width: calc(100% - 100px);
	max-width: 1320px;
	min-height: calc(100vh - 176px);
	margin: 96px auto 80px;
	display: flex;
	flex-direction: column;
	background: var(--ep-paper);
	box-shadow: 0 6px 18px rgba(0,0,0,.28);
	font-family: var(--ep-font);
	color: var(--ep-ink);
	font-size: 14px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
.ep-wrap a { color: inherit; text-decoration: none; }
.ep-wrap :focus-visible { outline: 2px solid var(--ep-point); outline-offset: 3px; }

/* ---------- 상단 메뉴 ---------- */
.ep-header { position: relative; z-index: 100; }
.ep-header__inner {
	max-width: var(--ep-max);
	margin: 0 auto;
	padding: 30px 32px 0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 54px;
}

/* 홈 버튼 (그림) */
.ep-home {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-left: -2px;
	color: var(--ep-ink) !important;
	transition: opacity .15s;
}
.ep-home:hover { opacity: .6; }
.ep-home svg { width: 19px; height: 19px; display: block; }
.ep-home img { display: block; max-height: 22px; width: auto; }

.ep-logo {
	flex: none;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -.01em;
	color: var(--ep-ink) !important;
	white-space: nowrap;
}
.ep-logo img { display: block; max-height: 28px; width: auto; }

.ep-gnb {
	flex: 1;
	display: flex;
	align-items: center;
	min-width: 0;
}
.ep-gnb__notice { margin: 0; font-size: 12px; color: var(--ep-muted); }
.ep-gnb__list {
	display: flex;
	gap: 40px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ep-gnb__item { position: relative; }
.ep-gnb__link {
	display: block;
	padding: 6px 0;
	font-size: 15px;
	color: var(--ep-ink) !important;
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-underline-offset: 4px;
	transition: opacity .15s;
}
.ep-gnb__item:hover > .ep-gnb__link { opacity: .6; }
.ep-gnb__item.is-active > .ep-gnb__link { text-decoration-thickness: 2px !important; }

/* 2차 메뉴 */
.ep-sub {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 150px;
	margin: 6px 0 0;
	padding: 6px 0;
	list-style: none;
	background: var(--ep-paper);
	border: 1px solid var(--ep-line);
	box-shadow: 0 6px 16px rgba(0,0,0,.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.ep-sub::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* 호버 끊김 방지 */
.ep-gnb__item:hover > .ep-sub,
.ep-gnb__item:focus-within > .ep-sub {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .15s, transform .15s, visibility 0s;
}
.ep-sub a {
	display: block;
	padding: 7px 16px;
	font-size: 13px;
	color: var(--ep-ink) !important;
	white-space: nowrap;
}
.ep-sub a:hover,
.ep-sub li.is-active > a { background: var(--ep-mist); }

.ep-sub-toggle { display: none; }

/* 3차 메뉴: 2차 메뉴 오른쪽으로 펼침 */
.ep-sub__item { position: relative; }
.ep-sub__item.has-sub > .ep-sub__link { padding-right: 32px; }
.ep-sub__item.has-sub > .ep-sub__link::after {
	content: '';
	position: absolute;
	right: 14px;
	top: 50%;
	width: 5px; height: 5px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: translateY(-50%) rotate(45deg);
	opacity: .6;
}
.ep-sub--3 {
	top: -7px;
	left: 100%;
	margin: 0 0 0 -1px;
	transform: translateX(-4px);
}
.ep-sub--3::before { display: none; }
.ep-sub__item:hover > .ep-sub--3,
.ep-sub__item:focus-within > .ep-sub--3 {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .15s, transform .15s, visibility 0s;
}
/* 화면 오른쪽 끝에 닿으면 왼쪽으로 펼침 (layout.js가 붙임) */
.ep-sub__item.is-flip > .ep-sub--3 { left: auto; right: 100%; margin: 0 -1px 0 0; transform: translateX(4px); }
.ep-sub__item.is-flip:hover > .ep-sub--3,
.ep-sub__item.is-flip:focus-within > .ep-sub--3 { transform: none; }


.ep-util {
	margin-left: auto;
	display: flex;
	gap: 24px;
	padding-left: 24px;
	font-size: 15px;
}
.ep-util a {
	color: var(--ep-ink) !important;
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-underline-offset: 4px;
}
.ep-util a:hover { opacity: .6; }

.ep-burger { display: none; }

/* ---------- 본문 ---------- */
.ep-main { flex: 1; }
.ep-container {
	max-width: var(--ep-max);
	margin: 0 auto;
	padding: 72px 32px 96px;
	box-sizing: border-box;
}
.ep-page-title {
	margin: 0 0 32px;
	font-family: var(--ep-font);
	font-weight: 400;
	font-size: 40px;
	line-height: 1.15;
	letter-spacing: -.005em;
	color: var(--ep-ink);
}

/* 메인 페이지: 제목(h1)은 화면에서 숨기고 스크린리더에는 남김 */
.ep-wrap.is-home .ep-main h1,
.ep-wrap.is-home .epb-title {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ep-footer .ep-container { padding: 0 32px 40px; font-size: 12px; color: var(--ep-muted); }

/* ---------- 모바일 ---------- */
@media (max-width: 860px) {
	.ep-wrap {
		width: 100%;
		min-height: 100vh;
		margin: 0;
		box-shadow: none;
	}
	.ep-header__inner { padding: 18px 20px 0; gap: 16px; }

	.ep-burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 40px;
		height: 40px;
		margin-left: auto;
		padding: 0 9px;
		background: none;
		border: 0;
		cursor: pointer;
	}
	.ep-burger span { display: block; height: 1.5px; background: var(--ep-ink); transition: transform .2s, opacity .2s; }
	.ep-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
	.ep-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.ep-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

	.ep-gnb {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		margin-top: 8px;
		max-height: calc(100vh - 80px);
		overflow-y: auto;
		flex-direction: column;
		align-items: stretch;
		background: var(--ep-paper);
		border-top: 1px solid var(--ep-rule);
		border-bottom: 1px solid var(--ep-line);
		box-shadow: 0 10px 20px rgba(0,0,0,.08);
		display: none;
	}
	.ep-gnb.is-open { display: flex; }
	.ep-gnb__notice { padding: 14px 20px 0; }
	.ep-gnb__list { flex-direction: column; gap: 0; }
	.ep-gnb__item { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--ep-line); }
	.ep-gnb__link { flex: 1; padding: 14px 20px; text-decoration: none !important; }
	.ep-gnb__item.is-active > .ep-gnb__link { font-weight: 500; }

	.ep-sub-toggle {
		display: block;
		width: 52px;
		background: none;
		border: 0;
		cursor: pointer;
		position: relative;
	}
	.ep-sub-toggle::after {
		content: '';
		position: absolute;
		top: 50%; left: 50%;
		width: 7px; height: 7px;
		border-right: 1.5px solid var(--ep-ink);
		border-bottom: 1.5px solid var(--ep-ink);
		transform: translate(-50%, -70%) rotate(45deg);
		transition: transform .2s;
	}
	.ep-sub-toggle[aria-expanded="true"]::after { transform: translate(-50%, -30%) rotate(-135deg); }

	.ep-gnb .ep-sub {
		position: static;
		flex-basis: 100%;
		display: none;
		margin: 0;
		opacity: 1;
		visibility: visible;
		transform: none;
		border: 0;
		box-shadow: none;
		background: var(--ep-mist);
		padding: 4px 0;
	}
	.ep-gnb .ep-sub::before { display: none; }
	.ep-gnb .is-open > .ep-sub { display: block; }
	.ep-sub a { padding: 10px 36px; }

	.ep-sub__item { display: flex; flex-wrap: wrap; }
	.ep-sub__item > .ep-sub__link { flex: 1; }
	.ep-sub__item.has-sub > .ep-sub__link { padding-right: 0; }
	.ep-sub__item.has-sub > .ep-sub__link::after { display: none; }
	.ep-gnb .ep-sub--3 { background: #ebebeb; }
	.ep-sub--3 a { padding: 9px 52px; font-size: 12.5px; }

	.ep-util { margin: 0; padding: 14px 20px; }

	.ep-container { padding: 40px 20px 64px; }
	.ep-page-title { font-size: 32px; }
	.ep-footer .ep-container { padding: 0 20px 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.ep-sub, .ep-burger span, .ep-sub-toggle::after { transition: none !important; }
}
