@charset "utf-8";

/* ===== Header ===== */
.wd-gnb {
  position: relative;
  height: var(--header-height);
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  font-family: var(--font-primary);
}

.wd-gnb__inner-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 9999;
  transition: all 0.4s ease-in-out;
}

.wd-gnb__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 30px;
  max-width: var(--max-width);
}

/* Logo */
.wd-gnb__logo {
  position: relative;
  z-index: 100;
  margin: 0;
}
.wd-gnb__logo a {
  display: block;
  text-decoration: none;
}
.wd-gnb__logo img {
  display: block;
  vertical-align: top;
  height: 40px;
  width: auto;
}
.wd-gnb__logo-text {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* Logo image switching */
.wd-gnb__logo img.wd-gnb__logo-dark { display: block; }
.wd-gnb__logo img.wd-gnb__logo-light { display: none; }

/* Util box */
.wd-gnb__util {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
}

/* 2-line hamburger button (shared style for sitemap-btn, close-btn, mobile-btn) */
.wd-gnb__sitemap-btn,
.wd-sitemap__close-btn,
.wd-gnb__mobile-btn {
  width: 28px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.wd-gnb__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
.wd-gnb__bar:last-child { width: 60%; margin-left: auto; }

/* Overlay BG (PC) */
.wd-gnb__overlay-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  visibility: hidden;
  opacity: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9997;
  transition: all 0.4s ease-in-out;
}
.wd-gnb__overlay-bg.is-open {
  visibility: visible;
  opacity: 1;
}

/* ===== PC GNB Nav ===== */
.wd-gnb__nav {
  position: relative;
  z-index: 99;
  margin-left: auto;
}
.wd-gnb__nav > .wd-gnb__list {
  display: flex;
  align-items: center;
}
.wd-gnb__item {
  position: relative;
  word-break: keep-all;
}
.wd-gnb__item > a {
  position: relative;
  z-index: 100;
  display: block;
  line-height: var(--header-height);
  padding: 0 2.8rem;
  text-align: center;
  color: var(--color-text);
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  font-weight: 500;
  transition: all 0.4s ease-in-out;
  text-decoration: none;
}
.wd-gnb__item > a:hover,
.wd-gnb__item > a:focus,
.wd-gnb__item.is-active > a {
  color: var(--color-accent);
}
.wd-gnb__nav.is-open .wd-gnb__item > a {
  padding: 0 4rem;
}

/* GNB 2depth BG */
.wd-gnb__nav-bg {
  overflow: hidden;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  background: var(--color-bg);
  z-index: -1;
  opacity: 0;
  transition: height 0.3s ease-in-out, opacity 0.2s ease-in-out;
}
.wd-gnb__nav-bg::after {
  position: absolute;
  top: var(--header-height);
  width: 100%;
  left: 0;
  height: 1px;
  background-color: #ddd;
  content: "";
}
.wd-gnb__nav.is-open .wd-gnb__nav-bg {
  height: 380px;
  opacity: 1;
}

/* 2depth dropdown (total-menu mode) */
.wd-gnb__sub {
  position: absolute;
  top: var(--header-height);
  left: 0;
  z-index: 99;
  width: 100%;
  text-align: left;
  opacity: 0;
  height: 0;
  visibility: hidden;
  transition: all 0.2s 0s;
}
.wd-gnb__sub::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 0;
  height: 3px;
  background-color: var(--color-accent);
  transition: all 0.4s ease-in-out;
}
.wd-gnb__item:hover .wd-gnb__sub::before {
  width: 100%;
  left: 0;
}
.wd-gnb__sub ul {
  padding: 3rem 0;
}
.wd-gnb__sub ul li a {
  display: block;
  padding: 0.8rem 0.5rem;
  color: #666;
  font-size: 1.0625rem;
  letter-spacing: -0.025em;
  font-weight: 500;
  line-height: 1.3;
  transition: all 0.4s ease-in-out;
  text-align: center;
  text-decoration: none;
}
.wd-gnb__sub ul li a:hover {
  color: var(--color-accent);
}

