/* =========================================================
   common.css — 리셋, 레이아웃, 헤더/GNB/전체메뉴/드로어, 푸터, 공통 컴포넌트
   색·간격은 tokens.css 변수만 사용
   브레이크: 1024px(GNB 축소) / 750px(햄버거·드로어)
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-base); font-size: var(--fs-15); line-height: var(--lh-base); color: var(--c-text-sub); background: var(--c-bg); word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
address { font-style: normal; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; border-radius: var(--r-4); }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hd-util__tel .ico, .drawer__cta .ico:not(.ico--fill), .mbar .ico:not(.ico--fill) { fill: currentColor; stroke: none; }
.ico--fill { fill: currentColor; stroke: none; }

.skip a { position: absolute; left: var(--sp-16); top: -60px; z-index: 999; padding: var(--sp-12) var(--sp-16); background: var(--c-navy); color: var(--c-white); border-radius: var(--r-4); }
.skip a:focus { top: var(--sp-16); }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8); min-height: 48px; padding: 0 var(--sp-24); border-radius: var(--r-8); border: 1px solid transparent; font-size: var(--fs-16); font-weight: var(--fw-bold); line-height: 1.2; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); white-space: nowrap; }
.btn--sm { min-height: 40px; padding: 0 var(--sp-16); font-size: var(--fs-14); }
.btn--lg { min-height: 56px; padding: 0 var(--sp-32); font-size: var(--fs-18); }
.btn--primary { background: var(--c-navy); color: var(--c-white); }
.btn--primary:hover { background: var(--c-navy-deep); }
.btn--white { background: var(--c-white); color: var(--c-navy); }
.btn--white:hover { background: var(--c-navy-tint); }
.btn--ghost { border-color: var(--c-white-70); color: var(--c-white); }
.btn--ghost:hover { background: var(--c-white-20); }
.btn--line { border-color: var(--c-line-strong); color: var(--c-navy); background: var(--c-white); }
.btn--line:hover { border-color: var(--c-navy); }
/* 카카오: 색은 tokens.css의 --c-kakao-bg / --c-kakao-fg 로만 결정 */
.btn--kakao { background: var(--c-kakao-bg); color: var(--c-kakao-fg); border-color: var(--c-white-20); }
.btn--kakao:hover { filter: brightness(1.12); }

/* ---------- Section heading ---------- */
/* 2026-11-29 1단계: 흰/회색 교대 대신 섹션 위 2px 선, 섹션마다 다른 간격. 영문 eyebrow 제거 */
.sec { padding: var(--sp-64) 0; }
.sec--lg { padding-bottom: var(--sp-80); }
.sec--sm { padding-bottom: var(--sp-40); }
.sec:not(.sec--gray) + .sec:not(.sec--gray) { padding-top: 0; }
.sec--gray { background: var(--c-bg-section); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-16); margin-bottom: var(--sp-32); padding-top: var(--sp-16); border-top: 2px solid var(--c-rule); }
.sec--sm .sec-head { margin-bottom: var(--sp-20); }
.sec-head__title { font-size: var(--fs-26); font-weight: var(--fw-bold); line-height: var(--lh-tight); color: var(--c-text); }
.sec-head__desc { margin-top: var(--sp-8); color: var(--c-text-muted); }
.more { display: inline-flex; align-items: center; gap: var(--sp-4); font-size: var(--fs-14); font-weight: var(--fw-semibold); color: var(--c-blue); white-space: nowrap; }
.more::after { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.more:hover { text-decoration: underline; }

.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--sp-8); border-radius: var(--r-4); font-size: var(--fs-12); font-weight: var(--fw-bold); background: var(--c-navy-tint); color: var(--c-navy); white-space: nowrap; }
.badge--solid { background: var(--c-navy); color: var(--c-white); }
.badge--line { background: var(--c-white); border: 1px solid var(--c-line-strong); color: var(--c-text-muted); }


