/* Congdy Header & Footer - Front */

/* Tenada font (Project Noonnu) */
@font-face{
	font-family:'Tenada';
	src:url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2210-2@1.0/Tenada.woff2') format('woff2');
	font-weight:normal;
	font-style:normal;
}

/* Layout spacers to prevent content overlap with fixed header/footer */
.chf-header-spacer{
  display:block;
  width:100%;
  height: var(--chf-header-h, 72px);
}
.chf-footer-spacer{
  display:block;
  width:100%;
  height: var(--chf-footer-h, 48px);
}
/* Header */
.chf-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	background-color: var(--chf-header-bg);
	/* Subtle "bevel" depth without drop shadows */
	background-image: linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0) 60%);
	color: var(--chf-header-fg);
	font-family: 'Tenada', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
	border-bottom: 1px solid rgba(0,0,0,0.10);
}

.chf-inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: var(--chf-header-py, 12px) 16px;
	max-width: 1200px;
	margin: 0 auto;
}

.chf-brand {
	flex: 0 0 auto;
	padding-left: var(--chf-brand-pl, 0px);
}

.chf-site-link {
	color: var(--chf-header-fg);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: -0.2px;
}

.chf-nav {
	flex: 1 1 auto;
	min-width: 0;
}


/* Nav wrapper + Mobile menu */
.chf-mobile-panel {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.chf-mobile-panel .chf-nav {
	flex: 1 1 auto;
	min-width: 0;
}

.chf-search-btn--mobile { display: none !important; }

/* Always hide the mobile-only search button on desktop (extra safety against theme overrides) */
@media (min-width: 769px) {
	.chf-search-btn--mobile { display: none !important; }
}

/* Hamburger */
.chf-burger-btn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	border: 1px solid rgba(0,0,0,0.10);
	background: rgba(255,255,255,0.0);
	color: var(--chf-header-fg);
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.chf-burger-btn:hover { background: transparent; }
.chf-burger-btn:active { transform: translateY(1px); }

/* Prevent hover transparency on icons (theme overrides) */
.chf-search-btn,
.chf-search-btn:hover,
.chf-search-btn:focus,
.chf-search-btn:active,
.chf-burger-btn,
.chf-burger-btn:hover,
.chf-burger-btn:focus,
.chf-burger-btn:active {
	opacity: 1 !important;
	color: var(--chf-header-fg) !important;
	filter: none !important;
}
.chf-search-btn svg,
.chf-burger-btn svg {
	opacity: 1 !important;
}

.chf-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px var(--chf-menu-gap-x, 14px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.chf-menu .menu-item {
	margin: 0;
	padding: 0;
}

/* If theme/plugins append a "search" menu item (e.g., GeneratePress nav search), hide it inside this plugin header
   to avoid duplicated magnifier icons on desktop. */
.chf-header li.search-item,
.chf-header .menu-bar-item.search-item,
.chf-header .menu-item.search-item {
	display: none !important;
}


.chf-menu a {
	color: var(--chf-header-fg);
	text-decoration: none;
	font-size: var(--chf-menu-font-size, 14px);
	font-weight: var(--chf-menu-font-weight, 600);
	line-height: 1.2;
	padding: 6px 8px;
	border-radius: 10px;
	transition: color .15s ease, opacity .15s ease;
	white-space: nowrap;
}



.chf-menu a:hover {
	background: transparent;
	color: var(--chf-menu-hover-color, currentColor);
}


.chf-menu-empty {
	opacity: .7;
	font-size: 13px;
	text-align: right;
}

.chf-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.chf-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	border: 1px solid rgba(0,0,0,0.10);
	background: rgba(255,255,255,0.0);
	color: var(--chf-header-fg);
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}

.chf-search-btn:hover {
	background: transparent;
}

.chf-search-btn:active {
	transform: translateY(1px);
}

/* Searchbar */
.chf-searchbar {
	border-top: 1px solid rgba(0,0,0,0.08);
	background: var(--chf-header-bg);
	color: var(--chf-header-fg);
}

.chf-searchbar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 16px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.chf-search-msg {
	flex: 0 0 auto;
	font-size: 13px;
	opacity: 0.85;
	white-space: nowrap;
}

.chf-search-form {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.chf-search-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 38px;
	border-radius: 12px;
	border: 1px solid rgba(0,0,0,0.12);
	padding: 0 12px;
	font-size: 14px;
	font-family: 'Tenada', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
	outline: none;
}

.chf-search-submit {
	height: 38px;
	border-radius: 0;
	border: 1px solid rgba(0,0,0,0.12);
	background: #919191 !important;
	color: #fff;
	padding: 0 12px;
	cursor: pointer;
	font-family: 'Tenada', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
}

.chf-search-submit-text{
  display: inline-block !important;
  position: relative !important;
  top: 4px !important; /* 1~3px로 조절 */
}

.chf-search-close {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	border: 1px solid rgba(0,0,0,0.12);
	background: transparent;
	color: var(--chf-header-fg);
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
}

/* Footer */
.chf-footer {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99998;
	background-color: var(--chf-footer-bg);
	/* Subtle "bevel" depth without drop shadows */
	background-image: linear-gradient(to top, rgba(255,255,255,0.16), rgba(255,255,255,0) 60%);
	color: var(--chf-footer-fg);
	border-top: 1px solid rgba(0,0,0,0.12);
	font-family: 'Tenada', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
}

.chf-footer-inner {
	text-align: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: var(--chf-footer-py, 10px) 16px;
	font-size: var(--chf-footer-font-size, 13px);
	opacity: 0.95;
}


/* Footer extra text under links */
.chf-footer-extra{
	margin-top: 6px;
	font-size: var(--chf-footer-extra-font-size, 12px);
	font-weight: var(--chf-footer-extra-font-weight, 400);
	line-height: 1.35;
	opacity: 0.92;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.chf-header {
		background-color: var(--chf-mobile-header-bg, var(--chf-header-bg));
		color: var(--chf-mobile-header-fg, var(--chf-header-fg));
	}
	.chf-searchbar {
		background: var(--chf-mobile-header-bg, var(--chf-header-bg));
		color: var(--chf-mobile-header-fg, var(--chf-header-fg));
	}
	.chf-footer {
		background-color: var(--chf-mobile-footer-bg, var(--chf-footer-bg));
		color: var(--chf-mobile-footer-fg, var(--chf-footer-fg));
	}

	.chf-footer-link:hover,
	.chf-footer-link:focus {
		color: var(--chf-mobile-footer-hover-color, var(--chf-footer-hover-color, currentColor));
	}


	.chf-inner {
		gap: var(--chf-mobile-menu-gap-y, 10px);
		padding: var(--chf-mobile-header-py, var(--chf-header-py, 12px)) 12px;
	}
	.chf-menu a {
		font-size: var(--chf-mobile-menu-font-size, var(--chf-menu-font-size, 14px));
		padding: 6px 7px;
	}
	.chf-footer-inner {
		font-size: var(--chf-mobile-footer-font-size, 13px);
		padding: var(--chf-mobile-footer-py, var(--chf-footer-py, 10px)) 16px;
	}

	.chf-footer-extra{
		font-size: var(--chf-mobile-footer-extra-font-size, var(--chf-footer-extra-font-size, 12px));
		font-weight: var(--chf-mobile-footer-extra-font-weight, var(--chf-footer-extra-font-weight, 400));
		margin-top: 5px;
	}
	.chf-searchbar-inner {
		flex-wrap: wrap;
		align-items: stretch;
	}
	.chf-search-msg {
		width: 100%;
	}
	.chf-search-close {
		margin-left: auto;
	}
}

/* Mobile: hide burger button when menu is opened (no X icon) */
@media (max-width: 768px) {
	.chf-header.chf-mobile-open .chf-burger-btn { display: none !important; }
}

/* Hamburger icon sizing (admin configurable) */
.chf-burger-svg {
	width: var(--chf-mobile-burger-icon, 22px);
	height: var(--chf-mobile-burger-icon, 22px);
}

/* Icon centering fix */
.chf-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}
.chf-icon svg {
	display: block;
}


