/* ============================================================
   GLOBAL HEADER — header.css
   로고 좌측 / 메뉴 중앙 나열 / 전체메뉴 팝업(라운드 박스)
   ============================================================ */

/* ── 헤더 래퍼 ── */
#site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 9000;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
#site-header.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

/* ── 헤더 이너 ── */
.header-inner {
  padding: 0 40px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ── 로고 (좌측) ── */
.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.header-logo img {
  height: 38px;
  width: auto;
  display: block;
  filter: invert(1) brightness(10);
  transition: filter 0.4s ease;
}
#site-header.scrolled .header-logo img {
  filter: invert(0) brightness(1);
}

/* ── 데스크탑 nav (중앙) ── */
.header-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
  gap: 0;
  flex: 1;
  justify-content: center;
}

/* ── nav 아이템 ── */
.nav-item { position: relative; }

.nav-item > .nav-link {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 20px;
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease;
}
#site-header.scrolled .nav-item > .nav-link { color: #111111; }
.nav-item > .nav-link:hover,
.nav-item.open > .nav-link { color: #77ac8e; }

/* ── 드롭다운 (라운드 박스, 상단 라인 없음) ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 200px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.06);
  list-style: none;
  margin: 0; padding: 10px 0;
  z-index: 9100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-item:hover .nav-dropdown,
.nav-item.open .nav-dropdown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-dropdown li a {
  display: block;
  padding: 10px 20px;
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #333333;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s, color 0.16s;
  word-break: keep-all;
  border-radius: 8px;
  margin: 0 6px;
}
.nav-dropdown li a:hover {
  background: #f2f8f5;
  color: #77ac8e;
}

/* ── 우측: 전체메뉴 버튼 ── */
.header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.header-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: opacity 0.2s;
}
.header-menu-btn:hover { opacity: 0.65; }

.menu-btn-lines {
  display: flex;
  flex-direction: column;
  gap: 5.5px;
  width: 28px;
}
.menu-btn-line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: rgba(255,255,255,0.92);
  border-radius: 2px;
  transition: background 0.4s ease, transform 0.32s ease, opacity 0.25s ease;
  transform-origin: center;
}
#site-header.scrolled .menu-btn-line { background: #111111; }
.header-menu-btn.open .menu-btn-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header-menu-btn.open .menu-btn-line:nth-child(2) { opacity: 0; }
.header-menu-btn.open .menu-btn-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu-btn-label { display: none; }

/* ============================================================
   전체메뉴 팝업 — 라운드 박스 (딤 배경 위)
   ============================================================ */

/* 딤 배경 */
.fullmenu-dim {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.fullmenu-dim.open {
  opacity: 1;
  pointer-events: auto;
}

/* 팝업 박스 */
.fullmenu-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  z-index: 9300;
  width: min(960px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  padding: 44px 52px 52px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.fullmenu-popup.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* 팝업 헤더 (로고 + X버튼) */
.fullmenu-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}
.fullmenu-popup-logo img {
  height: 32px;
  width: auto;
  display: block;
  filter: invert(0) brightness(1);
}
.fullmenu-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.fullmenu-close-btn:hover { opacity: 0.5; }
.fullmenu-close-btn svg { display: block; }

/* 메뉴 그리드 — 4열 */
.fullmenu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 36px;
}

/* 각 그룹 */
.fullmenu-group { display: flex; flex-direction: column; gap: 12px; }

/* 그룹 타이틀 */
.fullmenu-title {
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #111111;
  letter-spacing: 0.01em;
  line-height: 1.3;
  display: block;
  word-break: keep-all;
}

/* 서브메뉴 */
.fullmenu-sub {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fullmenu-sub li a {
  display: block;
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #888888;
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: 7px 0;
  transition: color 0.2s ease;
  word-break: keep-all;
  line-height: 1.5;
}
.fullmenu-sub li a:hover { color: #77ac8e; }

/* ============================================================
   모바일 슬라이드 패널 (≤ 1060px)
   ============================================================ */
.mobile-menu-dim {
  position: fixed;
  inset: 0;
  z-index: 8800;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.mobile-menu-dim.open { opacity: 1; pointer-events: auto; }

.mobile-menu-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(300px, 100vw);
  height: 100%;
  z-index: 8900;
  background: #ffffff;
  overflow-y: auto;
  padding: 88px 0 60px;
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.10);
}
.mobile-menu-panel.open { transform: translateX(0); }

.mobile-nav { list-style: none; margin: 0; padding: 0; }
.mobile-nav-item { border-bottom: 1px solid #f0f0f0; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111111;
  letter-spacing: 0.03em;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  word-break: keep-all;
}
.mobile-nav-link .m-arrow {
  display: inline-block;
  width: 7px; height: 7px;
  border-right: 1.5px solid #aaaaaa;
  border-bottom: 1.5px solid #aaaaaa;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.mobile-nav-item.open > .mobile-nav-link .m-arrow {
  transform: rotate(225deg) translateY(0);
}
.mobile-dropdown {
  display: none;
  list-style: none;
  margin: 0; padding: 4px 0 12px;
  background: #fafafa;
}
.mobile-nav-item.open > .mobile-dropdown { display: block; }
.mobile-dropdown li a {
  display: block;
  padding: 10px 28px 10px 38px;
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #888888;
  text-decoration: none;
  transition: color 0.2s;
  word-break: keep-all;
}
.mobile-dropdown li a:hover { color: #77ac8e; }

/* ── body 오프셋 ── */
body.has-header { padding-top: 80px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1600px) {
.nav-item > .nav-link{padding:0 10px;}
.header-logo img{height:30px;}
}
@media (max-width: 1280px) {
  .nav-item > .nav-link { padding: 0 7px; font-size: 12px; }
  .header-inner { padding: 0 25px; gap:10px;}
  .header-logo img { height: 24px; }
}
@media (max-width: 1060px) {
  .header-nav { display: none; }
  .header-inner { padding: 0 24px; }
}
@media (max-width: 640px) {
  .fullmenu-popup { padding: 32px 28px 40px; }
  .fullmenu-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}
@media (max-width: 480px) {
  .header-inner { height: 64px; padding: 0 20px; }
  .header-logo img { height: 26px; }
  body.has-header { padding-top: 64px; }
  .mobile-menu-panel { padding-top: 74px; }
}
