:root {
  --sidebar-width: 250px;
  --header-height: 60px;
  --brand: #004080;
  --brand-light: #0059b3;
  --bg-light: #f4f6f8;
  --text-dark: #333;
}

* {
  box-sizing: border-box;
}


/* Sample Problems Styling */
#sample-problems {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

#sample-problems h2 {
  color: var(--brand);
  border-bottom: 2px solid var(--brand-light);
  padding-bottom: 6px;
  margin-bottom: 20px;
}

#sample-problems .problem {
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s ease;
}
#sample-problems .problem:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

#sample-problems .problem h3 {
  margin-top: 0;
  color: var(--brand-light);
  font-size: 1.1rem;
}

#sample-problems details {
  margin-top: 10px;
  background: var(--bg-light);
  border-radius: 4px;
  padding: 10px 14px;
  border: 1px solid #d9dee3;
}

#sample-problems summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
  outline: none;
}
#sample-problems summary:hover {
  text-decoration: underline;
}

#sample-problems details[open] {
  background: #eef3f9;
  border-color: var(--brand-light);
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fafbfc;
  color: var(--text-dark);
  line-height: 1.5;
}

/* Overlay for mobile */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}
body.sidebar-open .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar styling */
.sidebar {
  position: fixed;
  top: 0;
  left: -var(--sidebar-width);
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-light);
  border-right: 1px solid #e3e6ea;
  padding: 16px;
  transition: transform 0.3s ease, left 0.3s ease;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}
body.sidebar-open .sidebar {
  transform: translateX(0);
  left: 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li strong {
  display: block;
  margin: 20px 0 8px;
  font-size: 0.95rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar a {
  display: block;
  padding: 10px 12px;
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar a:hover {
  background: var(--brand);
  color: #fff;
}
.sidebar a.active {
  background: var(--brand);
  color: #fff;
  font-weight: bold;
}

/* Menu button */
.menu-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.menu-btn:hover {
  background: var(--brand-light);
}

/* Container wrapper */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Content area */
.content {
  padding: 20px;
  transition: margin-left 0.3s ease;
}
.content h1, .content h2 {
  margin-top: 0;
  color: var(--brand);
}
.content p {
  max-width: 700px;
}

/* Section spacing */
section {
  margin-bottom: 40px;
}
section h2 {
  border-bottom: 2px solid var(--brand-light);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

/* Page navigation */
.page-nav ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  justify-content: space-between;
}
.page-nav a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.page-nav a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #e3e6ea;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

/* Desktop: push content when sidebar open */
@media (min-width: 769px) {
  body.sidebar-open .content {
    margin-left: var(--sidebar-width);
  }
}
