/* dvvc-nav-flyouts.css v1.1 — Genesis desktop dropdowns (right fly-outs + edge flip) */
@media (min-width: 769px) {
  /* Never clip dropdowns */
  .site-header, .site-header .wrap, .nav-primary, .nav-primary .wrap, .genesis-nav-menu {
    overflow: visible !important;
    position: relative;
    z-index: 1000;
  }
  /* Anchor top-level items */
  .nav-primary .genesis-nav-menu > li { position: relative !important; }
  /* Base hidden state (off-screen; not display:none) */
  .nav-primary .genesis-nav-menu .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: -9999px !important;      /* hidden by default */
    opacity: 0 !important;
    visibility: hidden !important;
    display: block !important;     /* beat any display:none */
    min-width: 220px;
    margin: 0 !important;
    padding: 10px 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    z-index: 99999;
  }
  /* Reveal on hover/focus/JS .hover */
  .genesis-nav-menu .menu-item:hover > .sub-menu,
  .genesis-nav-menu .menu-item:focus-within > .sub-menu,
  .genesis-nav-menu .menu-item.hover > .sub-menu {
    left: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  /* CRITICAL: anchor 2nd-level li so their children position from them */
  .genesis-nav-menu .sub-menu > li { position: relative !important; }
  /* Nested submenus fly out to the RIGHT */
  .genesis-nav-menu .sub-menu .sub-menu {
    top: 0 !important;
    left: 100% !important;
    right: auto !important;
    margin: 0 !important;
  }
  /* Edge protection: last two top-level items flip to right edge */
  .nav-primary .genesis-nav-menu > li.menu-item-has-children:nth-last-child(-n+2) > .sub-menu {
    left: auto !important;
    right: 0 !important;
  }
  /* When first submenu is right-aligned, deeper levels fly out RIGHT */
  .nav-primary .genesis-nav-menu > li.menu-item-has-children:nth-last-child(-n+2)
    > .sub-menu > li > .sub-menu {
    left: 100% !important;
    right: auto !important;
  }
  /* JS-assisted flip (dynamic per viewport width) */
  .nav-primary .genesis-nav-menu > li.dvvc-edge > .sub-menu {
    left: auto !important; right: 0 !important;
  }
  .nav-primary .genesis-nav-menu > li.dvvc-edge > .sub-menu > li > .sub-menu {
    left: 100% !important; right: auto !important;
  }
  /* Link styling */
  .genesis-nav-menu .sub-menu li { white-space: nowrap; }
  .genesis-nav-menu .sub-menu li > a {
    display: block; padding: 10px 14px; color: #1c316a; font-weight: 600; text-decoration: none;
  }
  .genesis-nav-menu .sub-menu li > a:hover { background: #e9f7fe; }
}