/* Logo */
.chf-logo {
	display: block;
	height: 28px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
}
@media (max-width: 768px) {
	.chf-logo { height: 24px; }
}

/* Search icon hover stability */
.chf-search-btn { opacity: 1 !important; }
.chf-search-btn:hover,
.chf-search-btn:focus { opacity: 1 !important; }

.chf-footer-link {
	color: currentColor;
	text-decoration: none !important;
}
.chf-footer-link:hover,
.chf-footer-link:focus {
	color: var(--chf-footer-hover-color, currentColor);
	text-decoration: none !important;
}

/* Never underline footer links even if theme applies underline */
.chf-footer a,
.chf-footer a:hover,
.chf-footer a:focus,
.chf-footer a:active {
	text-decoration: none !important;
}
.chf-sep {
	opacity: 0.7;
	padding: 0 6px;
}

/* WordPress Custom Logo */
.chf-logo-wrap .custom-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	text-decoration: none;
}
.chf-logo-wrap .custom-logo {
	display: block;
	height: var(--chf-header-logo-h, 28px);
	width: auto;
	max-width: 180px;
	object-fit: contain;
}
@media (max-width: 768px) {
	.chf-logo-wrap .custom-logo { height: calc(var(--chf-header-logo-h, 28px) - 4px); }
}


