/* ============================================================
   Investor Relations mega-menu
   Enterprise dropdown for the long IR list (21 items).
   Desktop/tablet (>=768px): wide 3-column grid panel.
   Mobile (<=767px): untouched — slicknav handles it.
   Loaded after bisness-style.css so these rules win.
   ============================================================ */

@media (min-width: 768px) {

  /* turn the narrow scrolling column into a wide grid panel.
     tablet (768-1099): 2 columns, narrower so it never clips the viewport.
     desktop (>=1100): 3 columns, wide. */
  .mainmenu ul li .sub-menu {
    width: min(560px, 92vw);
    left: auto;
    right: 0;                       /* anchor to the item's right edge, expand left */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 1px;
    padding: 0 0 6px;
    border-top: 3px solid #007bff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 22px 48px -16px rgba(10, 37, 64, .30);
    max-height: none;               /* kill the old scroll hack */
    overflow: visible;
  }

  /* eyebrow strip across all columns */
  .mainmenu ul li .sub-menu::before {
    content: "Investor Relations";
    grid-column: 1 / -1;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #0a2a4f;
    padding: 16px 22px 12px;
    border-bottom: 1px solid #eef1f5;
    margin-bottom: 5px;
  }

  .mainmenu ul li .sub-menu li {
    display: block;
    margin: 0;
  }

  .mainmenu ul li .sub-menu li a {
    position: relative;
    padding: 9px 16px 9px 22px;
    font-size: 12.5px;
    line-height: 1.35;
    color: #3a4452;
    border-left: 2px solid transparent;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
  }

  /* hover / keyboard focus — beat the theme's blue-fill rule */
  .mainmenu ul li .sub-menu li a:hover,
  .mainmenu ul li .sub-menu li a:focus,
  .mainmenu ul li:hover > .sub-menu li > a:hover {
    background: #f0f6ff;
    color: #007bff;
    border-left-color: #007bff;
  }

  /* the long Regulation 30(5) disclosure is the outlier:
     pin it full-width as a footnote row under a hairline */
  .mainmenu ul li .sub-menu li:last-child {
    grid-column: 1 / -1;
    margin-top: 5px;
    border-top: 1px solid #eef1f5;
  }
  .mainmenu ul li .sub-menu li:last-child a {
    font-size: 11.5px;
    line-height: 1.4;
    color: #6b7480;
    padding-top: 11px;
  }

  /* chevron reacts when the panel is open */
  .mainmenu ul li > a i.fa-angle-down {
    transition: transform .2s ease;
  }
  .mainmenu ul li:hover > a i.fa-angle-down,
  .mainmenu ul li:focus-within > a i.fa-angle-down {
    transform: rotate(180deg);
  }

  /* open on keyboard focus, not just hover (a11y) */
  .mainmenu ul li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    top: 100%;
  }
}

/* wide desktop: go to 3 columns */
@media (min-width: 1100px) {
  .mainmenu ul li .sub-menu {
    width: 760px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mainmenu ul li .sub-menu li a,
  .mainmenu ul li > a i.fa-angle-down {
    transition: none;
  }
}
