/* --------------------- header */
/* -------- navigation */

.nav-container {
  width: 100%;
  z-index: 500;
  position: fixed;
  top: 0;
  left: 0;
  background: #0000000f;
  transition: all 0.3s ease-in-out;
}

.nav-wrapper {
  width: 100%;
  padding-right: 20px;
  padding-left: 20px;
}

.nav_bar {
  font-size: 20px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 20px;
}

.logo {
  flex: 0 0 auto;
}

.logo img {
  max-width: 100px;
}

.nav-bar .nav {
  text-align: center;
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.nav-menu {
  align-items: center;
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  gap: 30px;
}

.menu__item.depth-1 {
  position: relative;
}

.menu__item.depth-1 .menu__link {
  position: relative;
  height: 60px;
  padding: 0 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-size: 1.15em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap !important;
  transition: all 0.3s ease-in-out;
}

.menu__item.depth-1 .menu__link:hover {
  color: #00bc9e;
  font-weight: 600;
}

/* 메인 페이지 네비게이션 색상 */
.main-page .menu__item.depth-1 .menu__link {
  color: #393838;
}

.main-page .menu__item.depth-1 .menu__link:hover {
  color: #00bc9e;
}

/* 메인 페이지 로고 색상 */
.main-page .logo img {
  filter: brightness(0) saturate(100%) invert(19%) sepia(5%) saturate(368%) hue-rotate(169deg) brightness(95%) contrast(89%);
}

.menu__submenu {
  padding: 2.8rem 0.3125rem 5.625rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
}

.menu__veil {
  display: none;
  position: absolute;
  top: 100%;
  width: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #ddd;
  height: 535px;
}

.menu__veil.active {
  display: block;
}

.menu__item.depth-1.active .menu__submenu {
  display: block;
}

.menu__submenu .menu__item.depth-2 a.menu__link {
  display: block;
  font-size: 1.0625em;
  color: #555;
  font-weight: 400;
  word-break: keep-all;
  padding: 0 0.5em;
  line-height: 1.3;
  height: 50px;
}

.menu__submenu .menu__item.depth-2 a.menu__link:hover {
  color: #00bc9e;
  font-weight: 400;
}

.nav-container.scroll {
  background: #fff;
  transition: all 0.3s ease-in-out;
}
.nav-container.scroll .menu__item.depth-1 .menu__link {
  color: #292929;
  transition: all 0.3s ease-in-out;
}
/* 스크롤 시 로고 색상 변경 (흰색 → 검정) */
.nav-container .logo img {
  transition: filter 0.3s ease-in-out;
}
.nav-container.scroll .logo img {
  filter: brightness(0) saturate(100%);
}

/* --------------------- Mobile Menu Button --------------------- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-btn .hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #393838;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* White hamburger on non-scrolled header (for non-main pages) */
.nav-container:not(.scroll) .mobile-menu-btn .hamburger-line {
  background-color: #fff;
}

/* Dark hamburger on main page */
.main-page .nav-container:not(.scroll) .mobile-menu-btn .hamburger-line {
  background-color: #393838;
}

/* Dark hamburger when scrolled */
.nav-container.scroll .mobile-menu-btn .hamburger-line {
  background-color: #393838;
}

/* --------------------- Mobile Menu Overlay --------------------- */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s;
}

.mobile-menu-overlay.active {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-overlay .mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.mobile-menu-overlay .mobile-logo img {
  max-width: 80px;
  height: auto;
}

.mobile-menu-overlay .mobile-menu-close {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.mobile-menu-overlay .mobile-menu-close span {
  display: block;
  width: 24px;
  height: 2px;
  background: #393838;
  position: absolute;
  top: 50%;
  left: 50%;
  transition: all 0.3s ease;
}

.mobile-menu-overlay .mobile-menu-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-overlay .mobile-menu-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu-overlay .mobile-nav {
  background: #fff;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay .mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-overlay .mobile-menu-item {
  border-bottom: 1px solid #eee;
}

.mobile-menu-overlay .mobile-menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.mobile-menu-overlay .mobile-menu-link::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: #999;
  transition: transform 0.3s;
}

.mobile-menu-overlay .mobile-menu-item.active .mobile-menu-link::after {
  content: '-';
}

.mobile-menu-overlay .mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f9f9f9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu-overlay .mobile-menu-item.active .mobile-submenu {
  max-height: 500px;
}

.mobile-menu-overlay .mobile-submenu li a {
  display: block;
  padding: 14px 20px 14px 35px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  border-top: 1px solid #eee;
}

.mobile-menu-overlay .mobile-submenu li a:hover {
  background: #f0f0f0;
  color: #00bc9e;
}

.mobile-menu-overlay .mobile-menu-contact {
  background: #fff;
  padding: 20px;
  border-top: 1px solid #eee;
}

.mobile-menu-overlay .mobile-phone-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: #00bc9e;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  min-height: 44px;
}

.mobile-menu-overlay .mobile-phone-btn span {
  font-size: 12px;
  opacity: 0.9;
}

.mobile-menu-overlay .mobile-phone-btn strong {
  font-size: 18px;
  font-weight: 700;
  margin-top: 3px;
}


/* =====================================================
   NAVIGATION RESPONSIVE STYLES
   ===================================================== */

/* Desktop: Hide mobile menu button */
@media screen and (min-width: 992px) {
  .mobile-menu-btn {
    display: none !important;
  }
  
  .nav-menu {
    display: flex !important;
  }
}

/* Tablet & Mobile: Show mobile menu button, hide desktop menu */
@media screen and (max-width: 991px) {
  .nav_bar {
    height: 70px;
    justify-content: space-between;
    padding: 0 15px;
  }
  
  .logo img {
    max-width: 80px;
  }
  
  .nav-menu {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex !important;
  }
  
  .nav-container.scroll {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
}

/* Mobile: Smaller adjustments */
@media screen and (max-width: 576px) {
  .nav_bar {
    height: 60px;
    padding: 0 10px;
  }
  
  .logo img {
    max-width: 70px;
  }
  
  .mobile-menu-btn {
    width: 35px;
    height: 35px;
  }
  
  .mobile-menu-btn .hamburger-line {
    width: 22px;
    height: 2px;
  }
  
  /* Mobile Menu Overlay Adjustments */
  .mobile-menu-overlay .mobile-menu-header {
    padding: 15px 20px;
  }
  
  .mobile-menu-overlay .mobile-logo img {
    max-width: 80px;
  }
  
  .mobile-menu-overlay .mobile-menu-link {
    font-size: 18px;
    padding: 15px 20px;
  }
  
  .mobile-menu-overlay .mobile-submenu-link {
    font-size: 15px;
    padding: 12px 30px;
  }
}
