/* Scope defaults to the same element that receives $style_attr */
.hm-nav.hm-nav--hamburger {
  /* CSS-owned defaults (safe without any atts) */
  --hm-drawer-bg: #263744;          /* Drawer/panel background */
  --hm-line-hover-bg: #FFFFFF;      /* Row “line” hover background */

  /* Text (atts typically override these via $style_attr) */
  --hm-menu-color: #ffffff;         /* Base link + hamburger bars color */

  /* IMPORTANT: Make CSS consume your PHP-provided hover_color.
     Your PHP sets: --hm-menu-hover-color: <hover_color>
     We use it (and fall back to base color if not set). */
  --hm-link-hover-color: var(--hm-menu-hover-color, var(--hm-menu-color));

  /* Typography defaults (also overridable by atts) */
  --hm-menu-font-family: inherit;
  --hm-menu-font-size: inherit;
  --hm-menu-font-weight: inherit;
}

/* === Drawer panel uses CSS-owned background ============================ */
.hm-nav.hm-nav--hamburger .hm-nav__panel {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 101dvh;
  box-sizing: border-box;
  overscroll-behavior: contain;
  overflow-y: auto;
  background: var(--hm-drawer-bg);
  padding: 0 0 0 48px;
  margin: 0;
  max-width: 450px;
}
.hm-nav.hm-nav--hamburger .hm-nav__panel[hidden] { display: none; }
.hm-nav.hm-nav--hamburger .hm-nav__panel:not([hidden]) { display: block; }

/* === Menu links use PHP-provided text vars ============================ */
.hm-nav.hm-nav--hamburger li > a {
	display: flex;
	align-items: center;
	padding: .25rem .5rem;
	color: var(--hm-menu-color);
	text-decoration: none;
	font-family: var(--hm-menu-font-family);
	font-size: var(--hm-menu-font-size);
	font-weight: var(--hm-menu-font-weight);
	width: 100%;
/*   transition: color .2s ease; */
}

/* A-tag hover: TEXT color only (decoupled from row background)
   Reads --hm-menu-hover-color if PHP set hover_color="...". */
.hm-nav.hm-nav--hamburger li > a:hover,
.hm-nav.hm-nav--hamburger li > a:focus {
  color: var(--hm-menu-hover-color, var(--hm-link-hover-color));
}

/* === “Line hover”: background only (text color unchanged) ============== */
.hm-nav.hm-nav--hamburger li {
  position: static;
  margin-bottom: .25rem;
}
.hm-nav.hm-nav--hamburger li:hover,
.hm-nav.hm-nav--hamburger li:focus-within {
  background: var(--hm-line-hover-bg);
}

/* === Submenus: layout only (no extra colors here) ===================== */
.hm-nav.hm-nav--hamburger .hm-menu {
  display: inline-flex;
  flex-direction: column;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 75px 0;
  max-width: 750px;
  width: 100%;
}
.hm-nav.hm-nav--hamburger .sub-menu {
  display: none;
  position: static;
  padding: 0 0 0 .9rem;
  margin: .25rem 0 0;
}
.hm-nav.hm-nav.hm-nav--hamburger li.open > .sub-menu { display: block !important; }

/* === Hamburger (toggle) bars match base text color ==================== */
#nav-icon {
  width: 32px;
  height: 32px;
  position: relative;
  transform: rotate(0deg);
  transition: .5s ease-in-out;
  cursor: pointer;
  z-index: 1000;
}
#nav-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--hm-menu-color);
  border-radius: 9px;
  left: 0;
  opacity: 1;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}
#nav-icon span:nth-child(1){ top: 0px; }
#nav-icon span:nth-child(2), #nav-icon span:nth-child(3){ top: 12px; }
#nav-icon span:nth-child(4){ top: 24px; }
#nav-icon.is-open span:nth-child(1){ top: 12px; width: 0%; left: 50%; }
#nav-icon.is-open span:nth-child(2){ transform: rotate(45deg); }
#nav-icon.is-open span:nth-child(3){ transform: rotate(-45deg); }
#nav-icon.is-open span:nth-child(4){ top: 18px; width: 0%; left: 50%; }

/* === Misc layout (unchanged) ========================================= */
.hm-panel-header { position: absolute; bottom: 20%; right: 15%; }
.hm-nav--hamburger .hm-drawer-logo img { width: 35vw; height: auto; display: block; }
/* body.hm-scroll-locked { overflow: hidden; padding-right: var(--hm-sbw, 0); }
html { scrollbar-gutter: stable; } */

@media screen and (max-width: 768px) {
  .hm-nav.hm-nav--hamburger .hm-nav__panel:not([hidden]) {
    display: flex;
    flex-direction: column;
    justify-content: start;
    padding: 20px 0 0 60px;
  }
  .hm-nav--hamburger .hm-drawer-logo img { width: 50vw; }
  .hm-panel-header { display: block; position: unset; }
  .hm-menu { padding: 60px 0 0 0 !important; }
  #nav-icon {
		width: 24px;
		height: 24px;
  }
  #nav-icon span:nth-child(2), #nav-icon span:nth-child(3){ top: 9px; }
  #nav-icon span:nth-child(4){ top: 18px; }
	
	.hm-btn {
	margin: 30px 0 0 0;
    display: flex;
    width: 200px;
    height: 50px;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    color: #263744;
	font-family: var(--hm-menu-font-family);
	font-size: 1rem;
	font-weight: 500;
	}
  
}
@media (min-width: 650px) and (max-width: 768px) {
  .hm-nav--hamburger .hm-drawer-logo img { width: 38vw; }
}

/* === Focus visibility for keyboard users ============================= */
.hm-nav.hm-nav--hamburger li > a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
