.header {
  width: 100%;
  height: auto;
  /* min-width: 1200px; */
  position: relative;
  top: 0;
  z-index: 1000;
  background: #fff;
}
.gnb {
  width: 100%;
  max-width: 1800px;
  /* height: 100px; */
  height: 6rem;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.logo {
  width: auto;
  height: 70px;
  z-index: 2;
  background: url('../img/common/bi.png') no-repeat left center;
  background-size: contain;
  transition-duration: 0.5s;
  overflow: hidden;
  flex-shrink: 0;
}

.logo a:first-child {
  height: 100%;
  display: block;
  margin: 0 auto;
}

.logo a img {
  display: block;
  height: auto;
  width: 100%;
  max-width: 200px;
}

.gnb .nav {
  flex: 1;
  height: 60px;
  margin: 0 180px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gnb .nav button {
  display: none;
}
.gnb .nav .menu_list {
  width: 100%;
  height: 100%;
  position: relative;
}
.gNaviBar {
  width: 58px;
  display: block;
  border-bottom: 3px #f14629 solid;
  position: absolute;
  bottom: -2px;
  opacity: 0;
  z-index: 2;
}

.urgent img {
  position: absolute;
  width: 30px;
  left: 50%;
  margin-left: -17px;
  top: -10px;
}

.menu_list > ul {
  height: 60px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu_list > ul > li {
  height: 60px;
  float: left;
  position: relative;
  font-size: 17px;
  text-align: center;
  list-style: none;
}
.menu_list > ul > li:last-child {
  margin-right: 0;
}
.menu_list > ul > li > a {
  width: 11%;
  text-align: center;
  font-weight: 500;
  color: #333;
  font-size: 18px;
  text-align: center;
  line-height: 60px;
}
.menu_list > ul > li > .user_m_b:hover {
  color: #f57341 !important;
}
/* PC 사이즈 (1400px 이상) - 메가메뉴용 서브메뉴 스타일 */
@media (min-width: 1401px) {
  .menu_list > ul > li > ul {
    width: 175px;
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    overflow: hidden;
    z-index: 100 !important;
    display: none; /* 기본적으로 숨김, hover 시 JavaScript로 표시 */
  }
  .navBg {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background-color: #fafafa;
    height: 250px;
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    z-index: 1;
  }
}
.menu_list > ul > li > ul > li {
  font-size: 14px;
  text-align: center;
  list-style: none;
}
.menu_list > ul > li > ul a {
  display: block;
  width: 100%;
  color: #333;
  font-size: 16px;
  font-weight: 400;
  line-height: 50px;
  transition: all 0.3s;
}
.menu_list > ul > li > ul a:hover,
.menu_list > ul > li > ul > li.on a {
  color: #ffaa00;
}
/*.contnes_d{padding-top:232px;}*/
.my {
  position: absolute;
  top: 35px;
  right: 0;
}

/**top_banner**/

.mix_global_banner {
  position: relative;
  width: 100%;
  height: 70px;
}
.mix_inner {
  height: 100%;
}
.mix_inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mix_banner_close_btn {
  position: absolute;
  /* top: 25px; */
  top: 34%;
  right: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10001;
}

.mix_banner_close_btn i {
  font-size: 1.5em;
  color: #fff;
  transition: color 0.3s ease;
}

.mix_banner_close_btn:hover i {
  color: #ff0000;
}

/* ========== 인라인 스타일에서 이동한 스타일 ========== */

/* 메뉴 리스트 flexbox 스타일 */
.menu_list > ul {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

/* 로고 링크 스타일 */
.logo > h1 > a {
  width: 175px;
}

/* 로고 h1 스타일 */
.logo > h1 {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 회원가입/로그인 랩 스타일 */
.join_wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  flex-shrink: 0;
  white-space: nowrap;
}

.join_wrap .user_m_b {
  color: #333;
  font-weight: 400;
  font-size: 14px;
}

/* 관리자 링크 스타일 */

/* 그룹웨어 링크 스타일 */
.join_wrap .user_m_b[href*='gw.gguldanji.net'] {
  padding-left: 10px;
}

/* 햄버거 버튼 스타일 */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
}

.hamburger-btn i {
  position: absolute;
  font-size: 2.5em;
  color: #333;
  transition: all 0.3s ease;
}

.hamburger-btn .hamburger-icon {
  opacity: 1;
  transform: scale(1);
}

.hamburger-btn .close-icon {
  opacity: 0;
  transform: scale(0);
}

.hamburger-btn.active .hamburger-icon {
  opacity: 0;
  transform: scale(0);
}

.hamburger-btn.active .close-icon {
  opacity: 1;
  transform: scale(1);
}

/* 메뉴 오픈 시 body 스크롤 방지 - m/header.php 참고 */
body.menu-open,
html.menu-open {
  overflow: hidden;
  height: 100%;
}
.menu_login_wrap {
  display: none;
}
/* 반응형 */

@media (max-width: 1400px) {
  .hamburger-btn {
    display: flex;
    order: 2;
    margin-left: auto;
    margin-right: 15px;
  }

  .gnb {
    padding: 0 20px;
  }

  .gnb .nav {
    position: fixed;
    top: 0;
    left: -300px; /* m/header.php 참고: 왼쪽에서 슬라이드 */
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease-in-out; /* m/header.php 참고: ease-in-out */
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 80px 20px 20px;
    margin: 0;
  }

  .gnb .nav.active {
    left: 0; /* m/header.php 참고: left: 0 */
  }

  .gnb .nav .menu_list {
    max-width: 100%;
    overflow-x: hidden;
  }

  .gnb .nav button {
    display: flex;
  }
  /* 메뉴 리스트 내 닫기 버튼 - 반응형에서만 표시 */
  .nav-close-btn {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    align-items: center;
    justify-content: center;
  }

  .nav-close-btn i {
    font-size: 1.8em;
    color: #333;
    transition: color 0.3s ease;
  }

  .nav-close-btn:hover i {
    color: #ffaa00;
  }

  .menu_list > ul {
    flex-direction: column;
    height: auto;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .menu_list > ul > li {
    width: 100%;
    height: auto;
    float: none;
    border-bottom: 1px solid #eee;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .menu_list > ul > li > a {
    width: 100%;
    text-align: left;
    padding: 15px;
    line-height: 1.5;
    font-size: 16px;
    display: block;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .menu_list > ul > li > ul {
    position: static;
    width: 100% !important;
    transform: none;
    top: 0;
    left: 0;
    background-color: transparent;
    padding-left: 20px;
    display: none;
    height: auto;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .menu_list > ul > li.active > ul {
    display: block;
  }

  /* 다른 모든 메뉴는 확실히 숨김 */
  .menu_list > ul > li:not(.active) > ul {
    display: none;
  }
  .menu_list > ul > li > ul a {
    text-align: left;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }
  /* 모바일용 로그인/회원가입 링크 - 반응형에서만 표시 */
  .menu_login_wrap {
    display: block;
    padding: 15px 20px;
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 10px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .menu_login_wrap a {
    color: #999;
    text-decoration: none;
    font-size: 11px;
    transition: color 0.3s ease;
  }

  .menu_login_wrap a:hover {
    color: #ffaa00;
  }

  .menu_login_wrap .menu_divider {
    margin: 0 6px;
    color: #ddd;
  }

  .join_wrap {
    order: 3;
    margin-left: auto;
    display: none;
  }

  .navBg {
    display: none !important;
  }

  /* 메뉴 오버레이 - m/header.php의 #dimmed 참고 */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* m/header.php 참고 */
    z-index: 999;
    overflow-y: hidden; /* m/header.php 참고 */
  }

  .menu-overlay.active {
    display: block;
  }

  /* 기존 hover 효과 비활성화 */
  .menu_list > ul > li:hover > ul {
    display: none;
  }
}

@media (max-width: 1200px) {
  .menu_list > ul > li > a {
    font-size: 18px;
  }
}

@media (max-width: 992px) {
  .gnb {
    height: auto;
    min-height: 80px;
    flex-wrap: wrap;
    padding: 10px 15px;
  }

  .logo {
    height: 60px;
  }

  .logo a img {
    max-width: 150px;
  }

  .hamburger-btn {
    width: 28px;
    height: 28px;
  }

  .hamburger-btn i {
    font-size: 2.4em;
  }

  .gnb .nav {
    width: 280px;
  }

  .join_wrap {
    order: 3;
    margin-left: auto;
    font-size: 12px;
    gap: 8px;
  }

  .join_wrap .user_m_b {
    font-size: 12px;
    padding: 5px 8px;
  }
}

@media (max-width: 768px) {
  .mix_global_banner {
    display: none;
  }
  .gnb {
    padding: 10px;
  }

  .logo {
    height: 50px;
  }
  .mix_inner .logo a img {
    max-width: 120px;
  }

  .hamburger-btn {
    width: 26px;
    height: 26px;
  }

  .hamburger-btn i {
    font-size: 2.3em;
  }

  .gnb .nav {
    width: 260px;
  }

  .menu_list > ul > li > a {
    font-size: 15px;
    padding: 12px;
  }

  .menu_list > ul > li > ul a {
    font-size: 14px;
    line-height: 40px;
    padding-left: 0;
    text-align: left;
  }

  .join_wrap {
    font-size: 11px;
    gap: 5px;
  }

  .join_wrap .user_m_b {
    font-size: 11px;
    padding: 4px 6px;
  }

  .mix_banner_close_btn {
    top: 15px;
    right: 15px;
  }

  .mix_banner_close_btn i {
    font-size: 1.2em;
  }
}

@media (max-width: 480px) {
  .gnb {
    padding: 8px;
  }

  .logo {
    height: 45px;
  }

  .logo a img {
    max-width: 100px;
  }

  .hamburger-btn {
    width: 24px;
    height: 24px;
  }

  .hamburger-btn i {
    font-size: 2.2em;
  }

  .gnb .nav {
    width: 240px;
    padding: 70px 15px 15px;
  }

  .menu_list > ul > li > a {
    font-size: 14px;
    padding: 10px;
  }

  .menu_list > ul > li > ul a {
    font-size: 13px;
    line-height: 35px;
  }

  .join_wrap {
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
  }

  .join_wrap .user_m_b {
    font-size: 10px;
    padding: 3px 5px;
  }

  .mix_global_banner {
    height: 12px;
  }

  .mix_banner_close_btn {
    top: 0;
    right: 10px;
  }

  .mix_banner_close_btn i {
    font-size: 1em;
  }
}
