/* 네비게이션 컨테이너는 기준 위치 */
.nav-container.cat-nav {
  position: relative;
  z-index: 20;
}

/* 드롭다운 공통 기본 스타일 (초기 숨김) */
.nav-container.cat-nav .hidden_cate,
.nav-container.cat-nav .hidden_board {
  position: absolute;
  max-width: 0px;
  left: 0;
  right: 0;
  top: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: 2px solid #2d5f3f;
  /* 포인트 라인 */
  border-radius: 0 0 12px 12px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* JS에서 .active 붙이면 오픈 */
.nav-container.cat-nav .hidden_cate.active,
.nav-container.cat-nav .hidden_board.active {
  max-height: 400px;
  max-width: 200px;
  /* 컨텐츠 높이에 맞게 조절 */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 내부 여백 */
.nav-container.cat-nav .hidden_cate > div,
.nav-container.cat-nav .hidden_board > div {
  padding: 8px 10px;
}

/* 드롭다운 내부 링크 */
.nav-container.cat-nav .hidden_cate a,
.nav-container.cat-nav .hidden_board a {
  display: block;
  padding: 5px 7px;
  margin: 4px 0;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

/* 링크 hover/active */
.nav-container.cat-nav .hidden_cate a:hover,
.nav-container.cat-nav .hidden_board a:hover {
  background: #f4f6f5;
  /* 은은한 회색 */
  color: #2d5f3f;
  /* 포인트 컬러 */
  transform: translateX(3px);
}

.nav-container.cat-nav .hidden_cate a:active,
.nav-container.cat-nav .hidden_board a:active {
  transform: translateX(3px) scale(0.98);
}

/* 상단 네비게이션 텍스트 링크 (밑줄 애니메이션) */
/* 주의: 동일 id가 반복될 수 있으니 가능하면 class로 교체 권장 */
#category-link,
#board-link {
  color: #1f2937 !important;
  font-weight: 600;
  position: relative;
  transition: color 0.2s ease;
}

#category-link::after,
#board-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2d5f3f, #4a9d6a);
  transition: width 0.3s ease;
}

#category-link:hover::after,
#board-link:hover::after {
  width: 100%;
}

/* 드롭다운 내 구분선 */
.nav-container.cat-nav .hidden_cate hr,
.nav-container.cat-nav .hidden_board hr {
  border: none;
  height: 1px;
  background: #e5e7eb;
  margin: 12px 0;
}

/* 모션 최소화 환경 */
@media (prefers-reduced-motion: reduce) {
  .nav-container.cat-nav .hidden_cate,
  .nav-container.cat-nav .hidden_board,
  .nav-container.cat-nav .hidden_cate a,
  .nav-container.cat-nav .hidden_board a,
  #category-link::after,
  #board-link::after {
    transition: none;
  }
}

/* 반응형 */
@media (max-width: 768px) {
  .nav-container.cat-nav .hidden_cate > div,
  .nav-container.cat-nav .hidden_board > div {
    padding: 14px 16px;
  }

  .nav-container.cat-nav .hidden_cate a,
  .nav-container.cat-nav .hidden_board a {
    padding: 8px 12px;
    font-size: 14px;
  }
}