/* GNB open state */
.wd-gnb__nav.is-open .wd-gnb__sub {
  height: 280px;
  opacity: 1;
  visibility: visible;
  transition: height 0.5s ease-in-out, opacity 0.5s ease-in-out 0.2s;
}

/* ===== Mobile Nav ===== */
.wd-gnb__mobile-btn { display: none; }
.wd-gnb__mobile { display: none; }
.wd-gnb__mobile-overlay { display: none; }

/* ===== Sitemap Overlay ===== */
.wd-sitemap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  z-index: -1;
  transition: all 0.3s 0.5s;
  font-family: var(--font-primary);
}
.wd-sitemap.is-open {
  opacity: 1;
  visibility: visible;
  z-index: 99999;
  background-color: var(--color-bg);
  transition: all 0.3s 0s;
}

/* BG panels with reveal animation */
.wd-sitemap__container {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: block;
}
.wd-sitemap__bg-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
}
.wd-sitemap__bg-panel {
  position: relative;
  height: 100%;
}
.wd-sitemap__bg-panel::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 0;
  content: "";
  background-color: #ddd;
  z-index: 1;
}
.wd-sitemap__bg-panel:first-child::before { display: none; }
.wd-sitemap__bg-panel::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #333;
  transition: width 0.6s cubic-bezier(0.47, 0, 0.31, 1.04) 0.2s;
}
.wd-sitemap.is-open .wd-sitemap__bg-panel::before {
  height: 100%;
}
.wd-sitemap.is-open .wd-sitemap__bg-panel::after {
  width: 0;
}

/* Close button row */
.wd-sitemap__close-wrap {
  position: relative;
  z-index: 10;
  max-width: var(--max-width);
  margin: auto;
  padding: 0 30px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.wd-sitemap__close-btn {
  position: relative;
  transition: transform 0.6s;
}
.wd-sitemap.is-open .wd-sitemap__close-btn .wd-gnb__bar:first-child {
  transform: translateY(9px) rotate(45deg);
}
.wd-sitemap.is-open .wd-sitemap__close-btn .wd-gnb__bar:last-child {
  width: 100%;
  transform: translateY(-9px) rotate(-45deg);
}

/* Sitemap content */
.wd-sitemap__content {
  position: relative;
  z-index: 5;
  height: calc(100% - var(--header-height));
}
.wd-sitemap__list {
  overflow: hidden;
  position: relative;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
}
.wd-sitemap__group {
  overflow: hidden;
  float: left;
  width: 25%;
  height: 100%;
}
.wd-sitemap__num { display: none; }
.wd-sitemap__title {
  overflow: hidden;
  color: var(--color-text);
  font-size: 2.25rem;
  letter-spacing: -0.033em;
  margin: 0 4rem 1.33em;
  font-weight: 600;
}

/* Sub items */
.wd-sitemap__sub a {
  overflow: hidden;
  position: relative;
  display: block;
  padding: 1.333em 4rem;
  color: var(--color-text-light);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  font-weight: 400;
  line-height: 1.2;
  transition: all 0.3s;
  text-decoration: none;
}
.wd-sitemap__sub a::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  content: "";
  height: 100%;
  background: var(--color-accent);
  transition: all 0.3s;
}
.wd-sitemap__sub a span {
  position: relative;
  z-index: 1;
}

/* Sitemap reveal animation for items */
.wd-sitemap__list span,
.wd-sitemap__title {
  display: inline-block;
  opacity: 0;
  transform: translateX(-50%);
  transition: transform 0.8s cubic-bezier(0.47, 0, 0.31, 1.04) 0s,
              opacity 0.8s cubic-bezier(0.47, 0, 0.31, 1.04) 0s;
}
.wd-sitemap.is-open .wd-sitemap__list span,
.wd-sitemap.is-open .wd-sitemap__title {
  opacity: 1;
  transform: translateX(0);
  transition: transform 0.8s cubic-bezier(0.47, 0, 0.31, 1.04),
              opacity 0.8s cubic-bezier(0.47, 0, 0.31, 1.04);
}

