/* ============================================================
   WeddingChannel — Navigation CSS
   (주)웨딩채널 | 051-808-2002 | WeddingChannel.co.kr
   ============================================================ */

/* ── Header base ──────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.35s ease, box-shadow 0.35s ease;
  /* 기본값: 투명 (히어로 위) */
  background: transparent;
}

/* solid 상태 (스크롤 후 / 서브페이지) */
#site-header.solid {
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* transparent 명시 (히어로 위) */
#site-header.transparent {
  background: transparent;
  box-shadow: none;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 72px;
}

/* ── Logo ─────────────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 32px;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  /* 기본(투명 헤더): 흰색 */
  color: #fff;
  transition: color 0.3s;
}
.logo-text em {
  font-style: normal;
  color: var(--gold-light);
  transition: color 0.3s;
}

/* solid 상태 로고: 어두운 색 */
#site-header.solid .logo-text    { color: var(--charcoal); }
#site-header.solid .logo-text em { color: var(--gold-dark); }

/* ── Main Nav ─────────────────────────────────────────────── */
.main-nav { flex: 1; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 500;
  /* 기본(투명 헤더): 흰색 */
  color: rgba(255,255,255,0.92);
  border-radius: var(--radius);
  transition: color 0.25s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-list > li > a:hover { color: #fff; }

/* solid 상태 메뉴: 어두운 색 */
#site-header.solid .nav-list > li > a       { color: var(--charcoal); }
#site-header.solid .nav-list > li > a:hover { color: var(--gold); }
.nav-list > li > a.active { color: var(--gold) !important; }

/* ── Mega Menu ─────────────────────────────────────────────── */
.mega-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -20px;
  width: 540px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-light);
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
  z-index: 200;
}
.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}
.mega-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.mega-col a {
  display: block;
  font-size: 13px;
  color: var(--charcoal-light);
  padding: 5px 0;
  transition: color 0.2s, padding-left 0.2s;
  text-decoration: none;
}
.mega-col a:hover { color: var(--gold); padding-left: 4px; }

/* ── Header Actions ────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* 아이콘 버튼 */
.btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  transition: background 0.2s;
  text-decoration: none;
  /* 기본: 흰색 */
  color: rgba(255,255,255,0.85);
}
.btn-icon:hover { background: rgba(255,255,255,0.15); }
#site-header.solid .btn-icon       { color: var(--charcoal); }
#site-header.solid .btn-icon:hover { background: var(--ivory-dark); }

/* 헤더 버튼 — 기본(투명): 흰 테두리/텍스트 */
.header-actions .btn-outline {
  color: rgba(255,255,255,0.9) !important;
  border-color: rgba(255,255,255,0.55) !important;
  background: transparent !important;
}
.header-actions .btn-outline:hover {
  color: #fff !important;
  border-color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}
.header-actions .btn-primary {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
}
.header-actions .btn-primary:hover {
  background: var(--gold-dark) !important;
  border-color: var(--gold-dark) !important;
}
/* 커스텀 스타일 버튼 (ivory) */
.header-actions .btn[style*="ivory"] {
  background: rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.85) !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
}

/* solid 상태 버튼: 원래 색상 복구 */
#site-header.solid .header-actions .btn-outline {
  color: var(--gold) !important;
  border-color: var(--gold) !important;
  background: transparent !important;
}
#site-header.solid .header-actions .btn-outline:hover {
  background: var(--gold) !important;
  color: #fff !important;
}
#site-header.solid .header-actions .btn-primary {
  background: var(--gold-dark) !important;
  border-color: var(--gold-dark) !important;
  color: #fff !important;
}
#site-header.solid .header-actions .btn[style*="ivory"] {
  background: var(--ivory-dark) !important;
  color: var(--charcoal) !important;
  border: 1px solid var(--gray-light) !important;
}

/* ── Mobile Toggle ─────────────────────────────────────────── */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  background: none;
  border: none;
}
.mobile-toggle span {
  display: block;
  width: 22px; height: 2px;
  /* 기본: 흰색 */
  background: rgba(255,255,255,0.9);
  border-radius: 1px;
  transition: background 0.3s;
}
#site-header.solid .mobile-toggle span { background: var(--charcoal); }

