/* 
 * JumClass Student Design System - Header Component
 * 학생용 디자인 시스템 헤더 컴포넌트
 * 피그마 디자인 기반 구현
 */

/* ===== CSS 변수 ===== */
:root {
  --black: #000;
  --white: #fff;
  --background_2: #292929;
  --purple-primary: #802fff;
  --purple-secondary: #6b21a8;
  --gray-dark: #1a1a1a;
  --gray-medium: #292929;
  --gray-light: #404040;
}

/* ===== Box-sizing 설정 ===== */
#wrapper.student-new #header,
#wrapper.student-new #header * {
  box-sizing: border-box;
}

/* ===== 헤더 전체 ===== */
#wrapper.student-new #header {
  width: 100%;
  background: var(--black);
  position: relative;
  z-index: 1000;
  height: 132px;
  /* 피그마 디자인: 52px + 80px */
  border-bottom: none !important; /* 밑줄 제거 */
  display: flex;
  flex-direction: column;
  margin-bottom: 0 !important; /* 배너와 바로 붙이기 */
  padding-bottom: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* ===== 상단바 (52px) ===== */
#wrapper.student-new .header-top-bar {
  height: 52px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: none;
}

/* header-top-bar 내부 wrapper */
#wrapper.student-new .header-top-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
}

/* 좌측 브랜드 영역 */
#wrapper.student-new .header-top-brands {
  display: flex;
  align-items: center;
  gap: 20px;
}

#wrapper.student-new .header-brand-item {
  color: var(--white);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 140% !important;
  letter-spacing: -0.42px !important;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
  cursor: default;
}

#wrapper.student-new .header-brand-item:hover {
  opacity: 0.9;
  color: var(--purple-primary);
  transition: opacity 0.6s ease;
}

#wrapper.student-new .header-brand-item.inactive {
  opacity: 0.6;
  transition: opacity 0.6s ease;
}

/* 우측 유틸리티 메뉴 */
#wrapper.student-new .header-top-utils {
  display: flex;
  align-items: center;
  gap: 24px;
}

#wrapper.student-new .header-util-item {
  color: var(--white);
  font-family: Pretendard !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 140% !important;
  letter-spacing: -0.39px !important;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0px;
  border-radius: 4px;
}

#wrapper.student-new .header-util-item:hover {
  /* background-color: rgba(255, 255, 255, 0.1); */
  color: var(--purple-primary);
}

/* 사용자 메뉴 */
#wrapper.student-new .header-user-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

#wrapper.student-new .header-user-name {
  /* color: var(--white); */
  font-family: Pretendard;
  font-size: 13px;
  font-weight: 700;
  line-height: 140%;
  letter-spacing: -0.39px;
}

#wrapper.student-new .header-user-menu:hover {
  color: var(--purple-primary);
}

#wrapper.student-new .header-user-menu:hover .header-user-dropdown-icon path {
  stroke: var(--purple-primary);
}

#wrapper.student-new .header-user-dropdown-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

#wrapper.student-new .header-user-dropdown-icon path {
  transition: stroke 0.2s ease;
}

#wrapper.student-new .header-user-menu.active .header-user-dropdown-icon {
  transform: rotate(180deg);
}

/* ===== 메인 네비게이션 바 (80px) ===== */
#wrapper.student-new .header-main-nav {
  height: 80px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  margin: 0 !important;
  padding-bottom: 0 !important;
}

/* 메인 네비게이션 wrapper - 최대 너비 1180px */
#wrapper.student-new .header-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1180px;
  padding: 0;
  margin: 0 auto;
  position: relative;
}

/* 왼쪽 영역: 햄버거 + 로고 + 메인메뉴 */
#wrapper.student-new .header-main-nav-left {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

/* 오른쪽 영역: 검색창 */
#wrapper.student-new .header-main-nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* 햄버거 메뉴 버튼 (좌측) */
#wrapper.student-new .header-hamburger-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  border-radius: 4px;
  flex-shrink: 0;
}

#wrapper.student-new .header-hamburger-menu:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#wrapper.student-new .header-hamburger-menu svg {
  width: 100%;
  height: 100%;
}

/* 로고 */
#wrapper.student-new .header-logo {
  display: flex;
  align-items: center;
  width: 189px;
  height: 35px;
  margin: 0;
  flex-shrink: 0;
}

#wrapper.student-new .header-logo a {
  display: block;
  width: 189px;
  height: 35px;
  transition: opacity 0.2s ease;
}

