/* 사이트맵 모달 */
/* 모달 기본 골격 — modal.css가 로드되지 않는 페이지(lib.do/lib.jsp 계열)에서도
   사이트맵이 단독으로 동작하도록 .sitemap 전용으로 자급한다. */
.modal.sitemap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  z-index: 200;
}
.modal-on {
  overflow: hidden;
  overscroll-behavior: none;
}
.modal-on .modal.sitemap.on {
  height: 100%;
}

.modal-on .gnb {
  opacity: 0;
  pointer-events: none;
}
.modal-on .modal.sitemap.on:not(:has(.dimed)) {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.modal.sitemap {
  user-select: none;
}
.modal.sitemap .modal-popup {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  box-shadow: none;
  opacity: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(-28px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.modal.sitemap .popup-content {
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  padding: 40px 0;
  max-width: var(--width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.modal.sitemap .sitemap-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--gray-dark);
}
.modal.sitemap .sitemap-head h1 {
  margin-bottom: 4px;
  font-size: 3em;
  font-weight: 800;
  color: var(--gray-dark);
}
.modal.sitemap .sitemap-head p {
  color: var(--gray-mid);
  line-height: 1.5;
  font-size: 1em;
  margin-top: 0;
  font-weight: bold;
}
.modal.sitemap .sitemap-head .close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--gray-dark);
  font-size: 1.4em;
}
.modal.sitemap .sitemap-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 40px;
}
.modal.sitemap .sitemap-list {
  display: flex;
  gap: 2em;
  align-items: flex-start;
}
.modal.sitemap .sitemap-section {
  flex: 1 1 0;
  min-width: 0;
}
.modal.sitemap .sitemap-section h2 {
  margin-bottom: 18px;
  font-size: 1.8em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-dark);
}
.modal.sitemap .sitemap-links {
  display: grid;
  gap: 36px;
}
.modal.sitemap .sitemap-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.modal.sitemap .sitemap-link a,
.modal.sitemap .sitemap-link span {
  display: inline-block;
  color: var(--gray-dark);
  font-size: 1.2em;
  font-weight: 700;
  transition: color 0.3s;
  cursor: pointer;
}
.modal.sitemap .sitemap-link a:hover {
  color: var(--main-color);
}
.modal.sitemap .sitemap-link p {
  flex: 1;
  margin-top: 0.1em;
  color: #888;
  line-height: 1.45;
  word-break: keep-all;
}
.modal-on .modal.sitemap.on .modal-popup {
  opacity: 1;
  transform: translateY(0);
}
.modal-on .modal.sitemap.on {
  padding: 0;
}

@media (max-width: 812px) {
  .modal.sitemap .popup-content {
    padding: 0;
  }
  .modal.sitemap .sitemap-head {
    position: relative;
    flex-direction: column;
    gap: 10px;
    margin: 24px 24px 0;
    padding-bottom: 20px;
    padding-right: 0;
  }
  .modal.sitemap .sitemap-head h1 {
    font-size: 2.4em;
  }
  .modal.sitemap .sitemap-head .close {
    position: absolute;
    top: -10px;
    right: -10px;
  }
  .modal.sitemap .sitemap-body {
    padding: 24px;
  }
  .modal.sitemap .sitemap-list {
    display: grid;
  }
  .modal.sitemap .sitemap-section {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }
  .modal.sitemap .sitemap-section h2 {
    font-size: 1.3em;
    width: 80px;
    flex-grow: 0;
    flex-shrink: 0;
    color: initial;
  }
  .modal.sitemap .sitemap-links {
    gap: 10px;
  }
}
