/*
 * RSK BSL — Mega menu styles (icon + title + description cards).
 * Loaded as a real stylesheet and excluded from 10Web optimisation so the
 * :hover rules are never stripped as "unused".
 */

@media (min-width: 992px) {
  /* Panel is anchored to the whole gradient bar (nav) -> it always drops from
     the bar's bottom edge, so it never overlaps the bar. Its horizontal
     position (right-aligned under the hovered item, opening right-to-left) is
     set per item by the small script at the bottom of this file. */
  .navbar.bg-gradient-gb { position: relative; }
  .mynav .navbar-nav > li.dropdown { position: static; }

  .mynav .dropdown > .dropdown-menu {
    display: block;                 /* visibility handled below for the animation */
    position: absolute;
    top: 100%;                      /* drops from the bottom of the bar */
    right: 0;                       /* default; refined per item via JS */
    left: auto;                     /* width extends to the LEFT (right-to-left) */
    width: max-content;
    min-width: 520px;
    max-width: 640px;
    margin: 0;
    padding: 22px 30px;
    border: 0;
    border-top: 3px solid transparent;
    border-image: linear-gradient(135deg, #96C121 0%, #1E66AB 100%) 1;
    border-radius: 0 0 14px 14px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(16, 42, 67, .16);
    max-height: 75vh;
    overflow-y: auto;
    columns: 2;
    column-gap: 34px;
    column-fill: balance;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    z-index: 1050;
  }

  /* Reveal on hover */
  .mynav .dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Individual links inside the panel */
  .mynav .dropdown-menu li {
    list-style: none;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 2px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .mynav .dropdown-menu .dropdown-item,
  .mynav .dropdown-menu li:not(.rsk-mega-li) > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid transparent;   /* neutralises the theme's card border */
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: #1E2A3A;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
  }

  /* Right-arrow icon in front of every menu item (FontAwesome) */
  .mynav .dropdown-menu .dropdown-item::before,
  .mynav .dropdown-menu li:not(.rsk-mega-li) > a::before {
    content: "\f105";                /* fa-angle-right */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 13px;
    line-height: 1;
    color: #96C121;
    flex: 0 0 auto;
    transition: transform .2s ease, color .2s ease;
  }

  .mynav .dropdown-menu .dropdown-item:hover,
  .mynav .dropdown-menu li:not(.rsk-mega-li) > a:hover {
    background: #1E66AB;
    border-color: #1E66AB;
    color: #fff;
  }
  .mynav .dropdown-menu .dropdown-item:hover::before,
  .mynav .dropdown-menu li:not(.rsk-mega-li) > a:hover::before {
    color: #fff;
    transform: translateX(3px);
  }

  /* =========================================================
     CARD-STYLE ITEMS (SVG icon + title + description)
     Rendered by the RSK_Mega_Walker.
     ========================================================= */
  .mynav .dropdown-menu {
    padding: 18px 20px !important;
    column-gap: 24px !important;
  }
  .mynav .dropdown-menu li.rsk-mega-li {
    margin: 0 0 2px !important;
    break-inside: avoid;
    list-style: none;
  }

  .mynav .dropdown-menu .rsk-mega-item {
    /* colours driven by variables so ONE parent :hover rule changes everything */
    --rsk-ico: #1E66AB;             /* default icon colour = blue */
    --rsk-ico-bg: #eef3f8;          /* default icon tile background */
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none !important;
    white-space: normal;
    background: transparent;
    color: #111111 !important;      /* default text = black; title/desc inherit this */
    transition: background .22s ease, color .22s ease, border-color .22s ease;
  }
  /* No arrow on card items (beats the simple-link ::before arrow) */
  .mynav .dropdown-menu .rsk-mega-item::before,
  .mynav .dropdown-menu li.rsk-mega-li > a::before { content: none !important; display: none !important; }

  /* Icon tile — reads the variables (no :hover selector needed) */
  .mynav .dropdown-menu .rsk-mega-ico {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--rsk-ico-bg) !important;
    color: var(--rsk-ico) !important;   /* SVG uses currentColor -> follows this */
    transition: background .22s ease, color .22s ease;
  }
  .mynav .dropdown-menu .rsk-mega-ico svg {
    width: 20px !important;
    height: 20px !important;
    display: block;
    color: var(--rsk-ico) !important;
    fill: currentColor;
  }

  /* Text block — inherits the item colour (no :hover selector needed) */
  .mynav .dropdown-menu .rsk-mega-txt {
    display: flex !important;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    color: inherit !important;
  }
  .mynav .dropdown-menu .rsk-mega-title {
    font-size: 13px;
    font-weight: 600;
    color: inherit !important;      /* = black by default, white on hover */
    line-height: 1.3;
  }
  .mynav .dropdown-menu .rsk-mega-desc {
    font-size: 11px;
    font-weight: 400;
    color: inherit !important;      /* = black by default, white on hover */
    line-height: 1.4;
    display: block !important;
  }

  /* Items with NO icon: keep the title aligned with icon-items' text */
  .mynav .dropdown-menu .rsk-mega-item:not(:has(.rsk-mega-ico)) .rsk-mega-txt { padding-left: 54px; }

  /* HOVER — a single parent rule. It flips the text colour (inherited by
     title + desc) and the icon variables (read by the icon tile + svg).
     Because there are NO descendant :hover selectors, 10Web cannot strip them. */
  .mynav .dropdown-menu .rsk-mega-item:hover {
    background: #1E66AB !important; /* blue card */
    border-color: #1E66AB;
    color: #ffffff !important;      /* title + desc -> white */
    --rsk-ico: #96C121;             /* icon -> green */
    --rsk-ico-bg: #ffffff;          /* tile -> white */
  }
}