/* 단추·카드 등 여러 쪽이 같이 쓰는 부품 — 디자인 시스템 §5 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: var(--radius-pill);
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: var(--track);
  border: 0; cursor: pointer; touch-action: manipulation; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-kakao { background: var(--kakao); color: var(--on-kakao); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* 단추 줄(단추 + 글 링크)과 글 링크 — 링크는 색이 아닌 밑줄로도 구분 */
.actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.text-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
.text-link:hover { color: var(--navy); }

.card { background: var(--surface); border-radius: var(--radius-card); padding: var(--s4); box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* 머리·메뉴 */
html { scroll-padding-top: 88px; } /* 고정 머리 밑으로 초점·건너뛰기 대상이 가리지 않게 */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--bg); }
/* 반투명 + 흐림은 color-mix를 아는 브라우저에서만 — 모르면 위 불투명 배경이 남는다 */
@supports (background: color-mix(in srgb, red, blue)) {
  .site-head { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); }
}
.head-row { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--s3); }
.logo img { height: 38px; width: auto; }
.menu { display: flex; align-items: center; gap: var(--s4); }
.menu-list { display: flex; align-items: center; gap: var(--s4); }
.menu-item { position: relative; }
.menu-item > a, .menu-toggle { font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: none; border: 0; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.menu-item > a:hover, .menu-toggle:hover, .menu-toggle[aria-expanded="true"] { color: var(--navy); }
.submenu { position: absolute; top: 100%; left: -16px; min-width: 180px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-hover); padding: var(--s1); }
.submenu a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; font-size: 15px; }
.submenu a:hover { background: var(--bg); color: var(--navy); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; color: var(--ink); align-items: center; justify-content: center; }
.menu-btn svg { width: 24px; height: 24px; }
.mobile-menu { background: var(--bg); border-top: 1px solid var(--line); padding: var(--s3) 0 var(--s6); max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain; }
.mobile-group { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.mobile-group-label { color: var(--navy); margin-bottom: var(--s1); }
.mobile-group a { display: flex; align-items: center; min-height: 48px; }
.mobile-cta { width: 100%; min-height: 48px; margin-top: var(--s4); }
@media (max-width: 734px) {
  html { scroll-padding-top: 76px; }
  .menu { display: none; }
  .menu-btn { display: inline-flex; }
  .head-row { height: 60px; }
  .logo img { height: 26px; }
}
@media (min-width: 735px) { .mobile-menu { display: none; } }

/* 바닥글 */
.site-foot { padding: var(--s8) 0 var(--s6); color: var(--ink-2); border-top: 1px solid var(--line); margin-top: var(--s12); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.foot-brand img { height: 24px; width: auto; margin-bottom: var(--s1); }
.foot-office { font-style: normal; display: grid; gap: 4px; align-content: start; } /* 칸 높이가 달라도 줄이 위로 붙게 */
.foot-label { color: var(--navy); }
.foot-office a, .foot-bottom a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; } /* 링크를 색이 아닌 밑줄로도 구분 */
.foot-office a:hover, .foot-bottom a:hover { color: var(--navy); }
.foot-bottom { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s6); padding-top: var(--s3); border-top: 1px solid var(--line); color: var(--ink-3); }
@media (max-width: 1068px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 734px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }

/* 휴대폰 아래 상담 띠 — 좁은 화면에서만 */
.bottom-bar { display: none; }
@media (max-width: 734px) {
  html { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); } /* 띠 뒤로 초점이 숨지 않게 */
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .bottom-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  /* 반투명 + 흐림은 color-mix를 아는 브라우저에서만 — 모르면 위 불투명 배경이 남는다 */
  @supports (background: color-mix(in srgb, red, blue)) {
    .bottom-bar { background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  }
  .bottom-bar .btn { width: 100%; min-height: 48px; }
  body.menu-open .bottom-bar { display: none; }
}
/* 아주 좁은 폰(375px 미만, 접힌 폴드 바깥 화면 등) — 두 칸을 같은 폭으로, 단추 안 여백·글자를 줄여 넘치지 않게 */
@media (max-width: 374px) {
  .bottom-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-bar .btn { padding: 0 10px; gap: 6px; font-size: 15px; }
}
