/* ========= site.css : 공통 베이스 ========= */
:root{
  --brand:#0B5CFF;--brand-600:#0A54E8;--brand-400:#3C7BFF;
  --ink:#0F172A;--sub:#46566d;--muted:#5B6474;
  --line:#E8ECF3; --bg:#F7F8FA; --card:#FFFFFF;
  --container:1240px; --page-pad:20px; --nav-pill-h:40px;
  --focus:#0B5CFF40; --shadow-sm:0 2px 8px rgba(2,6,23,.06);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Pretendard,"Noto Sans KR",sans-serif;
  color:var(--ink); background:var(--bg)
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block;height:auto}

/* ========== 헤더 ========== */
.site-header{
  position:sticky;top:0;z-index:40;
  background:linear-gradient(180deg, rgba(248,251,255,0.85) 0%, rgba(255,255,255,0.80) 100%);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line);
}
.site-header::before{
  content:"";position:absolute;left:0;right:0;top:0;height:2px;
  background:linear-gradient(90deg,#6EA8FF 0%,#0B5CFF 35%,#6EA8FF 100%);
  opacity:.85;
}
.nav{
  max-width:var(--container);margin:0 auto;
  display:flex;align-items:center;gap:12px;
  padding:8px var(--page-pad);
}
.brand{margin-right:auto;display:flex;align-items:center;gap:10px}
.brand-logo{max-height:64px;border-radius:8px}

/* ========== 데스크탑 메뉴 ========== */
.nav-desktop{
  display:flex;gap:18px;list-style:none;margin:0;padding:0;align-items:center
}
.nav a{
  display:inline-flex;align-items:center;justify-content:center;
  height:var(--nav-pill-h);padding:0 12px;border-radius:12px;font-weight:600;
  border:1px solid transparent; /* 항상 1px 확보 → 클릭시 들썩임 방지 */
  transition:background-color .15s ease, box-shadow .15s ease;
}
.nav a.link{color:var(--sub)}
.nav a.link:hover{background:#F1F5F9}
.nav a.btn{
  border-color:var(--line);background:#fff;color:var(--sub);
}
.nav a.btn:hover{background:#F8FAFC}
.nav a:focus{
  outline:0;
  box-shadow:0 0 0 3px var(--focus);
}

/* ========== 언어 스위치 ========== */
.lang-switch{
  display:inline-flex; align-items:center; gap:6px;
  border:1px solid var(--line); border-radius:12px;
  background:#fff; padding:2px; height:var(--nav-pill-h);
  transition:box-shadow .15s ease;
}
.lang-switch button{
  appearance:none; border:0; background:transparent;
  padding:8px 10px; border-radius:10px;
  font-weight:600; /* 굵기 통일 → 폭 변화 없음 */
  color:#334155; cursor:pointer; min-width:48px;
  border:1px solid transparent; /* 공간 확보 */
  transition:background-color .15s ease, box-shadow .15s ease;
}
.lang-switch button.active{
  background:#EEF4FF; color:#0B5CFF;
  font-weight:600;
}
.lang-switch button:focus{
  outline:0; box-shadow:0 0 0 3px var(--focus);
}

/* ========== 모바일 전환 규칙 ========== */
/* 기본(데스크탑): 모바일 UI 숨김 */
.menu-btn, .menu-toggle{ display:none; }
.nav-menu-panel{ display:none; }

@media(max-width:720px){
  /* 데스크탑 메뉴 숨김 */
  .nav-desktop{ display:none; }

  /* KR/EN + 메뉴버튼 우측 정렬 */
  .lang-switch{ margin-left:auto; }

  /* 햄버거 버튼 */
  .menu-btn, .menu-toggle{
    display:inline-flex; align-items:center; justify-content:center;
    height:var(--nav-pill-h); padding:0 12px;
    border-radius:12px; border:1px solid var(--line);
    background:#fff; font-weight:600; line-height:1;
    border:1px solid transparent;
    transition:background-color .15s ease, box-shadow .15s ease;
  }
  .menu-btn:focus, .menu-toggle:focus{
    outline:0; box-shadow:0 0 0 3px var(--focus);
  }

  /* 모바일 메뉴 패널 */
  .nav{ position:relative; }
  .nav-menu-panel{
    position:absolute; right:var(--page-pad); top:calc(100% + 10px);
    width:clamp(220px,60vw,260px);
    border:1px solid var(--line); border-radius:16px;
    background:#fff; box-shadow:var(--shadow-sm); padding:8px;
  }
  .nav-menu-panel ul{ list-style:none; margin:0; padding:6px; }
  .nav-menu-panel a{
    display:flex; align-items:center; height:44px;
    border-radius:12px; padding:0 12px;
    font-weight:600; color:var(--sub);
    border:1px solid transparent;
    transition:background-color .15s ease;
  }
  .nav-menu-panel a:hover{ background:#F1F5F9; }
  .nav-menu-panel.open{ display:block; }
}

/* ========== 클릭 시 미세 이동 방지 (공통 보정) ========== */
.nav a,
.nav a.btn,
.nav a.link,
.nav-menu-panel a,
.lang-switch button {
  border: 1px solid transparent;
  font-weight: 600;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.nav a.btn:hover,
.nav a.btn:focus {
  border-color: var(--line);
}
.nav a:focus,
.nav-menu-panel a:focus,
.lang-switch button:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus);
}

/* ========== 유틸 ========== */
.flash-ring{
  outline:0 !important;
  box-shadow:inset 0 0 0 3px var(--focus), var(--shadow-sm) !important;
}
.section-title.highlight{
  background:#EEF4FF; box-shadow:0 0 0 3px var(--focus);
  border-radius:10px; padding-inline:6px;
}
/* ==== 전역: 스크롤바 폭 변화로 인한 흔들림 방지 ==== */
html{ scrollbar-gutter: stable both-edges; }

/* ==== 버튼 전반: 눌림/포커스 시 레이아웃 고정 ==== */
.btn, .btn.primary, .btn.ghost, .btn.small {
  border:1px solid transparent;   /* 항상 1px 확보 → 들썩임 방지 */
  font-weight:600;                 /* 상태별 굵기 동일 */
  line-height:1;                   /* 높이 고정 */
  transition:background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:focus{ outline:0; box-shadow:0 0 0 3px var(--focus); }
.btn:active{ transform:none; }     /* 눌림 애니메이션 제거 */

/* hero의 .nudge 클래스가 있다면 눌림 이동 제거 */
.nudge{ transform:none !important; }
.nudge:active{ transform:none !important; }

/* ==== 스크린리더 전용 텍스트 (index.html에 .sr-only 존재) ==== */
.sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ==== 모바일 메뉴 오버레이 ==== */
.nav-overlay{
  display:none; position:fixed; inset:0; z-index:39;
  background:rgba(15,23,42,.25); backdrop-filter:saturate(140%) blur(2px);
}
.nav-overlay.show{ display:block; }

/* ===== 햄버거 아이콘 가시성 보완 ===== */
/* 버튼 자체 레이아웃(여백/클릭영역) */
.menu-toggle .icon{
  display:inline-flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;              /* 막대 간격 */
  width:24px; height:20px;
}

/* 실제 막대 3줄 */
.menu-toggle .icon span{
  display:block;
  width:22px; height:2px;
  background-color:#0F172A;  /* 밝은 헤더 위에서도 선명 */
  border-radius:2px;
  transition:transform .2s ease, opacity .2s ease, background-color .2s ease;
}

/* 호버/포커스 시 살짝 강조 */
.menu-toggle:hover .icon span{ background-color:#1E293B; }
.menu-toggle:focus .icon span{ background-color:#0B5CFF; }

/* (선택) 메뉴 열렸을 때 X 아이콘으로 변환하고 싶다면 .is-open 클래스 활용 */
.menu-toggle.is-open .icon span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.menu-toggle.is-open .icon span:nth-child(2){ opacity:0; }
.menu-toggle.is-open .icon span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* 모바일에선 더 진하게 */
@media (max-width:720px){
  .menu-toggle .icon span{ background-color:#1E293B; }
}


/* ===== 모바일 메뉴 패널 개선 ===== */
.nav-menu-panel {
  right:16px;
  top:calc(100% + 12px);
  width:200px; /* 기존보다 좁게 */
  background:#fff;
  border-radius:14px;
  box-shadow:0 6px 20px rgba(15,23,42,0.15);
  border:1px solid #E5E7EB;
  padding:10px 0;
  text-align:center;
}

.nav-menu-panel a {
  display:block;
  padding:10px 0;
  color:#0F172A;
  text-decoration:none;
  font-weight:500;
  transition:background .25s, color .25s;
}

.nav-menu-panel a:hover {
  background:#F3F4F6;
  color:#0B5CFF;
}
/* ===== 햄버거 아이콘 가시성(강제 오버라이드) ===== */
.site-header .menu-toggle{ 
  background:#fff;                 /* 흰 배경으로 대비 확실히 */
  border:1px solid #E5E7EB;
  border-radius:12px;
  box-shadow:0 2px 8px rgba(2,6,23,.06);
}

.site-header .menu-toggle .icon{
  display:inline-flex;
  width:24px; height:20px;
  flex-direction:column; justify-content:center; align-items:center;
  gap:5px;
}

.site-header .menu-toggle .icon span{
  display:block;
  width:22px; height:2px;
  background-color:#0F172A !important;  /* 핵심: 강제 색상 */
  border-radius:2px;
  opacity:1 !important;                 /* 혹시 0 처리된 경우 방지 */
  transition:transform .2s ease, opacity .2s ease, background-color .2s ease;
}

/* 호버/포커스 */
.site-header .menu-toggle:hover .icon span{ background-color:#1E293B !important; }
.site-header .menu-toggle:focus .icon span{ background-color:#0B5CFF !important; }

/* X 전환 상태 */
.site-header .menu-toggle.is-open .icon span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.site-header .menu-toggle.is-open .icon span:nth-child(2){ opacity:0; }
.site-header .menu-toggle.is-open .icon span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }
/* ===== 스팬이 없어도 보이는 백업 햄버거 (gradient로 3줄 그림) ===== */
.site-header .menu-toggle .icon{
  position:relative;
  width:22px; height:14px;
  background-image:
    linear-gradient(#0F172A,#0F172A),
    linear-gradient(#0F172A,#0F172A),
    linear-gradient(#0F172A,#0F172A);
  background-repeat:no-repeat;
  background-size:22px 2px, 22px 2px, 22px 2px;
  background-position:0 0, 0 6px, 0 12px;
}
/* 홈으로 돌아가기 버튼 공통 스타일 */
.back-home .btn.ghost{
  display:inline-block;
  border:1px solid #CBD5E1;
  padding:10px 18px;
  border-radius:10px;
  color:#0F172A;
  background:#fff;
  transition:all .25s ease;
}
.back-home .btn.ghost:hover{
  background:#F3F4F6;
  color:#0B5CFF;
  border-color:#A5B4FC;
}
/* === Mobile Drawer (추가) === */
.mobile-menu[hidden]{ display:none; }
.mobile-menu{ position:fixed; inset:0; z-index:9999; }
.mobile-menu__overlay{
  position:absolute; inset:0; background:rgba(0,0,0,.32); opacity:0; transition:opacity .2s ease;
}
.mobile-menu__sheet{
  position:absolute; inset:0 0 0 auto; width:86%; max-width:420px; background:#fff;
  transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column;
  box-shadow: -8px 0 24px rgba(0,0,0,.12);
}
.mobile-menu.open .mobile-menu__overlay{ opacity:1; }
.mobile-menu.open .mobile-menu__sheet{ transform:translateX(0); }

.mobile-menu__header{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; border-bottom:1px solid rgba(0,0,0,.06);
}
.mobile-menu__title{ font-weight:700; font-size:16px; }
.mobile-menu__close{ font-size:28px; line-height:1; background:none; border:0; cursor:pointer; padding:4px 8px; }

.mobile-nav{ list-style:none; margin:8px 0 16px; padding:0 12px; }
.nav-item{ margin:10px 0; }
.nav-link{
  display:flex; align-items:center; gap:12px; padding:14px; border-radius:14px;
  background:linear-gradient(180deg,#fff, #fafafa);
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 2px 10px rgba(0,0,0,.04);
  text-decoration:none; color:inherit;
  transition:transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}
.nav-link:active{ transform:scale(.99); }
.nav-link:hover{ box-shadow:0 6px 20px rgba(0,0,0,.08); border-color:rgba(0,0,0,.1); }

.nav-icon{
  flex:0 0 40px; height:40px; border-radius:12px; display:grid; place-items:center;
  background: #f1f5ff; /* 연한 포인트 배경 */
}
.nav-icon svg{ width:22px; height:22px; fill:#3b82f6; }

.nav-texts{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.nav-title{ font-weight:700; font-size:15px; line-height:1.2; }
.nav-sub{ font-size:12px; color:#6b7280; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.nav-arrow{ margin-left:auto; font-size:22px; color:#9ca3af; }

@media (min-width: 720px){
  /* 데스크톱에서는 드로어 비활성 (햄버거 쓰는 레이아웃만 노출) */
  .mobile-menu{ display:none; }
}
/* 기존 모바일 패널 비활성(겹침 방지) */
#navMenuPanel, #navOverlay { display: none !important; }
/* ✅ 네비게이션 간격 완전 통일 */
.site-header .nav {
  gap: 14px !important;  /* 전체 간격 통일 */
}

.site-header .lang-switch {
  margin-right: 0 !important; /* 따로 띄우지 않기 */
}

.site-header .nav-desktop {
  gap: 14px !important; /* 가격-문의하기 사이 */
}
