/* SMMM SGS - Custom Styles */
:root {
  --sidebar-width: 260px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

/* Sidebar */
.sidebar {
  background-color: var(--bs-dark);
  min-height: calc(100vh - 56px);
}

[data-bs-theme="light"] .sidebar {
  background-color: #f8f9fa;
}

[data-bs-theme="dark"] .sidebar {
  background-color: #212529;
}

.sidebar .nav-link {
  padding: 0.25rem 1rem;
  font-size: 0.9rem;
  color: var(--bs-body-color);
  border-radius: 0.25rem;
}

.sidebar .nav-link:hover {
  background-color: rgba(57, 73, 171, 0.1);
}

.sidebar .nav-link.active {
  background-color: var(--bs-primary);
  color: white !important;
}

.sidebar .small.text-muted {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* Course cards */
.course-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Tables */
.table {
  font-size: 0.9rem;
}

/* Mermaid diagrams */
.mermaid {
  text-align: center;
  margin: 1.5rem 0;
  overflow-x: auto;
}

/* Code */
pre:not(.mermaid) {
  background-color: var(--bs-light) !important;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
}

code {
  font-size: 0.875em;
}

/* Blockquotes */
.blockquote {
  border-left: 4px solid var(--bs-primary);
  padding-left: 1rem;
  margin: 1rem 0;
}

/* Images responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Dark mode overrides for mermaid */
[data-bs-theme="dark"] .mermaid {
  filter: invert(0.9) hue-rotate(180deg);
}

[data-bs-theme="dark"] pre:not(.mermaid) {
  background-color: #2d2d2d !important;
  color: #ccc;
}

/* Admonition alerts */
.alert {
  border-left-width: 4px;
}

/* Main content area */
#mainContent h2 {
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bs-primary);
}

#mainContent h3 {
  margin-top: 1.5rem;
}

#mainContent h2:first-child {
  margin-top: 0;
}

/* Search highlight */
.search-highlight {
  background-color: #fff3cd;
  padding: 0 2px;
  border-radius: 2px;
}

[data-bs-theme="dark"] .search-highlight {
  background-color: #664d03;
}