/* Plugin header logo */
.chf-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	text-decoration: none;
}
.chf-header-logo {
	display: block;
	height: var(--chf-header-logo-h, 28px);
	width: auto;
	max-width: 180px;
	object-fit: contain;
}
@media (max-width: 768px) {
	.chf-header-logo { height: var(--chf-mobile-header-logo-h, calc(var(--chf-header-logo-h, 28px) - 4px)); max-width: 140px; }
}


@media (max-width: 768px) {
	/* First row layout: brand left, hamburger right */
	.chf-inner {
		flex-wrap: wrap;
		justify-content: space-between;
	}

	/* Ensure row order on mobile: brand + actions first row, panel below */
	.chf-brand { order: 1; }
	.chf-actions { order: 2; }
	.chf-mobile-panel { order: 3; }

	/* Brand spacing (admin configurable) */
	.chf-brand {
		flex: 1 1 auto;
		padding-left: var(--chf-mobile-brand-pl, var(--chf-brand-pl, 0px));
	}

	/* First row: brand + hamburger */
	.chf-actions {
		flex: 0 0 auto;
		margin-left: auto;
		padding-right: var(--chf-mobile-burger-pr, 10px);
		gap: 8px;
	}

	/* Hide desktop search on mobile, show hamburger */
	.chf-search-btn--desktop { display: none !important; }
	.chf-burger-btn { display: inline-flex; }

	/* Remove hamburger separator/outline border on mobile */
	.chf-burger-btn {
		border: 0 !important;
	}

	/* Dropdown panel */
	.chf-mobile-panel {
		flex-basis: 100%;
		width: 100%;
		display: none;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		gap: 12px;
		padding: 10px 0 6px;
	}

	.chf-header.chf-mobile-open .chf-mobile-panel { display: flex; }

	/* Search icon inside mobile panel (only when open) */
	.chf-header.chf-mobile-open .chf-search-btn--mobile { display: inline-flex !important; }

	/* Place menu first, search icon at the very bottom */
	.chf-mobile-panel .chf-nav { order: 1; }
	.chf-mobile-panel .chf-search-btn--mobile {
		order: 2;
		align-self: center;
		margin: 2px auto 0;
	}

	/* Menu stacking + center alignment */
	.chf-mobile-panel .chf-nav { width: 100%; }
	.chf-mobile-panel .chf-menu {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: var(--chf-mobile-menu-gap-y, 10px);
	}
	.chf-mobile-panel .chf-menu-empty { text-align: center; }
}
.chf-header .chf-menu a span.chf-link-text{
  display: inline-block !important;
  position: relative !important;
  top: 4px !important; /* 1~3px로 조절 */
}