/* 헤더 기본 구조 */
.header {
  position: fixed;
  top: 38px;
  left: 0;
  width: 100%;
  height: 96px;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
  z-index: 9998;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 5px 16px 10px;
  transition: top 0.3s ease;
}

.header-container {
  width: 100%;
  min-width: auto;
  height: 48px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1000002;
}

/* 햄버거 버튼 */
.hamburger-button {
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-hamburger {
  display: block;
  width: 24px;
  height: 24px;
  background: url(/css/images/new/main/hamburger.svg) no-repeat center;
  background-size: contain;
}

/* 브랜드 로고 영역 */
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
  gap: 4px;
}

.brand-logo img {
  width: 100%;
}


.brand-logo .icon-arrow {
  display: block;
  width: 8px;
  height: 4px;
  -webkit-mask: url(/css/images/new/main/arrow_icon.svg) no-repeat center;
  mask: url(/css/images/new/main/arrow_icon.svg) no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  background-color: #000;
  transition: transform 0.2s ease;
}

/* 우측 네비게이션 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.my-contents-icon-wrapper {
  width: 24px;
}

.my-contents-icon {
  display: flex;
  align-items: center;
}

.icon-my-contents {
  width: 24px;
  height: 24px;
  background: url(/css/images/new/lnb/my-contents-icon.svg) no-repeat center;
  background-size: contain;
}

/* 유저 아이콘 */
.user-icon {
  width: 24px;
  height: 24px;
  display: block;
  background: url(/css/images/new/main/user_icon.svg) no-repeat center;
  background-size: contain;
}

/* 장바구니 아이콘 */
.cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  position: relative;
  transition: all 0.2s;
}

.icon-cart {
  display: block;
  width: 24px;
  height: 24px;
  background: url(/css/images/new/main/shopping_cart.svg) no-repeat center;
  background-size: contain;
}

.cart-icon:hover {
  opacity: 0.8;
}

/* 검색 영역 */
.search-container {
  position: relative;
  width: 100%;
  height: 40px;
  display: block;
  background: none;
  margin-top: 8px;
  z-index: 1000001;
}

.search-box {
  position: relative;
  width: 100%;
  height: 100%;
}

.search-box input {
  width: 100%;
  height: 100%;
  padding: 0 16px 0 40px;
  font-size: 14px;
  border-radius: 20px;
  background: #f5f5f5;
  transition: all 0.2s ease;
  border: none;
}

.search-box input:focus {
  background: #f5f5f5;
  outline: none;
  border: 1px #03aea0 solid;
}

.search-button {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-search {
  display: block;
  width: 20px;
  height: 20px;
  background: url(/css/images/new/main/search_icon.svg) no-repeat center;
  background-size: contain;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.search-button:hover .icon-search {
  opacity: 1;
}

.close-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #888;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.close-button:hover {
  color: #333;
}

/* 검색 결과 영역 */
.box_recomd {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-top: 8px;
  z-index: 1000;
  font-weight: 700;
  line-height: 1.4;
}

.recomd_list {
  padding: 0;
  margin: 0;
}

.recomd_list li {
  padding: 14px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recomd_list li:hover {
  background: rgba(1, 162, 138, 0.05);
}

.recomd_list a {
  display: block;
  color: #333;
  font-size: 14px;
}

.recomd_list li a p{
  margin: 0;
}

.no_cont {
  padding: 16px;
  text-align: center;
  color: #666;
}

.keysel {
  color: #00afa0;
  font-weight: bold;
}

/* 브랜드 드롭다운 */
.brand-dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000002;
  width: 75px;
}

.brand-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 5px;
  z-index: 999999;
}

.brand-dropdown-content a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0px 16px;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 700;
}

.brand-dropdown-content a:hover {
  background: rgba(1, 162, 138, 0.05);
  color: #00afa0;
}

.brand-dropdown-content.show-dropdown {
  display: block;
}

/* 모바일 메뉴 패널 - 햄버거 버튼 클릭시 나오는 영역*/
.mobile-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background: #f8f8f8;
  z-index: 1000000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  padding-right: 0;
  overflow-y: auto;
}

.mobile-menu-panel.active {
  transform: translateX(0);
}

.menu-container {
  display: flex;
  height: 100%;
}

.main-menu-list {
  width: 120px;
  background: #f8f8f8;
  padding: 0;
}

