/* Caregiver Rising: three-line menu button and dropdown. Loaded on every page. */

.menu-btn {
  display: none;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  margin-left: 8px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 2px solid var(--oxblood, #834b3d);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
html.js .menu-btn { display: flex; }
.menu-btn:hover { background: rgba(131, 75, 61, 0.08); }
.menu-btn:focus-visible { outline: 3px solid var(--gold, #d5ab76); outline-offset: 2px; }
.menu-btn .bar {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--oxblood, #834b3d);
  transition: transform .2s ease, opacity .2s ease;
}
.menu-btn.is-open .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn.is-open .bar:nth-child(2) { opacity: 0; }
.menu-btn.is-open .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* keep the existing text links pushed right, with the button at the far corner */
header.site-header .primary-nav,
header.site .nav > nav { margin-left: auto; }

.menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: min(340px, 100vw);
  max-height: calc(100vh - 70px);
  max-height: calc(100dvh - 70px);
  overflow-y: auto;
  background: var(--cream, #faf6f2);
  border: 1px solid var(--taupe, #d5c7c3);
  border-top: none;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 18px 30px -14px rgba(36, 28, 23, 0.35);
  padding: 8px 0 12px;
  z-index: 60;
}
.menu-panel[hidden] { display: none; }
.menu-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 24px;
  font-family: var(--font-body, var(--body, 'Southlake', 'Source Sans 3', sans-serif));
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink, #241c17);
  text-decoration: none;
  border-bottom: 0;
}
.menu-panel a:hover,
.menu-panel a:focus-visible { background: var(--blush, #efe2df); color: var(--oxblood, #834b3d); outline: none; }
.menu-panel a[aria-current="page"] { color: var(--oxblood, #834b3d); box-shadow: inset 4px 0 0 var(--gold, #d5ab76); }
.menu-panel a.menu-cta {
  margin: 6px 16px 8px;
  border-radius: 999px;
  justify-content: center;
  background: var(--oxblood, #834b3d);
  color: var(--cream, #faf6f2);
}
.menu-panel a.menu-cta:hover,
.menu-panel a.menu-cta:focus-visible { background: var(--terracotta, #9d584e); color: #fff; }
.menu-panel a.menu-ext::after { content: "\2197"; font-size: .9em; opacity: .55; margin-left: 10px; }
.menu-divider { height: 1px; margin: 6px 24px; background: var(--taupe, #d5c7c3); }

@media (max-width: 480px) {
  .menu-panel { width: 100vw; border-radius: 0; border-left: none; border-right: none; }
}

/* the top bar already shows a few links on larger screens; on small screens the menu button takes over */
@media (max-width: 860px) {
  nav.primary-nav { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-btn .bar { transition: none; }
}
