/* header.css - Header & Navigation (PC + Mobile) */

/* ========== PC Header ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: var(--z-header);
  transition: var(--transition);
  background: #fff;
  box-shadow: 0 0 5px #ddd;
}

header.scrolled {
  background: var(--color-white);
  box-shadow: var(--shadow-header);
}

.head_wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.head_wrap .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.head_wrap .logo img {
  height: 40px;
  width: auto;
}

.head_wrap .logo h1 {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-dark);
  white-space: nowrap;
}

/* ========== PC Navigation ========== */
.pc-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.pc-nav ul {
  display: flex;
  justify-content: center;
  gap: 0;
}

.pc-nav ul li {
  position: relative;
}

.pc-nav ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-height);
  padding: 0 18px;
  font-family: var(--font-kr);
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text-dark);
  white-space: nowrap;
  letter-spacing: -0.03em;
  transition: var(--transition);
  position: relative;
}

.pc-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: 0;
  transition: var(--transition);
}

.pc-nav ul li:hover a,
.pc-nav ul li.on a {
  color: var(--color-accent);
}

.pc-nav ul li:hover a::after,
.pc-nav ul li.on a::after {
  opacity: 1;
}

/* Right side HOME */
.head-right {
  flex-shrink: 0;
}

.head-right a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-dark);
  transition: var(--transition);
}

.head-right a:hover {
  color: var(--color-accent);
}

/* ========== Mobile Toggle Button ========== */
.mo-toggle {
  display: none;
  position: relative;
  z-index: var(--z-toggle);
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.mo-toggle .line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-dark);
  border-radius: 2px;
  margin: 6px auto;
  transition: all 0.5s ease-in-out;
}

.mo-toggle.on .line:first-child {
  transform: translateY(8px) rotate(45deg);
}

.mo-toggle.on .line.second {
  opacity: 0;
}

.mo-toggle.on .line.last {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========== Mobile Slide Navigation ========== */
.mo-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100dvh;
  background: var(--color-white);
  overflow-y: auto;
  z-index: var(--z-mobile-nav);
  box-shadow: -2px 0 7px rgba(0, 0, 0, 0.2);
  transition: 0.4s;
  display: none;
}

.mo-nav.on {
  right: 0;
  transition: 0.5s;
}

.mo-nav ul {
  position: relative;
  top: 90px;
  width: 90%;
  margin: 0 auto;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.mo-nav ul li {
  border-top: 1px solid var(--color-border);
}

.mo-nav ul li:first-child {
  border-top: none;
}

.mo-nav ul li a {
  display: block;
  padding: 18px 15px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  transition: var(--transition);
}

.mo-nav ul li.on a,
.mo-nav ul li a:hover {
  color: var(--color-text-dark);
  font-weight: 700;
}

/* Mobile Overlay */
.mo-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 100vh;
  background: #232323;
  opacity: 0.7;
  z-index: var(--z-overlay);
  display: none !important;
}

.mo-overlay.on {
  width: 100%;
  display: block;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .pc-nav {
    display: none;
  }

  .head-right {
    display: none;
  }

  .mo-toggle {
    display: block;
  }

  .mo-nav {
    display: block;
  }

  .mo-overlay {
    display: none !important;
  }

  .mo-overlay.on {
    display: block !important;
  }
}

@media (max-width: 480px) {
  .mo-nav {
    width: 100%;
  }

  .head_wrap .logo h1 {
    font-size: 16px;
  }
}
