/*
 * Premium desktop megamenu.
 * Kept separate from theme.bundle.css so design changes are cache-busted
 * independently and never affect the mobile navigation.
 */

@media (min-width: 961px) {
  .navBar .megaMenuDropdown {
    top: calc(100% + 10px);
    width: calc(100% - 48px);
    max-width: 1320px;
    border: 1px solid rgba(21, 73, 100, .11);
    border-radius: 22px;
    background:
      radial-gradient(circle at 94% -30%, rgba(49, 185, 181, .16), transparent 34%),
      linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    box-shadow:
      0 30px 80px rgba(15, 48, 70, .2),
      0 8px 24px rgba(15, 48, 70, .08);
    overflow: hidden;
  }

  .navBar .megaMenuDropdown::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1eb7a4, #3aaaca 58%, #f27828);
  }

  .navBar .megaMenuDropdown.megaOpen {
    transform: translateX(-50%) translateY(0);
  }

  .megaMenuOverlay {
    background: rgba(8, 31, 45, .34);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  .megaMenuOverlay.noBlur {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .megaMenuHead {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 88px;
    padding: 20px 30px 17px;
    border-bottom: 1px solid rgba(21, 73, 100, .08);
    background: rgba(255, 255, 255, .76);
  }

  .megaMenuHeading {
    display: grid;
    gap: 3px;
    min-width: 280px;
  }

  .megaMenuEyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #bd581c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .megaMenuEyebrow i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f27828;
    box-shadow: 0 0 0 5px rgba(242, 120, 40, .1);
  }

  .megaMenuTitle {
    color: #112f46;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.22;
  }

  .megaMenuSubtitle {
    color: #718391;
    font-size: 12px;
    line-height: 1.35;
  }

  .megaMenuSearch {
    flex: 0 1 410px;
    max-width: 410px;
    padding: 0;
  }

  .megaMenuSearchInput {
    height: 46px;
    padding: 0 18px 0 47px;
    border: 1px solid rgba(37, 95, 124, .16);
    border-radius: 14px;
    color: #17384f;
    font-size: 13px;
    font-weight: 500;
    background: #f5f9fb;
    box-shadow: inset 0 1px 1px rgba(13, 46, 67, .025);
    transition:
      border-color .2s ease,
      background-color .2s ease,
      box-shadow .2s ease;
  }

  .megaMenuSearchInput::placeholder {
    color: #8797a3;
  }

  .megaMenuSearchInput:focus {
    border-color: rgba(24, 165, 159, .62);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(24, 165, 159, .1);
  }

  .megaMenuSearchIcon {
    top: 50%;
    right: auto;
    left: 17px;
    width: 18px;
    height: 18px;
    margin-top: 0;
    color: #288da3;
  }

  .megaMenuContent {
    padding: 15px 22px 18px;
    background:
      linear-gradient(rgba(28, 124, 153, .025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(28, 124, 153, .025) 1px, transparent 1px);
    background-size: 28px 28px;
  }

  .megaMenuGrid {
    gap: 7px 9px;
  }

  .megaMenuLink {
    min-width: 0;
    min-height: 50px;
    gap: 11px;
    padding: 7px 11px;
    border: 1px solid rgba(25, 83, 111, .09);
    border-radius: 13px;
    color: #29465a;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 4px 12px rgba(14, 56, 79, .035);
    transition:
      color .2s ease,
      border-color .2s ease,
      background-color .2s ease,
      box-shadow .2s ease,
      transform .2s ease;
  }

  .megaMenuLink::after {
    content: "→";
    flex: 0 0 auto;
    margin-left: auto;
    color: #61a8b4;
    font-size: 16px;
    font-weight: 700;
    opacity: .72;
    transform: translateX(-2px);
    transition: transform .2s ease, color .2s ease, opacity .2s ease;
  }

  .megaMenuLink > span:last-child {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .megaMenuLinkIcon {
    width: 35px;
    height: 35px;
    border: 1px solid rgba(29, 174, 163, .1);
    border-radius: 11px;
    background: linear-gradient(145deg, #edfbf8, #dff5f3);
    box-shadow: inset 0 1px rgba(255, 255, 255, .75);
  }

  .megaMenuLinkIcon svg {
    width: 16px;
    height: 16px;
    color: #159b99;
    transition: color .2s ease, transform .2s ease;
  }

  .megaMenuLink:hover,
  .megaMenuLink:focus-visible {
    color: #123b51;
    border-color: rgba(27, 166, 157, .3);
    background: #fff;
    box-shadow: 0 10px 24px rgba(18, 86, 108, .1);
    transform: translateY(-2px);
  }

  .megaMenuLink:hover .megaMenuLinkIcon,
  .megaMenuLink:focus-visible .megaMenuLinkIcon {
    border-color: transparent;
    background: linear-gradient(145deg, #1bb6a7, #168eaa);
  }

  .megaMenuLink:hover .megaMenuLinkIcon svg,
  .megaMenuLink:focus-visible .megaMenuLinkIcon svg {
    color: #fff;
    transform: scale(1.05);
  }

  .megaMenuLink:hover::after,
  .megaMenuLink:focus-visible::after {
    color: #d86620;
    opacity: 1;
    transform: translateX(2px);
  }

  .megaMenuFooter {
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
    padding: 13px 30px;
    border-top: 1px solid rgba(20, 79, 108, .09);
    background:
      radial-gradient(circle at 10% 120%, rgba(25, 176, 163, .11), transparent 31%),
      linear-gradient(110deg, #f4f9fb, #f9fbfc);
  }

  .megaMenuFooterNote {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #18384e;
  }

  .megaMenuFooterNote > span:last-child {
    display: grid;
    gap: 2px;
  }

  .megaMenuFooterNote strong {
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
  }

  .megaMenuFooterNote small {
    color: #788a96;
    font-size: 10px;
    line-height: 1.3;
  }

  .megaMenuFooterIcon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(24, 162, 156, .12);
    border-radius: 12px;
    color: #168f9f;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 5px 14px rgba(21, 81, 104, .06);
  }

  .megaMenuFooterIcon svg {
    width: 18px;
    height: 18px;
  }

  .megaMenuFooterBtn {
    flex: 0 0 auto;
    min-height: 43px;
    padding: 0 22px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 750;
    background: linear-gradient(135deg, #19b39f, #168eaa);
    box-shadow: 0 8px 20px rgba(24, 150, 157, .2);
  }

  .megaMenuFooterBtn:hover {
    background: linear-gradient(135deg, #17a895, #117e99);
    box-shadow: 0 11px 26px rgba(24, 150, 157, .27);
  }

  .megaMenuWrap.megaOpen > a {
    color: #117f8c;
    background: rgba(26, 174, 163, .08);
  }

  .artMenuHead {
    min-height: 88px;
  }

  .artMenuContent {
    padding-top: 16px;
  }

  .artMenuGrid {
    gap: 8px 10px;
  }

  .artMenuLink {
    min-height: 58px;
  }
}

@media (min-width: 1180px) {
  #megaDropdown .megaMenuGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 961px) and (max-width: 1120px) {
  .navBar .megaMenuDropdown {
    width: calc(100% - 28px);
  }

  .megaMenuHead,
  .megaMenuFooter {
    padding-right: 22px;
    padding-left: 22px;
  }

  .megaMenuContent {
    padding-right: 15px;
    padding-left: 15px;
  }

  .megaMenuFooterNote small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .megaMenuDropdown,
  .megaMenuOverlay,
  .megaMenuLink,
  .megaMenuLink::after,
  .megaMenuLinkIcon,
  .megaMenuLinkIcon svg,
  .megaMenuFooterBtn {
    transition: none !important;
  }
}