/* ---------- Tabs (공통) ---------- */
.tabs { display: flex; align-items: center; gap: var(--sp-4); border-bottom: 2px solid var(--c-text); }
.tabs [role="tab"] { position: relative; padding: var(--sp-12) var(--sp-16); font-size: var(--fs-16); font-weight: var(--fw-bold); color: var(--c-text-muted); }
.tabs [role="tab"][aria-selected="true"] { color: var(--c-navy); }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--c-navy); }

/* ---------- Header ---------- */
.hd { position: sticky; top: 0; z-index: var(--z-header); background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.hd-util { border-bottom: 1px solid var(--c-line); font-size: var(--fs-12); color: var(--c-text-sub); }
.hd-util__in { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.hd-util__msg strong { color: var(--c-navy); }
.hd-util__list { display: flex; align-items: center; gap: var(--sp-16); }
.hd-util__list li + li::before { content: ""; display: inline-block; width: 1px; height: 10px; margin-right: var(--sp-16); background: var(--c-line); vertical-align: middle; }
.hd-util__list a:hover { color: var(--c-navy); text-decoration: underline; }
.hd-util__tel { display: inline-flex; align-items: center; gap: var(--sp-4); font-weight: var(--fw-bold); color: var(--c-navy); }
.hd-util__tel .ico { width: 14px; height: 14px; }

.hd-main__in { display: flex; align-items: center; height: var(--header-h); gap: var(--sp-24); }
.logo a { display: flex; align-items: center; gap: var(--sp-12); }
.logo__mark { width: 40px; height: 40px; flex: none; }
.logo__bg { fill: var(--c-navy); }
.logo__fg { fill: var(--c-white); }
.logo__txt { display: flex; flex-direction: column; line-height: 1.2; }
.logo__name { font-size: var(--fs-20); font-weight: var(--fw-bold); color: var(--c-navy); letter-spacing: -.02em; white-space: nowrap; }
.logo__sub { font-size: var(--fs-12); font-weight: var(--fw-medium); color: var(--c-text-muted); white-space: nowrap; }

.gnb { flex: 1; display: flex; justify-content: center; }
.gnb__list { display: flex; align-items: center; height: var(--header-h); }
.gnb__item { position: relative; height: 100%; display: flex; align-items: center; }
.gnb__link { position: relative; display: flex; align-items: center; height: 100%; padding: 0 var(--sp-16); font-size: var(--fs-16); font-weight: var(--fw-bold); color: var(--c-text); white-space: nowrap; }
.gnb__link::after { content: ""; position: absolute; left: var(--sp-16); right: var(--sp-16); bottom: -1px; height: 3px; background: var(--c-navy); transform: scaleX(0); transition: transform var(--t-fast); }
.gnb__item:hover .gnb__link, .gnb__item:focus-within .gnb__link, .gnb__item.is-current .gnb__link { color: var(--c-navy); }
.gnb__item:hover .gnb__link::after, .gnb__item:focus-within .gnb__link::after, .gnb__item.is-current .gnb__link::after { transform: scaleX(1); }
.gnb__item--cta .gnb__link { height: 40px; margin-left: var(--sp-8); padding: 0 var(--sp-20); border-radius: var(--r-4); background: var(--c-navy); color: var(--c-white); }
.gnb__item--cta .gnb__link::after { display: none; }
.gnb__item--cta:hover .gnb__link, .gnb__item--cta:focus-within .gnb__link { color: var(--c-white); background: var(--c-navy-deep); }
.gnb__sub { position: absolute; top: 100%; left: 50%; min-width: 168px; padding: var(--sp-8) 0; background: var(--c-white); border: 1px solid var(--c-line); border-top: 2px solid var(--c-navy); border-radius: 0; opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast); }
.gnb__item:hover .gnb__sub, .gnb__item:focus-within .gnb__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
/* 2026-11-29 2단계: 마지막 항목 드롭다운이 화면 오른쪽 밖으로 나가 751–1024px에서 가로 스크롤이 생기던 문제 */
.gnb__item:last-child .gnb__sub { left: auto; right: 0; transform: translate(0, -4px); }
.gnb__item:last-child:hover .gnb__sub, .gnb__item:last-child:focus-within .gnb__sub { transform: translate(0, 0); }
.gnb__sub a { display: block; padding: var(--sp-8) var(--sp-20); font-size: var(--fs-14); color: var(--c-text-sub); white-space: nowrap; }
.gnb__sub a:hover, .gnb__sub a:focus-visible { color: var(--c-navy); background: var(--c-bg-section); font-weight: var(--fw-semibold); }
.is-allmenu-open .gnb__sub { display: none; }

.hd-actions { display: flex; align-items: center; gap: var(--sp-8); }
.burger { display: inline-flex; flex-direction: column; justify-content: space-between; width: 20px; height: 14px; }
.burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--t-fast), opacity var(--t-fast); }
.btn-allmenu { display: inline-flex; align-items: center; gap: var(--sp-8); height: 40px; padding: 0 var(--sp-12); border: 1px solid var(--c-line); border-radius: var(--r-8); font-size: var(--fs-14); font-weight: var(--fw-bold); color: var(--c-text); }
.btn-allmenu:hover, .btn-allmenu[aria-expanded="true"] { border-color: var(--c-navy); color: var(--c-navy); }
.btn-allmenu[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.btn-allmenu[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.btn-allmenu[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.btn-drawer { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--c-text); }

/* 전체메뉴 패널 */
.allmenu { position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-panel); background: var(--c-white); border-top: 1px solid var(--c-line); border-bottom: 2px solid var(--c-navy); max-height: calc(100vh - 120px); overflow-y: auto; }
.allmenu__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-32) 0 var(--sp-24); border-bottom: 2px solid var(--c-navy); }
.allmenu__title { font-size: var(--fs-30); font-weight: var(--fw-bold); color: var(--c-text); }
.allmenu__close { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--r-8); color: var(--c-text); }
.allmenu__close:hover { background: var(--c-bg-section); }
.allmenu__close .ico { width: 24px; height: 24px; }
.allmenu__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--sp-24); padding: var(--sp-32) 0; }
.allmenu__grid h3 { padding-bottom: var(--sp-12); margin-bottom: var(--sp-12); border-bottom: 1px solid var(--c-line); font-size: var(--fs-20); font-weight: var(--fw-bold); color: var(--c-navy); }
.allmenu__grid li + li { margin-top: var(--sp-8); }
.allmenu__grid a { font-size: var(--fs-15); color: var(--c-text-sub); }
.allmenu__grid a:hover { color: var(--c-navy); text-decoration: underline; }
.allmenu__foot { display: flex; flex-wrap: wrap; gap: var(--sp-12); padding: var(--sp-20) 0 var(--sp-32); border-top: 1px solid var(--c-line); }
.allmenu__quick { display: inline-flex; align-items: center; gap: var(--sp-8); padding: var(--sp-12) var(--sp-20); border-radius: var(--r-8); background: var(--c-bg-section); font-size: var(--fs-14); color: var(--c-text-sub); }
.allmenu__quick strong { color: var(--c-navy-deep); }
.allmenu__quick:hover { background: var(--c-navy-tint); }

