@charset "utf-8";
/* index.php 상단 헤더 톤 — css.php 경유 스타일 위에 덮어씀 */

#header_wrap {
	position: relative;
	z-index: 500;
	width: 100%;
	min-width: 0 !important;
	overflow: visible;
}

#header_wrap #header.jbMenu,
#header_wrap #header {
	background: rgba(255, 255, 255, 0.88) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid #dde3ed !important;
	box-sizing: border-box;
	min-height: 64px !important;
	height: 64px !important;
	transition: height 0.35s ease, min-height 0.35s ease, box-shadow 0.25s ease;
}

#header_wrap #header.header_on {
	height: 300px !important;
	min-height: 300px !important;
	box-shadow: 0 20px 60px -15px rgba(25, 32, 45, 0.12);
}

#header_wrap .header_in {
	position: relative;
	width: 100% !important;
	background: transparent !important;
	border-bottom: none !important;
}

#header_wrap .wrap_box {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 80rem;
	width: 100%;
	margin: 0 auto;
	padding: 0 1rem;
	box-sizing: border-box;
}

#header_wrap .logo_a {
	position: static !important;
	float: none !important;
	line-height: 1 !important;
	height: auto !important;
	flex-shrink: 0;
}

#header_wrap .logo_a a.emc-logo-link,
#header_wrap .logo_a a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	line-height: 1;
	text-decoration: none;
	color: inherit;
	min-width: 0;
	max-width: 100%;
}

#header_wrap .logo_a .emc-logo-img {
	max-height: 36px;
	max-width: min(100%, 168px);
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: left center;
	vertical-align: middle;
	flex-shrink: 0;
}

/* 서브 페이지 로고 옆 기관명 */
.emc-logo-title {
	font-size: 0.9375rem;
	font-weight: 700;
	color: #19202d;
	letter-spacing: -0.02em;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 11rem;
}

@media (max-width: 480px) {
	.emc-logo-title {
		font-size: 0.8125rem;
		max-width: 8.5rem;
	}
}

/* 메인 메뉴 */
#header_wrap #lnb {
	position: static !important;
	float: none !important;
	margin-right: 0 !important;
	line-height: 1 !important;
	flex: 1;
	display: flex;
	justify-content: center;
	min-width: 0;
	background: none !important;
}

#header_wrap #lnb .lnb_wrap {
	height: 64px !important;
	min-height: 64px !important;
	overflow: hidden !important;
}

#header_wrap #header.header_on #lnb .lnb_wrap,
#header_wrap #lnb:hover .lnb_wrap {
	height: 280px !important;
	min-height: 280px !important;
	max-height: none !important;
	overflow: visible !important;
	padding-bottom: 1rem;
}

/* 1차 메뉴는 항상 같은 높이(상단) 줄에 두고, .lnb_sub만 아래로 길어지게
   align-items:center 이면 서브 개수가 적은 열의 1차 링크가 중앙으로 내려가 보임 */
#header_wrap #mainMenu {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

#header_wrap #mainMenu > li:empty,
#header_wrap #mainMenu > li.emc-gnb-sep {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	flex: 0 0 0 !important;
}

#header_wrap #mainMenu > li:not(.emc-gnb-sep) {
	float: none !important;
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	align-self: flex-start;
	flex-shrink: 0;
}

#header_wrap #lnb .lnb_wrap > ul > li > a {
	height: 64px !important;
	line-height: 64px !important;
	padding: 0 1rem !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	color: #19202d !important;
	border-radius: 8px;
	transition: color 0.2s ease, background 0.2s ease;
}

#header_wrap #lnb .lnb_wrap > ul > li > a:hover {
	color: #1668c7 !important;
	background: rgba(22, 104, 199, 0.06);
}

#header_wrap #lnb .lnb_wrap > ul > li.current > a,
#header_wrap #lnb .lnb_wrap > ul > li.actived > a {
	color: #1668c7 !important;
	font-weight: 600 !important;
}

#header_wrap #lnb .lnb_wrap > ul > li > a > span {
	background: #1668c7 !important;
	height: 2px !important;
}

#header_wrap #lnb .lnb_sub {
	flex: 0 0 auto;
	margin-top: 0.25rem !important;
	text-align: left !important;
	padding: 0.25rem 0 !important;
	min-width: 180px;
}