#wrapper.student-new .header-logo a:hover {
  opacity: 0.8;
}

#wrapper.student-new .header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 메인 메뉴 (중앙) */
#wrapper.student-new .header-main-menu {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 40px !important;
  margin-left: 48px; /* 로고에서 메뉴까지의 간격 조정 */
  min-width: 0;
  white-space: nowrap;
}

#wrapper.student-new .header-menu-item {
  display: inline-block !important;
  color: var(--white);
  font-family: Pretendard;
  font-size: 18px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 700;
  line-height: 140%;
  letter-spacing: -0.09px;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 8px 0 !important; /* 좌우 패딩 제거 */
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

#wrapper.student-new .header-menu-item:hover {
  color: var(--purple-primary);
  /* background-color: rgba(255, 255, 255, 0.05); */ /* 음영 제거 */
  padding: 8px 12px !important; /* hover 시 패딩 복원 */
}

/* 메뉴 드롭다운 컨테이너 */
#wrapper.student-new .header-menu-dropdown {
  position: relative;
  display: inline-block !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 메뉴와 서브메뉴 사이의 연결 영역 */
#wrapper.student-new .header-menu-dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 207px;
  height: 20px;
  z-index: 999;
}

/* 검색 영역 (우측) */
#wrapper.student-new .header-search {
  position: relative;
}

#wrapper.student-new .header-search-container {
  display: flex;
  width: 341px;
  height: 40px;
  padding: 10px 20px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 400px;
  background: var(--background_2);
  position: relative;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

#wrapper.student-new .header-search-container:hover {
  background: var(--gray-light);
  border-color: rgba(255, 255, 255, 0.2);
}

#wrapper.student-new .header-search-container.active {
  background: var(--gray-light);
  border-color: var(--purple-primary);
  position: relative;
}

#wrapper.student-new .header-search-input {
  flex: 1 0 0;
  color: var(--white);
  font-family: Pretendard;
  font-size: 14px;
  font-weight: 700;
  line-height: 140%;
  letter-spacing: -0.42px;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 35px 0 12px;
  transition: padding-left 0.2s ease;
}

/* 검색창 활성화 시 input 왼쪽 패딩 증가 - 막대 옆에서 시작 */
#wrapper.student-new .header-search-container.active .header-search-input {
  padding: 0 35px 0 12px;
}

#wrapper.student-new .header-search-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

#wrapper.student-new .header-search-input::placeholder {
  color: var(--white);
  opacity: 0.7;
}

/* 비활성화 상태에서도 placeholder 위치 유지 */
#wrapper.student-new
  .header-search-container:not(.active)
  .header-search-input::placeholder {
  text-indent: 0;
}

#wrapper.student-new .header-search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

#wrapper.student-new .header-search-icon:hover {
  color: var(--purple-primary);
  transform: translateY(-50%) scale(1.1);
}

/* ===== 드롭다운 메뉴 ===== */
#wrapper.student-new .header-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--gray-medium);
  /* 어두운 회색 배경으로 변경 */
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
  min-width: 160px;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: -1;
  margin-top: 8px;
  border: none;
  /* 테두리 제거 */
  display: none !important; /* 기본적으로 완전히 숨김 */
}

#wrapper.student-new .header-dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
  z-index: 10001 !important; /* z-index를 높여서 다른 요소들보다 위에 표시 */
}

#wrapper.student-new .header-dropdown-item {
  display: block;
  padding: 12px 16px;
  color: var(--white);
  /* 흰색 텍스트로 변경 */
  font-family: Pretendard;
  font-size: 14px;
  font-weight: 600;
  line-height: 140%;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 0;
  margin: 0 8px;
  border-radius: 4px;
}

/* 첫 번째 메뉴 항목의 기본 스타일 제거 - active 클래스로만 하이라이트 표시 */

#wrapper.student-new .header-dropdown-item:last-child {
  border-radius: 4px;
}

#wrapper.student-new .header-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--purple-primary);
}

/* 활성화된 메뉴 아이템 스타일 */
#wrapper.student-new .header-dropdown-item.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--purple-primary);
  font-weight: 700;
}

#wrapper.student-new .header-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  /* 밝은 구분선으로 변경 */
  margin: 8px 16px;
}

#wrapper.student-new .header-dropdown-item.admin-item {
  background: transparent;
  /* 관리자 아이템은 기본 배경 */
  color: var(--white);
  font-weight: 600;
}

#wrapper.student-new .header-dropdown-item.admin-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--purple-primary);
}