/* 모바일 드로어 */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); }
.drawer__dim { position: absolute; inset: 0; background: var(--c-dim); opacity: 0; transition: opacity .25s ease; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86%, 360px); display: flex; flex-direction: column; background: var(--c-white); transform: translateX(100%); transition: transform .28s ease; overflow-y: auto; }
.drawer.is-open .drawer__dim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; gap: var(--sp-12); height: var(--header-h-m); padding: 0 var(--sp-8) 0 var(--sp-20); border-bottom: 1px solid var(--c-line); }
.drawer__title { font-size: var(--fs-18); font-weight: var(--fw-bold); color: var(--c-text); }
.drawer__login { margin-left: auto; font-size: var(--fs-14); font-weight: var(--fw-semibold); color: var(--c-blue); }
.drawer__close { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; }
.drawer__close .ico { width: 24px; height: 24px; }
.drawer__cta { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); padding: var(--sp-16) var(--sp-20); background: var(--c-bg-section); }
.drawer__cta .btn { padding: 0 var(--sp-8); gap: var(--sp-4); }
.drawer__cta .ico { width: 16px; height: 16px; }
.drawer__nav { flex: 1; }
.drawer__dep1 { position: relative; display: flex; width: 100%; align-items: center; min-height: 56px; padding: 0 var(--sp-20); border-bottom: 1px solid var(--c-line); font-size: var(--fs-18); font-weight: var(--fw-bold); color: var(--c-text); text-align: left; }
.drawer__dep1::after { content: ""; position: absolute; right: var(--sp-24); top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--c-text-muted); border-bottom: 2px solid var(--c-text-muted); transform: translateY(-70%) rotate(45deg); transition: transform var(--t-fast); }
.drawer__dep1[aria-expanded="true"] { color: var(--c-navy); }
.drawer__dep1[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); border-color: var(--c-navy); }
.drawer__dep2 { padding: var(--sp-8) 0; background: var(--c-bg-section); border-bottom: 1px solid var(--c-line); }
.drawer__dep2 a { display: block; padding: var(--sp-8) var(--sp-32); font-size: var(--fs-15); color: var(--c-text-sub); }
.drawer__foot { padding: var(--sp-20); border-top: 1px solid var(--c-line); font-size: var(--fs-13); color: var(--c-text-muted); }
.drawer__foot a { font-weight: var(--fw-bold); color: var(--c-navy); }
body.is-locked { overflow: hidden; }