#header_wrap #lnb .lnb_sub li a {
	color: #636b7e !important;
	border-radius: 8px !important;
	padding: 0 0.75rem !important;
	margin: 2px 0 !important;
	height: auto !important;
	min-height: 36px !important;
	line-height: 36px !important;
	font-size: 0.8125rem !important;
	transition: color 0.2s ease, background 0.2s ease;
}

#header_wrap #lnb .lnb_sub li a:hover {
	background: #d9e6f7 !important;
	color: #1668c7 !important;
	font-weight: 500 !important;
}

/* 전화 (index.php 우측) */
.emc-header-tel {
	flex-shrink: 0;
	display: none;
}

@media (min-width: 1100px) {
	.emc-header-tel {
		display: block;
	}
}

.emc-header-tel a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #1668c7;
	text-decoration: none;
	white-space: nowrap;
}

.emc-header-tel a:hover {
	opacity: 0.85;
}

.emc-header-tel svg {
	flex-shrink: 0;
}

/* 관리자 / 퀵 링크 */
#header_wrap #gnbb {
	position: static !important;
	right: auto !important;
	flex-shrink: 0;
}

#header_wrap #gnbb span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}

#header_wrap #gnbb a {
	line-height: 1.2 !important;
	height: auto !important;
	padding: 0.5rem 0.75rem !important;
	margin: 0 !important;
	font-size: 0.8125rem !important;
	font-weight: 500 !important;
	color: #1668c7 !important;
	background: rgba(22, 104, 199, 0.08) !important;
	border-radius: 8px !important;
	text-decoration: none;
	transition: background 0.2s ease;
}

#header_wrap #gnbb a:hover {
	background: rgba(22, 104, 199, 0.15) !important;
	color: #1668c7 !important;
}

/* 스크롤 고정 — jbFixed 클래스는 JS에서 #header.jbMenu 에 부여됨(조상이 아님). 테마는 .jbFixed .header_in 고정 */
#header_wrap #header.jbMenu.jbFixed {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 501 !important;
}

#header_wrap #header.jbMenu.jbFixed .header_in {
	position: relative !important;
	width: 100% !important;
	background: rgba(255, 255, 255, 0.95) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid #dde3ed !important;
}

#header_wrap #header.jbMenu.jbFixed #lnb .lnb_wrap {
	height: 56px !important;
	min-height: 56px !important;
	overflow: hidden !important;
}

#header_wrap #header.jbMenu.jbFixed.header_on #lnb .lnb_wrap,
#header_wrap #header.jbMenu.jbFixed #lnb:hover .lnb_wrap {
	height: 280px !important;
	min-height: 280px !important;
	overflow: visible !important;
}

#header_wrap #header.jbMenu.jbFixed #lnb .lnb_wrap > ul > li > a {
	height: 56px !important;
	line-height: 56px !important;
}

#header_wrap #header.jbMenu.jbFixed .logo_a .emc-logo-img {
	width: auto !important;
	max-height: 32px;
	max-width: min(100%, 152px);
}

#header_wrap #header.jbMenu.jbFixed .logo_a .emc-logo-title {
	font-size: 0.8125rem;
	max-width: 10rem;
}

#header_wrap #header.jbMenu.jbFixed #gnbb a {
	padding: 0.45rem 0.65rem !important;
	height: auto !important;
	line-height: 1.2 !important;
	background: rgba(22, 104, 199, 0.1) !important;
	color: #1668c7 !important;
}

#header_wrap #header.jbMenu.jbFixed #gnbb a:hover {
	background: rgba(22, 104, 199, 0.18) !important;
	color: #1668c7 !important;
}

#header_wrap #header.jbMenu.jbFixed.header_on {
	height: 300px !important;
	min-height: 300px !important;
}

/* 고정 시 레이아웃 붕괴 방지: 헤더 영역만큼 상단 여백 */
#header_wrap:has(#header.jbMenu.jbFixed) {
	display: block;
	min-height: 64px;
}

/* ----- 모바일 상단바 ----- */
#mobile_header .inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	border-bottom: 1px solid #dde3ed !important;
	box-shadow: 0 1px 0 rgba(25, 32, 45, 0.04);
}

#mobile_header h1.emc-mh-logo {
	margin: 0;
	min-width: 0;
	flex: 1;
	width: auto !important;
	max-width: none !important;
	padding-top: 0 !important;
	/*text-align: left !important;*/
	line-height: 1.2 !important;
}

