:root {
  --site-header-bg: transparent;
  --site-header-border: transparent;
  --site-header-text: #ffffff;
  --site-header-text-hover: #00cccc; /* 에이프레임 시그니처 시안 */
  --site-header-menu-bg: rgba(13, 21, 32, 0.98);
  --site-header-menu-shadow: rgba(0, 0, 0, 0.6);
}

/* 로고 스타일링 (에이프레임 스타일 32px 볼드) */
.a-frame-logo {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  transition: opacity 0.2s ease;
}

@media (min-width: 768px) {
  .a-frame-logo {
    font-size: 2rem;
  }
}

.a-frame-logo:hover {
  opacity: 0.85;
}

.a-frame-logo .upper {
  text-transform: uppercase;
}

.a-frame-logo .lower {
  text-transform: lowercase;
}

/* 헤더 기본: 모바일에서는 안전하게 글래스모피즘 배경 적용 (본문 겹침 방지) */
.a-frame-nav {
  width: 100%;
  background: rgba(7, 11, 18, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 데스크톱(768px 이상)에서는 기본 투명, 스크롤 시 글래스모피즘 */
@media (min-width: 768px) {
  .a-frame-nav {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid transparent !important;
    box-shadow: none !important;
  }

  .a-frame-nav.scrolled {
    background: rgba(7, 11, 18, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  }
}

/* 데스크톱 내비게이션: 768px 미만에서는 절대 노출되지 않도록 강제 */
@media (max-width: 767px) {
  .a-frame-nav nav.desktop-nav,
  .a-frame-nav nav {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .a-frame-nav nav.desktop-nav {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    height: 85px;
    min-height: 85px;
    gap: 0.5rem;
  }

  .a-frame-nav nav.desktop-nav > a,
  .a-frame-nav nav.desktop-nav > .a-frame-dropdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 85px;
    min-height: 85px;
    line-height: 1;
    margin: 0;
    padding: 0;
  }

  /* 네비게이션 대메뉴 텍스트: 에이프레임 스타일 (17~18px, 볼드, 시안 호버) */
  .a-frame-nav nav.desktop-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 85px;
    min-height: 85px;
    line-height: 1;
    position: relative;
    color: #ffffff;
    letter-spacing: 0.06em;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    font-family: 'Noto Sans KR', sans-serif;
    padding: 0 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
    transition: color 0.25s ease, transform 0.2s ease;
  }

  .a-frame-nav nav.desktop-nav a:hover,
  .a-frame-nav nav.desktop-nav a:focus-visible {
    color: var(--site-header-text-hover) !important;
  }
}

/* 드롭다운 메뉴 래퍼 */
.a-frame-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 85px;
  min-height: 85px;
  padding: 0;
  margin: 0;
  z-index: 10;
}

.a-frame-dropdown > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 85px;
  min-height: 85px;
  padding: 0 20px;
  margin: 0;
}

.a-frame-dropdown:hover,
.a-frame-dropdown:focus-within {
  z-index: 20;
}

/* 서브 드롭다운 패널: 에이프레임 다크 서식 */
.a-frame-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 200px;
  padding: 8px 0;
  background: var(--site-header-menu-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px var(--site-header-menu-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  border-radius: 8px;
}

.a-frame-dropdown:hover .a-frame-dropdown-menu,
.a-frame-dropdown:focus-within .a-frame-dropdown-menu,
.a-frame-dropdown-menu:hover,
.a-frame-dropdown-menu:focus-within {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.a-frame-dropdown-menu a {
  display: block !important;
  height: auto !important;
  min-height: auto !important;
  padding: 12px 22px !important;
  color: #aaaaaa !important;
  letter-spacing: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  text-shadow: none !important;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.a-frame-dropdown-menu a:hover,
.a-frame-dropdown-menu a:focus-visible {
  background: #1a2535 !important;
  color: var(--site-header-text-hover) !important;
}

/* ============================================================
   📱 모바일 햄버거 버튼 & 모바일 전용 메뉴 패널
   ============================================================ */

/* 햄버거 아이콘 애니메이션 */
.mobile-menu-btn .hamburger-icon {
  width: 20px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-btn .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.mobile-menu-btn.is-active .bar {
  background-color: #00cccc;
}

.mobile-menu-btn.is-active .line-1 {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.is-active .line-2 {
  opacity: 0;
}

.mobile-menu-btn.is-active .line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* 모바일 메뉴 패널 */
.mobile-nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: rgba(10, 16, 26, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-nav-panel.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 모바일 메뉴 링크 */
.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.is-active {
  background: rgba(0, 204, 204, 0.12);
  color: #00cccc;
}

/* 모바일 아코디언 메뉴 */
.mobile-accordion {
  border-radius: 8px;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.mobile-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-accordion-btn:hover,
.mobile-accordion-btn.is-active {
  color: #00cccc;
}

.mobile-accordion.is-expanded .mobile-accordion-btn {
  color: #00cccc;
  background: rgba(255, 255, 255, 0.03);
}

.mobile-accordion.is-expanded .icon-arrow {
  transform: rotate(180deg);
  color: #00cccc;
}

/* 모바일 서브메뉴 */
.mobile-sub-menu {
  display: none;
  padding: 4px 0 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid rgba(0, 204, 204, 0.3);
  margin: 0 8px 6px 16px;
  border-radius: 0 0 6px 6px;
}

.mobile-accordion.is-expanded .mobile-sub-menu {
  display: block;
}

.mobile-sub-item {
  display: block;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mobile-sub-item:hover,
.mobile-sub-item:active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  padding-left: 18px;
}

/* 모바일 오버레이 */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.is-open {
  display: block;
  opacity: 1;
}
