/**
 * 코스데이트 스킨 — 사이트 전체 외형
 *
 * 테마 파일을 건드리지 않고 CSS 로만 덮어씁니다.
 * 플러그인을 끄거나 설정에서 스킨을 해제하면 원래 테마로 즉시 돌아갑니다.
 * Kadence 기준으로 셀렉터를 잡되, 일반적인 워드프레스 구조도 함께 지정합니다.
 */

body.bd-skin {
	--bd-accent: #4f8362;          /* 기본 초록 */
	--bd-accent-deep: #2f5b43;     /* 진한 초록 — CTA */
	--bd-accent-soft: #9dbcaa;     /* 연한 초록 — 보조 */
	--bd-cream: #f1f6f3;           /* 배경 */
	--bd-cream-2: #e7ece8;         /* 배경 강조 */
	--bd-ink: #24282a;
	--bd-muted: #6b7075;
	--bd-line: #dde3df;
	--bd-bg: #ffffff;
	--bd-soft: #f1f6f3;
	--bd-radius: 20px;

	/* 테마의 인라인 커스터마이저 CSS 가 뒤에 실려 이기는 경우가 있어 강제한다 */
	background-color: var(--bd-cream) !important;
	background-image: none !important;
	color: var(--bd-ink);
	word-break: keep-all;
}

/* 다크 모드에서도 스킨은 밝은 톤을 유지 (배경이 크림색이라 반전하면 깨짐) */
@media (prefers-color-scheme: dark) {
	body.bd-skin {
		--bd-ink: #24282a;
		--bd-muted: #6b7075;
		--bd-line: #dde3df;
		--bd-bg: #ffffff;
		--bd-soft: #f1f6f3;
	}
}

body.bd-skin #wrapper,
body.bd-skin .site,
body.bd-skin #inner-wrap,
body.bd-skin .site-container,
body.bd-skin #primary,
body.bd-skin .content-area,
body.bd-skin .content-bg,
body.bd-skin .entry-content-wrap,
body.bd-skin .site-main,
body.bd-skin .content-container,
body.bd-skin .entry-hero-container-inner {
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
}

/* 박스형 콘텐츠 흰 패널 제거 — 테마 인라인 CSS 를 확실히 이기도록 특이도를 올린다 */
html body.bd-skin article.entry.content-bg,
html body.bd-skin .content-bg:not(.loop-entry) {
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 0 !important;
}

/* 본문 폭 — 테마 기본보다 좁혀 읽기 좋게 */
body.bd-skin .site-container,
body.bd-skin .content-container.site-container {
	max-width: 1080px;
}

/* 위아래 여백 정리 — 테마 기본 세로 패딩이 과하다 */
body.bd-skin .content-area,
body.bd-skin .site-main,
body.bd-skin.content-vertical-padding-show .content-area {
	padding-top: 0 !important;
}
body.bd-skin .entry-content-wrap { padding-top: 4px !important; }

/* 테마가 제목 영역과 본문 사이에 80px 여백을 준다 */
body.bd-skin #primary.content-area,
body.bd-skin #primary { margin-top: 22px !important; }
body.bd-skin.home #primary { margin-top: 0 !important; }

/* ---------------------------------------------------------------- 헤더 */

body.bd-skin #masthead,
body.bd-skin .site-header {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* 로고 줄과 메뉴 줄을 하나의 알약으로 합친다 */
body.bd-skin #main-header .site-header-inner-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	width: min(1080px, calc(100% - 40px));
	margin: 20px auto 34px;
	padding: 9px 14px 9px 22px;
	background: var(--bd-bg);
	border: 1px solid var(--bd-line);
	border-radius: 999px;
	box-shadow: 0 8px 28px rgba(45, 52, 45, .07);
}

body.bd-skin #main-header .site-header-upper-wrap,
body.bd-skin #main-header .site-header-upper-inner-wrap,
body.bd-skin #main-header .site-main-header-wrap,
body.bd-skin #main-header .site-bottom-header-wrap,
body.bd-skin #main-header .site-header-row-container-inner,
body.bd-skin #main-header .site-header-row {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	box-shadow: none !important;
}

body.bd-skin #main-header .site-container {
	max-width: none;
	width: auto;
	padding: 0 !important;
	margin: 0;
}

