/* ═══ 오상신경외과 — 헤더 (Tailwind 무의존) ═══ */

/* 헤더 */
#main-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 메인 포함 모든 페이지: 항상 흰 배경 + 다크 텍스트 */

.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
}

/* 로고 */
.header-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.header-logo-link img { height: 32px; width: auto; }

/* 데스크톱 Nav */
.header-nav {
  display: none; align-items: center; gap: 10px;
}
.header-nav a.nav-link {
  font-size: 13px; font-weight: 500; color: #2c2c2c;
  text-decoration: none; white-space: nowrap;
  padding: 12px 15px; transition: color 0.2s;
  display: flex; align-items: center; height: 100%;
  letter-spacing: 0.01em;
}
.header-nav a.nav-link:hover { color: #515c3e; }

/* 메인 포함 전체: 항상 다크 텍스트 */

/* 오른쪽 CTA 영역 */
.header-right {
  display: none; align-items: center; gap: 12px;
}
.header-phone {
  font-size: 13px; font-weight: 600; color: #2c2c2c;
  text-decoration: none; white-space: nowrap;
}
.header-kakao {
  font-size: 12px; font-weight: 500; color: #3C1E1E;
  background: #FEE500; padding: 6px 14px; border-radius: 4px;
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s;
}
.header-kakao:hover { background: #f5dc00; }
.header-lang {
  font-size: 12px; font-weight: 600; color: #515c3e;
  text-decoration: none; white-space: nowrap;
  padding: 5px 10px; border: 1px solid #515c3e; border-radius: 4px;
  transition: all 0.2s; letter-spacing: 0.5px;
}
.header-lang:hover { background: #515c3e; color: #fff; }

/* 햄버거 */
.header-hamburger {
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; width: 32px; height: 32px; gap: 5px;
  background: none; border: none; cursor: pointer;
}
.mobile-bar {
  display: block; height: 1.5px; background: #2c2c2c;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 1px;
}
.mobile-bar:nth-child(1), .mobile-bar:nth-child(2) { width: 24px; }
.mobile-bar:nth-child(3) { width: 16px; align-self: flex-end; }

/* 드롭다운 */
.nav-item {
  position: relative !important;
  display: flex; align-items: center;
}
.nav-item::after {
  content: ''; position: absolute; top: 100%; left: -20px; right: -20px; height: 36px;
}
.nav-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 8px 0;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 99999;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.nav-dropdown::before {
  content: ''; position: absolute;
  top: -44px; left: -40px; right: -40px; height: 52px;
}
.nav-item:hover > .nav-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.nav-dropdown a {
  display: block; padding: 11px 22px;
  font-size: 13.5px; color: #555 !important;
  transition: all 0.15s; text-decoration: none;
  white-space: nowrap;
}
.nav-dropdown a:hover { background: #f9f8f6; color: #363636 !important; }

/* 모바일 메뉴 — 왼쪽 서랍 */
#menu-overlay {
  position: fixed !important; top: 0 !important; left: 0 !important; bottom: 0 !important;
  width: 320px; max-width: 85vw;
  background: #fff; z-index: 10000;
  transform: translateX(-100%) !important;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto; padding: 0;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
#menu-overlay.open { transform: translateX(0) !important; }
#menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
#menu-backdrop.open { opacity: 1; pointer-events: auto; }

/* 서랍 헤더 */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #f0ece7;
}
.drawer-header img { height: 28px; }
.drawer-close {
  width: 36px; height: 36px; background: none; border: none;
  cursor: pointer; font-size: 20px; color: #888;
  display: flex; align-items: center; justify-content: center;
}

/* 메뉴 리스트 */
#menu-overlay ul { list-style: none; padding: 0; margin: 0; }
#menu-overlay > ul > li { border-bottom: 1px solid #f0ece7; }

/* 메인 링크 */
#menu-overlay > ul > li > a,
#menu-overlay > ul > li > .menu-parent {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; font-size: 15px; font-weight: 500;
  color: #2c2c2c; text-decoration: none;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer; background: none; border: none; width: 100%;
  text-align: left;
}
#menu-overlay > ul > li > a:hover,
#menu-overlay > ul > li > .menu-parent:hover { background: #faf9f7; }

/* 아코디언 화살표 */
.menu-arrow { font-size: 12px; color: #c3a990; transition: transform 0.3s; }
.menu-parent.open .menu-arrow { transform: rotate(180deg); }

/* 서브메뉴 */
.menu-sub {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: #faf9f7;
}
.menu-sub a {
  display: block; padding: 12px 20px 12px 36px;
  font-size: 14px; color: #555; text-decoration: none;
  font-family: 'Noto Sans KR', sans-serif;
  border-top: 1px solid #f0ece7;
}
.menu-sub a:hover { color: #515c3e; background: #f4f2ed; }

/* 서랍 하단 */
.drawer-footer {
  padding: 20px; border-top: 1px solid #f0ece7;
  display: flex; flex-direction: column; gap: 12px;
}
.drawer-phone {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 600; color: #2c2c2c;
  text-decoration: none;
}
.drawer-kakao {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; background: #FEE500; color: #3C1E1E;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none;
}

/* body offset */
body { padding-top: 56px; }

/* ═══ 반응형 ═══ */
@media (min-width: 1280px) {
  .header-nav { display: flex; }
  .header-right { display: flex; }
  .header-hamburger { display: none; }
  body { padding-top: 56px; }
}
@media (max-width: 1279px) {
  .header-nav { display: none !important; }
  .header-right { display: none !important; }
  .header-hamburger { display: flex; }
}