/* ---------- Footer ---------- */
.ft { border-top: 3px solid var(--c-navy); background: var(--c-bg-section); font-size: var(--fs-13); color: var(--c-text-muted); }
.ft-links { border-bottom: 1px solid var(--c-line); background: var(--c-white); }
.ft-links__in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-16); min-height: 52px; }
.ft-links__list { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-24); font-size: var(--fs-14); color: var(--c-text-sub); }
.ft-links__list strong { color: var(--c-navy); }
.ft-links__list a:hover { text-decoration: underline; }
.ft-top { font-size: var(--fs-13); font-weight: var(--fw-semibold); color: var(--c-text-muted); white-space: nowrap; }
.ft-body { display: flex; justify-content: space-between; gap: var(--sp-40); padding-top: var(--sp-40); padding-bottom: var(--sp-48); }
.ft-logo { margin-bottom: var(--sp-12); font-size: var(--fs-18); font-weight: var(--fw-bold); color: var(--c-text); }
.ft-info { line-height: 1.9; }
.ft-info span { display: inline-block; margin-right: var(--sp-16); }
.ft-copy { margin-top: var(--sp-16); color: var(--c-text-muted); }
.ft-cs { flex: none; min-width: 260px; }
.ft-cs__label { font-size: var(--fs-14); font-weight: var(--fw-bold); color: var(--c-text-sub); }
.ft-cs__tel { display: block; margin: var(--sp-4) 0; font-size: var(--fs-30); font-weight: var(--fw-bold); color: var(--c-navy); letter-spacing: -.01em; }

/* 모바일 하단 상담바 */
.mbar { display: none; }

/* ---------- 1024 이하: GNB 축소 ---------- */
@media (max-width: 1024px) {
  .hd-util__msg { display: none; }
  .hd-util__in { justify-content: flex-end; }
  .hd-main__in { gap: var(--sp-12); }
  .logo__sub { display: none; }
  .logo__name { font-size: var(--fs-18); }
  .logo__mark { width: 34px; height: 34px; }
  .gnb__link { padding: 0 var(--sp-8); font-size: var(--fs-15); }
  .gnb__link::after { left: var(--sp-8); right: var(--sp-8); }
  .gnb__item--cta .gnb__link { padding: 0 var(--sp-12); margin-left: var(--sp-4); }
  .btn-allmenu { padding: 0 var(--sp-12); }
  .btn-allmenu__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .allmenu__grid { grid-template-columns: repeat(4, 1fr); }
}
/* 2026-11-29 2단계: 751–860px에서 GNB+전체메뉴 버튼이 폭을 넘어 가로 스크롤이 생기던 문제 */
@media (min-width: 751px) and (max-width: 860px) {
  .gnb__link { padding: 0 var(--sp-4); font-size: var(--fs-14); }
  .gnb__link::after { left: var(--sp-4); right: var(--sp-4); }
  .gnb__item--cta .gnb__link { padding: 0 var(--sp-8); }
}