.main-menu-list > div,
.main-menu-list > a > div {
  padding: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #434343;
  cursor: pointer;
  transition: all 0.2s ease;
}

.main-menu-list > div.active,
.main-menu-list > a > div.active {
  background-color: #fff;
  color: #01a28a;
  position: relative;
}

.main-menu-list > div.curr,
.main-menu-list > a > div.curr {
  color: #01a28a;
}

.sub-menu-container {
  flex: 1;
  background: #fff;
  overflow-y: auto;
  padding: 16px 0 172px;
}

.sub-menu .menu-title {
  padding: 16px 16px 12px;
  font-size: 13px;
  font-weight: 700;
}

.sub-menu .menu-title .lecture-menu-title{
  padding: 0 16px 12px;
  font-size: 13px;
  font-weight: 700;
}

.sub-menu li a {
  padding: 12px 16px;
  font-size: 12px;
  display: block;
  text-decoration: none;
}

.sub-menu li a:hover {
  background: rgba(1, 162, 138, 0.05);
  color: #01a28a;
}

.divider {
  height: 1px;
  width: 90%;
  background-color: #E3E3E3;
  margin: 10px auto;
}

/* 모바일 메뉴 오버레이 */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999999;
  display: none;
}

.mobile-menu-overlay.active {
  display: block;
}

/* 유저 패널 - 유저 아이콘 클릭 시 나오는 영역 */
.user-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background: #fff;
  z-index: 1000000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -2px 0 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.user-panel.login {
  background-color: #f8f8f8;
}

.user-panel.active {
  transform: translateX(0);
}

.user-panel-close-wrapper {
  background-color: #fff;
  padding: 0;
  display: flex;
}

.user-panel-close {
  position: relative;
  width: 48px;
  height: 48px;
  background-color: #fff;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}


.user-panel.login .user-panel-close-wrapper, .user-panel.login .user-panel-close {
  background-color: #f8f8f8;
}

.user-panel-close .icon-close {
  display: block;
  width: 15px;
  height: 15px;
  background: url(/css/images/new/main/cancle_icon.svg) no-repeat center;
  background-size: contain;
}

.user-panel.login .user-top {
  padding: 20px 16px;
}

.user-top {
  position: relative;
  background-color: #fff;
  color: #434343;
  padding: 0 16px;
}

.user-top .user-title {
  font-size: 18px;
  font-weight: 700;
}

.user-top .user-desc {
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.user-top .user-login {
  width: 95%;
  margin: auto;
}

.user-top .user-login a {
  background: #01A28A;
  color: #fff;
  border-radius: 4px;
  display: inline-block;
  min-height: 20px;
  padding: 12px;
  justify-content: center;
  font-size: 14px;
  width: 100%;
  text-align: center;
  font-weight: 700;
}

.user-info-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info-top p {
  font-size: 13px;
  margin: 0;
  line-height: 1;
}

.user-info-top span {
  font-weight: 400;
  font-size: 16px;
}

.user-email {
  font-size: 13px;
}

.user-panel-list {
  padding: 10px 0;
  margin: 0;
  background-color: #fff;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.user-panel.login .user-panel-list, .user-panel.login .user-panel-list > li {
  background-color: #f8f8f8;
}

.user-panel-list > li {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.user-panel-list > li:last-child {
  border-bottom: none;
}

.user-panel-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #434343;
  text-decoration: none;
  transition: all 0.2s;
}

.user-panel-list a:hover {
  background: rgba(1, 162, 138, 0.05);
  color: #01a28a;
}

.arrow-right {
  color: #a9a9a9;
  font-size: 12px;
}

/* 유저 패널 오버레이 */
.user-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999999;
  display: none;
}

.user-panel-overlay.active {
  display: block;
}

/* 띠 배너 영역 */
.bar-banner {
  width: 100%;
  height: 42px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  transition: transform 0.3s ease;
}

.banner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.banner-link {
  text-decoration: none;
}

.banner-text {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.banner-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 5px 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-close {
  font-size: 16px;
  color: #fff;
}

/* 스크롤 시 배너 숨김 */
.bar-banner.hide {
  transform: translateY(-100%);
}

/* 스크롤 시 헤더 위치 조정 */
.header.scroll-up {
  top: 38px;
}

.header.scroll-down {
  top: 0;
}

/* 배너가 없을 때 */
.header.no-banner {
  top: 0;
}
