.header {
  z-index: 99;
  --header-h: 80px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background-color: rgba(255, 255, 255, .6);
}

.header__inner {
  width: 100%;
  height: var(--header-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  margin-left: 80px;
}

.header__logo img {
  height: 38px;
}

.header__menu {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 40px;
  font-family: var(--font-pointen);
}

/* header__btn__lang language change button */
.header__btn__lang {
  position: relative;
  cursor: pointer;
}

.header__btn__lang span {
  position: relative;
  padding-left: 10px;
}

.header__btn__lang span::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 2px;
  width: 1px;
  background: #000;
}

.header__btn__lang span img {
  margin-left: 3px;
  width: 11px;
  transform: rotate(0deg) translateY(-2px);
  transition: transform .2s;
}

.header__btn__lang:hover span img {
  transform: rotate(180deg) translateY(2px);
}

.header__btn__lang:hover .header__lang__link {
  display: block;
}

.header__lang__link {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  background-color: var(--c-main);
  color: #fff;
  text-align: center;
  padding: 6px 0;
}

.header__lang__link li {
  padding: 2px 0;
}

.header__lang__link li:hover {
  text-decoration: underline;
}

/* header__btn__menu sitemap button */
.header__btn__sitemap {
  color: #ffffff;
  background-color: var(--c-main);
  width: calc(var(--header-h) + 20px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  z-index: 100;
}

.header__btn__sitemap p {
  font-family: var(--font-main);
  font-size: 0.8rem;
}

.header__btn__menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 18px;
  margin-top: 5px;
}

.header__btn__menu .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    width 0.3s ease;
  transform-origin: center center;
}

.header__btn__sitemap:hover .header__btn__menu .bar:nth-child(2) {
  width: 80%;
}

/* 첫 번째 bar */
.header__btn__sitemap.active .header__btn__menu .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

/* 두 번째 bar (가운데 숨김) */
.header__btn__sitemap.active .header__btn__menu .bar:nth-child(2) {
  width: 0px;
  opacity: 0;
}

/* 세 번째 bar */
.header__btn__sitemap.active .header__btn__menu .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* GNB */
.header__gnb {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 1.125rem;
}

.header__gnb > li {
  position: relative;
  height: var(--header-h);
  padding: 0 14px;
}

.header__gnb > li > a {
  line-height: var(--header-h);
}

.header__gnb > li:hover .header__sub {
  display: flex;
}

.header__sub {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 100%;
  width: max-content;
  color: #ffffff;
  background-color: rgba(0, 0, 0, .4);
  padding: 30px 20px;
  font-family: var(--font-main);
  flex-direction: column;
  gap: 20px;
}

.header__sub::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--c-main);
}

.header__sub a:hover {
  color: var(--c-main);
}

/* --- Header 반응형 --- */

/* 1. 노트북 & 테블릿 가로 (1440px ~ 1024px) */
@media screen and (max-width: 1440px) {
  .header__logo {
    margin-left: 40px;
  }

  /* 로고 여백 축소 */
  .header__gnb {
    gap: 15px;
  }

  .header__gnb > li {
    padding: 0 10px;
  }

  /* 메뉴 간격 축소 */
}

@media screen and (max-width: 1280px) {
  .header__gnb {
    gap: 10px;
    font-size: 1rem;
  }
}

/* point */
@media screen and (max-width: 1209px) {
  .header__gnb {
    display: none;
  }

  .header__btn__lang span::before {
    content: '';
    display: none;
  }
}

/* 2. 태블릿 (1024px ~ 768px) */
@media screen and (max-width: 1024px) {
  .header {
    --header-h: 70px;
  }

  /* 헤더 높이 살짝 축소 */
  .header__logo {
    margin-left: 20px;
  }

  .header__logo img {
    height: 32px;
  }

  .header__btn__sitemap {
    width: 80px;
  }

  /* 사이트맵 버튼 너비 조절 */
}

