/* ========================================
   Path Box - 브레드크럼 네비게이션 (KRDS 스타일)
   PathBox.tsx에서 사용
   ======================================== */

.path-box-wrapper {
  background-color: #fff;
}

.path-box-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Path Box 본체 - 브레드크럼 메뉴 바 */
.path-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.path-box .path {
  display: flex;
  align-items: center;
  height: 100%;
}

/* ========================================
   홈 버튼 - 네이비 배경
   ======================================== */
.path-box .path-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #001B54;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.path-box .path-home-btn:hover {
  background: #002D7A;
}

.path-box .path-home-btn .home-icon {
  width: 24px;
  height: 24px;
  color: #fff;
}

/* ========================================
   드롭다운 메뉴 영역
   ======================================== */
.path-box .path-depth-wrap {
  display: flex;
  align-items: center;
  height: 100%;
}

.path-box .path-depth-wrap > ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.path-box .path-depth-wrap > ul > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  min-width: 240px;
  max-width: 240px;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

/* 선택된 항목 (브레드크럼 아이템) */
.path-box .path-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 20px;
}

/* 메뉴 링크 스타일 */
.path-box .path-selected .path-link,
.path-box .path-selected .path-text {
  display: flex;
  align-items: center;
  flex: 1;
  height: 100%;
  font-family: "Pretendard", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #222222;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  line-height: 160%;
}

.path-box .path-selected .path-link:hover {
  color: #001B54;
}

/* 드롭다운 토글 버튼 */
.path-box .path-selected .path-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.path-box .path-selected .arrow-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #222222;
}

.path-box .path-depth-wrap > ul > li.is-open .path-selected .arrow-icon {
  transform: rotate(180deg);
  color: #001B54;
}

/* 마지막 항목 활성화 스타일 */
.path-box .path-depth-wrap > ul > li.is-active {
  background-color: #f8f9fa;
}

.path-box .path-depth-wrap > ul > li.is-active .path-selected .path-link,
.path-box .path-depth-wrap > ul > li.is-active .path-selected .path-text {
  font-weight: 600;
  color: #001B54;
}

/* ========================================
   드롭다운 메뉴 (2뎁스 펼침) - 부드러운 애니메이션
   ======================================== */
.path-box .path-depth {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 240px;
  background: #fff;
  border: 1px solid #C0C0C0;
  border-top: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 0;
  
  /* 부드러운 애니메이션 */
  animation: dropdownSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: top center;
}

@keyframes dropdownSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.path-box .path-depth li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #E5E5E5;
  opacity: 0;
  animation: dropdownItemFadeIn 0.2s ease forwards;
}

.path-box .path-depth li:nth-child(1) { animation-delay: 0.05s; }
.path-box .path-depth li:nth-child(2) { animation-delay: 0.08s; }
.path-box .path-depth li:nth-child(3) { animation-delay: 0.11s; }
.path-box .path-depth li:nth-child(4) { animation-delay: 0.14s; }
.path-box .path-depth li:nth-child(5) { animation-delay: 0.17s; }
.path-box .path-depth li:nth-child(6) { animation-delay: 0.20s; }
.path-box .path-depth li:nth-child(7) { animation-delay: 0.23s; }
.path-box .path-depth li:nth-child(8) { animation-delay: 0.26s; }
.path-box .path-depth li:nth-child(n+9) { animation-delay: 0.29s; }

@keyframes dropdownItemFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.path-box .path-depth li:last-child {
  border-bottom: none;
}

/* 드롭다운 메뉴 링크 */
.path-box .path-depth li .dropdown-link {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  font-family: "Pretendard", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
  cursor: pointer;
}

.path-box .path-depth li .dropdown-link:hover {
  background-color: #f5f7fa;
  color: #001B54;
  padding-left: 24px;
}

/* 현재 활성화된 메뉴 */
.path-box .path-depth li.active .dropdown-link,
.path-box .path-depth li .dropdown-link.active {
  background-color: #001B54;
  color: #fff;
  font-weight: 600;
}

.path-box .path-depth li.active .dropdown-link:hover,
.path-box .path-depth li .dropdown-link.active:hover {
  background-color: #002D7A;
  color: #fff;
  padding-left: 24px;
}

