/* ============================================================
   nav-modern.css — Mega-menu + mobile nav modernization
   Loaded AFTER phoneiq.purged.css + a11y-overrides.css.
   Additive overrides only. Desktop scoped to .nav-menu,
   mobile scoped to .mobile-nav. Brand: navy #00135e / accent #5078ee.
   ============================================================ */

:root {
  --nav-navy: #00135e;
  --nav-accent: #5078ee;
  --nav-tint: #f0f4ff;
  --nav-border: rgba(0, 19, 94, 0.08);
  --nav-muted: #798099;
}

/* ---------- Top-level links & dropdown toggles ---------- */
.nav-bar .nav-link {
  border-radius: 10px;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-bar .nav-link:hover,
.nav-bar .w-dropdown.w--open .nav-link {
  background-color: var(--nav-tint);
  color: var(--nav-navy);
}
/* hide Webflow's faint built-in caret — keep only the custom triangle below */
.nav-bar .nav-dropdown-icon {
  display: none;
}
/* flip the caret when the menu is open — rotate the wrapper so the wrapper's
   background-triangle AND the img-triangle inside it turn together (rotating
   only the img left the wrapper's triangle behind, creating a "bowtie") */
.nav-bar .divtrianglenav {
  transition: transform 0.25s ease;
}
.nav-bar .w-dropdown:hover .divtrianglenav,
.nav-bar .w-dropdown.w--open .divtrianglenav {
  transform: rotate(180deg);
}

/* ---------- The mega-menu card ---------- */
.nav-menu .dropdown-list.w-dropdown-list {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--nav-border);
  border-radius: 18px;
  box-shadow:
    0 24px 60px -18px rgba(0, 19, 94, 0.28),
    0 8px 20px -12px rgba(0, 19, 94, 0.14);
  /* smooth reveal — the one high-impact motion moment */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 0.8, 0.28, 1);
}
/* nav.js puts w--open on the .w-dropdown PARENT, not on the list */
.nav-menu .w-dropdown.w--open .dropdown-list.w-dropdown-list {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Solutions: two-column section headers ---------- */
.nav-menu .heading-38.nav {
  color: var(--nav-navy);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.nav-menu .text-block-105.nav {
  color: var(--nav-muted);
  font-size: 12.5px;
  margin-bottom: 8px;
}
.nav-menu .officenavdiv {
  padding-left: 18px;
  border-left: 1px solid var(--nav-border);
}
.nav-menu .agentnavdiv {
  padding-right: 18px;
}

/* ---------- Menu item rows ---------- */
.nav-menu .divnav {
  border-radius: 12px;
  padding: 9px 12px;
  transition: background-color 0.16s ease;
}
.nav-menu .divnav:hover {
  background-color: var(--nav-tint);
}
.nav-menu .link-6,
.nav-menu .link-39 {
  line-height: 1.3;
  font-weight: 500;
  color: var(--nav-navy);
}
/* arrow stays hidden until hover, then slides in */
.nav-menu .div-block-21 {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-menu .w-inline-block:hover .div-block-21 {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Mobile nav ---------- */
.mobile-nav .mobile-toggle,
.mobile-nav .mobile-nav-link {
  padding: 15px 6px;
  border-bottom: 1px solid #eef1f8;
  font-weight: 600;
  color: var(--nav-navy);
}
.mobile-nav .mobile-toggle .text-block-110,
.mobile-nav .mobile-toggle .text-block-115,
.mobile-nav .mobile-toggle .text-block-116 {
  color: var(--nav-navy);
  font-weight: 600;
}
.mobile-nav .dropdown-list-4 {
  padding: 6px 0 10px;
  background: #fff;
}
.mobile-nav .divnav.small {
  padding: 13px 10px;
  border-radius: 12px;
}
.mobile-nav .divnav.small:hover,
.mobile-nav .divnav.small:active {
  background: var(--nav-tint);
}
.mobile-nav .heading-38.nav {
  color: var(--nav-navy);
  font-weight: 700;
}

/* ---------- Mobile: full-page takeover ---------- */
@media (max-width: 991px) {
  /* lock the page behind the menu (class toggled by nav.js) */
  body.mobile-nav-open {
    overflow: hidden;
  }
  /* keep the top bar above the overlay so the hamburger stays tappable */
  .navigation-mob.w--nav-menu-open {
    z-index: 1000;
  }
  /* the menu becomes a full-screen sheet below the 70px bar */
  .navigation-mob.w--nav-menu-open .mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: none;
    padding: 14px 22px calc(40px + env(safe-area-inset-bottom, 0px));
  }
  /* active cue on the toggle while open */
  .menu-mob .image-57 {
    transition: transform 0.2s ease;
  }
  .menu-mob.w--open .image-57 {
    transform: rotate(90deg);
  }
}
