/* Dropdown items in the top nav (Events, Team). Works with the existing header/nav markup. */
#nav-links .has-sub { position: relative; }
#nav-links .sub-btn { display: none; } /* old chevron button, no longer used */

#nav-links .sub-menu {
  list-style: none; margin: 0; padding: .4rem;
  display: flex; flex-direction: column; gap: 0;   /* vertical list, even if the nav's own styles make lists horizontal */
  position: absolute; top: 100%; left: 50%; min-width: 11rem; z-index: 50;
  transform: translate(-50%, 6px);
  background: var(--nav-sub-bg, #16161d);
  border: 1px solid var(--border, rgba(255, 255, 255, .15)); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
#nav-links .sub-menu li { display: block; margin: 0; width: 100%; }
#nav-links .sub-menu a {
  display: block; padding: .5rem .8rem; border-radius: 8px; white-space: nowrap;
  text-decoration: none; font-size: .95em;
}
#nav-links .sub-menu a:hover, #nav-links .sub-menu a:focus-visible { background: var(--accent-dim, rgba(255, 90, 54, .15)); }

/* Open on mouse hover, keyboard focus, or a first tap on touch screens (see nav-dropdown.js) */
@media (hover: hover) {
  #nav-links .has-sub:hover > .sub-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
}
#nav-links .has-sub:focus-within > .sub-menu,
#nav-links .has-sub.open > .sub-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }

/* Phone menu: no floating panel, the sub-links are always listed, indented under their parent */
@media (max-width: 900px) {
  #nav-links .sub-menu {
    position: static; transform: none !important; min-width: 0; width: 100%;
    background: transparent; border: 0; box-shadow: none; padding: 0 0 0 1rem;
    opacity: 1; visibility: visible; pointer-events: auto;
  }
}