/* ========================================
   공유/프린트 버튼
   ======================================== */
.path-box .share-box ul {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0 20px 0 0;
}

.path-box .share-box button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: #F8F8F8;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.path-box .share-box .share button {
  background: #e8f4ff;
  border-color: #b8dcff;
}

.path-box .share-box .share button:hover {
  background: #d0e8ff;
}

.path-box .share-box .share button svg {
  color: #246BEB;
}

.path-box .share-box .print button {
  background: #fff5e6;
  border-color: #ffd699;
}

.path-box .share-box .print button:hover {
  background: #ffebcc;
}

.path-box .share-box .print button svg {
  color: #e67700;
}

.path-box .share-box button svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   하단 라인 (브레드크럼 바 아래)
   ======================================== */
.path-box-border {
  width: 100%;
  height: 1px;
  background-color: #C0C0C0;
}

/* ========================================
   페이지 타이틀 영역
   ======================================== */
.page-title-box {
  padding: 40px 20px 0;
}

.page-title-box .page-title {
  font-size: 40px;
  font-weight: 700;
  color: #1D1D1D;
  margin: 0;
  letter-spacing: -0.5px;
  text-align: center;
  line-height: 1.3;
  padding-bottom: 15px;
  border-bottom: none;
  background-image: url(/images/Bar.png);
  background-repeat: no-repeat;
  background-position: center bottom;
}

/* ========================================
   새창 열기 아이콘
   ======================================== */
.path-box .path-link .new-window-icon,
.path-box .dropdown-link .new-window-icon {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  flex-shrink: 0;
  opacity: 0.7;
}

.path-box .path-link:hover .new-window-icon,
.path-box .dropdown-link:hover .new-window-icon {
  opacity: 1;
}

.path-box .path-depth li.active .dropdown-link .new-window-icon,
.path-box .path-depth li .dropdown-link.active .new-window-icon {
  color: #fff;
}

/* ========================================
   반응형 - 태블릿
   ======================================== */
@media (max-width: 1024px) {
  .path-box .path-depth-wrap > ul > li {
    min-width: 180px;
  }

  .path-box .path-selected {
    padding: 0 16px;
  }

  .path-box .path-selected .path-link,
  .path-box .path-selected .path-text {
    font-size: 16px;
  }

  .path-box .share-box ul {
    padding: 0 16px 0 0;
  }

  .page-title-box {
    padding: 32px 16px 0;
  }

  .page-title-box .page-title {
    font-size: 32px;
    padding-bottom: 15px;
  }
}

/* ========================================
   반응형 - 모바일
   ======================================== */
@media (max-width: 767px) {
  .path-box {
    height: 50px;
  }

  .path-box .path {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .path-box .path-home-btn {
    width: 50px;
    min-width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .path-box .path-home-btn .home-icon {
    width: 20px;
    height: 20px;
  }

  .path-box .path-depth-wrap {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .path-box .path-depth-wrap::-webkit-scrollbar {
    display: none;
  }

  .path-box .path-depth-wrap > ul > li {
    min-width: 0;
    max-width: none;
    flex-shrink: 0;
  }

  .path-box .path-selected {
    padding: 0 10px;
  }

  /* 모바일: 텍스트 잘림 방지 - flex:1(=1 1 0%)을 flex:0 0 auto로 변경 */
  .path-box .path-selected .path-link,
  .path-box .path-selected .path-text {
    font-size: 13px;
    flex: 0 0 auto;
  }

  .path-box .path-selected .path-dropdown-btn {
    flex-shrink: 0;
  }

  .path-box .path-selected .arrow-icon {
    width: 18px;
    height: 18px;
  }

  /* 모바일 드롭다운: JS에서 position:fixed 인라인 스타일로 위치 지정 (overflow 클리핑 우회) */
  .path-box .path-depth {
    min-width: unset;
    max-height: 60vh;
    overflow-y: auto;
  }

  .path-box .path-depth li .dropdown-link {
    padding: 12px 16px;
    font-size: 14px;
  }

  .path-box .share-box {
    display: none;
  }

  .page-title-box {
    padding: 24px 16px 0;
  }

  .page-title-box .page-title {
    font-size: 24px;
    padding-bottom: 15px;
  }
}

/* 스크린리더 전용 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}