/* assets/css/header.css */

.header {
  padding: 40px 80px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
}

/* ===== 로고 ===== */
.logo img {
  width: 350px;
  height: 67px;
  object-fit: contain;
}

/* ===== PC 메뉴 ===== */
.gnb {
  display: flex;
}

/* 각 메뉴 칸 */
.gnb-item {
  position: relative;
  width: 180px;
  height: 80px;
  padding: 0 20px;
  color: var(--text);
}

/* 세로 라인 */
.gnb-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  opacity: .6;
}

.gnb-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: var(--text);
  position: relative;
}

/* 영어 */
.en {
  position: absolute;
  top: 0;
  left: 20px;
  font-size: 44px;
  font-weight: 700;
  opacity: 0.05;
  line-height: 0.75; /* 줄간격 더 좁게 (약 2mm) */
  transform-origin: left top;
  transition: transform 600ms cubic-bezier(.2,.8,.2,1), opacity 350ms ease;
}

/* 한글 */
.ko {
  position: absolute;
  bottom: 12px;
  left: 20px;
  font-size: 15px;
  line-height: 1; /* 한글은 기본값 */
  transition: opacity 300ms ease, transform 300ms ease;
}

.gnb-item:hover .en {
  opacity: 1;
  transform: translateY(28px) scale(0.36); /* 32px → 28px (2mm 간격) */
}

.gnb-item:hover .ko {
  opacity: 0;
  transform: translateY(6px);
}

/* ===== 서브메뉴 (브랜드소개) ===== */
.sub-menu {
  position: absolute;
  left: 0;
  top: 78px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease;
  background: white;
  width: 180px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 4px;
}

/* 부모 또는 서브메뉴 자체에 호버 시 표시 */
.has-sub:hover .sub-menu,
.sub-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.sub-menu li {
  margin: 0;
  padding: 0;
}

.sub-menu a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.sub-menu a:hover {
  background: #f5f5f5;
  padding-left: 20px;
  color: var(--accent);
}

/* ===== 가로줄 ===== */
.full-line {
  height: 1px;
  background: var(--line);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 15px;
}

/* ===== 모바일 햄버거 버튼 ===== */
.mobile-toggle {
  display: none; /* PC에서는 숨김 */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 모바일 메뉴 열렸을 때 X */
body.mobile-open .mobile-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

body.mobile-open .mobile-toggle span:nth-child(2) {
  opacity: 0;
}

body.mobile-open .mobile-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== 모바일 드로어 ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
  display: none; /* PC에서는 숨김 */
}

body.mobile-open .mobile-menu {
  right: 0;
}

.mobile-menu-header {
  padding: 30px 20px 20px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.mobile-nav {
  list-style: none;
  padding: 0;
}

.mobile-nav > li {
  border-bottom: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 500;
}

.mobile-nav a:active {
  background: #f5f5f5;
}

/* 모바일 아코디언 */
.mobile-acc-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.mobile-acc-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.mobile-acc.open .mobile-acc-icon {
  transform: rotate(180deg);
}

.mobile-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f5f5f5;
}

.mobile-acc.open .mobile-sub {
  max-height: 500px;
}

.mobile-sub a {
  padding: 14px 24px 14px 44px;
  font-size: 15px;
  color: #666;
  display: block;
}

/* 모바일 백드롭 */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: none; /* PC에서는 숨김 */
}

body.mobile-open .mobile-backdrop {
  opacity: 1;
  visibility: visible;
}

/* ===== 반응형 ===== */
@media (max-width: 900px) {
  .header {
    padding: 20px 20px 10px;
    align-items: center;
  }
  
  .logo img {
    width: 200px;
    height: auto;
  }
  
  /* PC 메뉴 숨김 */
  .gnb {
    display: none !important;
  }
  
  /* 모바일 요소 표시 */
  .mobile-toggle {
    display: flex !important;
  }
  
  .mobile-menu {
    display: block !important;
  }
  
  .mobile-backdrop {
    display: block !important;
  }
  
  .full-line {
    margin-top: 10px;
  }
}