body {
  font-family: sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #212529;
}

header {
  background-color: #343a40;
  color: white;
  padding: 1rem 2rem;
  text-align: center;
}

header h1 {
  margin: 0;
}

main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  font-size: 0.9em;
  color: #6c757d;
}

h2 {
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

h3 {
  margin-top: 1.5rem;
}

pre {
  background-color: #e9ecef;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

code {
  font-family: monospace;
  background-color: #e9ecef;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre > code {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
}

/* Tab styles */
.tab-container {
  margin-top: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  overflow: hidden;
}

.tab-buttons {
  display: flex;
  background-color: #f1f3f5;
  border-bottom: 1px solid #dee2e6;
}

.tab-button {
  padding: 0.75rem 1.25rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 1em;
  color: #495057;
  border-right: 1px solid #dee2e6; /* Separator */
}

.tab-button:last-child {
  border-right: none;
}

.tab-button.active {
  background-color: white;
  font-weight: bold;
  color: #007bff;
  border-bottom: 2px solid #007bff;
  margin-bottom: -1px; /* Align with content border */
}

.tab-content {
  display: none;
  padding: 1.5rem;
  background-color: white;
}

.tab-content.active {
  display: block;
}

/* Foldable section (details/summary) styles */
details {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  margin-top: 1rem;
  background-color: #f8f9fa;
}

summary {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: bold;
  background-color: #e9ecef;
  border-bottom: 1px solid #dee2e6;
}

details[open] summary {
  border-bottom: 1px solid #dee2e6;
}

details > *:not(summary) {
  padding: 1.5rem;
  background-color: white;
}

/* Add specific styles for language-specific foldable */
.lang-specific-foldable summary {
  background-color: #e7f5ff; /* Light blue */
}

.no-content {
  font-style: italic;
  color: #6c757d;
}

/* Layout Container */
.layout-container {
  display: flex;
  align-items: flex-start; /* Align items to the top */
}

/* Vertical Navigation Sidebar Styles */
#main-nav {
  width: 280px; /* Fixed width for the sidebar */
  flex-shrink: 0; /* Prevent sidebar from shrinking */
  height: calc(100vh - 60px); /* Adjust height based on header height, assuming header is roughly 60px */
  position: sticky;
  top: 10px; /* Stick following the header (adjust if header height changes) */
  overflow-y: auto; /* Allow scrolling within the nav */
  background-color: #f8f9fa; /* Light background */
  padding: 1rem;
  border-right: 1px solid #dee2e6;
  margin-right: 2rem; /* Add some space between nav and main content */
}

#main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  /* display: flex; removed for vertical layout */
}

#main-nav ul li {
  /* position: relative; removed */
  margin-bottom: 0.25rem; /* Space between list items */
}

#main-nav ul li a {
  display: block;
  padding: 0.4rem 0.8rem; /* Padding for links */
  text-decoration: none;
  color: #495057; /* Dark gray text */
  border-radius: 4px;
  /* white-space: wrap; removed */
}

#main-nav ul li a:hover {
  background-color: #dee2e6; /* Slightly darker gray */
  color: #0056b3; /* Blue text on hover */
}

/* Second Level List (Always Visible and Indented) */
#main-nav ul ul {
  /* display: none; removed */
  /* position: absolute; removed */
  /* left: 0; removed */
  /* top: 100%; removed */
  /* background-color: white; removed */
  /* box-shadow: none; removed */
  /* border: none; removed */
  /* z-index: auto; removed */
  /* min-width: auto; removed */
  /* flex-direction: column; removed */
  padding-left: 1rem; /* Indentation for sub-menu */
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

/* Remove hover effect that showed dropdown */
/* #main-nav li:hover > ul { display: block; } */

#main-nav ul ul li {
  /* width: 100%; removed */
  margin-bottom: 0.1rem;
}

#main-nav ul ul li a {
  padding: 0.25rem 0.8rem; /* Smaller padding for sub-items */
  font-size: 0.9em; /* Slightly smaller font */
  color: #6c757d; /* Lighter text color */
}

#main-nav ul ul li a:hover {
  background-color: #e9ecef;
  color: #0056b3;
}

/* Adjust Main Content Area */
main#content {
  flex-grow: 1; /* Allow main content to grow */
  max-width: none; /* Remove max-width */
  margin: 1rem 0; /* Adjust margin */
  padding: 1rem 2rem; /* Adjust padding as needed */
}