/* ===== 메가메뉴 스타일 ===== */
#wrapper.student-new .header-mega-menu {
  position: absolute;
  top: calc(100% + 20px); /* header-top-bar 높이(52px) 더하기 */
  left: 50%;
  transform: translateX(-50%);
  width: 180px; /* 태블릿 스타일처럼 너비 축소 */
  background: var(--background_2);
  border-radius: 8px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* CSS hover 효과로 메가메뉴 표시 */
#wrapper.student-new .header-menu-dropdown:hover .header-mega-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

#wrapper.student-new .mega-menu-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 20px; /* 패딩 축소 */
  gap: 10px; /* 간격 축소 */
}

#wrapper.student-new .mega-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 0; /* 패딩 축소 */
  color: var(--white);
  font-family: Pretendard;
  font-size: 13px; /* 폰트 크기 축소 */
  font-weight: 500;
  line-height: 140%;
  letter-spacing: -0.42px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

/* SVG 화살표 추가 */
#wrapper.student-new .mega-menu-item::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.54297 14.75L13.293 10L8.54297 5.25" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: all 0.2s ease;
}

#wrapper.student-new .mega-menu-item:hover {
  color: var(--purple-primary);
}

#wrapper.student-new .mega-menu-item:hover::after {
  background-image: url('data:image/svg+xml;utf8,<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.54297 14.75L13.293 10L8.54297 5.25" stroke="%23A166FF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

#wrapper.student-new .mega-menu-text {
  display: inline-block;
}

/* ===== 검색 드롭다운 ===== */
#wrapper.student-new .header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  background: var(--background_2);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 10000; /* 배너보다 앞에 나오도록 높은 값 설정 */
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
}

#wrapper.student-new .header-search-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#wrapper.student-new .header-search-suggestion {
  display: block;
  padding: 16px 20px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-family: Pretendard;
  font-size: 16px;
  font-weight: 500;
  line-height: 140%;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
  text-decoration: none;
}

#wrapper.student-new .header-search-suggestion:last-child {
  margin-bottom: 0;
}

#wrapper.student-new .header-search-suggestion:hover {
  background-color: rgba(128, 47, 255, 0.1);
  color: var(--purple-primary);
}

/* 검색어 하이라이트 */
#wrapper.student-new .header-search-suggestion .highlight {
  color: var(--purple-primary);
  font-weight: 700;
}

/* ===== 모바일 메뉴 / 데스크탑 풀다운 메뉴 ===== */
#wrapper.student-new #m-gnb-wrap {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
}

#wrapper.student-new #m-gnb-wrap.show {
  display: block;
}

#wrapper.student-new #m-gnb-wrap .m-gnb-inner {
  position: absolute;
  top: 0;
  right: -100%;
  padding: 85px 0 0;
  width: 80%;
  max-width: 500px;
  height: 100%;
  background: var(--white);
  transition: right 0.3s ease;
}

#wrapper.student-new #m-gnb-wrap.show .m-gnb-inner {
  right: 0;
}

/* 데스크탑 풀다운 메뉴 스타일 */
@media (min-width: 1025px) {
  #wrapper.student-new #m-gnb-wrap {
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    top: 132px;
    left: 0;
    right: 0;
    height: 0;
    background: var(--background_2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 999;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #wrapper.student-new #m-gnb-wrap.show {
    display: block; /* show 클래스가 있으면 표시 */
    height: auto;
    overflow: visible; /* 내용이 보이도록 */
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb-inner {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px;
    height: auto;
    background: transparent;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
  }

  #wrapper.student-new #m-gnb-wrap.show .m-gnb-inner {
    opacity: 1;
    transform: translateY(0);
  }

  /* 데스크탑 메뉴 그리드 레이아웃 */
  #wrapper.student-new #m-gnb-wrap .m-gnb {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 {
    width: 100%;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 > a {
    display: block;
    padding: 0 0 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    line-height: 140%;
    letter-spacing: -0.54px;
    transition: all 0.2s ease;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 > a:hover {
    color: var(--purple-primary);
    border-color: var(--purple-primary);
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 {
    display: block !important;
    padding: 16px 0 0;
    border: none;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: -0.42px;
    transition: all 0.2s ease;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a:hover {
    color: var(--purple-primary);
  }

  /* 데스크탑에서 화살표 아이콘 추가 */
  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.54297 14.75L13.293 10L8.54297 5.25" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.6;
    transition: all 0.2s ease;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a:hover::after {
    opacity: 1;
    background-image: url('data:image/svg+xml;utf8,<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.54297 14.75L13.293 10L8.54297 5.25" stroke="%23A166FF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  }

  /* 데스크탑에서 사용자 메뉴와 로그인 유틸 숨김 */
  #wrapper.student-new #m-gnb-wrap .m-user-menu,
  #wrapper.student-new #m-gnb-wrap .login-utils {
    display: none;
  }

  /* 스크롤 시 위치 조정 */
  #wrapper.student-new #header.fixed ~ #m-gnb-wrap {
    top: 60px;
  }
}

/* 스크롤 시 풀다운 메뉴도 함께 고정 */
#wrapper.student-new #header.fixed + #m-gnb-wrap {
  position: fixed;
  top: 60px;
}

/* ===== 모바일 헤더 스타일 ===== */
/* 기본값: 모바일 헤더 숨김 (데스크톱) */
#wrapper.student-new .mobile-header {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #000000;
  border-bottom: 1px solid #333333;
  height: 60px;
}

#wrapper.student-new .mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 100%;
}