/* 3. 스마트폰 (768px 이하) */
@media screen and (max-width: 768px) {
  .header {
    --header-h: 60px;
    background-color: #fff;
    /* 모바일은 가독성을 위해 불투명 화이트 권장 */
  }

  .header__logo {
    margin-left: 15px;
  }

  .header__logo img {
    height: 28px;
  }

  /* 사이트맵 버튼 디자인 변경 (텍스트 제외 아이콘 집중) */
  .header__btn__sitemap {
    width: 60px;
  }

  .header__btn__sitemap p {
    display: none;
  }

  /* 'MENU' 글자 숨김 */
  .header__btn__menu {
    width: 24px;
    height: 16px;
    margin-top: 0;
  }

  .header__btn__sitemap.active .header__btn__menu .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  /* 모바일 서브메뉴(GNB)는 보통 사이트맵 클릭 시 나타나는 
     전체화면 오버레이 방식으로 별도 구현하거나 아래처럼 처리합니다. */
}

/* 4. 초소형 스마트폰 (480px 이하) */
@media screen and (max-width: 480px) {
  .header__logo img {
    height: 24px;
  }

  .header__menu {
    gap: 16px;
  }
}

/* Sitemap */
/* sitemap__wrap */
.sitemap__wrap {
  --sitemap--point: var(--c-main);
  /* 차분한 팥색 계열 브라운 */
  --sitemap--accent: #999999;
  /* 부드러운 오크/골드 */
  --sitemap--bg: #f9f7f2;
  /* 한지 느낌의 미색 배경 */

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--sitemap--bg);
  /* 아주 미세한 종이 질감 패턴 (선택사항) */
  background-image: url('https://www.transparenttextures.com/patterns/natural-paper.png');
  color: var(--sitemap--point);
  z-index: 99;
  overflow-y: auto;
  font-family: 'Georgia', 'Noto Serif KR', serif;
}

.sitemap__box {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 5%;
  box-sizing: border-box;
}

.sitemap {
  width: 100%;
  max-width: 1300px;
}

/* 리스트 레이아웃: 정갈한 격자 구조 */
.sitemap__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* 4단 구성 */
  gap: 0;
  padding: 0;
  border-top: 2px solid var(--sitemap--point);
  border-bottom: 2px solid var(--sitemap--point);
}

.sitemap__list > li {
  padding: 50px 20px;
  border-right: 1px solid rgba(125, 90, 68, 0.15);
  text-align: center;
  transition: background 0.4s ease;
}

.sitemap__list > li:last-child {
  border-right: none;
}

/* 메인 메뉴 타이틀 */
.sitemap__list > li > a {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sitemap--point);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 8px;
}

/* 호버 시 아래에 가느다란 선이 생기는 효과 */
.sitemap__list > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--sitemap--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.sitemap__list > li:hover {
  background: rgba(255, 255, 255, 0.5);
}

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

/* 서브 리스트 */
.sitemap__sublist {
  list-style: none;
  padding: 0;
}

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

.sitemap__sublist li a {
  font-size: 0.95rem;
  color: #8a7a6e;
  text-decoration: none;
  transition: color 0.3s;
  font-family: var(--font-main);
}

.sitemap__sublist li a:hover {
  color: var(--sitemap--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 반응형 */
@media (max-width: 900px) {
  .sitemap__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .sitemap__list > li:nth-child(even) {
    border-right: none;
  }

  .sitemap__list > li {
    border-bottom: 1px solid rgba(125, 90, 68, 0.15);
  }

  .sitemap__list > li:last-child {
    border-bottom: none;
    border-right: 1px solid rgba(125, 90, 68, 0.15);
  }
}

/* 사이트맵이 열렸을 때 body 스크롤 방지 */
body.no-scroll {
  overflow: hidden;
  /* Lenis 사용 시 간혹 터치 이벤트가 튈 수 있으므로 추가 */
  touch-action: none;
}