body.bd-skin #main-header .site-header-upper-wrap { flex: 0 0 auto; }
body.bd-skin #main-header .site-bottom-header-wrap { flex: 1 1 auto; }
body.bd-skin #main-header .site-bottom-header-inner-wrap { justify-content: flex-end; }

/* 로고 자리 — 초록 배지 + 서비스명 + 한 줄 설명 */
body.bd-skin .site-branding a.brand,
body.bd-skin .site-branding .site-title-wrap {
	display: flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
}

body.bd-skin .site-branding .custom-logo-link,
body.bd-skin .site-branding img.custom-logo {
	display: none !important;
}

body.bd-skin .site-branding .site-title {
	position: relative;
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 0;
	font-size: 1.22rem;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.2;
	color: var(--bd-ink);
}

body.bd-skin .site-branding .site-title a { color: inherit; text-decoration: none; }

/* CSS 로 그린 배지 (이미지 없이) */
body.bd-skin .site-branding .site-title::before {
	content: "";
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background: var(--bd-accent);
	/* 흰색 체크 표시 */
	background-image:
		linear-gradient(to bottom right, transparent 0, transparent 100%),
		url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 13 10 18 19 7'/%3E%3C/svg%3E");
	background-size: auto, 17px 17px;
	background-position: center, center;
	background-repeat: no-repeat;
}

body.bd-skin .site-branding .site-description {
	margin: 2px 0 0;
	font-size: .74rem;
	font-weight: 400;
	color: var(--bd-muted);
	letter-spacing: 0;
}

@media (max-width: 1024px) {
	body.bd-skin .site-branding .site-description { display: none; }
}

/* 메뉴 */
body.bd-skin .header-navigation ul,
body.bd-skin .primary-menu-container > ul {
	display: flex;
	align-items: center;
	gap: 2px;
}

body.bd-skin .header-navigation .menu-item > a,
body.bd-skin .primary-menu-container .menu-item > a {
	padding: 8px 15px !important;
	font-size: .93rem;
	font-weight: 500;
	color: var(--bd-muted);
	border-radius: 999px;
	min-height: 0 !important;
	transition: background .15s ease, color .15s ease;
}

body.bd-skin .header-navigation .menu-item > a:hover {
	background: var(--bd-cream-2);
	color: var(--bd-ink);
}

body.bd-skin .header-navigation .current-menu-item > a,
body.bd-skin .header-navigation .current_page_item > a {
	background: var(--bd-cream-2);
	color: var(--bd-ink);
	font-weight: 600;
}

/* 메뉴에 'cta' 클래스를 준 항목은 진한 초록 버튼으로 */
body.bd-skin .header-navigation .menu-item.cta > a {
	background: var(--bd-accent-deep);
	color: #fff;
	font-weight: 600;
}
body.bd-skin .header-navigation .menu-item.cta > a:hover {
	background: var(--bd-accent);
	color: #fff;
}

/* 밑줄·강조선 제거 (Kadence 기본 효과) */
body.bd-skin .header-navigation .menu-item > a::after,
body.bd-skin .header-navigation .menu-item > a::before { display: none !important; }

/* 모바일 헤더 */
body.bd-skin #mobile-header .site-header-inner-wrap {
	width: calc(100% - 28px);
	margin: 14px auto 22px;
	padding: 9px 12px 9px 18px;
	background: var(--bd-bg);
	border: 1px solid var(--bd-line);
	border-radius: 22px;
	box-shadow: 0 8px 28px rgba(45, 52, 45, .07);
}
body.bd-skin #mobile-header .site-header-row-container-inner,
body.bd-skin #mobile-header .site-main-header-wrap { background: transparent !important; }

/* ------------------------------------------------------------ 본문 영역 */

body.bd-skin .entry-hero,
body.bd-skin .entry-hero-container-inner,
body.bd-skin .page-title,
body.bd-skin .entry-hero .entry-header {
	background: transparent !important;
	border: 0 !important;
}

/* 테마 기본 히어로는 위아래 여백이 크고 제목이 가운데 정렬이다.
   본문과 같은 축에 두고 여백을 줄인다. */
