/* =====================================================================
   common.css — 헤더/푸터 등 전 페이지 공통 컴포넌트
   layout.css 다음에 로드됨 (변수는 layout.css :root 참조).
   시안 출처: Figma node 0:494(헤더) / 0:416(푸터)
   ===================================================================== */

/* =====================================================================
   헤더 — [site_page slug="header"]
   시안: 높이 72px, 크림 반투명 배경 + 하단 1px 라인, 로고 좌 / 메뉴 우
   ===================================================================== */
/* ★ sticky 가 아니라 fixed 다 (실측으로 확인한 이유):
   이 헤더는 HFE(Header Footer Elementor) 템플릿 안에 들어가는데, 그 래퍼
   (.elementor-shortcode → .e-con-inner → #masthead)가 전부 헤더와 같은 73px 다.
   sticky 는 "부모 박스 안에서만" 움직일 수 있으므로 여유가 0 이면 아무 일도
   일어나지 않는다 → 스크롤하면 헤더가 그대로 위로 사라졌다
   (실측: scrollY 5899 일 때 headerRectTop -5899).
   fixed 는 부모 박스를 벗어나므로 이 구조에서도 화면에 고정된다.
   ※ fixed 는 문서 흐름에서 빠지므로 아래 #masthead 에 높이를 예약해준다. */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	width: 100%;
	background: rgba(247, 245, 238, .88);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--color-line);
}
/* fixed 로 빠진 헤더 자리를 HFE 래퍼가 대신 차지한다.
   이 값이 없으면 첫 섹션이 헤더 아래로 밀려 올라가 가려진다.
   (#masthead 는 HFE 가 만드는 래퍼 — 없는 사이트에서는 이 규칙이 무해하게 무시된다) */
#masthead {
	min-height: var(--header-h);
}
/* 관리자 로그인 시 WP 어드민바(32px)와 겹치지 않게 */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .site-header { top: 46px; }
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-h);
}

/* 로고 */
.site-header__logo { display: flex; align-items: center; flex-shrink: 0; }
.site-header__logo img {
	width: 163px;
	height: 40px;
	object-fit: contain;
}

/* 데스크톱 내비 */
.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav__link {
	font-size: 15.2px;
	font-weight: 500;
	color: var(--color-text);
	line-height: 1.7;
	transition: color .2s ease;
}
.site-nav__link:hover { color: var(--color-primary); }
/* 현재 페이지 표시 (WP body class 나 aria-current 로 제어) */
.site-nav__link[aria-current="page"] {
	color: var(--color-primary);
	font-weight: 600;
}

/* 헤더 CTA (상담신청 — 링크 미정이라 지금은 페이지 내 #contact 앵커) */
.site-nav__cta {
	background: var(--color-primary);
	color: #fff;
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 14.4px;
	font-weight: 600;
	line-height: 1.7;
	white-space: nowrap;
	transition: background-color .2s ease;
}
.site-nav__cta:hover { background: var(--color-primary-dark); }

/* 모바일 토글 버튼 (시안엔 없지만 반응형 필수) */
.site-header__toggle {
	display: none;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	position: relative;
	flex-shrink: 0;
}
.site-header__toggle span {
	position: absolute;
	left: 11px;
	width: 22px;
	height: 2px;
	background: var(--color-text);
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}
.site-header__toggle span:nth-child(1) { top: 15px; }
.site-header__toggle span:nth-child(2) { top: 21px; }
.site-header__toggle span:nth-child(3) { top: 27px; }
.site-header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
	.site-header__toggle { display: block; }

	/* 모바일: 헤더 아래로 펼쳐지는 패널 */
	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--color-bg-cream);
		border-bottom: 1px solid var(--color-line);
		padding: 8px 0 16px;
		/* 닫힘 상태 */
		display: none;
	}
	.site-nav.is-open { display: flex; }

	.site-nav__link {
		padding: 14px var(--gutter);
		font-size: 16px;
		border-bottom: 1px solid rgba(0, 0, 0, .05);
	}
	.site-nav__cta {
		margin: 14px var(--gutter) 0;
		text-align: center;
		padding: 14px 20px;
		font-size: 15px;
	}
}

/* =====================================================================
   푸터 — [site_page slug="footer"]
   시안: 다크 배경, 4컬럼 (브랜드 / 빠른링크 / 연락처 / 영업시간) + 하단 고지
   ===================================================================== */
/* 시안 0:415 — 푸터 배경은 #1b2620 (SystemShowcase 와 동일 톤). */
.site-footer {
	width: 100%;
	background: var(--color-text);
	color: var(--color-text-on-dark-sub);
}
/* .container 의 좌우 padding 을 덮지 않도록 top 만 지정 */
.site-footer__inner { padding-top: 56px; }

.site-footer__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px;
}
@media (max-width: 900px) {
	.site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
}
@media (max-width: 560px) {
	.site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* 브랜드 컬럼 */
.site-footer__logo img {
	width: 147px;
	height: 36px;
	object-fit: contain;
}
.site-footer__tagline {
	margin-top: 12px;
	font-size: 13.76px;
	line-height: 1.7;
	color: var(--color-text-mute);
}

/* 컬럼 제목 */
.site-footer__h {
	font-size: 12.8px;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--color-accent);
	margin-bottom: 14px;
}

