/* =====================================================================
   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%;
	/* ★ 흰색 고정. 스타터 기본값은 rgba(247,245,238,.88)(이전 사이트 크림)였는데
	   본사 로고(logo.png)가 흰 배경을 포함한 이미지라 크림 위에서 사각형이 드러났다.
	   반투명도 쓰지 않는다 — 스크롤 시 배너가 비쳐 같은 문제가 생긴다. */
	background: #fff;
	border-bottom: 1px solid var(--color-line-2);
}
/* 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; gap: 12px; flex-shrink: 0; }
/* 원본 156×36. 레이아웃 확대(2026-08)에 맞춰 1.25배로 키우되 비율은 유지한다.
   고정 height 를 주면 로고가 눌리므로 width 만 지정하고 height 는 auto. */
.site-header__logo img {
	width: 195px;
	height: auto;
	object-fit: contain;
}

/* 상호 텍스트 — PPT 슬라이드3 "로고 및 상호가 왼쪽으로" 요청 반영.
   로고 이미지 옆에 붙는다. 좁은 화면에서는 숨겨 로고만 남긴다. */
.site-header__name {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	font-size: 13px;
	color: var(--color-text-sub);
	padding-left: 12px;
	border-left: 1px solid var(--color-line);
	white-space: nowrap;
}
.site-header__name strong {
	font-size: 16px;
	font-weight: 700;
	color: var(--color-primary-deep);
}
@media (max-width: 1180px) {
	.site-header__name { display: none; }
}

/* 데스크톱 내비 */
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav__list { display: flex; align-items: center; gap: 4px; }

/* 대메뉴 항목 — 드롭다운의 기준(position) 이 된다 */
.site-nav__item { position: relative; }

.site-nav__link {
	display: inline-flex;
	align-items: center;
	/* 15.2 → 17.5px (+15%) — 2026-08 전체 확대 요청 */
	font-size: 17.5px;
	font-weight: 500;
	color: var(--color-text);
	line-height: 1.7;
	/* 호버 영역을 위아래로 넓혀 헤더~드롭다운 사이에 마우스가 빠지는 틈을 없앤다 */
	padding: 16px 14px;
	transition: color .2s ease;
	white-space: nowrap;
}
.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;
}

/* 모바일 전용 하위 토글 버튼 — 데스크톱에서는 숨긴다 */
.site-nav__more { display: none; }

/* ---------------- 하위메뉴 (드롭다운) ----------------
   기존 사이트처럼 대메뉴 호버 시 펼쳐진다.
   · display:none 대신 opacity/visibility 로 전환해 애니메이션이 가능하게 한다.
   · :focus-within 을 함께 걸어 키보드(Tab)로도 열린다 — 마우스 전용이면 접근성 위반.
   · 항목이 없는 대메뉴(.site-nav__item 에 .has-sub 없음)는 이 규칙과 무관. */
