header {
  width: 100%;
  height: auto;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: transparent;
  transition-property: all;
  transition-duration: 650ms;
  transition-timing-function: ease;
  transition-delay: 0s;
}
header .header_wrap {
  background-color: #fff;
}

/* 메인 페이지 헤더 스타일 */
body.main-page header .header_wrap {
  background-color: transparent;
  transition-property: background-color;
  transition-duration: 0.3s;
  transition-timing-function: ease;
  transition-delay: 0s;
}

/* 메뉴 항목에 hover 시 전체 헤더 배경 흰색으로 변경 */
body.main-page header:has(.header_wrap .box:hover) .header_wrap,
body.main-page header:has(.header_list .nav_item:hover) .header_wrap,
body.main-page header:has(.header_list a:hover) .header_wrap,
body.main-page header:has(.mega_menu:hover) .header_wrap {
  background-color: #fff;
  transition-property: background-color;
  transition-duration: 0.3s;
  transition-timing-function: ease;
  transition-delay: 0s;
}

/* 헤더 배경이 흰색일 때 모든 메뉴 항목 글씨 검정색으로 변경 (관리자 로그아웃 버튼 제외) */
body.main-page header:has(.header_wrap .box:hover) .header_list a:not(:hover):not(.admin_logout_btn),
body.main-page header:has(.header_list .nav_item:hover) .header_list a:not(:hover):not(.admin_logout_btn),
body.main-page header:has(.header_list a:hover) .header_list a:not(:hover):not(.admin_logout_btn),
body.main-page header:has(.mega_menu:hover) .header_list a:not(:hover):not(.admin_logout_btn) {
  color: #1e1e1e;
}

body.main-page header .header_list a {
  color: #000000;
}

body.main-page header .header_list a:hover:not(.admin_logout_btn) {
  color: #bc481f;
}

body.main-page header .header_list .nav_item:hover {
  border-radius: 4px;
}



body.main-page header .header_list a:hover::before {
  display: block;
  width: 100%;
  background-color: #bc481f;
}

body.main-page header .header_list li.active a {
  color: #fff;
}

body.main-page header .header_list li.active a::before {
  display: none;
}

/* 헤더 배경이 흰색일 때 active 항목도 검정색으로 변경 */
body.main-page header:has(.header_wrap .box:hover) .header_list li.active a:not(:hover),
body.main-page header:has(.header_list .nav_item:hover) .header_list li.active a:not(:hover),
body.main-page header:has(.header_list a:hover) .header_list li.active a:not(:hover),
body.main-page header:has(.mega_menu:hover) .header_list li.active a:not(:hover) {
  color: #1e1e1e;
}

body.main-page header .header_list li.active a:hover {
  color: #bc481f;
}

body.main-page header .header_list li.active .nav_item:hover {
  border-radius: 4px;
}

body.main-page header .header_list li.active .nav_item:hover a {
  color: #bc481f;
}
header .header_container {
  width: 100%;
  position: relative;
  z-index: 100;
  background: transparent;
}

header .header_container::after {
  display: none;
}
header .header_wrap:before, header .header_wrap:after {
  content: "";
  display: block;
  clear: both;
}
header .header_wrap {
  position: relative;
  transition-property: all;
  transition-duration: 650ms;
  transition-timing-function: ease;
  transition-delay: 0s;
  background-color: #fff;
}
header .header_wrap .box:before, header .header_wrap .box:after {
  content: "";
  display: block;
  clear: both;
}
header .header_wrap .box {
  padding: 30px 152px;
  position: relative;
}
header h1 {
  width: 150px;
  height: 17px;
  float: left;
}
header h1 a {
  display: block;
  width: 100%;
  height: 100%;
  background: url("../img/BeLAB_logo.png") no-repeat;
  background-size: contain;
  background-image: url("../img/BeLAB_logo.png");
}

/* 메인 페이지 로고는 기본 이미지 사용 */
header .header_nav {
  float: right;
  position: relative;
  text-align: right;
}
header .header_nav .header_list {
  position: relative;
}
header .header_list {
  display: inline-block;
}
header .header_list li {
  float: left;
  position: relative;
}