/* Hover */
@media (hover: hover) {
  .wd-sitemap__group:hover .wd-sitemap__title { color: var(--color-accent); }
  .wd-sitemap__sub a:hover { color: #fff; }
  .wd-sitemap__sub a:hover::after { width: 100%; }
}

/* ============================================================
   Responsive: <= 1200px
   ============================================================ */
@media (max-width: 1200px) {
  .wd-gnb__item > a { font-size: 1.125rem; padding: 0 1.5rem; }
  .wd-gnb__sub ul li a { font-size: 1rem; }
}

/* ============================================================
   Responsive: <= 1024px — Switch to Mobile GNB
   ============================================================ */
@media (max-width: 1024px) {
  .wd-gnb__inner-wrap {
    position: fixed;
    z-index: 10000;
  }
  .wd-gnb.is-fixed .wd-gnb__inner-wrap {
    background-color: var(--color-bg);
    border-bottom: 1px solid #eee;
  }

  /* Hide PC GNB & sitemap button */
  .wd-gnb__util { padding-right: 50px; }
  .wd-gnb__sitemap-btn { display: none; }
  .wd-gnb__nav { display: none; }
  .wd-gnb__overlay-bg { display: none; }

  /* Show mobile nav button */
  .wd-gnb__mobile-btn {
    display: flex;
    position: fixed;
    top: 25px;
    right: 30px;
    z-index: 10001;
    transition: all 0.4s ease-in-out;
  }
  .wd-gnb__mobile-btn.is-active .wd-gnb__bar:first-child {
    transform: translateY(9px) rotate(45deg);
  }
  .wd-gnb__mobile-btn.is-active .wd-gnb__bar:last-child {
    width: 100%;
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Mobile overlay BG */
  .wd-gnb__mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
  }

  /* Mobile nav — Full-screen style */
  .wd-gnb__mobile {
    display: block;
    position: fixed;
    top: -100%;
    right: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    background-color: var(--color-bg);
    z-index: 9999;
    transition: all 0.4s ease-in-out;
    visibility: hidden;
  }
  .wd-gnb__mobile.is-open {
    top: 0;
    visibility: visible;
  }

  /* Mobile wrapper */
  .wd-gnb__mobile-wrapper {
    height: auto;
    width: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    padding-top: 0;
    overflow: hidden;
  }
  .wd-gnb__mobile-inner {
    display: table;
    width: 100%;
    height: calc(100% - 1px);
    border-top: 1px solid #e5e5e5;
    padding: 0 30px;
    box-sizing: border-box;
  }

  /* Mobile 1depth */
  .wd-gnb__mobile-list {
    display: table-cell;
    padding-top: 5rem;
  }
  .wd-gnb__mobile-item {
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0s 0s;
    border-bottom: 1px solid #eee;
  }
  .wd-gnb__mobile.is-open .wd-gnb__mobile-item {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.8s, opacity 0.8s;
  }
  .wd-gnb__mobile.is-open .wd-gnb__mobile-item:nth-child(1) { transition-delay: 0.3s; }
  .wd-gnb__mobile.is-open .wd-gnb__mobile-item:nth-child(2) { transition-delay: 0.4s; }
  .wd-gnb__mobile.is-open .wd-gnb__mobile-item:nth-child(3) { transition-delay: 0.6s; }
  .wd-gnb__mobile.is-open .wd-gnb__mobile-item:nth-child(4) { transition-delay: 0.7s; }

  .wd-gnb__mobile-item > a {
    position: relative;
    display: block;
    padding: 2.5rem 30px;
    color: var(--color-text);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
  }
  .wd-gnb__mobile-item.is-active > a {
    color: var(--color-accent);
    border-bottom: 3px solid var(--color-accent);
  }
  .wd-gnb__mobile-item.has-sub > a::before {
    font-family: inherit;
    content: "+";
    position: absolute;
    top: 50%;
    right: 30px;
    font-size: 1.3em;
    transform: translateY(-50%);
    transition: all 0.4s ease-in-out;
  }
  .wd-gnb__mobile-item.has-sub.is-active > a::before {
    content: "\2212";
  }

  /* Mobile 2depth */
  .wd-gnb__mobile-sub {
    display: none;
    padding: 1.5rem 0;
  }
  .wd-gnb__mobile-sub ul li a {
    display: block;
    color: #666;
    font-size: 1.125rem;
    padding: 1rem 30px;
    font-weight: 600;
    text-decoration: none;
  }
}

/* ============================================================
   Responsive: <= 1024px — Sitemap mobile
   ============================================================ */
@media (max-width: 1024px) {
  .wd-sitemap__bg-box { display: none; }
  .wd-sitemap__group {
    float: none;
    width: auto !important;
    padding: 2em 0;
    border-bottom: 1px solid #ddd;
  }
  .wd-sitemap__title { margin: 0 2rem 0.5em; }
  .wd-sitemap__sub a { padding: 1em 2rem; }
}

/* ============================================================
   Responsive: <= 480px
   ============================================================ */
@media (max-width: 480px) {
  .wd-gnb__logo img { height: 30px; }
  .wd-gnb__logo-text { font-size: 1.125rem; }
  .wd-gnb__util { padding-right: 40px; }
}

/* ============================================================
   메인 페이지 투명 헤더
   ============================================================ */
.wd-gnb--transparent {
  position: absolute;
  height: auto;
}

.wd-gnb--transparent .wd-gnb__inner-wrap {
  background: transparent;
  border-bottom: none;
}

.wd-gnb--transparent .wd-gnb__logo-text {
  color: #fff;
}
.wd-gnb--transparent .wd-gnb__logo img.wd-gnb__logo-dark { display: none; }
.wd-gnb--transparent .wd-gnb__logo img.wd-gnb__logo-light { display: block; }

.wd-gnb--transparent .wd-gnb__item > a {
  color: rgba(255, 255, 255, 0.9);
}

.wd-gnb--transparent .wd-gnb__item > a:hover,
.wd-gnb--transparent .wd-gnb__item > a:focus {
  color: #fff;
}

.wd-gnb--transparent .wd-gnb__sitemap-btn .wd-gnb__bar {
  background-color: #fff;
}

.wd-gnb--transparent .wd-gnb__mobile-btn .wd-gnb__bar {
  background-color: #fff;
}

/* GNB 호버 시 또는 스크롤 시 배경 복원 */
.wd-gnb--transparent.gnb-open .wd-gnb__inner-wrap,
.wd-gnb--transparent.is-scrolled .wd-gnb__inner-wrap {
  position: fixed;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}

.wd-gnb--transparent.gnb-open .wd-gnb__logo-text,
.wd-gnb--transparent.is-scrolled .wd-gnb__logo-text {
  color: var(--color-text);
}
.wd-gnb--transparent.gnb-open .wd-gnb__logo img.wd-gnb__logo-dark,
.wd-gnb--transparent.is-scrolled .wd-gnb__logo img.wd-gnb__logo-dark { display: block; }
.wd-gnb--transparent.gnb-open .wd-gnb__logo img.wd-gnb__logo-light,
.wd-gnb--transparent.is-scrolled .wd-gnb__logo img.wd-gnb__logo-light { display: none; }

.wd-gnb--transparent.gnb-open .wd-gnb__item > a,
.wd-gnb--transparent.is-scrolled .wd-gnb__item > a {
  color: var(--color-text);
}

.wd-gnb--transparent.gnb-open .wd-gnb__sitemap-btn .wd-gnb__bar,
.wd-gnb--transparent.is-scrolled .wd-gnb__sitemap-btn .wd-gnb__bar {
  background-color: var(--color-text);
}

.wd-gnb--transparent.gnb-open .wd-gnb__mobile-btn .wd-gnb__bar,
.wd-gnb--transparent.is-scrolled .wd-gnb__mobile-btn .wd-gnb__bar {
  background-color: var(--color-text);
}
