/* 사이드바 스타일 */
#sidebar {
    width: 300px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-image: url('../images/blueprint-bg.jpg');
    background-repeat: repeat;
    background-color: #2c3e50;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2em;
    letter-spacing: -0.01em; /* 추가: 자간 미세 조정 */
}

.sidebar-content {
    padding: 20px;
}

.table-of-contents {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 6px;
}

.table-of-contents a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 2px 0;
    transition: opacity 0.3s;
    opacity: 0.9;
    line-height: 1.3;
    letter-spacing: -0.01em; /* 추가: 자간 미세 조정 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.table-of-contents a:hover {
    opacity: 1;
    text-decoration: underline;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 15px;
    margin-top: 3px;
}

.table-of-contents ul li {
    margin-bottom: 3px;
}

.table-of-contents ul a {
    font-size: 0.9em;
    color: #ffffff;
    opacity: 0.8;
    line-height: 1.2;
    letter-spacing: -0.01em; /* 추가: 자간 미세 조정 */
}

.table-of-contents ul a:hover {
    opacity: 1;
    text-decoration: underline;
}

.sub-chapter-number {
    font-weight: normal !important;
  }

/* 활성 링크 스타일 */
.table-of-contents a.active {
    font-weight: normal;  /* bold에서 normal로 변경 */
    color: #8EEDC7;       /* 흰색(#ffffff)에서 옅은 녹색으로 변경 */
    opacity: 1;
    text-decoration: underline;  /* 밑줄은 유지 */
}

/* 모바일 스타일 */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    #sidebar.active {
        transform: translateX(0);
    }

    #mobile-sidebar-toggle {
        display: block;
        position: fixed;
        left: 1rem;
        top: 1rem;
        z-index: 900;
        background: white;
        border: none;
        padding: 0.5rem;
        font-size: 1.5rem;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* 소챕터(3단계 중첩 메뉴) 스타일 */
.table-of-contents ul ul a {
    font-size: 0.9em;       /* 폰트 크기 더 줄임 */
    font-weight: 300;       /* 폰트 두께 얇게 */
    opacity: 0.9;           /* 약간 더 투명하게 */
    padding-left: 4px;      /* 살짝 들여쓰기 */
    line-height: 1.1;       /* 행간 줄이기 (기존 1.2에서 축소) */
}

/* 호버 시 원래 불투명도로 돌아오도록 */
.table-of-contents ul ul a:hover {
    opacity: 1;
}

/* 로고 링크 스타일 */
.logo-link {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s;
  }
  
  .logo-link:hover {
    opacity: 0.8;
    text-decoration: none;
  }

/* 페이지 없는 하위 섹션에 링크 연결 끊기(1) */
.no-link {
  pointer-events: none; /* 모든 마우스 이벤트 무시 */
  cursor: default;      /* 커서 모양을 기본으로 변경 */
}

/* 페이지 없는 하위 섹션에 링크 연결 끊기(2). 필요하다면 시각적으로 약간 다르게 보이도록 할 수 있습니다 (선택 사항) */
.no-link {
  opacity: 0.8;         /* 약간 더 투명하게 (원하면 조정) */
}