/* === SIDEBAR === */
#sidebar {
  width: 220px;
  background-color: var(--bg-sidebar);
  color: var(--text-muted);
  padding: 1.5em 1em;
  display: flex;
  flex-direction: column;
  user-select: none;
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.1);
  float: left;
  height: 100vh;
  border-right: 1px solid #ccc;
  box-sizing: border-box;
  padding: 1em;
}

/* Hide sidebar toggle button on desktop */
#sidebar-toggle {
  display: none;
}

/* === HEADER === */
#header {
  background-color: var(--bg-panel);
  color: var(--text-main);
  padding: 1em 1.5em;
  display: flex;
  justify-content: space-between;
  /* align-items: flex-start; */
  /* flex-wrap: wrap; */
  /* gap: 1em; */
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  user-select: none;
}

#header .title {
  font-size: 1.1em;
  font-weight: 700;
}

/* On small screens, stack title + top-bar */
@media (max-width: 600px) {
  #header {
    flex-direction: column;
    align-items: stretch;
  }

  .title-block,
  .top-bar {
    width: 100%;
  }
}

/* === MAIN CONTENT === */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-body);
}

#content {
  flex: 1;
  padding: 2em;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* === HEADER TITLE + FLAVOUR === */
.title-block {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

#site-title {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--text-main);
}

#site-flavour {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 0;
}

/* === SIDEBAR TITLE + LIST === */
#site-name {
  font-size: 1.3em;
  margin-bottom: 1em;
  color: var(--text-inverted);
  font-weight: 600;
}

#section-list {
  list-style: none;
  flex-grow: 1;
  overflow-y: auto;
}

#section-list li {
  padding: 0.5em 0;
  cursor: pointer;
  color: var(--text-subtle);
  transition: color 0.2s ease;
}

#section-list li:hover,
#section-list li.active {
  color: var(--text-inverted);
}

#section-list li {
  padding: 0.5em 0.8em;
  cursor: pointer;
  color: var(--text-subtle);
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#section-list li:hover {
  background-color: rgba(255, 255, 255, 0.05); /* subtle hover effect */
  color: var(--text-inverted);
}

#section-list li.active {
  background-color: rgba(255, 255, 255, 0.1); /* slightly more visible */
  color: var(--text-inverted);
  font-weight: 600;
}