body.bd-skin .entry-hero-container-inner {
	padding-top: 4px !important;
	padding-bottom: 0 !important;
	min-height: 0 !important;
}
/* 테마가 제목 영역에 min-height 200px + flex 중앙정렬을 걸어둔다 */
body.bd-skin .entry-hero .entry-header.page-title,
body.bd-skin .entry-hero header.entry-header {
	min-height: 0 !important;
	display: block !important;
	padding: 8px 0 12px !important;
}

body.bd-skin .entry-hero .entry-header,
body.bd-skin .entry-hero .entry-title,
body.bd-skin .entry-hero .kadence-breadcrumbs,
body.bd-skin .entry-hero .archive-description {
	text-align: left !important;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}
body.bd-skin .entry-hero .entry-header > * + * { margin-top: 6px; }
body.bd-skin .entry-content > *:first-child { margin-top: 0; }

/* 홈에서는 페이지 제목 히어로를 숨긴다 — 조회 카드가 첫 화면이어야 한다 */
body.bd-skin.home .entry-hero,
body.bd-skin.home .entry-hero-container,
body.bd-skin.home h1.entry-title {
	display: none !important;
}
body.bd-skin.home .content-area,
body.bd-skin.home .site-main {
	padding-top: 0 !important;
	margin-top: 0 !important;
}
body.bd-skin.home .entry-content > .bd-home:first-child { margin-top: 0; }

body.bd-skin .entry-hero .entry-title,
body.bd-skin h1.entry-title {
	font-size: clamp(1.7rem, 4.2vw, 2.5rem);
	letter-spacing: -.03em;
	line-height: 1.28;
}

body.bd-skin .site-main .entry-content-wrap,
body.bd-skin .content-bg.entry-content-wrap,
body.bd-skin article.entry {
	background: transparent;
	box-shadow: none;
	border: 0;
	padding-left: 0;
	padding-right: 0;
}

body.bd-skin .entry-content h2 {
	font-size: 1.35rem;
	letter-spacing: -.02em;
	margin-top: 2.2em;
}

body.bd-skin .entry-content a { color: var(--bd-accent-deep); }

/* 표 */
body.bd-skin .wp-block-table table {
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border-radius: 14px;
	border: 1px solid var(--bd-line);
	background: var(--bd-bg);
	font-size: .93rem;
}
body.bd-skin .wp-block-table th {
	background: var(--bd-cream-2);
	font-weight: 600;
	text-align: left;
}
body.bd-skin .wp-block-table th,
body.bd-skin .wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--bd-line);
	padding: 11px 14px;
}
body.bd-skin .wp-block-table tr:last-child td { border-bottom: 0; }

/* 글 목록 카드 */
body.bd-skin .loop-entry,
body.bd-skin article.entry.loop-entry {
	background: var(--bd-bg);
	border: 1px solid var(--bd-line);
	border-radius: var(--bd-radius);
	box-shadow: none;
	overflow: hidden;
}

/* 버튼 */
body.bd-skin .wp-block-button__link,
body.bd-skin .button,
body.bd-skin input[type="submit"] {
	background: var(--bd-accent-deep);
	border-radius: 999px;
	font-weight: 600;
	border: 0;
}

/* ---------------------------------------------------------------- 푸터 */

/* 테마 푸터는 숨기고 스킨 푸터로 대체한다 (스킨을 끄면 그대로 복귀) */
body.bd-skin #colophon,
body.bd-skin footer.site-footer {
	display: none !important;
}

