/* =============================================
   GLOBAL RESET & BASE
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  line-height: 1.6;
  background: #fff;
  color: #111;
  min-height: 100vh;
}

/* =============================================
   LAYOUT: sidebar + main side by side
   ============================================= */
.layout {
  display: flex;
  min-height: 100vh;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #f5f5f5;
  border-right: 1px solid #ddd;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Logo/image placeholder at top of sidebar */
.sidebar-logo-placeholder {
  margin: 1rem 1.25rem 2rem;
  height: 140px;
  border: 2px dashed #bbb;
  border-radius: 6px;
  background: #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sidebar-logo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Nav groups (collapsible) --- */
.nav-group {
  border-bottom: 1px solid #ddd;
}

.nav-group-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  text-align: left;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111;
}

.nav-group-toggle:hover,
.nav-group-toggle:focus {
  background: #e8e8e8;
  outline: 2px solid #888;
  outline-offset: -2px;
}

.arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.7rem;
}

.nav-group-toggle[aria-expanded="true"] .arrow {
  transform: rotate(90deg);
}

.nav-group-list {
  list-style: none;
  padding: 0.25rem 0;
  background: #efefef;
}

.nav-group-list li a {
  display: block;
  padding: 0.5rem 1.25rem 0.5rem 2rem;
  text-decoration: none;
  color: #222;
  font-size: 0.9rem;
}

.nav-group-list li a:hover,
.nav-group-list li a:focus {
  background: #ddd;
  outline: 2px solid #888;
  outline-offset: -2px;
  text-decoration: underline;
}

/* Standalone nav link */
.nav-standalone-wrap {
  border-bottom: 1px solid #ddd;
}

.nav-standalone {
  display: block;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  font-size: 0.95rem;
  color: #111;
}

.nav-standalone:hover,
.nav-standalone:focus {
  background: #e8e8e8;
  outline: 2px solid #888;
  outline-offset: -2px;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: 900px;
}

.site-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: bold;
  color: #111;
}

/* =============================================
   MOBILE SIDEBAR TOGGLE BUTTON
   ============================================= */
.sidebar-toggle-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: #f5f5f5;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  line-height: 1;
}

.sidebar-toggle-btn:focus {
  outline: 2px solid #555;
}

/* =============================================
   RESPONSIVE: mobile
   ============================================= */
@media (max-width: 700px) {
  .sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 300px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    padding: 4rem 1.25rem 2rem;
  }
}
