/* ============================================
   민티의 자동화 학습 가이드
   ============================================ */

/* === 1. 본문 글자 크기 (기본 대비 10% 증가) === */
.md-typeset {
  font-size: 0.88rem;
  line-height: 1.8;
}

.md-typeset h1 { font-size: 1.8rem; }
.md-typeset h2 { font-size: 1.4rem; margin-top: 2rem; }
.md-typeset h3 { font-size: 1.15rem; }
.md-typeset table { font-size: 0.85rem; }

/* === 2. 사이드바 카테고리 간격 === */
.md-nav--primary > .md-nav__list > .md-nav__item {
  margin-bottom: 8px;
}

/* === 3. 카테고리 헤더 === */
.md-nav__item--nested > .md-nav__link {
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.3px;
  padding: 10px 12px !important;
  border-radius: 6px;
  border-left: 4px solid #ccc;
}

/* === 4. 카테고리별 색상 === */
/* 시작하기 - 초록 */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(2) > .md-nav__link {
  border-left-color: #43A047 !important;
  background: rgba(67, 160, 71, 0.08) !important;
  color: #2E7D32 !important;
}
/* Claude Code 핵심 - 인디고 */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(3) > .md-nav__link {
  border-left-color: #5C6BC0 !important;
  background: rgba(92, 107, 192, 0.08) !important;
  color: #3949AB !important;
}
/* 웹 & 배포 - 주황 */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(4) > .md-nav__link {
  border-left-color: #FF7043 !important;
  background: rgba(255, 112, 67, 0.08) !important;
  color: #E64A19 !important;
}
/* 실전 자동화 - 보라 */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(5) > .md-nav__link {
  border-left-color: #AB47BC !important;
  background: rgba(171, 71, 188, 0.08) !important;
  color: #8E24AA !important;
}
/* 마케팅 & 콘텐츠 - 청록 */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(6) > .md-nav__link {
  border-left-color: #26A69A !important;
  background: rgba(38, 166, 154, 0.08) !important;
  color: #00897B !important;
}
/* 환경 설정 - 블루그레이 */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7) > .md-nav__link {
  border-left-color: #78909C !important;
  background: rgba(120, 144, 156, 0.08) !important;
  color: #546E7A !important;
}
/* 빌드 케이스 - 앰버 */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(8) > .md-nav__link {
  border-left-color: #FFA726 !important;
  background: rgba(255, 167, 38, 0.08) !important;
  color: #F57F17 !important;
}

/* === 5. 하위 메뉴 아이템 === */
.md-nav__item--nested .md-nav .md-nav__link {
  padding: 6px 12px 6px 24px !important;
  font-size: 0.82rem !important;
  border-radius: 4px;
}
.md-nav__item--nested .md-nav .md-nav__link:hover {
  background: rgba(0, 0, 0, 0.05);
}
.md-nav__link--active {
  font-weight: 700 !important;
  color: var(--md-accent-fg-color) !important;
}

/* === 6. 햄버거 토글 버튼 (데스크톱) === */
.sidebar-toggle-btn {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  padding: 8px 12px;
  margin-right: 8px;
  line-height: 1;
  opacity: 0.9;
}
.sidebar-toggle-btn:hover {
  opacity: 1;
}

@media screen and (min-width: 76.25em) {
  .sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
  }

  /* 사이드바 숨김 상태 */
  body.sidebar-hidden .md-sidebar--primary {
    transform: translateX(-100%);
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  /* 사이드바 보임 상태 (기본) */
  .md-sidebar--primary {
    transition: all 0.3s ease;
  }

  /* 사이드바 숨기면 본문 넓어짐 */
  body.sidebar-hidden .md-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
  }
}

/* === 7. 다크모드 === */
[data-md-color-scheme="slate"] .md-nav__item--nested > .md-nav__link {
  border-left-color: rgba(255,255,255,0.3) !important;
}
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(2) > .md-nav__link { background: rgba(67,160,71,0.15) !important; color: #81C784 !important; border-left-color: #66BB6A !important; }
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(3) > .md-nav__link { background: rgba(92,107,192,0.15) !important; color: #9FA8DA !important; border-left-color: #7986CB !important; }
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(4) > .md-nav__link { background: rgba(255,112,67,0.15) !important; color: #FFAB91 !important; border-left-color: #FF8A65 !important; }
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(5) > .md-nav__link { background: rgba(171,71,188,0.15) !important; color: #CE93D8 !important; border-left-color: #BA68C8 !important; }
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(6) > .md-nav__link { background: rgba(38,166,154,0.15) !important; color: #80CBC4 !important; border-left-color: #4DB6AC !important; }
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7) > .md-nav__link { background: rgba(120,144,156,0.15) !important; color: #B0BEC5 !important; border-left-color: #90A4AE !important; }
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(8) > .md-nav__link { background: rgba(255,167,38,0.15) !important; color: #FFD54F !important; border-left-color: #FFCA28 !important; }

[data-md-color-scheme="slate"] .md-nav__item--nested .md-nav .md-nav__link:hover {
  background: rgba(255, 255, 255, 0.06);
}
