.container1520 {
  max-width: 1520px;
  width: 95%;
  margin: 0 auto;
}

/* header.on (스크롤된 상태 - 메인 영상 섹션을 벗어남) */
header.on .h_logo {
  filter: none;
}
header.on {
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-strong);
  box-shadow: 0 4px 12px rgba(3, 7, 18, 0.06);
}
header.on .header_in_wrap,
header.on .header_in_wrap .gnb,
header.on .header_in_wrap .gnb a,
header.on .header_in_wrap .header_link {
  color: var(--color-text-strong);
}

.main_before {
  height: 0px;
  width: 100%;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-white);
  backdrop-filter: blur(6px);
  box-shadow: 0 5px 5px rgba(3, 7, 18, 0.04);
  transition:
    background 0.3s ease-in-out,
    color 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
}

.h_top {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 0.5px solid var(--color-text-muted);
}

.h_logo {
  max-width: 220px;
  filter: invert(100%) sepia(100%) saturate(0) hue-rotate(200deg)
    brightness(200%) contrast(201%);
  transition: 0.3s;
}

.header_in_wrap {
  max-width: 1920px;
  height: 80px;
  margin: 0 auto;
  width: 95%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header_in_wrap nav {
  display: flex;
  align-items: center;
}

.header_in_wrap .gnb {
  display: flex;
  height: 100%;
  font-size: 20px;
  font-weight: 600;
}

.header_in_wrap .gnb li a {
  position: relative;
  transition: color 0.3s ease;
  line-height: 80px;
}

.header_in_wrap .gnb li:hover a,
.header_in_wrap .gnb li.active a,
.header_in_wrap .gnb li a.active {
  color: var(--color-accent);
}
header.on .header_in_wrap .gnb li.active a,
header.on .header_in_wrap .gnb li a.active {
  color: var(--color-accent);
  font-weight: 700;
}

/* 밑줄 인디케이터 (가운데 → 양옆으로 펴짐) */
.header_in_wrap .gnb li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 5px;
  background: var(--color-accent);
  transform: translateX(-50%);
  transition:
    width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.25s ease;
  opacity: 0;
}

.header_in_wrap .gnb li a:hover::after,
.header_in_wrap .gnb li.active a::after,
.header_in_wrap .gnb li a.active::after {
  width: calc(100%);
  opacity: 0.3;
}

.header_in_wrap .gnb a {
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 4rem;
}

.header_in_wrap .header_link {
  display: flex;
  align-items: center;
  font-family: "NEXON Lv2 Gothic";
  font-weight: bold;
  color: var(--color-text-strong);
}

.link_img {
  margin-right: 1rem;
}

.header_in_wrap .header_link {
  display: none;
}

/* 모바일메뉴 햄버거 */
.menu-wrap {
  position: relative;
  width: 30px;
  height: 18px;
  cursor: pointer;
}

.menu-wrap .line {
  position: absolute;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--color-white);
  left: 0;
  transition: background 0.3s ease-in-out;
}
header.on .menu-wrap .line {
  background: var(--color-text-strong);
}

.menu-wrap .line:first-child {
  top: 0;
  transform-origin: 25% 50%;
  transition: 0.3s;
}

.menu-wrap .line:nth-child(2) {
  top: calc(50% - 1px);
}

.menu-wrap .line:last-child {
  bottom: 0;
  transform-origin: 25% 50%;
  transition: 0.3s;
}

.menu-wrap.open .line:first-child {
  transform: rotate(45deg) translateX(10%);
}

.menu-wrap.open .line:nth-child(2) {
  opacity: 0;
}

.menu-wrap.open .line:last-child {
  transform: rotate(-45deg) translateX(10%);
}

@media (min-width: 0px) and (max-width: 1280px) {
  .header_in_wrap .gnb {
    font-size: 17px;
  }

  .h_logo {
    max-width: 230px;
  }
}

/* =========================================================
 * 모바일 헤더 (≤ 1080px)
 * - 항상 화이트 글래스 톤
 * - 드롭다운 메뉴: 흰 배경 + 좌측 컬러 라인 인디케이터
 * ========================================================= */
@media (min-width: 0px) and (max-width: 1080px) {
  .main_before {
    height: 65px;
    display: block;
  }

  header {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text-strong);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: none;
  }

  header .menu-wrap .line {
    background: var(--color-text-strong);
  }

  .h_logo {
    filter: none;
    max-width: 220px;
  }

  header .header_in_wrap {
    height: 65px;
    padding: 0;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
  }

  header.on .header_in_wrap {
    height: 65px;
  }

  .header_in_wrap .header_link {
    display: flex;
  }

  .link_img {
    width: 40px;
  }

  .header_in_wrap .h_logo {
    max-width: 180px;
  }

  /* ============ 모바일 드롭다운 메뉴 ============ */
  .header_in_wrap nav {
    display: block;
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    height: auto;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 28px rgba(3, 7, 18, 0.08);
  }

  .header_in_wrap nav.menu_open {
    max-height: 80vh;
  }

  .header_in_wrap nav .gnb {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    font-size: 15px;
    gap: 0;
  }

  .header_in_wrap nav .gnb li {
    height: auto;
  }

  .header_in_wrap nav .gnb a {
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
    padding: 16px 24px;
    line-height: 1.4;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition:
      background 0.2s ease,
      color 0.2s ease,
      padding-left 0.25s ease;
  }

  .header_in_wrap nav .gnb li:last-child a {
    border-bottom: none;
  }

  .header_in_wrap nav .gnb a:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding-left: 32px;
  }

  /* 모바일 active: 좌측 컬러 라인 + 소프트 배경 */
  .header_in_wrap nav .gnb li.active a,
  .header_in_wrap nav .gnb li a.active {
    color: var(--color-accent);
    background: var(--color-accent-soft);
    font-weight: 700;
    padding-left: 32px;
  }
  .header_in_wrap nav .gnb li.active a::before,
  .header_in_wrap nav .gnb li a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-accent);
  }

  /* 모바일에서는 데스크탑 밑줄 효과 비활성화 */
  .header_in_wrap nav .gnb a::after {
    display: none;
  }
}

@media (min-width: 0px) and (max-width: 500px) {
  .h_logo {
    width: 220px;
  }
}