#wrapper.student-new .mobile-header-left {
  display: flex;
  align-items: center;
}

#wrapper.student-new .mobile-logo {
  margin: 0;
}

#wrapper.student-new .mobile-logo a {
  display: flex;
  align-items: center;
  height: 28px;
}

#wrapper.student-new .mobile-logo img {
  height: 28px;
  width: auto;
}

#wrapper.student-new .mobile-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

#wrapper.student-new .mobile-header-link {
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
  text-decoration: none;
  white-space: nowrap;
}

#wrapper.student-new .mobile-header-username {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 140%;
  white-space: nowrap;
}

#wrapper.student-new .mobile-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
}

#wrapper.student-new .mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
  transition: all 0.3s ease;
}

#wrapper.student-new .mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== 모바일 마이페이지 전용 헤더 ===== */
#wrapper.student-new .mobile-header-mypage {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #000000;
  z-index: 1001;
}

/* 마이페이지에서만 마이페이지 헤더 표시 */
@media (max-width: 768px) {
  body.mypage-page #wrapper.student-new .mobile-header-mypage {
    display: block;
  }

  /* 마이페이지에서는 일반 모바일 헤더 숨김 */
  body.mypage-page
    #wrapper.student-new
    .jumclass-mobile-header:not(.mobile-header-mypage) {
    display: none;
  }
}

#wrapper.student-new .mobile-header-mypage .mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0;
}

#wrapper.student-new .mobile-header-mypage .mobile-back-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

#wrapper.student-new .mobile-header-mypage .mobile-header-title {
  flex: 1;
  text-align: center;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0;
}

#wrapper.student-new .mobile-header-mypage .mobile-header-spacer {
  width: 56px;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 1200px) {
  #wrapper.student-new .header-top-wrapper,
  #wrapper.student-new .header-nav-wrapper {
    padding: 0 20px;
  }
}

@media (max-width: 1024px) {
  /* 헤더 중앙 영역 레이아웃 조정 */
  #wrapper.student-new .header-main-nav-center {
    flex: 1;
    min-width: 0; /* flex-shrink가 작동하도록 */
  }

  #wrapper.student-new .header-main-menu {
    /* 태블릿에서도 가로 유지하면서 스크롤 가능하게 */
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    max-width: calc(100vw - 450px); /* 로고(189px) + 검색(280px) + 여백 고려 */
    gap: 20px; /* 간격 축소 */
    padding: 0 10px; /* 좌우 패딩 추가 */
  }

  #wrapper.student-new .header-main-menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  /* 메뉴 아이템 크기 조정 */
  #wrapper.student-new .header-menu-link {
    font-size: 14px; /* 폰트 크기 축소 */
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
  }

  /* 태블릿에서는 메가메뉴도 숨김 */
  #wrapper.student-new .header-mega-menu {
    display: none !important;
  }

  #wrapper.student-new .header-search-container {
    width: 240px; /* 검색창 너비 축소 */
  }

  #wrapper.student-new .header-hamburger-menu {
    display: flex;
  }

  /* 로고 크기 조정 */
  #wrapper.student-new .header-logo {
    width: 160px;
  }

  #wrapper.student-new .header-logo a {
    width: 160px;
  }
}