.site-sub {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	min-width: 190px;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--color-line-2);
	border-radius: 14px;
	box-shadow: 0 14px 34px rgba(21, 10, 80, .13);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
	z-index: 10;
}
.site-nav__item.has-sub:hover > .site-sub,
.site-nav__item.has-sub:focus-within > .site-sub {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}
.site-sub a {
	display: flex;
	align-items: center;
	/* 탭 영역 44px — 고령 사용자 기준 */
	min-height: 44px;
	padding: 0 14px;
	border-radius: 9px;
	font-size: 16.5px;
	line-height: 1.5;
	color: var(--color-text);
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.site-sub a:hover {
	background: var(--color-bg-cream);
	color: var(--color-primary);
	font-weight: 600;
}

/* 화면 폭이 좁아지는 구간에서 메뉴 간격을 조금 줄여 줄바꿈을 막는다 */
@media (max-width: 1320px) {
	.site-nav { gap: 18px; }
	.site-nav__link { padding: 16px 10px; font-size: 16.5px; }
}

/* 헤더 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__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}
	.site-nav__item { position: static; }

	.site-nav__link {
		padding: 15px var(--gutter);
		font-size: 17px;
		min-height: 52px;
		border-bottom: 1px solid rgba(0, 0, 0, .05);
	}

	/* ---- 모바일 하위메뉴: 호버가 없으므로 아코디언으로 ----
	   대메뉴 링크는 그대로 이동용으로 두고, 우측 [+] 버튼으로 하위를 펼친다.
	   (링크 자체를 토글로 만들면 대메뉴 페이지로 갈 방법이 없어진다) */
	.site-nav__item.has-sub { display: grid; grid-template-columns: 1fr 56px; }
	.site-nav__item.has-sub > .site-nav__link { grid-column: 1; }

	.site-nav__more {
		display: flex;
		grid-column: 2;
		align-items: center;
		justify-content: center;
		/* 탭 영역 확보 */
		min-height: 52px;
		border-bottom: 1px solid rgba(0, 0, 0, .05);
		position: relative;
	}
	/* + / − 아이콘을 CSS 로 그린다(이미지·폰트 의존 없음) */
	.site-nav__more::before,
	.site-nav__more::after {
		content: '';
		position: absolute;
		background: var(--color-text-sub);
		transition: transform .2s ease, opacity .2s ease;
	}
	.site-nav__more::before { width: 15px; height: 2px; }
	.site-nav__more::after  { width: 2px; height: 15px; }
	.site-nav__more[aria-expanded="true"]::after { opacity: 0; transform: rotate(90deg); }

	.site-sub {
		/* 데스크톱 드롭다운 스타일 초기화 */
		position: static;
		transform: none;
		grid-column: 1 / -1;
		min-width: 0;
		padding: 0;
		background: rgba(0, 0, 0, .03);
		border: 0;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transition: none;
		/* 닫힘 상태 */
		display: none;
	}
	.site-sub.is-open { display: block; }
	/* 모바일에서는 호버로 열리지 않게 한다(터치 시 의도치 않게 열림) */
	.site-nav__item.has-sub:hover > .site-sub,
	.site-nav__item.has-sub:focus-within > .site-sub {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.site-sub a {
		min-height: 48px;
		padding: 0 calc(var(--gutter) + 14px);
		border-radius: 0;
		font-size: 16px;
		color: var(--color-text-sub);
		border-bottom: 1px solid rgba(0, 0, 0, .04);
	}

	.site-nav__cta {
		margin: 14px var(--gutter) 0;
		text-align: center;
		justify-content: center;
		padding: 15px 20px;
		font-size: 16px;
		min-height: 48px;
	}
}

/* =====================================================================
   푸터 — [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 은 링크가 아니므로 제외)

   ★ 44px 인 이유: 스타터 기본값은 40px 이지만 이 사이트의 주 이용자는
     고령층이다. 실측에서 푸터 링크 7개가 전부 40px 로 잡혀 접근성 기준
     (탭 영역 최소 44px)에 미달했다 → 전화 링크만 예외 두지 말고 통일한다. */
.site-footer__list a {
	display: flex;          /* inline-flex 면 "소개"처럼 짧은 글자는 폭이 24px 밖에 안 된다 */
	align-items: center;
	min-height: 44px;
}
/* 링크가 44px 를 차지하므로 항목 간 여백은 줄여 시각적 간격을 유지 */
.site-footer__list li + li:has(> a) { margin-top: 0; }
.site-footer__list a:hover { color: #fff; }
/* 푸터 전화 링크 — 주 전환 경로라 굵게·흰색으로 강조 (높이는 위 규칙과 동일 44px) */
.site-footer__list .is-strong {
	font-weight: 700;
	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 */
/* 하단 고정 CTA 버튼.
   ★ 스타터 기본값은 --color-accent(이전 사이트 골드)였다. 우리 accent 는 로고
     연두(#96cb63)라 네이비 바 위에서 브랜드가 달라 보인다(실측 스크린샷 확인).
     전화 버튼이므로 브랜드 블루로 고정하고 탭 영역을 44px 로 넉넉히 잡는다. */
.site-footer__cta-btn {
	flex-shrink: 0;
	background: var(--color-primary);
	color: #fff;
	border-radius: 999px;
	padding: 10px 22px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	font-size: 15px;
	font-weight: 700;
	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; }
}
