/* *****************************************

              *** README ***
  수정사항 있는 거 적는 곳

****************************************** */

.header {

  /* 헤더 높이 */
  --header-height: 100px;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  color: #ffffff;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  height: var(--header-height);
}

/* header inner 크기 관리 */
.header__inner {
  max-width: 100%;
  padding: 0 0px;
  margin: 0 auto;
}

/* @media (max-width: 1200px) {
  .header__inner {
    padding: 0 40px;
  }
}

@media (max-width: 992px) {
  .header__inner {
    padding: 0 30px;
  }
}

@media (max-width: 768px) {
  .header__inner {
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .header__inner {
    padding: 0 15px;
  }
} */

/* (선택) 가로 길이 지정 */
/* 각각 설정은 html 순서대로 css 정렬 */
/* 단 네비게이션은 복잡하므로 최하단 작성 */
.header__logo {
  width: 400px;
}

.header__nav {
  flex: 1;
}

.header__btn__global {
  width: 200px;
}

.header__btn__menu {
  width: 100px;
}

/* header__logo */
.header__logo {
  display: flex;
  padding-left: 50px;
}

.header__logo a {
  position: relative;
  z-index: 100;
}

.header__logo img {
  height: 70px;
}

/* header__btn__global */
.header__btn__global {
  cursor: pointer;
  transform: translateY(0px);
  position: relative;
}

.header__btn__global svg {
  width: 20px;
}

.header__btn__global span {
  font-size: 1.25rem;
  display: block;
  width: 40px;
}

.header__btn__global__box {
  position: absolute;
  left: 50%;
  top: -20px;
  transform: translateX(-50%);
  height: 0px;
  padding: 10px;
  transition: all .3s;
}

.header__btn__global__current {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: inherit;
}

.header__btn__global__expand {
  min-width: 80px;
  margin-top: 10px;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}

.header__btn__global__expand a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.header__btn__global__expand .img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
}

.header__btn__global__expand .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header__btn__global:hover .header__btn__global__box {
  height: 76px;
  background-color: var(--color-main);
  border-radius: 14px;
  color: #ffffff !important;
}

.header__btn__global:hover .header__btn__global__expand {
  opacity: 1;
  visibility: visible;
}

/* header__btn__menu */
.header__btn__menu {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header__btn__sitemap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  cursor: pointer;
  position: relative;
  z-index: 100;
}

.header__btn__sitemap .bar {
  display: block;
  width: 100%;
  height: 1px;
  background-color: #ffffff;
  transition: 0.3s ease;
  transform-origin: center center;
}

/* header__nav */
/* 대메뉴 */
.header__gnb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(40px, 7vw, 150px);
  height: var(--header-height);

  font-size: 1.125rem;
  font-weight: 600;
}

/* 서브메뉴 */
.header__sub {
  position: absolute;
  top: 100%;
  left: 0;
  top: var(--header-height);
  width: 100%;
  height: 250px;
  background: #ffffff;
  border-top: 1px solid var(--color-main);

  font-size: 1.125rem;
  font-weight: 400;
}

.header__sub__wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.header__sub__list {
  position: absolute;
  top: 0;
  height: 100%;
  text-align: center;
  padding-top: 16px;
}

.header__sub__list li {
  padding: 10px 0;
}

/* sitemap__wrap */
.sitemap__wrap {
  --color--smpoint: #e67e22;
  --color--smbg: #0a0a0a;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color--smbg);
  color: #fff;
  z-index: 99;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sitemap__box {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 8vw;
  box-sizing: border-box;
  overflow: hidden;
}

.sitemap__deco {
  position: absolute;
  left: -50px;
  bottom: -50px;
  width: 600px;
  opacity: .1;
  pointer-events: none;
  z-index: 0;
}

.sitemap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.sitemap__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 80px 40px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap__list > li {
  position: relative;
  counter-increment: sitemap-counter;
}

.sitemap__list > li::before {
  content: "0" counter(sitemap-counter);
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--color--smpoint);
  margin-bottom: 25px;
  letter-spacing: 0.2em;
  font-weight: 600;
}

.sitemap__list > li > a {
  display: inline-block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: 35px;
  transition: all 0.3s ease;
}

.sitemap__list > li > a::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color--smpoint);
  margin-top: 12px;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.sitemap__list > li:hover > a {
  color: var(--color--smpoint);
}

.sitemap__list > li:hover > a::after {
  width: 100%;
}

.sitemap__sublist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap__sublist li {
  margin-bottom: 16px;
}

.sitemap__sublist li a {
  font-size: 1.1rem;
  color: #aaa;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s;
  display: inline-block;
}

.sitemap__sublist li a:hover {
  color: #fff;
  padding-left: 10px;
}

@media (max-width: 1200px) {
  .sitemap__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 40px;
  }
}

