/* =========================================================
   ST7D v7.7.2 - NAVBAR DROPDOWN FIT HOTFIX
   Fixes the v7.7.1 desktop dropdown geometry without changing
   the new top-level discovery navigation.
   ========================================================= */

@media (min-width:1281px){
  /* PLAY is close to the left edge. Centre-anchoring a 660px mega menu
     pushes half of it off-screen, so anchor it to the Play group instead. */
  .header .nav-play-group > .nav-play-dropdown{
    left:0!important;
    right:auto!important;
    transform:none!important;
    width:min(680px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
  }
  .header .nav-play-group.open > .nav-play-dropdown{
    transform:none!important;
  }
  .header .nav-play-group.open:after{
    left:0!important;
    transform:none!important;
    width:min(680px,calc(100vw - 24px))!important;
  }

  /* v7.7.1 intended Explore to be a real two-column discovery menu,
     but the generic .header .nav-dropdown width rule won specificity
     and collapsed it back to 320px. Give the intended width explicitly. */
  .header .nav-explore-dropdown{
    width:min(640px,calc(100vw - 32px))!important;
    min-width:min(560px,calc(100vw - 32px))!important;
    max-width:calc(100vw - 32px)!important;
    padding:14px!important;
    overflow:hidden!important;
  }
  .header .nav-explore-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  .header .nav-explore-grid > a{
    display:block!important;
    min-width:0!important;
    min-height:96px;
    padding:12px 13px!important;
    overflow:hidden;
  }
  .header .nav-explore-grid > a > span,
  .header .nav-explore-grid > a > strong,
  .header .nav-explore-grid > a > small{
    max-width:100%;
    white-space:normal!important;
    overflow-wrap:break-word;
    word-break:normal;
  }
  .header .nav-explore-grid > a > strong{
    display:block!important;
    line-height:1.22!important;
  }
  .header .nav-explore-grid > a > small{
    line-height:1.42!important;
  }

  /* Defensive viewport containment for the remaining mega menus. */
  .header .nav-community-dropdown,
  .header .nav-my-dropdown,
  .header .nav-help-dropdown{
    max-width:calc(100vw - 24px)!important;
  }
}

/* Mobile/tablet keep the existing stacked menu layout. */
@media (max-width:1280px){
  .header .nav-explore-dropdown{
    min-width:0!important;
  }
}
