/* 모던 PC 헤더 */
.ib-hd-modern.pc-header {
	padding: 0;
	text-align: left;
	border-bottom: 1px solid #e8ecf0;
}
.ib-hd-modern.pc-header .ib-hd-container,
.ib-hd-modern.pc-header .at-container {
	background: none !important;
	background-image: none !important;
}
.ib-hd-modern .ib-hd-container {
	padding: 12px 20px 14px;
}
.ib-hd-row {
	display: grid;
	grid-template-columns: 1fr 1.4fr 1fr;
	gap: 12px 20px;
	align-items: center;
}
.ib-hd-zone { min-width: 0; }
.ib-hd-zone-left { justify-self: start; text-align: left; }
.ib-hd-zone-center { justify-self: center; text-align: center; }
.ib-hd-zone-right { justify-self: end; text-align: right; }
.ib-hd-zone.is-empty { visibility: hidden; height: 0; overflow: hidden; padding: 0; }
.ib-hd-zone-left:not(.is-empty) ~ .ib-hd-zone-center:not(.is-empty) { }

/* 로고 */
.ib-hd-logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ib-hd-zone-center .ib-hd-logo { align-items: center; }
.ib-hd-zone-right .ib-hd-logo { align-items: flex-end; }
.ib-hd-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}
.ib-hd-logo-link:hover { opacity: 0.92; text-decoration: none; }
.ib-hd-logo-img { max-height: 52px; max-width: 200px; display: block; }
.ib-hd-logo-title {
	font-size: var(--ib-logo-title-size, 26px);
	font-weight: var(--ib-logo-title-weight, 800);
	line-height: 1.15;
	letter-spacing: var(--ib-logo-letter-spacing, -0.5px);
	color: inherit;
}
.ib-hd-logo-desc {
	font-size: var(--ib-logo-desc-size, 12px);
	color: #6b7c8f;
	letter-spacing: -0.3px;
}

/* 헤더 배너 */
.ib-hd-banner {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	line-height: 0;
}
.ib-hd-zone-right .ib-hd-banner,
.ib-hd-zone-right .ib-hd-util {
	margin-left: 8px;
}
.ib-hd-zone-left .ib-hd-banner + .ib-hd-banner,
.ib-hd-zone-right .ib-hd-banner + .ib-hd-banner,
.ib-hd-zone-center .ib-hd-banner + .ib-hd-banner {
	margin-left: 8px;
}
.ib-hd-banner-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}
.ib-hd-banner-img {
	display: block;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}
.ib-hd-zone-right {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px 12px;
}
.ib-hd-zone-left {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}
.ib-hd-zone-center {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 12px;
}

/* 금주말씀 */
.ib-hd-verse { max-width: 100%; }
.ib-hd-verse-text {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #5a6b7d;
	font-style: italic;
}
.ib-hd-verse-ref { color: #8a9bab; font-style: normal; white-space: nowrap; }
.ib-hd-verse-left { text-align: left; }
.ib-hd-verse-center { text-align: center; }
.ib-hd-verse-right { text-align: right; }

/* 유틸(검색 아이콘 · 로그인) */
.ib-hd-util {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
}
.ib-hd-zone-center .ib-hd-util { justify-content: center; }
.ib-hd-zone-right .ib-hd-util { justify-content: flex-end; }
.ib-hd-util-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	color: #64748b;
	font-size: 15px;
	text-decoration: none;
	transition: color 0.2s, background 0.2s;
}
.ib-hd-util-icon:hover {
	color: #1e293b;
	background: rgba(15, 23, 42, 0.06);
	text-decoration: none;
}