/* ---------- 750 이하: 햄버거 + 드로어 ---------- */
@media (max-width: 750px) {
  body { font-size: var(--fs-15); padding-bottom: 60px; }
  .hd-util { display: none; }
  .hd-main__in { height: var(--header-h-m); justify-content: space-between; }
  .logo__name { font-size: var(--fs-18); }
  .logo__mark { width: 32px; height: 32px; }
  .gnb, .btn-allmenu, .allmenu { display: none !important; }
  .btn-drawer { display: inline-flex; margin-right: calc(var(--sp-8) * -1); }
  .sec { padding: var(--sp-48) 0; }
  .sec--lg { padding-bottom: var(--sp-64); }
  .sec--sm { padding-bottom: var(--sp-32); }
  .sec:not(.sec--gray) + .sec:not(.sec--gray) { padding-top: 0; }
  .sec-head { margin-bottom: var(--sp-24); padding-top: var(--sp-12); }
  .sec-head__title { font-size: var(--fs-22); }
  .sec-head { position: relative; }
  .sec-head .more { position: absolute; right: 0; top: var(--sp-12); }
  .ft-links__in { padding-top: var(--sp-12); padding-bottom: var(--sp-12); align-items: flex-start; }
  .ft-links__list { gap: var(--sp-8) var(--sp-16); }
  .ft { border-top-color: var(--c-blue-light); border-top-width: 2px; }
  .ft-body { flex-direction: column; gap: var(--sp-24); padding-top: var(--sp-24); padding-bottom: var(--sp-32); }
  .ft-cs { order: -1; min-width: 0; }
  .ft-cs__tel { font-size: var(--fs-26); }
  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--z-header) + 1); display: grid; grid-template-columns: 1fr 1fr 1fr; height: 60px; background: var(--c-white); border-top: 1px solid var(--c-line-strong); }
  .mbar__btn { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); font-size: var(--fs-14); font-weight: var(--fw-bold); color: var(--c-navy); }
  .mbar__btn .ico { width: 18px; height: 18px; }
  .mbar__btn--kakao { background: var(--c-kakao-bg); color: var(--c-kakao-fg); }
  .mbar__btn--primary { background: var(--c-navy-deep); color: var(--c-white); }
}
@media (max-width: 360px) {
  .logo__name { font-size: var(--fs-16); }
  .drawer__cta .btn { font-size: var(--fs-13); }
}
/* ---------- 카카오톡 상담 플로팅 버튼 (2026-11-29) ----------
   4px 사각형: 1·2단계에서 버튼·카드 모서리를 모두 4px 이하로 맞췄으므로 원형 대신 같은 규칙을 따름.
   그림자·그라데이션 없음. 노랑은 카카오 전용 토큰만 사용. */
.kakao-float { position: fixed; right: var(--sp-24); bottom: var(--sp-24); z-index: calc(var(--z-header) + 1); display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--c-kakao-bg); color: var(--c-kakao-fg); border: 1px solid rgba(25,25,25,.12); border-radius: var(--r-4); }
.kakao-float:hover { filter: brightness(.96); }
.kakao-float svg { display: block; }
.kakao-float.is-hidden { visibility: hidden; pointer-events: none; }
@media (max-width: 750px) {
  .kakao-float { right: var(--sp-12); bottom: calc(60px + var(--sp-12) + env(safe-area-inset-bottom, 0px)); width: 48px; height: 48px; }
  .kakao-float svg { width: 24px; height: 24px; }
}
@media print { .kakao-float { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