.bd-footer {
	margin-top: 64px;
	padding: 44px 0 40px;
	background: var(--bd-cream-2, #e7ece8);
	border-top: 1px solid var(--bd-line, #dde3df);
	color: var(--bd-ink, #24282a);
	font-size: .92rem;
	line-height: 1.65;
	word-break: keep-all;
}

.bd-footer__inner {
	width: min(1080px, calc(100% - 48px));
	margin: 0 auto;
}

/* 브랜드 */
.bd-footer__brand {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 34px;
}

.bd-footer__mark {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background-color: var(--bd-accent, #4f8362);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 13 10 18 19 7'/%3E%3C/svg%3E");
	background-size: 17px 17px;
	background-position: center;
	background-repeat: no-repeat;
}

.bd-footer__name {
	margin: 2px 0 1px;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: -.02em;
}

.bd-footer__tag {
	margin: 0;
	font-size: .86rem;
	color: var(--bd-muted, #6b7075);
}

/* 링크 열 */
.bd-footer__cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 28px 24px;
	padding-bottom: 30px;
	border-bottom: 1px solid var(--bd-line, #dde3df);
}

.bd-footer__coltitle {
	margin: 0 0 10px;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--bd-muted, #6b7075);
	text-transform: none;
}

.bd-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 7px;
}

.bd-footer__col a {
	color: var(--bd-ink, #24282a);
	text-decoration: none;
	font-size: .9rem;
}

.bd-footer__col a:hover {
	color: var(--bd-accent-deep, #2f5b43);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* 안내 문구 */
.bd-footer__note {
	margin: 26px 0 0;
	width: 100%;
	max-width: 760px;
	font-size: .82rem;
	color: var(--bd-muted, #6b7075);
}

.bd-footer__bottom {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--bd-line, #dde3df);
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: .78rem;
	color: var(--bd-muted, #6b7075);
}

.bd-footer__sep { opacity: .5; }

@media (max-width: 600px) {
	.bd-footer { margin-top: 44px; padding: 34px 0 32px; }
	.bd-footer__inner { width: calc(100% - 36px); }
	.bd-footer__cols { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
	.bd-footer__sep { display: none; }
	.bd-footer__bottom { flex-direction: column; gap: 4px; }
}

/* -------------------------------------------- 조회 위젯 색을 스킨에 맞춤 */

body.bd-skin {
	/* bd.css 의 :root 변수를 스킨 톤으로 덮어쓴다 */
	--bd-radius: 20px;
}

body.bd-skin .bd-card {
	border-radius: 20px;
	box-shadow: 0 6px 22px rgba(45, 52, 45, .05);
	padding: 26px;
}

body.bd-skin .bd-btn {
	background: var(--bd-accent-soft);
	color: #22402f;
	border-radius: 999px;
	padding: 12px 26px;
}
body.bd-skin .bd-btn:hover { background: var(--bd-accent); color: #fff; filter: none; }

body.bd-skin .bd-field input[type="text"],
body.bd-skin .bd-field input[type="date"],
body.bd-skin .bd-field select {
	border-radius: 14px;
	padding: 13px 15px;
	background: var(--bd-bg);
	border-color: var(--bd-line);
}

body.bd-skin .bd-field input:focus-visible,
body.bd-skin .bd-field select:focus-visible,
body.bd-skin .bd-btn:focus-visible { outline-color: var(--bd-accent); }

body.bd-skin .bd-az__item,
body.bd-skin .bd-chip {
	background: var(--bd-bg);
	border-color: var(--bd-line);
	border-radius: 12px;
}
body.bd-skin .bd-az__item:hover,
body.bd-skin .bd-chip:hover { border-color: var(--bd-accent); color: var(--bd-accent-deep); }

body.bd-skin .bd-brandgrid__item {
	background: var(--bd-bg);
	border: 1px solid var(--bd-line);
	border-radius: 14px;
}

body.bd-skin .bd-res { border-radius: 16px; background: var(--bd-cream); }
body.bd-skin .bd-res--good { border-left-color: var(--bd-accent); }
body.bd-skin .bd-faq details { border-radius: 16px; }
body.bd-skin .bd-spec > div { border-radius: 14px; background: var(--bd-cream); }

/* ------------------------------------------------------------ 홈 히어로 */

.bd-home {
	display: grid;
	grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
	gap: 44px;
	align-items: start;
	margin: 0 0 44px;
}

.bd-home__aside .bd-card { margin-bottom: 0; }

.bd-home__lead h2 {
	font-size: clamp(1.5rem, 3.6vw, 2.15rem);
	line-height: 1.3;
	letter-spacing: -.03em;
	margin: 4px 0 14px;
}

.bd-home__lead p { color: var(--bd-muted); margin: 0 0 22px; font-size: 1rem; }

.bd-home__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bd-home__links a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 0;
	font-size: .97rem;
	font-weight: 500;
	color: var(--bd-ink);
	text-decoration: none;
}
.bd-home__links a::after { content: "↗"; font-size: .8em; color: var(--bd-muted); }
.bd-home__links a:hover { color: var(--bd-accent-deep); }

@media (max-width: 860px) {
	.bd-home { grid-template-columns: 1fr; gap: 28px; }
}
