/* PHIMAXX Top Navigation (refined dropdown) */
.phx-topnav-wrap{
  position: sticky;
  top: 0;
  z-index: 9999;
  width:100%;
  min-height:84px;
  box-sizing:border-box;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(10,31,68,.08);
  box-shadow: 0 8px 24px rgba(10,31,68,.05);
}
.phx-topnav{
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px;
  min-height:84px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:nowrap;
}
.phx-topnav .phx-brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.phx-topnav .phx-brand img{height:34px;width:auto;display:block;}
.phx-topnav .phx-menu{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;justify-content:flex-end;white-space:nowrap;}
.phx-topnav .phx-menu a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  text-decoration:none;
  font-weight:800;
  color:#0A1F44;
  padding:12px 16px;
  border-radius:14px;
  line-height:1;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.phx-topnav .phx-menu a:hover{background:rgba(10,31,68,.06);}
.phx-topnav .phx-cta{
  background:transparent;
  color:#0A1F44 !important;
  padding:12px 16px !important;
  border-radius:14px !important;
  box-shadow:none !important;
}
@media (max-width: 900px){
  .phx-topnav{gap:10px;flex-wrap:wrap;min-height:64px;padding:12px 14px;}
  .phx-topnav .phx-menu{width:100%;justify-content:flex-start;gap:8px;white-space:normal;}
}

.phx-topnav .phx-menu a.phx-active{
  background: rgba(10,31,68,.06);
  box-shadow: inset 0 0 0 1px rgba(10,31,68,.08);
}

/* Refined desktop dropdown */
.phx-topnav .phx-menu .phx-dropdown{
  position:relative;
  display:flex;
  align-items:center;
  padding-bottom:16px;
  margin-bottom:-16px;
}
.phx-topnav .phx-menu .phx-dropdown::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:18px;
}
.phx-topnav .phx-menu .phx-drop-link{
  display:flex;
  align-items:center;
  gap:8px;
}
.phx-topnav .phx-menu .phx-drop-link::after{
  content:"";
  width:8px;
  height:8px;
  border-right:2px solid #6b7280;
  border-bottom:2px solid #6b7280;
  transform: rotate(45deg) translateY(-1px);
  transform-origin:center;
  margin-left:2px;
}
.phx-topnav .phx-menu .phx-dropdown:hover .phx-drop-link,
.phx-topnav .phx-menu .phx-dropdown:focus-within .phx-drop-link{
  background:rgba(10,31,68,.06);
}
.phx-topnav .phx-menu .phx-dropdown-menu{
  position:absolute;
  top:calc(100% + 2px);
  left:0;
  min-width:250px;
  max-height:420px;
  overflow:auto;
  background:#fff;
  border:1px solid rgba(10,31,68,.08);
  border-radius:18px;
  box-shadow:0 22px 48px rgba(10,31,68,.14);
  padding:10px;
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index:10000;
}
.phx-topnav .phx-menu .phx-dropdown-menu::before{
  content:"";
  position:absolute;
  top:-7px;
  left:28px;
  width:14px;
  height:14px;
  background:#fff;
  border-top:1px solid rgba(10,31,68,.08);
  border-left:1px solid rgba(10,31,68,.08);
  transform:rotate(45deg);
}
.phx-topnav .phx-menu .phx-dropdown-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7b8494;
  padding:6px 10px 8px;
}
.phx-topnav .phx-menu .phx-dropdown-menu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:700;
  padding:10px 12px;
  border-radius:12px;
  white-space:nowrap;
  color:#0A1F44;
}
.phx-topnav .phx-menu .phx-dropdown-menu a:hover{
  background:#f6f8fc;
  transform:translateX(2px);
}
.phx-topnav .phx-menu .phx-dropdown-menu a:first-of-type{
  background:linear-gradient(180deg,#fff8ef 0%,#fff 100%);
  box-shadow: inset 0 0 0 1px rgba(255,122,0,.18);
  color:#0A1F44;
  margin-bottom:4px;
}
.phx-topnav .phx-menu .phx-dropdown-menu--ms{min-width:230px;}
.phx-topnav .phx-menu .phx-dropdown-menu--pm{min-width:290px;}
.phx-topnav .phx-menu .phx-dropdown-menu--pm a{display:grid;grid-template-columns:1fr auto;column-gap:18px;}
.phx-topnav .phx-menu .phx-dropdown-menu--pm a::after,
.phx-topnav .phx-menu .phx-dropdown-menu--ms a::after{
  content:"→";
  color:#b1b8c4;
  font-size:13px;
}
.phx-topnav .phx-menu .phx-dropdown-menu a:first-of-type::after{color:#ff7a00;}
.phx-topnav .phx-menu .phx-dropdown:hover .phx-dropdown-menu,
.phx-topnav .phx-menu .phx-dropdown:focus-within .phx-dropdown-menu{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}

@media (max-width: 900px){
  .phx-topnav .phx-menu .phx-dropdown{display:block;}
  .phx-topnav .phx-menu .phx-drop-link::after{margin-left:6px;}
  .phx-topnav .phx-menu .phx-dropdown-menu,
  .phx-topnav .phx-menu .phx-dropdown-menu--ms,
  .phx-topnav .phx-menu .phx-dropdown-menu--pm{
    position:static;
    min-width:0;
    display:block;
    box-shadow:none;
    border:none;
    padding:4px 0 0 12px;
    max-height:none;
    background:transparent;
    opacity:1;
    visibility:visible;
    transform:none;
    pointer-events:auto;
  }
  .phx-topnav .phx-menu .phx-dropdown-menu::before{display:none;}
  .phx-topnav .phx-menu .phx-dropdown-label{padding:4px 0;color:#7b8494;}
  .phx-topnav .phx-menu .phx-dropdown-menu a{
    padding:6px 0;
    border-radius:0;
    font-weight:600;
    display:block;
  }
  .phx-topnav .phx-menu .phx-dropdown-menu a::after{display:none;}
  .phx-topnav .phx-menu .phx-dropdown-menu a:first-of-type{
    background:transparent;
    box-shadow:none;
    margin-bottom:0;
  }
}


/* Stable desktop dropdown: click or hover */
.phx-topnav .phx-menu .phx-dropdown{padding-bottom:22px;margin-bottom:-22px;}
.phx-topnav .phx-menu .phx-dropdown::after{height:24px;}
.phx-topnav .phx-menu .phx-dropdown-menu{top:calc(100% + 4px);}
.phx-topnav .phx-menu .phx-dropdown.phx-open .phx-drop-link,
.phx-topnav .phx-menu .phx-dropdown.phx-pinned .phx-drop-link{
  background:rgba(10,31,68,.06);
  box-shadow: inset 0 0 0 1px rgba(10,31,68,.08);
}
.phx-topnav .phx-menu .phx-dropdown.phx-open .phx-dropdown-menu,
.phx-topnav .phx-menu .phx-dropdown.phx-pinned .phx-dropdown-menu{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}
@media (max-width:900px){
  .phx-topnav .phx-menu .phx-dropdown{padding-bottom:0;margin-bottom:0;}
}