@media (max-width: 768px) {
  .sitemap__box {
    align-items: flex-start;
    padding: 100px 40px;
  }

  .sitemap__deco {
    display: none;
  }

  .sitemap__list {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .sitemap__list > li {
    border-bottom: none !important;
    padding: 15px 0;
    transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sitemap__list > li::before {
    margin-bottom: 6px;
    font-size: 0.75rem;
    opacity: 0.8;
  }

  .sitemap__list > li > a {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
    line-height: 1.1;
    transition: color 0.3s ease;
  }

  .sitemap__list > li > a::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--color--smpoint);
    margin-top: 10px;
    /* 대메뉴 글자와 선 사이 간격 미세 단축 */
    transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .sitemap__sublist {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    margin-top: 0;
    /* 닫혔을 때는 여백 없음 */
    padding-left: 2px;
    /* 닫힐 때는 0.4s */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease;
  }

  .sitemap__list > li.is-open {
    padding-top: 20px;
    /* 열릴 때 상단 여백 살짝 부여 */
    padding-bottom: 8px;
    /* 다음 대메뉴와 멀어지지 않게 최소화 */
  }

  .sitemap__list > li.is-open > a {
    color: var(--color--smpoint);
  }

  .sitemap__list > li.is-open .sitemap__sublist {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    /* 대메뉴 밑선과 서브메뉴 사이의 간격을 대폭 좁힘 */
    margin-top: 12px;
    padding-bottom: 12px;
    /* 서브메뉴 끝과 다음 대메뉴 사이의 여백 */
    /* 열릴 때 속도: 1.1s */
    transition: max-height 1.1s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.8s ease 0.1s;
  }

  .sitemap__sublist li {
    margin-bottom: 10px;
  }

  .sitemap__sublist li:last-child {
    margin-bottom: 0;
  }

  .sitemap__sublist li a {
    font-size: 1.1rem;
    color: #bbb;
    font-weight: 400;
    transition: all 0.3s;
  }
}

body.no-scroll {
  overflow: hidden !important;
  touch-action: none;
}

.sitemap__wrap {
  touch-action: auto !important;
}

/* *****************************************

              *** Active ***
    hover, scroll 에 따른 header 변경 요소

****************************************** */

.header.hovered,
.header.scrolled {
  color: #000000;
  background-color: #ffffff;
}

.header.hovered .header__gnb,
.header.scrolled .header__gnb,
.header.hovered .header__btn,
.header.scrolled .header__btn {
  color: #000;
}

.header.hovered .header__btn__sitemap .bar,
.header.scrolled .header__btn__sitemap .bar {
  background-color: #000000;
}

/* active 시 (열릴 때) */
.header__btn__sitemap.active .bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.header__btn__sitemap.active .bar:nth-child(2) {
  opacity: 0;
}

.header__btn__sitemap.active .bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* active면 색상 변경 */
.header__btn__sitemap.active .bar {
  background-color: #ffffff !important;
}

/* *****************************************

              *** media ***
        브레이크 포인트 반응형 제어   

****************************************** */

@media screen and (max-width: 1440px) {
  .header__logo {
    width: 200px;
  }
}

@media screen and (max-width:1280px) {

  .header__btn__global {
    width: 150px;
  }

  /* header__btn__global */
  .header__btn__global svg {
    width: 18px;
  }

  .header__btn__global span {
    font-size: 1rem;
  }

  .header__btn__global__box {
    top: -18px;
  }

  .header__btn__global__expand .img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    overflow: hidden;
  }

  .header__btn__global:hover .header__btn__global__box {
    height: 70px;
  }

  /* 대메뉴 */
  .header__gnb {
    font-size: 1rem;
  }

  /* 서브메뉴 */
  .header__sub {
    font-size: 1rem;
  }
}

@media screen and (max-width:1024px) {
  .header {
    /* 헤더 높이 */
    --header-height: 80px;
  }

  .header__btn__global {
    flex: 1;
  }

  /* header__logo */
  .header__logo {
    padding-left: 36px;
  }

  .header__logo img {
    height: 56px;
  }

  /* header__btn__global */
  .header__btn__global__box {
    left: auto;
    right: 0;
    transform: translateX(0);
  }

  .header__nav {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .header__inner {
    gap: 0;
  }

  .header__btn__menu {
    width: 70px;
    padding-right: 10px;
  }

  /* header__logo */
  .header__logo {
    padding-left: 28px;
  }
}

@media screen and (max-width: 480px) {

  /* header__logo */
  .header__logo {
    padding-left: 24px;
  }

  .header__logo img {
    height: 46px;
  }

  /* header__btn__global */
  .header__btn__global svg {
    width: 20px;
  }

  .header__btn__global span {
    display: none;
  }

  .header__btn__global__box {
    top: -20px;
  }

  .header__btn__global__expand {
    min-width: 26px;
  }

  .header__btn__global__expand .img {
    width: 20px;
    height: 20px;
  }
}