.nav-toggle {
  background: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 0.5rem;
  /* animate the toggle itself for subtle feedback */
  transition: transform 0.25s ease;
}
.nav-toggle .icon-close[hidden] {
  display: none;
}
.nav-toggle .icon-burger[hidden] {
  display: none;
}
.has-mobile-open .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
}
body.has-mobile-open {
  overflow: hidden;
}
.mobile-dropdown {
  position: fixed;
  left: 0;
  top: 0; /* actual top set via JS to header height */
  width: 100%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-top: 1px solid #e5e7eb;
  max-height: 0;
  overflow: hidden;
  z-index: 10000;
  /* slide + fade for nicer reveal */
  transform: translateY(-8px);
  opacity: 0;
  transition: max-height 0.3s ease, transform 0.3s ease, opacity 0.25s ease;
}
.has-mobile-open #mobile-dropdown {
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(#ffffff, #f9fafb);
  border-radius: 0 0 8px 8px;
  transform: translateY(0);
  opacity: 1;
}
.mobile-inner {
  padding: 1rem 1.25rem 2rem;
}
.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu > li {
  border-bottom: 1px solid #f0f2f5;
  position: relative;
}

.mobile-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: #090d14;
  font-weight: 500;
  font-size: 0.95rem;
}

.mobile-menu a:hover {
  color: #055ea9;
}

.mobile-menu a.current-menu-item,
.mobile-menu a.current-menu-parent,
.mobile-menu a.current_page_item,
.mobile-menu a.current_page_parent,
.mobile-menu a.current-about-section {
  color: #fff;
  background: #055ea9;
  border-radius: 6px;
}

.mobile-menu .current-menu-item .menu-item-main {
  color: #fff;
  background: #055ea9;
  border-radius: 6px;
}

.mobile-menu li.current-menu-item > a,
.mobile-menu li.current_page_item > a,
.mobile-menu li.current-menu-parent > a,
.mobile-menu li.current_page_parent > a {
  color: #fff;
  background: #055ea9;
  border-radius: 6px;
}
/* When anchor is wrapped inside .menu-item-main, target it there too */
.mobile-menu li.current-menu-item > .menu-item-main > a,
.mobile-menu li.current_page_item > .menu-item-main > a,
.mobile-menu li.current-menu-parent > .menu-item-main > a,
.mobile-menu li.current_page_parent > .menu-item-main > a,
.mobile-menu li.current-menu-ancestor > .menu-item-main > a {
  color: #fff;
  background: #055ea9;
  border-radius: 6px;
  padding-left: 1rem;
}

.mobile-menu li.current_page_parent > .menu-item-main {
  background: #0a5bd3 !important;
  border-radius: 6px;
}

.mobile-menu li.current-menu-ancestor > .menu-item-main > button {
  color: white;
}
.mobile-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.mobile-menu .sub-menu a.current-about-section {
  color: #055ea9;
  background: #fff;
}
/* Submenu toggle button */
/* structure for menu item main line (button + anchor) */
.mobile-menu .menu-item-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-direction: row-reverse;
}
.mobile-menu .menu-item-main > a {
  flex: 1 1 auto;
}
.submenu-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: black;
  border: 0;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.current-menu-item .submenu-toggle {
  background: #055ea9;
  color: #fff;
}
/* replace glyph with inline SVG arrow rotated; default points down */
.submenu-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  transform: rotate(90deg);
  transition: transform 0.25s ease;
}
.menu-item-has-children.open > .menu-item-main > .submenu-toggle svg {
  transform: rotate(-90deg);
}
/* allow focus accessibility */
.submenu-toggle:focus {
  outline-offset: 2px;
}
.mobile-lang {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}
@media (min-width: 1080px) {
  #mobile-dropdown,
  .nav-toggle {
    display: none !important;
  }
}

/* Backdrop */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 999; /* below dropdown but above page */
  opacity: 0;
  pointer-events: none; /* don't block clicks when not visible */
  transition: opacity 0.25s ease;
}
.mobile-backdrop[hidden] {
  display: none;
}
.has-mobile-open .mobile-backdrop {
  opacity: 1;
  pointer-events: auto; /* clickable only when visible */
}

/* Rotate the toggle when menu is open (works even if icons swap) */
.has-mobile-open .nav-toggle {
  transform: rotate(90deg);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .mobile-dropdown {
    transition: max-height 0.01s linear;
    transform: none;
    opacity: 1;
  }
  .has-mobile-open .nav-toggle {
    transform: none;
  }
  .mobile-backdrop {
    transition: opacity 0.01s linear;
  }
}