header .header_list li.out_link .nav_item {
  padding: 0 12px 0 24px;
}
header .header_list li.out_link a:hover i {
  display: inline-block;
  opacity: 1;
  visibility: visible;
}
header .header_list li.out_link i {
  visibility: hidden;
  display: inline-block;
  overflow: hidden;
  width: 24px;
  height: 24px;
  color: transparent;
  text-indent: -9999px;
  vertical-align: middle;
  background-image: url("../img/outlink_icon.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  transition: 0.3s;
  opacity: 0;
}
header .header_list li.active a {
  color: #bc481f;
}
header .header_list li.active a::before {
  width: 100%;
}


header .header_list .nav_item {
  padding: 0 24px;
}
header .header_list a {
  display: block;
  position: relative;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: #1e1e1e;
  transition: 0.3s;
}
header .header_list a::before {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background-color: #bc481f;
  position: absolute;
  top: auto;
  right: auto;
  bottom: -12px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  -webkit-transition: width 0.3s;
  transition: width 0.3s;
}

header .header_list a:hover {
  color: #bc481f;
}
header .header_list a:hover::before {
  width: 100%;
}

/* 관리자 로그아웃 버튼 스타일 */
header .header_list .admin_logout_btn {
  background-color: #bc481f;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  margin-left: 10px;
}

header .header_list .admin_logout_btn::before {
  display: none;
}

header .header_list .admin_logout_btn:hover {
  background-color: #9a3a18;
  color: #fff;
}

/* 모바일 헤더 관리자 로그아웃 버튼 (햄버거 버튼 왼쪽) */
header .admin_logout_btn.m_admin_logout {
  display: none;
  position: absolute;
  right: 50px;
  background-color: #bc481f;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  z-index: 10;
}

header .admin_logout_btn.m_admin_logout::before {
  display: none;
}

header .admin_logout_btn.m_admin_logout:hover {
  background-color: #9a3a18;
  color: #fff;
}
/* 메가 메뉴 */
header .header_nav .mega_menu {
  position: fixed;
  top: var(--header-h, 84px);
  left: 0;
  width: 100%;
  height: 400px;
  min-height: 200px;
  max-height: 300px;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 98;
  display: flex;
  align-items: stretch;
  padding: 40px 60px;
  box-sizing: border-box;
}

@media only screen and (min-width: 1280px) {
  header .header_wrap .box:hover .header_nav .mega_menu,
  header .header_nav:hover .mega_menu,
  header .header_nav .header_list:hover ~ .mega_menu,
  header .header_nav .mega_menu:hover {
    opacity: 1;
    visibility: visible;
  }
}

header .header_nav .mega_menu_image {
  width: 300px;
  height: 100%;
  min-height: 120px;
  background-color: #f5f5f5;
  background-image: url("../img/header_cloud_img.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-right: 40px;
  flex-shrink: 0;
}
header .header_nav .mega_menu_column {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-right: 20px;
  padding-left: 20px;
  text-align: left;
  border-right: 1px solid #e0e0e0;
  height: 100%;
  align-items: stretch;
}
header .header_nav .mega_menu_column:first-child {
  padding-left: 0;
}
header .header_nav .mega_menu_column:last-child {
  padding-right: 0;
  border-right: none;
}
header .header_nav .mega_menu_title {
  font-size: 18px;
  font-weight: 700;
  color: #1e1e1e;
  margin-bottom: 15px;
  padding-bottom: 10px;
  text-align: left;
}
header .header_nav .mega_menu_list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
header .header_nav .mega_menu_list li {
  margin-bottom: 8px;
  float: none;
  text-align: left;
}
header .header_nav .mega_menu_list li:last-child {
  margin-bottom: 0;
}
header .header_nav .mega_menu_list li a {
  font-size: 14px;
  font-weight: 400;
  color: #666;
  text-decoration: none;
  display: block;
  line-height: 1.6;
  transition: color 0.3s ease;
  text-align: left;
}
header .header_nav .mega_menu_list li a:hover {
  color: #bc481f;
}
header .header_nav .mega_menu_list li a::before {
  display: none;
}

header .m_menu {
  display: none;
  position: absolute;
  right: 0;
  background-color: transparent;
  z-index: 10;
  width: 32px;
  height: 32px;
}
header .m_menu span {
  width: 20px;
  height: 2px;
  display: block;
  background: #1e1e1e;
  position: absolute;
  top: 8px;
  left: 6px;
  -webkit-transform-origin: left center;
  -moz-transform-origin: left center;
  -o-transform-origin: left center;
  transform-origin: left center;
  -webkit-transition: 0.25s ease-in-out;
  -moz-transition: 0.25s ease-in-out;
  -o-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
}
header .m_menu span:nth-child(2) {
  top: 15px;
  -webkit-transform-origin: left center;
  -moz-transform-origin: left center;
  -o-transform-origin: left center;
  transform-origin: left center;
}
header .m_menu span:nth-child(3) {
  top: auto;
  bottom: 8px;
  -webkit-transform-origin: left center;
  -moz-transform-origin: left center;
  -o-transform-origin: left center;
  transform-origin: left center;
}
header .m_menu.active span:nth-child(1) {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
  left: 8px;
}
header .m_menu.active span:nth-child(2) {
  opacity: 0;
  width: 0;
}
header .m_menu.active span:nth-child(3) {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
  left: 8px;
}
header .m-nav {
  position: fixed;
  padding: 0 90px;
  width: 100%;
  height: 100%;
  background: #fff;
  top: 0;
  right: -100%;
  z-index: 100;
  transition: ease 0.4s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
header .m-nav .top {
  display: flex;
  justify-content: space-between;
  padding: 21px 0;
  position: relative;
  flex-shrink: 0;
}
header .m-nav .logo {
  overflow: hidden;
  width: 100px;
  height: 17px;
  background: url("../img/BeLAB_logo.png") no-repeat;
  background-size: contain;
  color: transparent;
  text-indent: -9999px;
}
header .m-nav .close-btn {
  width: 32px;
  height: 32px;
  position: absolute;
  top: 20px;
  right: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  background-image: url("../img/button/close_btn.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: transparent;
  display: block;
  z-index: 12;
  cursor: pointer;
}
header .m-nav ul {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
header .m-nav li {
  float: none;
  padding: 0;
}
header .m-nav li.active a::before {
  display: none;
}
header .m-nav li.active a:hover {
  color: #bc481f;
}
header .m-nav li.out_link div {
  padding: 18px 0;
}
header .m-nav li.out_link i {
  visibility: visible;
  display: inline-block;
  position: absolute;
  right: 0;
  width: 24px;
  height: 24px;
  background: url("../img/button/mo_outlink_icon.png") no-repeat center;
  background-size: cover;
  opacity: 1;
}
header .m-nav li div {
  padding: 18px 0;
  text-align: left;
  border-bottom: 1px solid #eee;
}
header .m-nav li a {
  display: block;
  position: relative;
  font-size: 20px;
  font-weight: 700;
  color: #bc481f;
}
header .m-nav li a:hover {
  color: #1e1e1e;
}
header .m-nav li .mo_submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 20px;
  margin-top: 10px;
  display: block;
  text-align: left;
}
header .m-nav li .mo_submenu li {
  margin-bottom: 8px;
  float: none;
  text-align: left;
}
header .m-nav li .mo_submenu li:last-child {
  margin-bottom: 0;
}
header .m-nav li .mo_submenu li a {
  font-size: 15px;
  font-weight: 400;
  color: #666;
  text-decoration: none;
  display: block;
  line-height: 1.6;
  transition: color 0.3s ease;
  text-align: left;
}
header .m-nav li .mo_submenu li a:hover {
  color: #bc481f;
}
header .m-nav.active {
  right: 0;
}
.main_wrap header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: transparent;
  transition: 0.3s;
}
.main_wrap header .header_wrap {
  padding: 29px 152px;
  position: relative;
  transition: 0.3s;
}
.main_wrap header h1 a {
  background-image: url("../img/main_logo_w.svg");
}

@media only screen and (max-width: 1600px) {
  header .header_wrap .box {
    max-width: 1476px;
    margin: 0 auto;
    padding: 30px 90px;
  }
  .main_wrap header .header_wrap {
    max-width: 1476px;
    margin: 0 auto;
    padding: 29px 90px;
  }
}
@media only screen and (max-width: 1596px) {
  header .header_wrap .box {
    margin: 0 auto;
    padding: 30px 90px;
    max-width: 1476px;
  }
}
@media only screen and (max-width: 1280px) {
  body.main-page header .header_wrap{
    background-color: #fff;
    height: auto;
  }

  .main_wrap header .header_wrap {
    padding: 22px 90px;
  }
  header .header_list {
    display: none;
  }
  header .header_nav .mega_menu {
    display: none !important;
  }
  header .m_menu {
    display: block;
  }
  header .admin_logout_btn.m_admin_logout {
    display: inline-block;
  }
}
@media only screen and (max-width: 1024px) {
  header .header_wrap .box {
    padding: 22px 30px;
  }
  .main_wrap header .header_wrap {
    padding: 22px 30px;
  }
}
@media only screen and (max-width: 767px) {
  header .header_wrap .box {
    padding: 22px 24px;
  }
  header .header_wrap .m-nav {
    padding: 0 24px;
  }
  header .admin_logout_btn.m_admin_logout {
    display: inline-block;
    right: 50px;
  }
}