#mobile_header h1.emc-mh-logo .emc-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	max-width: 100%;
	text-decoration: none;
	color: inherit;
}

#mobile_header .emc-logo-img {
	width: auto !important;
	max-height: 32px;
	max-width: min(100%, 148px);
	height: auto;
	object-fit: contain;
	object-position: left center;
	flex-shrink: 0;
}

#mobile_header .m_gnb li.category a i,
#mobile_header .m_gnb li.home a i {
	color: #19202d !important;
}

/* 테마 모바일 전용 헤더 (#hd) */
#hd #logo .emc-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

#hd #logo .emc-logo-img {
	max-height: 34px !important;
	max-width: min(100%, 155px);
	width: auto !important;
	margin-top: 0 !important;
	object-fit: contain;
	vertical-align: middle;
	flex-shrink: 0;
}

/* 사이드 메뉴 */
#sideMenu .side_title {
	background-color: #1668c7 !important;
}

#gnba {
	background-color: #f0f3f8 !important;
}

#gnba i {
	color: #1668c7 !important;
}

#gnba a {
	background: #1668c7 !important;
	border-radius: 8px !important;
}

#gnba a:hover {
	background: #f7760f !important;
	color: #fff !important;
}

#sideMenu .navi_set ul li a:hover {
	color: #1668c7 !important;
	background-color: #d9e6f7 !important;
}

/* ----- 세부 페이지 로컬 메뉴 (#sub_menu / .sub_location) -----
   float + inline-block 조합으로 2번째 열(dep2)이 아래로 밀리는 현상 방지:
   flex로 상단 정렬, 하위 메뉴는 기존처럼 absolute로 아래로 펼침 ----- */
#sub_wrapper {
	position: relative;
}

#sub_menu {
	position: sticky;
	z-index: 400;
	background: #fff;
	border-bottom-color: #dde3ed !important;
	overflow: visible !important;
	box-shadow: 0 1px 0 rgba(25, 32, 45, 0.06);
}

@media (min-width: 1101px) {
	#sub_menu {
		top: 64px;
	}
}

/* 모바일 상단바 비고정 — sticky 보정 오프셋 불필요 */
@media (max-width: 1100px) {
	#sub_menu {
		top: 0;
	}
}

.sub_location {
	height: auto !important;
	min-height: 60px;
	overflow: visible !important;
}

.sub_location > div {
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
	flex-wrap: nowrap !important;
	min-height: 60px;
	font-size: 0;
}

.sub_location > div .cen {
	float: none !important;
	flex: 0 0 60px;
	width: 60px !important;
	max-width: 60px !important;
}

/* 직계 컬럼 ul만 — .sub_location ul 은 안쪽 드롭다운까지 잡아 display:block!important 로 항상 펼쳐짐 */
.sub_location > div > ul {
	float: none !important;
	display: block !important;
	width: 179px !important;
	max-width: none !important;
	flex: 0 0 179px;
	margin: 0 !important;
	padding: 0 !important;
	vertical-align: top !important;
	align-self: flex-start !important;
}

.sub_location > div > ul.dep2 {
	width: 180px !important;
	flex: 0 0 180px;
}

.sub_location > div > ul > li {
	position: relative !important;
}

.sub_location > div > ul > li > span {
	box-sizing: border-box;
}

/* 2depth 드롭다운: common.dt_ori / css.php 최적화로 display:none 이 깨질 수 있어 명시 */
.sub_location > div > ul > li > ul {
	display: none !important;
	visibility: hidden !important;
	position: absolute !important;
	top: 60px !important;
	left: -1px !important;
	right: auto !important;
	margin-top: 0 !important;
	z-index: 999998;
	padding: 0 !important;
	background: #fff !important;
	border: 1px solid #dde3ed !important;
	border-top: none !important;
	width: calc(100% + 2px) !important;
	box-sizing: border-box !important;
}

.sub_location > div > ul.on > li > ul {
	display: block !important;
	visibility: visible !important;
	height: auto !important;
	overflow: visible !important;
}

.sub_location > div > ul.dep2.on > li > ul {
	width: 180px !important;
}

/* 중간·모바일: 기존 테마와 동일 비율 유지 */
@media all and (max-width: 1100px) {
	.sub_location > div {
		flex-wrap: wrap;
	}

	.sub_location > div > ul,
	.sub_location > div > ul.dep2 {
		flex: 1 1 50% !important;
		width: 50% !important;
		max-width: none !important;
	}
}
