@charset "utf-8";
/* ============================================================
   header.css — 헤더 · GNB · 모바일 메뉴
   ============================================================ */

/* ===== 헤더 (sticky) ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  transition: background .25s;
}

body.scrolled .header {
  background: #1d1d3e;
}

.header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 80px;
}

.header .logo-main {
  height: 47px;
  width: auto;
}

.header .logo-asiae {
  height: 31px;
  width: auto;
}

.nav {
  display: flex;
  gap: clamp(20px, 3vw, 50px);
  font-size: 18px;
}

.nav a {
  color: var(--t-mute);
  white-space: nowrap;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus {
  color: var(--pink);
  text-decoration: none;
}

.nav a.active {
  color: var(--pink);
  font-weight: 700;
}

.nav-btn,
.nav-dim,
.nav-drawer {
  display: none;
}

/* ===== GNB 드롭다운 ===== */
.nav .nav-item {
  position: relative;
}

.nav .nav-item>.nav-top {
  display: inline-block;
}

.nav .submenu {
  list-style: none;
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 20px);
  min-width: 180px;
  padding: 10px 0;
  margin: 0;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.nav .submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  height: 20px;
}

.nav .nav-item.has-sub:hover>.submenu,
.nav .nav-item.has-sub:focus-within>.submenu {
  display: block;
}

.nav .submenu a {
  display: block;
  padding: 11px 24px;
  font-size: 16px;
  color: var(--t-mute);
  text-decoration: none;
}

.nav .submenu li:first-child>a {
  margin-top: -10px;
  padding-top: 21px;
}

.nav .submenu li:last-child>a {
  margin-bottom: -10px;
  padding-bottom: 21px;
}

.nav .submenu a:hover {
  color: var(--pink);
  text-decoration: none;
}

/* ===== 반응형 ===== */
@media (max-width:780px) {
  .header .bar>.nav {
    display: none;
  }

  .header .logo-asiae,
  .header a:has(.logo-asiae) {
    display: none;
  }

  .nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 61;
  }

  .nav-btn span,
  .nav-btn span::before,
  .nav-btn span::after {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    position: absolute;
    transition: .25s;
  }

  .nav-btn span::before {
    top: -7px;
  }

  .nav-btn span::after {
    top: 7px;
  }

  body.nav-open .nav-btn span {
    background: transparent;
  }

  body.nav-open .nav-btn span::before {
    top: 0;
    transform: rotate(45deg);
  }

  body.nav-open .nav-btn span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .nav-dim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 59;
  }

  body.nav-open .nav-dim {
    opacity: 1;
    visibility: visible;
  }

  .nav-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(80vw, 300px);
    background: var(--panel);
    box-shadow: var(--shadow);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 60;
    overflow-y: auto;
    padding: 66px 0 24px;
  }

  body.nav-open .nav-drawer {
    transform: translateX(0);
  }

  .nav-close {
    display: none;
  }

  .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 18px;
  }

  .nav-mobile .nav-item {
    position: static;
    border-bottom: 1px solid rgba(136, 136, 191, .15);
  }

  .nav-mobile .nav-top,
  .nav-mobile .nav-item.open>.nav-top {
    background: transparent;
  }

  .nav-mobile .nav-item>.nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 22px;
    color: #fff;
    font-weight: 600;
  }

  .nav-mobile .nav-item>.nav-top.active {
    color: var(--pink);
  }

  .nav-mobile .nav-item.has-sub>.nav-top::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    margin-left: 12px;
    border-right: 2px solid var(--t-mute);
    border-bottom: 2px solid var(--t-mute);
    transform: rotate(45deg);
    transition: transform .25s;
  }

  .nav-mobile .nav-item.open>.nav-top::after {
    transform: rotate(-135deg);
  }

  .nav-mobile .submenu {
    display: block;
    position: static;
    transform: none;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
  }

  .nav-mobile .submenu::before {
    display: none;
  }

  .nav-mobile .nav-item.open>.submenu {
    max-height: 500px;
  }

  .nav-mobile .submenu a {
    display: block;
    padding: 12px 22px 12px 34px;
    font-size: 15px;
    color: var(--t-mute);
  }
}

@media (max-width:575px) {
  .header .bar {
    height: 64px;
  }

  .header .logo-main {
    height: 38px;
  }

  .header .logo-asiae {
    height: 24px;
  }
}