/* ============================================================
   Michelle Blake sites — shared hamburger/mobile menu
   Load this AFTER the page's own <style> block so it can rely
   on the page defining --blue if it wants the default bar color.
   ============================================================ */

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s ease;
  z-index: 1100;
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: rgba(48, 87, 236, 0.08);
}

.hamburger-btn .bar {
  display: block;
  width: 22px;
  height: 2px;
  /* Default assumes a light/white nav bar. Pages with a dark or
     image nav background should override this AFTER this stylesheet
     loads, e.g.: .hamburger-btn .bar { background: #ffffff; } */
  background: var(--blue, #3057EC);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease, width 0.3s ease;
  transform-origin: center;
}

.hamburger-btn.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open .bar:nth-child(2) { opacity: 0; width: 0; }
.hamburger-btn.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer — always rendered so transitions work */
.mobile-menu {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(280px, 85vw);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  z-index: 1050;
  padding: 54px 2rem 3rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(110%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.35s;
}

.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0s;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #3a3530;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.mobile-menu a:hover {
  background: rgba(48, 87, 236, 0.06);
}

.menu-group-row {
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.menu-group-row:hover { background: rgba(48, 87, 236, 0.06); border-radius: 8px; }

.menu-group-label {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  padding: 0.75rem 0 0.75rem 1rem;
  color: #3a3530; text-decoration: none;
  font-weight: 600; font-size: 1.1rem;
}

.menu-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%; object-fit: contain;
  background: #fff; box-shadow: 0 2px 6px rgba(156,45,134,.16);
  padding: 2px;
}

.mobile-menu a.has-icon {
  display: flex; align-items: center; gap: 10px;
}

.menu-icon.icon-fill {
  background: transparent;
  padding: 0;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.08);
}

.menu-group-chevron {
  background: none; border: none; cursor: pointer;
  padding: 0.75rem 1rem;
  display: flex; align-items: center;
}

.menu-group-chevron .chevron {
  font-size: 0.75rem; color: #888; transition: transform 0.25s ease;
}

.menu-group-children {
  max-height: 0; overflow: hidden;
  transition: max-height 0.28s ease;
  background: rgba(0,0,0,0.02); border-radius: 8px; margin: 2px 0;
}

.menu-group-children a {
  padding: 0.6rem 1rem 0.6rem 1.75rem;
  font-size: 1rem; font-weight: 500;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  border-left: 2px solid rgba(48,87,236,0.25);
  border-radius: 0;
}

.mobile-menu .mobile-cta {
  margin-top: 0.5rem; text-align: center;
  background: linear-gradient(135deg, #898df7 0%, #5fcfd1 100%);
  color: #fff !important; border-radius: 50px;
  border-bottom: none; font-weight: 600;
}

.mobile-menu .mobile-cta:hover {
  background: linear-gradient(135deg, #5471f0 0%, #8a64ba 100%) !important;
  opacity: 0.95;
}

/* Overlay — always rendered but pointer-events off when closed */
.menu-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
