

/* ===== Navbar ===== */
.navbar {position:fixed;width:100%;top:0;left:0;z-index:1000;background-color:transparent;transition:background-color 0.3s ease, box-shadow 0.3s ease}
.navbar.active {background-color:#fff;box-shadow:0 2px 10px rgba(0, 0, 0, 0.05)}
.navbar .main-menu {margin-left:4rem}


/* 2차 메뉴 하단 배경 (hover 시에만 표시) */
.navbar::after {content:'';position:absolute;top:100%;left:0;width:100vw;height:0;background-color:#fff;z-index:0;transition:height 0.3s ease}
.navbar.has-sub-hover::after {height:70px}

/* ===== Navbar 내부 ===== */
.navbar-inner {max-width:1200px;height:80px;margin:auto;display:flex;justify-content:space-between;align-items:center}
.navbar-inner .hd-inner {width:100%;align-items:center;justify-content:space-between}

/* ===== 로고 ===== */
#header #logo a {display:block;width:170px}
#header #logo img {width:100%}
  
/* ===== 메뉴 ===== */
.main-menu {display:flex;align-items:center}
.main-menu ul {display:flex;list-style:none;margin:0;padding:0}
.main-menu .gnb .menu-item {position:relative;margin-right:40px}
.main-menu .gnb .menu-item:last-child {margin-right:0}

/* 1차 메뉴 스타일 */
.menu-item > a {position:relative;display:block;text-decoration:none;color:#fefefe;font-weight:500;line-height:80px;transition:color 0.3s ease;font-size:1.125rem}
.navbar.active .menu-item > a {color:#000}
  .menu-item:hover > a,
  .menu-item.active > a {
    color: #004296;
  }
  .menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #004296;
    transition: width 0.3s ease;
  }
  .menu-item:hover > a::after,
  .menu-item.active > a::after {
    width: 100%;
  }
  
  /* 2차 메뉴 스타일 */
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    display: none;
    flex-direction: row;
    z-index: 999;
  }
  .submenu li {
    margin-right:20px;
    white-space: nowrap;
  }
  .submenu li:last-child {
    margin-right:0
  }
 .submenu a {display:block;color:#888888;font-size:1rem;font-weight:400;text-decoration:none;line-height:70px}
  
  /* ===== Contact 버튼 ===== */
  .contact-btn {
    background-color: #000;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  .contact-btn:hover {
    background-color: #333;
  }
  
  /* ===== 햄버거 메뉴 (모바일) ===== */
  .hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: 20px;
  }
  .hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fefefe;
    display: block;
    transition: all 0.3s ease;
  }
  
  .navbar.active .hamburger span {background-color: #333}

  /* 햄버거 메뉴 열림 상태 (X자) */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  
  /* ===== 반응형 ===== */
  @media (max-width: 1024px) {
    .main-menu {display:none;position:absolute;top:80px;left:0;width:100%;margin-left:0 !important;padding:1rem;background-color:#fff;border-top:1px solid #eee}
    .main-menu.open {display:block}
    .main-menu ul {flex-direction:column;padding:0 1.25rem}
    .menu-item {margin-right:0}
    .menu-item > a {line-height:1;padding:1.5rem 0}
    .submenu a {line-height:50px}
    .submenu {
      position: relative;
      top: 0;
      left: 0;
      width: 100%;
      transform: none;
      justify-content: flex-start;
      box-shadow: none;
      padding-left: 15px;
    }
    .contact-btn {
      display: none;
    }
    .hamburger {
      display: flex;
    }
    .menu-item > a::after {
      display: none;
    }
  }