/* =========================
   DESKTOP MENU COLORS + STATES
   ========================= */

/* Main menu hover */
.main-header-menu a:hover {
  color: #b8860b !important; /* your gold */
}

/* Active menu item */
.main-header-menu .current-menu-item > a,
.main-header-menu .current_page_item > a {
  color: #b8860b !important;
}

/* Dropdown hover (text color) */
.main-header-menu .sub-menu a:hover {
  color: #b8860b !important;
}

/* ✅ KEEP PARENT (Types of Funding) VISIBLE WHILE DROPDOWN IS OPEN */
.main-header-menu .menu-item-has-children:hover > a,
.main-header-menu .menu-item-has-children:focus-within > a,
.ast-header-navigation .menu-item-has-children:hover > a,
.ast-header-navigation .menu-item-has-children:focus-within > a {
  color: #b8860b !important;
  background: rgba(184, 134, 11, 0.08) !important; /* subtle highlight so it never "vanishes" */
  border-radius: 8px !important;
}

/* ✅ Make sure header items can stack above submenu if needed */
.ast-header-navigation,
.main-header-menu {
  position: relative !important;
  z-index: 50 !important;
}

/* =========================
   DROPDOWN POSITION + STYLE
   ========================= */

/* Pull submenu closer to parent + ensure it sits above content */
.ast-header-navigation .sub-menu,
.main-header-menu .sub-menu {
  top: 100% !important;           /* sits directly under parent */
  margin-top: 4px !important;     /* small, intentional gap */
  z-index: 9999 !important;
}

/* Modern dropdown container */
.ast-header-navigation .sub-menu,
.main-header-menu .sub-menu {
  background: #ffffff !important;
  border-radius: 8px !important;  /* modern */
  padding: 6px !important;
  min-width: 220px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.12) !important;
  border: 1px solid rgba(0,0,0,.08) !important;
}

/* Menu items */
.ast-header-navigation .sub-menu a,
.main-header-menu .sub-menu a {
  display: block !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #111111 !important;
  text-transform: none !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

/* ✅ Hover state (clean, subtle) — FIXED (your rule was incomplete) */
.ast-header-navigation .sub-menu a:hover,
.ast-header-navigation .sub-menu a:focus,
.main-header-menu .sub-menu a:hover,
.main-header-menu .sub-menu a:focus {
  color: #b8860b !important;
  background: rgba(184, 134, 11, 0.10) !important;
  outline: none !important;
}

/* =========================
   OFF-CANVAS MENU — MOBILE + TABLET
   ========================= */

/* Off-canvas panel background */
.ast-mobile-popup-content,
.ast-mobile-popup-inner {
  background-color: #ffffff !important;
}

/* Menu links (normal state) */
.ast-mobile-popup-content a,
.ast-mobile-popup-content .menu-link {
  color: #111111 !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0.3px;
}

/* Hover + active states */
.ast-mobile-popup-content a:hover,
.ast-mobile-popup-content a:focus,
.ast-mobile-popup-content .menu-link:hover,
.ast-mobile-popup-content .menu-link:focus,
.ast-mobile-popup-content .current-menu-item > a {
  color: #b8860b !important; /* gold */
}

/* Clean spacing for items */
.ast-mobile-popup-content ul li a {
  padding: 14px 20px !important;
}

/* Remove ugly dividers if present */
.ast-mobile-popup-content .menu-item {
  border-bottom: none !important;
}

/* =========================
   TABLET-SPECIFIC SAFETY NET
   ========================= */
@media (min-width: 768px) and (max-width: 1024px) {
  .ast-mobile-popup-content,
  .ast-mobile-popup-inner {
    background-color: #ffffff !important;
  }

  .ast-mobile-popup-content a,
  .ast-mobile-popup-content .menu-link {
    color: #111111 !important;
  }
}