@media (max-width: 768px) {
  /* 모바일에서는 데스크탑 헤더 숨김 */
  #wrapper.student-new #header {
    display: none !important;
  }

  /* 모바일에서 모바일 헤더 표시 */
  #wrapper.student-new .mobile-header {
    display: block !important;
  }

  /* 상단바 숨김 */
  #wrapper.student-new .header-top-bar {
    display: none;
  }

  /* 메인 네비게이션 숨김 */
  #wrapper.student-new .header-main-nav {
    display: none;
  }

  #wrapper.student-new .header-nav-wrapper {
    display: none;
  }

  /* 모바일 햄버거 메뉴 스타일 */
  #wrapper.student-new .header-hamburger-menu {
    padding: 5px;
    margin-right: 10px;
  }

  /* 모바일 로고 조정 */
  #wrapper.student-new .header-logo {
    flex: 0 0 auto;
  }

  #wrapper.student-new .header-logo img {
    height: 24px;
    width: auto;
  }

  /* 모바일 메인 메뉴 조정 */
  #wrapper.student-new .header-main-nav-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* 모바일 검색창 */
  #wrapper.student-new .header-main-nav-right {
    flex: 0 0 auto;
  }

  #wrapper.student-new .header-search-container {
    width: 180px;
    height: 36px;
  }

  #wrapper.student-new .header-search-input {
    font-size: 12px;
    height: 36px;
    padding: 0 35px 0 12px;
  }

  #wrapper.student-new .header-search-icon {
    width: 16px;
    height: 16px;
    right: 10px;
  }

  /* 마이페이지가 아닌 일반 페이지의 컨텐츠 여백 */
  #wrapper.student-new:not(.mypage-page) {
    padding-top: 10px; /* 모바일 헤더 높이 */
  }

  /* 모바일에서 메인 컨텐츠 상단 여백 조정 */
  #wrapper.student-new #contents,
  #wrapper.student-new main {
    padding-top: 0;
  }

  /* 마이페이지인 경우 추가 조정 */
  #wrapper.student-new.mypage-page #contents {
    padding-top: 0;
  }

  /* 모바일 메인 메뉴 숨김 */
  #wrapper.student-new .header-main-menu {
    display: none !important;
  }

  #wrapper.student-new .header-logo a {
    width: 140px;
    height: 28px;
  }

  #wrapper.student-new .header-top-utils {
    gap: 16px;
  }

  #wrapper.student-new .header-util-item {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  #wrapper.student-new .header-search-container {
    width: 200px;
  }

  #wrapper.student-new .header-top-brands {
    gap: 12px;
  }

  #wrapper.student-new .header-brand-item {
    font-size: 12px;
  }
}

/* ===== 모든 해상도에서 m-gnb-wrap 기본 스타일 ===== */
#m-gnb-wrap {
  display: none !important;
}

#m-gnb-wrap.show {
  display: block !important;
}

/* ===== 태블릿 m-gnb-wrap 스타일 ===== */
@media (min-width: 768px) and (max-width: 1024px) {
  /* 데스크톱과 완전히 동일한 스타일 적용 */
  #wrapper.student-new #m-gnb-wrap {
    position: fixed;
    top: 132px;
    left: 0;
    right: 0;
    background: #1a1a1a !important; /* 명확한 검은 배경 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 999;
    overflow: hidden;
    display: none !important;
  }

  #wrapper.student-new #m-gnb-wrap.show {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    min-height: 400px !important; /* 최소 높이 보장 */
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb-inner {
    position: relative;
    top: 0;
    right: 0 !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 40px 30px;
    height: auto;
    background: #1a1a1a; /* 배경색 추가 */
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
  }

  #wrapper.student-new #m-gnb-wrap.show .m-gnb-inner {
    opacity: 1;
    transform: translateY(0);
  }

  /* 메뉴 그리드 레이아웃 - 태블릿용 조정 */
  #wrapper.student-new #m-gnb-wrap .m-gnb {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 태블릿에서는 3열로 */
    gap: 30px;
    max-height: none !important;
    overflow: visible !important;
    padding: 0;
    border: none !important;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 {
    width: 100%;
  }

  /* 1차 메뉴 스타일 - 데스크톱과 완전히 동일 */
  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 > a {
    display: block;
    padding: 0 0 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--white, #fff);
    font-size: 18px;
    font-weight: 700;
    line-height: 140%;
    letter-spacing: -0.54px;
    transition: all 0.2s ease;
    background: transparent;
    text-align: left;
    box-shadow: none;
    border-radius: 0;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 > a:hover {
    color: var(--purple-primary, #802fff);
    border-color: var(--purple-primary, #802fff);
    background: transparent;
    transform: none;
    box-shadow: none;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 > a::before,
  #wrapper.student-new #m-gnb-wrap .m-gnb .depth01 > a::after {
    display: none;
  }

  /* 2차 메뉴 스타일 - 데스크톱과 동일 */
  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 {
    display: block !important;
    padding: 16px 0 0;
    border: none;
    margin-top: 0;
    background: transparent;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: -0.42px;
    transition: all 0.2s ease;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    text-align: left;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a:hover {
    color: var(--purple-primary, #802fff);
    background: transparent;
    transform: none;
  }

  /* 데스크탑과 동일한 화살표 아이콘 */
  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.54297 14.75L13.293 10L8.54297 5.25" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.6;
    transition: opacity 0.2s ease;
  }

  #wrapper.student-new #m-gnb-wrap .m-gnb .depth02 a:hover::after {
    opacity: 1;
  }

  /* 모바일 전용 요소 숨기기 */
  #wrapper.student-new #m-gnb-wrap .m-user-menu,
  #wrapper.student-new #m-gnb-wrap .login-utils,
  #wrapper.student-new #m-gnb-wrap .m-header-utils {
    display: none !important;
  }

  /* 스크롤 시 위치 조정 - 데스크톱과 동일 */
  #wrapper.student-new.header-fixed #m-gnb-wrap {
    top: 60px;
  }
}

