:root {
  --page-header-height: 80px;
}

/* Keep page content below the fixed header. */

body {
  padding-top: var(--page-header-height);
}

/* Header remains visible above the sliding menu. */

#pageHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--page-header-height);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid #dcdcdc;
}

#pageHeader img {
  max-height: 60px;
  max-width: 70%;
  object-fit: contain;
}

/* Hamburger stays at the right on every screen size. */

#menuToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 28px;
  color: #000000;
  background: #ffffff;
  border: 1px solid #777777;
  border-radius: 6px;
}

/* Sliding panel starts immediately below the header. */

#topMenu {
  top: var(--page-header-height);
  z-index: 1045;
  height: auto;
  max-height: calc(100vh - var(--page-header-height));
  max-height: calc(100dvh - var(--page-header-height));
  background: #ffffff;
  border-bottom: 2px solid #dcdcdc;
}

/* Start the dimmed background below the header too. */

.offcanvas-backdrop {
  top: var(--page-header-height);
  height: calc(100vh - var(--page-header-height));
  height: calc(100dvh - var(--page-header-height));
}

#topMenu .offcanvas-body {
  overflow-y: auto;
  padding: 12px 20px 24px;
}

/* Main links and submenu buttons. */

#topMenu .main-menu-link, #topMenu .dropdown-toggle {
  display: block;
  width: 100%;
  padding: 12px 0;
  font-family: Verdana, Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: #000000;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* Submenus expand within the panel's vertical layout. */

#topMenu .dropdown-menu {
  position: static !important;
  transform: none !important;
  float: none;
  width: 100%;
  min-width: 0;
  margin: 0 0 8px;
  padding: 4px 0 4px 16px;
  background: #f5f5f5;
  border: 0;
  border-left: 3px solid #dcdcdc;
  box-shadow: none;
}

#topMenu .dropdown-item {
  padding: 10px 12px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 16px;
  color: #000000;
  white-space: normal;
}

#topMenu .dropdown-item:hover, #topMenu .dropdown-item:focus {
  background: #e5e5e5;
}