/* 링크/텍스트 목록 */
.site-footer__list li + li { margin-top: 8px; }
.site-footer__list a,
.site-footer__list span {
	font-size: 14.08px;
	line-height: 1.6;
	color: var(--color-text-on-dark-sub);
	transition: color .2s ease;
}
/* 링크만 탭 영역 확보 — 글자 높이가 16px 밖에 안 돼 모바일에서 누르기 어렵다.
   inline-flex + min-height 로 히트영역만 넓히고 보이는 여백은 유지한다.
   (span 은 링크가 아니므로 제외) */
.site-footer__list a {
	display: flex;          /* inline-flex 면 "소개"처럼 짧은 글자는 폭이 24px 밖에 안 된다 */
	align-items: center;
	min-height: 40px;
}
/* 링크가 40px 를 차지하므로 항목 간 여백은 줄여 시각적 간격을 유지 */
.site-footer__list li + li:has(> a) { margin-top: 0; }
.site-footer__list a:hover { color: #fff; }
.site-footer__list .is-strong {
	font-weight: 600;
	color: #fff;
}

/* 하단 고지 */
.site-footer__bottom {
	margin-top: 32px;
	border-top: 1px solid var(--color-line-dark);
	padding: 23px 0 22px;
}
.site-footer__legal {
	font-size: 12.8px;
	line-height: 1.7;
	color: var(--color-text-on-dark-mute);
}

/* 시안 — 최하단 CTA 바: bg #181b16, py 16px.
   ★ 화면 하단에 고정되는 컨텐츠다(스크롤과 무관하게 항상 보인다).
   마크업은 푸터 안에 그대로 두고 CSS 로만 고정한다 →
   JS 없이 동작하고, 인쇄/스타일 미적용 시에도 문서 흐름이 자연스럽다.
   body 하단 여백은 아래 .site-footer__cta ~ 규칙 대신 layout 에서
   padding-bottom 으로 확보한다(아래 참고). */
.site-footer__cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 95;          /* 카톡 버튼(90)보다 위, 헤더(100)보다 아래 */
	background: var(--color-bg-dark-3);
	border-top: 1px solid var(--color-line-dark);
	/* 뒤 컨텐츠가 비쳐 글자가 읽기 어려워지는 걸 막는다 */
	box-shadow: 0 -6px 20px rgba(0, 0, 0, .28);
}
/* 고정된 CTA 바가 페이지 마지막 컨텐츠를 덮지 않게 문서 아래에 여백을 준다.
   높이 실측(2026-08-11): 데스크톱 77px(패딩 16+16 + 라인 25.84 + 테두리 1),
   모바일 640px 이하는 세로 2줄이 되어 약 120px.
   ※ 처음에 57px 로 잡았다가 실측에서 77px 로 확인해 고쳤다(20px 만큼 컨텐츠가 가려졌다). */
body { padding-bottom: 77px; }
@media (max-width: 640px) {
	body { padding-bottom: 124px; }
}
/* 관리자 어드민바가 있으면 고정 바가 그 위로 올라가지 않게 (어드민바는 상단이라
   충돌하지 않지만, 모바일 어드민바는 하단 고정인 경우가 있어 안전하게 띄운다) */
@media screen and (max-width: 782px) {
	body.admin-bar .site-footer__cta { bottom: 0; }
}
.site-footer__cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 16px;
	padding-bottom: 16px;
}
/* 시안 — 15.2px SemiBold / lh 25.84px / #e7e2d4 */
.site-footer__slogan {
	font-size: 15.2px;
	line-height: 25.84px;
	font-weight: 600;
	color: var(--color-line-2);
}
/* 시안 — 골드 pill, px20 py10 */
.site-footer__cta-btn {
	flex-shrink: 0;
	background: var(--color-accent);
	color: var(--color-text);
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 14.4px;
	font-weight: 600;
	line-height: 24.48px;
	white-space: nowrap;
	transition: filter .2s ease;
}
.site-footer__cta-btn:hover { filter: brightness(.95); }
@media (max-width: 640px) {
	.site-footer__cta-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.site-footer__slogan { font-size: 14px; line-height: 22px; }
}

/* =====================================================================
   플로팅 카톡 버튼 (시안 우하단 노란 원형)
   ===================================================================== */
.float-kakao {
	position: fixed;
	right: 20px;
	/* 하단 고정 CTA 바(실측 77px) 위로 올린다 — 겹치면 버튼을 누를 수 없다.
	   77 + 여백 12 = 89px (실측으로 겹침 0 확인) */
	bottom: 89px;
	z-index: 90;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--color-kakao);
	color: var(--color-kakao-text);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.15;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	transition: transform .2s ease, box-shadow .2s ease;
}
.float-kakao:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}
.float-kakao img { width: 18px; height: 18px; }
@media (max-width: 560px) {
	/* 모바일 CTA 바는 세로 2줄(약 124px) 이므로 그만큼 더 올린다 */
	.float-kakao { right: 14px; bottom: 136px; width: 52px; height: 52px; }
}