/* ── Mobile Drawer ─────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}
.mobile-nav.open { pointer-events: all; }
.mobile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-nav.open .mobile-overlay { opacity: 1; }
.mobile-drawer {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  background: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.mobile-nav.open .mobile-drawer { transform: none; }
.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ivory-dark);
  position: sticky; top: 0;
  background: #fff;
  z-index: 1;
}
.mobile-drawer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.04em;
}
.mobile-close {
  font-size: 22px;
  color: var(--gray-mid);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
.mobile-nav-list { padding: 8px 0; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal);
  border-bottom: 1px solid var(--ivory-dark);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border-left: none; border-right: none; border-top: none;
  width: 100%;
  font-family: inherit;
}
.mobile-nav-link:hover { color: var(--gold); background: var(--ivory); }
.acc-arrow { font-size: 11px; transition: transform 0.2s; }
.mobile-sub { display: none; background: var(--ivory); }
.mobile-sub a {
  display: block;
  padding: 10px 20px 10px 32px;
  font-size: 13px;
  color: var(--charcoal-light);
  border-bottom: 1px solid var(--ivory-dark);
  text-decoration: none;
}
.mobile-sub a:hover { color: var(--gold); }
.mobile-auth {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
}
.mobile-auth .btn { flex: 1; justify-content: center; font-size: 13px; padding: 10px; }

/* ── Reveal animation ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Card base ─────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.footer-brand .footer-logo em {
  font-style: normal;
  color: var(--gold-light);
}
.footer-brand p { font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
.footer-contact { font-size: 13px; line-height: 2.2; display: flex; flex-direction: column; gap: 2px; }
.footer-contact span { color: rgba(255,255,255,0.6); }
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .header-actions .btn { display: none; }
  .header-actions .btn-icon { display: none; }
  .mobile-toggle { display: flex; }
  .mobile-nav { display: block; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .mega-menu { display: none !important; }
}
@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr 1fr; }
}

/* ══ NAV 모바일 최적화 ══ */
@media (max-width: 768px) {
  /* 헤더 높이 */
  #site-header .header-inner { height: 60px; padding: 0 16px; }

  /* 로고 크기 */
  .logo-text { font-size: 1.1rem; }

  /* 네비 숨김 */
  .main-nav { display: none; }

  /* 액션 버튼 */
  .header-actions .btn-outline,
  .header-actions .btn-primary { display: none; }
  .header-actions .btn-icon { display: flex !important; }

  /* 모바일 토글 표시 */
  .mobile-toggle { display: flex !important; }

  /* 드로어 너비 */
  .mobile-drawer { width: min(340px, 90vw); }

  /* 모바일 링크 */
  .mobile-nav-link { font-size: 15px; padding: 14px 20px; min-height: 48px; }
  .mobile-sub a { padding: 11px 20px 11px 36px; font-size: 14px; }

  /* 모바일 인증 버튼 */
  .mobile-auth { padding: 14px 16px; gap: 10px; }
  .mobile-auth .btn { flex: 1; padding: 12px; font-size: 14px; min-height: 46px; }
}

@media (max-width: 480px) {
  #site-header .header-inner { padding: 0 14px; }
  .logo-text { font-size: 1rem; }
  .mobile-drawer { width: 100vw; border-radius: 0; }
}

/* ── 모바일 헤더 보강 ── */
@media (max-width: 768px) {
  /* 상단 헤더 높이 조정 */
  .header-inner { padding: 0 16px; min-height: 60px; }
  body           { padding-top: 60px; }

  /* 로고 축소 */
  .logo-text     { font-size: 1.1rem; }

  /* 헤더 액션 버튼 */
  .header-actions .btn-outline,
  .header-actions .btn-primary { display: none; }
  .header-actions .btn-icon    { font-size: 1.2rem; }

  /* 모바일 드로어 */
  .mobile-drawer { width: min(320px, 90vw); }

  /* 모바일 네비 링크 */
  .mobile-nav-link { padding: 13px 20px; font-size: 15px; }
  .mobile-auth     { padding: 16px 20px; gap: 10px; }
  .mobile-auth .btn { flex: 1; text-align: center; justify-content: center; }
}

@media (max-width: 360px) {
  .header-inner  { padding: 0 12px; }
  .logo-text     { font-size: 1rem; }
  .mobile-drawer { width: 88vw; }
}