/* 로그인/회원가입 */
.ib-hd-auth {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
}
.ib-hd-auth-link {
	color: #64748b;
	font-size: 13px;
	text-decoration: none;
	line-height: 1.4;
}
.ib-hd-auth-link:hover { color: #1e293b; text-decoration: none; }
.ib-hd-auth-name { color: #1e293b; font-size: 13px; text-decoration: none; }
.ib-hd-auth-name:hover { color: #0f172a; text-decoration: none; }
.ib-hd-auth-btn-outline {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: transparent;
	color: #334155 !important;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	line-height: 1.4;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.ib-hd-auth-btn-outline:hover {
	border-color: #94a3b8;
	background: rgba(15, 23, 42, 0.04);
	color: #0f172a !important;
	text-decoration: none;
}

/* 검색 — 모던(그누보드7 스타일) */
.ib-hd-search { width: 100%; max-width: 320px; }
.ib-hd-zone-center .ib-hd-search { margin: 0 auto; }
.ib-hd-zone-right .ib-hd-search { margin-left: auto; }
.ib-hd-search-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	padding: 4px 6px 4px 14px;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.ib-hd-search-wrap:focus-within {
	border-color: #93c5fd;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
	background: var(--tm-input-bg, #f1f5f9);
}
.ib-hd-search-icon { color: #94a3b8; font-size: 14px; flex-shrink: 0; }
.ib-hd-search-input {
	flex: 1;
	border: 0;
	background: transparent;
	box-shadow: none;
	height: 32px;
	padding: 0;
	font-size: 13px;
	color: #334155;
	min-width: 0;
}
.ib-hd-search-input:focus { outline: none; }
.ib-hd-search-btn {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: #1e293b;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	padding: 0;
	line-height: 34px;
	text-align: center;
}
.ib-hd-search-btn:hover { background: #0f172a; }
.ib-hd-keywords { margin-top: 4px; font-size: 11px; }

/* 검색 — 클래식(기존 테마) */
.ib-hd-search-classic .ib-hd-search-wrap {
	border-radius: 0;
	border: 4px solid #111;
	background: #111;
	padding: 0;
}
.ib-hd-search-classic .ib-hd-search-input {
	background: #fff;
	border: 1px solid #111;
	height: 30px;
	padding: 0 8px;
	border-radius: 0;
}
.ib-hd-search-classic .ib-hd-search-icon { display: none; }
.ib-hd-search-classic .ib-hd-search-btn {
	border-radius: 0;
	width: auto;
	height: 30px;
	padding: 0 12px;
	line-height: 30px;
	background: #111 !important;
}

.ib-hd-search-row {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed #e2e8f0;
}
.ib-hd-search-row .ib-hd-search { max-width: 100%; }

/* LNB */
.ib-hd-lnb .ib-hd-lnb-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 4px;
}
.ib-hd-lnb-left ul,
.ib-hd-lnb-right ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ib-hd-lnb-left li,
.ib-hd-lnb-right li { display: inline-block; }
.ib-hd-lnb-theme {
	margin-left: auto;
	padding: 4px 0;
}
.ib-hd-lnb-inner .ib-hd-lnb-theme { float: right; }
.ib-hd-lnb-right { float: none; margin-left: auto; }

@media (max-width: 991px) {
	.ib-hd-modern.pc-header { display: none !important; }
}
@media (min-width: 992px) {
	.responsive .ib-hd-modern.pc-header { display: block; }
}

/* 모바일 헤더 — 한 줄 flex */
.m-header.ib-m-header .at-container { padding: 0; }
.m-header.ib-m-header .ib-m-header-inner {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	width: 100%;
	min-height: var(--ib-m-hd-height, 44px);
	height: var(--ib-m-hd-height, 44px);
}
.m-header.ib-m-header .ib-m-header-side {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	flex-shrink: 0;
}
.m-header.ib-m-header .ib-m-header-left { justify-content: flex-start; }
.m-header.ib-m-header .ib-m-header-right {
	justify-content: flex-end;
	margin-left: auto;
}
.m-header.ib-m-header .ib-m-header-logo {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 16px;
	line-height: var(--ib-m-hd-height, 44px);
}
.m-header.ib-m-header .ib-m-header-logo a {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: inherit;
	text-decoration: none;
}
.m-header.ib-m-header .ib-m-header-logo-img {
	max-height: calc(var(--ib-m-hd-height, 44px) - 12px);
	vertical-align: middle;
}
.m-header.ib-m-header .ib-m-header-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 40px;
	height: var(--ib-m-hd-height, 44px);
	flex-shrink: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	text-decoration: none;
	font-size: 17px;
	line-height: 1;
	vertical-align: middle;
}
.m-header.ib-m-header .ib-m-header-btn .label {
	position: absolute;
	top: 6px;
	right: 4px;
	font-size: 9px;
	font-weight: 300;
	padding: 2px 3px;
	line-height: 0.9;
	border-radius: .25em;
	pointer-events: none;
}
.m-header.ib-m-header .ib-nav-theme-m {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: var(--ib-m-hd-height, 44px);
	padding: 0;
	font-size: 17px;
}
.m-header.ib-m-header .ib-nav-view-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: var(--ib-m-hd-height, 44px);
	padding: 0;
	line-height: 1;
}

@media (max-width: 1200px) {
	.ib-hd-row {
		grid-template-columns: 1fr 1fr;
	}
	.ib-hd-zone-center { grid-column: 1 / -1; justify-self: center; }
}
