@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* ===============================
   HEADER & LOGO
================================ */
.header {
  font-family: 'Pretendard', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 84px; /* 헤더 고정 높이 */
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  z-index: 1000;
}

.header-logo {
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
}

.header-logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-image {
  /* 아까 관리자 헤더처럼 로고를 시원하게 키움 */
  height: 120px; 
  width: auto;
  object-fit: contain;
  cursor: pointer;
  /* 헤더 중앙 정렬을 위한 미세 조정 */
  margin-top: -5px; 
}

/* ===============================
   MAIN NAVIGATION (1st Level)
================================ */
.header-center {
  height: 100%;
  display: flex;
  align-items: center;
}

.header-center > ul {
  display: flex;
  align-items: center;
  gap: 35px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.main-menu {
  position: relative;
  height: 100%;
}

.main-menu > a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none !important;
  color: #333;
  padding: 0 4px;
  transition: color 0.2s ease;
}

/* Hover & Active State */
.main-menu:hover > a,
.main-menu.active > a {
  color: #000 !important;
  font-weight: 700;
}

/* Underline Animation */
.main-menu > a::after {
  content: "";
  position: absolute;
  bottom: 22px;
  left: 0;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.25s ease;
}

.main-menu:hover > a::after,
.main-menu.active > a::after {
  width: 100%;
}

/* ===============================
   DROPDOWN MENUS (2nd & 3rd Level)
================================ */
/* 2차 메뉴 (sub-menu) */
.sub-menu {
  position: absolute;
  top: 84px; /* 헤더 높이에 맞춤 */
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  padding: 10px 0;
  min-width: 200px;
  list-style: none;
  margin: 0;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1001;
  border: 1px solid rgba(0,0,0,0.05);
}

/* 3차 메뉴 (sub-sub-menu) */
.sub-sub-menu {
  position: absolute;
  top: 0;
  left: 100%; /* 2차 메뉴 옆으로 펼쳐짐 */
  background: #fff;
  border-radius: 12px;
  padding: 10px 0;
  min-width: 180px;
  list-style: none;
  margin: 0;
  box-shadow: 10px 15px 35px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1002;
  border: 1px solid rgba(0,0,0,0.05);
}

/* Hover Display Logic */
.main-menu:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
}

.sub-menu-item:hover > .sub-sub-menu {
  opacity: 1;
  visibility: visible;
}

/* Dropdown Item Styles */
.sub-menu li a,
.sub-sub-menu li a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  text-decoration: none !important;
  color: #555 !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* 3차 메뉴가 있는 항목 화살표 표시 */
.sub-menu-item > a::after {
  content: "›";
  float: right;
  font-size: 18px;
  line-height: 1;
  color: #ccc;
  margin-left: 10px;
}

.sub-menu li:hover > a {
  background: #f8f9fa;
  color: #000 !important;
  padding-left: 25px;
}

.sub-menu li:hover > a::after {
  color: #000;
}

/* ===============================
   AUTH & USER INFO
================================ */
.header-auth {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-auth i {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  font-style: normal;
}

.header-auth a {
  text-decoration: none !important;
  color: #666;
  font-size: 13px;
  font-weight: 400;
  transition: color 0.2s;
}

.header-auth a:hover {
  color: #000;
}

/* Responsive Fix */
@media (max-width: 1200px) {
  .header { padding: 0 20px; }
  .header-center > ul { gap: 20px; }
}



/* ===============================
   MOBILE MENU & DRAWER
================================ */

/* 기본적으로 햄버거 버튼 숨김 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* 어두운 배경 오버레이 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;   /* 가로 전체 */
    height: 100vh;  /* 세로 전체 */
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;  /* 메인 콘텐츠(보통 1~100)보다 훨씬 높게 설정 */
    display: none;  /* 평소엔 숨김 */
    pointer-events: auto; /* 터치를 이 오버레이가 잡아먹음 */
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
    display: block;
}

/* 우측 슬라이드 드로어 */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;  /* 숨겨져 있다가 나옴 */
    width: 300px;
    height: 100%;
	overflow-y: auto; 
    background-color: #fff;
    z-index: 1001;  /* 오버레이(1000)보다 1 커야 함 */
    transition: right 0.3s ease;
    /* 생략: 나머지 스타일 */
}

.mobile-drawer.active {
  right: 0;
}

/* 드로어 헤더 */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.drawer-logo {
  height: 40px;
  object-fit: contain;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}
body.no-scroll {
    overflow: hidden !important;
    touch-action: none; /* 모바일에서 슬라이드(스크롤) 동작 차단 */
}
/* 로그인/아웃 링크 영역 */
.drawer-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #f0f0f0;
}

.drawer-auth-links a {
  font-size: 13px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
}

/* 모바일 네비게이션 아코디언 메뉴 */
.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-list > li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.mobile-nav-list a i {
  font-size: 12px;
  color: #999;
  transition: transform 0.3s ease;
}

.mobile-nav-list .has-sub.open > a > i {
  transform: rotate(180deg);
}

/* 서브 메뉴 숨김 처리 */
.mobile-sub-list, .mobile-sub-sub-list {
  display: none; /* jQuery slideToggle 제어 */
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fafafa;
}

.mobile-sub-list a {
  padding: 14px 20px 14px 40px;
  font-size: 15px;
  font-weight: 400;
  color: #555;
}

.mobile-sub-sub-list a {
  padding: 12px 20px 12px 60px;
  font-size: 14px;
  font-weight: 400;
  color: #777;
}

/* ===============================
   MEDIA QUERIES (반응형)
================================ */
@media (max-width: 991px) {
  .header-center {
    display: none; /* PC 메인 메뉴 숨김 */
  }
  .header-auth {
    display: none; /* PC 회원 메뉴 숨김 */
  }
  .mobile-menu-btn {
    display: block; /* 햄버거 메뉴 표시 */
  }
}