/* ================================================================
   Navigation — vb-nav 컴포넌트 스타일
   vb-nav.js와 짝을 이루는 네비게이션 전용 스타일
   ================================================================ */

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.nav-list li {
  display: inline-flex;
}

.nav-list a {
  position: relative;
  z-index: 10000;
  display: inline-block;
  padding: 4px 0;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.2;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: width .18s ease-out;
}

.nav-list a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--primary-color);
  background: var(--white-color);
  font-size: 13px;
  white-space: nowrap;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--white-color);
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--black-color);
  transition: transform .2s ease-out, opacity .15s ease-out;
}

/* Nav overlay backdrop (vb-nav.js가 동적으로 생성) */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-out;
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   Responsive — 720px (Navigation)
   ================================================================ */
@media (max-width: 720px) {
  /* Navigation — 오른쪽에서 슬라이드인 드로어 */
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: 64px;
    left: 100%;
    height: calc(100vh - 64px);
    width: 280px;
    max-width: 85vw;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    background: rgba(250,247,243,0.98);
    padding: 24px 28px 40px;
    border-left: 1px solid var(--border-color);
    transform: translateX(0);
    visibility: hidden;
    transition: transform .3s cubic-bezier(0.4,0,0.2,1),
                visibility 0s linear .3s;
    z-index: 10000;
    overflow-y: auto;
  }

  .nav-list.is-open {
    transform: translateX(-100%);
    visibility: visible;
    transition: transform .3s cubic-bezier(0.4,0,0.2,1),
                visibility 0s;
  }

  .nav-list li {
    display: block;
    width: 100%;
  }

  .nav-list a {
    display: block;
    padding: 13px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
  }

  .nav-list li:last-child a {
    border-bottom: none;
  }

  /* 드로어에서는 hover 밑줄 애니메이션 제거 */
  .nav-list a::after {
    display: none;
  }

  /* 토글 버튼 햄버거 → X 변환 애니메이션 */
  .nav-toggle.is-active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* 드로어 열릴 때 body 스크롤 잠금 */
  body.nav-open {
    overflow: hidden;
  }

  /* 오버레이: 모바일 헤더 아래에서 시작 */
  .nav-overlay {
    top: 64px;
  }
}