/* ===== 헤더 고정 효과 ===== */
#wrapper.student-new #header.fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 60px !important;
  z-index: 1001 !important;
}

#wrapper.student-new #header.fixed .header-top-bar {
  display: none;
}

#wrapper.student-new #header.fixed .header-main-nav {
  position: relative;
  top: 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  background: var(--black);
}

/* 스크롤 시 body padding 추가 (헤더 높이만큼) */
body.header-fixed {
  padding-top: 132px; /* 원래 헤더 높이 */
}

@media (max-width: 768px) {
  body.header-fixed {
    padding-top: 60px; /* 모바일 헤더 높이 */
  }

  #wrapper.student-new #header.fixed {
    height: 60px !important;
  }
}

/* 스크롤 시 메뉴 아이템 크기 조정 */
#wrapper.student-new #header.fixed .header-menu-item {
  /* font-size: 16px; 폰트 크기 변경 안함 */
  /* padding: 6px 10px; 패딩 간격 변경 안함 */
}

#wrapper.student-new #header.fixed .header-logo {
  /* height: 28px; 로고 크기 변경 안함 */
}

#wrapper.student-new #header.fixed .header-logo a {
  /* height: 28px; 로고 크기 변경 안함 */
}

#wrapper.student-new #header.fixed .header-search-container {
  /* height: 36px; 검색창 높이 변경 안함 */
  /* padding: 8px 16px; 검색창 패딩 변경 안함 */
}

/* ===== 기존 wrapper 스타일 오버라이드 ===== */
#wrapper.student-new {
  padding-top: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
}

/* 2025.10.19  */
@media (max-width: 1180px) {
  /* 모바일 햄버거 메뉴 스타일 수정 */
  #wrapper.student-new .mobile-menu-btn {
    width: 28px;
    height: 28px;
  }

  /* 모바일 햄버거 메뉴 위치 조정을 위한 inner padding 값 수정 */
  #wrapper.student-new .mobile-header-inner {
    padding-left: 17px !important;
    padding-right: 12.5px !important;
  }

  /* 햄버거 메뉴 피그마 스타일에 맞춰 수정 */
  #wrapper.student-new .mobile-menu-btn span {
    border-radius: 0px;
    height: 1.7px;
    gap: 6px;
  }

  /* 강사신청/문의, 로그인 텍스트 폰트 두께 수정 */
  #wrapper.student-new .mobile-header-link {
    font-weight: 700;
  }

  /* 클래스 메뉴 배경색, 방향, 간격 수정 */
  #wrapper.student-new .mobile-menu-container .class-submenu {
    background: #000 !important;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 450px) {
  /* PRIME MUSE, ERANDE wrap 여백 수정, 첫 메뉴 시작점과 간격 조절 */
  .mobile-menu-header {
    padding: 20px 12.5px 20px 20px !important;
    margin-bottom: 8px !important;
  }

  .mobile-menu-container {
    padding-top: 0px !important;
  }

  /* 강사신청/문의, 로그인, 햄버거 메뉴 간격 수정 */
  .jumclass-mobile-header .mobile-header-actions {
    gap: 12px;
  }

  /* 강사신청/문의, 로그인 텍스트 크기 수정 */
  #wrapper.student-new .mobile-header-link {
    font-size: 13px;
  }
}
