/* =====================================================
   화이트빌드케어 | header.css
   ===================================================== */

:root {
  --navy:  #06223b;
  --navy2: #0e3558;
  --blue:  #2d6f9f;
  --line:  #dce6ef;
  --font:  "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: var(--font);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ══════════ 헤더 레이아웃 ══════════ */
.header {
  height: 92px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(10, 45, 75, 0.10);
  box-shadow: 0 2px 16px rgba(6, 34, 59, 0.07);
  position: relative;
}

.inner {
  width: min(100% - 64px, 1120px);
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

/* ══════════ 로고 최적화 ══════════ */
.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-link img {
  height: 46px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.logo-fallback {
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
}

/* ══════════ 데스크탑 네비게이션 ══════════ */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 15px;
  font-weight: 700;
}

.nav a {
  position: relative;
  color: var(--navy);
  padding: 4px 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--navy);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

.nav a:hover {
  color: var(--blue);
}

.nav a:hover::after,
.nav a.active::after {
  width: 24px;
}

.nav a.active {
  color: var(--navy);
  font-weight: 900;
}

/* 견적문의 버튼 */
.nav .quote {
  background: var(--navy);
  color: #ffffff !important;
  border-radius: 999px;
  padding: 10px 22px !important;
  font-weight: 800;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(6, 34, 59, 0.18);
}

.nav .quote:hover {
  background: var(--blue) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 111, 159, 0.30);
}

.nav .quote::after {
  display: none !important;
}

/* ══════════ 햄버거 버튼 ══════════ */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.menu-btn:hover {
  background: rgba(6, 34, 59, 0.07);
}

.menu-btn .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* 햄버거 → X 애니메이션 */
.menu-btn.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn.active .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-btn.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ══════════ 모바일 드롭다운 메뉴 ══════════ */
.mobile-nav {
  display: block;
  position: absolute;
  top: 92px;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 2px solid var(--navy);
  box-shadow: 0 12px 40px rgba(6, 34, 59, 0.15);
  z-index: 999;

  /* 닫힌 상태 */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

/* 열린 상태 */
.mobile-nav.open {
  max-height: 480px;
  opacity: 1;
}

.mobile-nav-inner {
  padding: 8px 0 16px;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid rgba(220, 230, 239, 0.5);
  transition: all 0.2s;
}

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

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(45, 111, 159, 0.06);
  color: var(--blue);
}

.mobile-nav a i {
  width: 18px;
  font-size: 14px;
  color: var(--blue);
  text-align: center;
  flex-shrink: 0;
}

/* 모바일 견적문의 강조 버튼 */
.mobile-nav .mobile-quote {
  margin: 12px 20px 4px;
  background: var(--navy);
  color: #ffffff !important;
  border-radius: 12px;
  justify-content: center;
  font-weight: 900;
  border-bottom: none !important;
  box-shadow: 0 4px 16px rgba(6, 34, 59, 0.20);
}

.mobile-nav .mobile-quote:hover {
  background: var(--blue) !important;
  color: #ffffff !important;
}

.mobile-nav .mobile-quote i {
  color: #ffffff !important;
}

/* ══════════ 반응형 ══════════ */
@media (max-width: 900px) {
  .header {
    height: 72px;
  }

  .inner {
    height: 72px;
    width: min(100% - 32px, 1120px);
  }

  .logo-link img {
    height: 38px;
    max-width: 200px;
  }

  /* 데스크탑 메뉴 숨김 */
  .nav {
    display: none;
  }

  /* 햄버거 버튼 표시 */
  .menu-btn {
    display: flex;
  }

  /* 모바일 메뉴 top 위치 조정 */
  .mobile-nav {
    top: 72px;
  }
}

@media (max-width: 480px) {
  .inner {
    width: min(100% - 24px, 1120px);
  }

  .logo-link img {
    height: 34px;
    max-width: 180px;
  }

  .mobile-nav a {
    padding: 13px 20px;
    font-size: 14px;
  }
}
