/* Life & Final Expense Insurance — Coverage Options mega menu */

.nav-life-dropdown {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 1062;
}

.nav-life-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 8.8rem;
  margin: 0;
  padding: 5px 8px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
  white-space: normal !important;
  cursor: pointer;
}

.nav-life-caret {
  flex: 0 0 auto;
  font-size: 0.65em;
  opacity: 0.72;
  transition: transform 0.15s ease;
}

.nav-life-dropdown-trigger > span {
  min-width: 0;
  white-space: normal;
}

.nav-life-dropdown:hover .nav-life-dropdown-trigger,
.nav-life-dropdown:focus-within .nav-life-dropdown-trigger,
.nav-life-dropdown.is-open .nav-life-dropdown-trigger {
  color: #087c80;
  background: #e5f5f4;
  box-shadow: inset 0 -3px 0 #087c80;
}

.nav-life-dropdown:hover .nav-life-caret,
.nav-life-dropdown:focus-within .nav-life-caret,
.nav-life-dropdown.is-open .nav-life-caret {
  transform: rotate(180deg);
}

.nav-life-mega {
  display: none;
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 1400;
  width: min(700px, calc(100vw - 2.5rem));
  min-height: 215px;
  grid-template-columns: 170px 1fr;
  overflow: hidden;
  background: #fff;
  border-radius: 0.45rem;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.07),
    0 20px 48px rgba(15, 23, 42, 0.2);
}

.nav-life-dropdown:hover .nav-life-mega,
.nav-life-dropdown:focus-within .nav-life-mega,
.nav-life-dropdown.is-open .nav-life-mega {
  display: grid;
}

.nav-life-mega::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  right: 0;
  left: 0;
  height: 0.7rem;
}

.nav-life-categories {
  padding: 0.75rem 0;
  background: #f4f8f8;
  border-right: 1px solid #d8e4e5;
}

.nav-life-category {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  color: #1f2937;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.25;
}

.nav-life-category.is-active {
  color: #173f42;
  background: #e1f3f2;
  box-shadow: inset -3px 0 0 #087c80;
}

.nav-life-category i {
  color: #173f42;
  font-size: 0.9rem;
}

.nav-life-options {
  padding: 1.2rem 1.4rem;
}

.nav-life-options h3 {
  margin: 0 0 0.8rem;
  color: #374151;
  font-size: 0.92rem;
  font-weight: 800;
}

.nav-life-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.6rem;
  row-gap: 0.15rem;
}

.nav-life-options-grid a {
  display: block;
  padding: 0.44rem 0.3rem;
  border-radius: 0.25rem;
  color: #25313d;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.nav-life-options-grid a:hover,
.nav-life-options-grid a:focus-visible {
  color: #087c80;
  background: #eef8f7;
  outline: none;
}

/* Keep the expanded navigation readable without allowing header items to overlap. */
@media (min-width: 992px) {
  .header-inner .desktop-nav .nav-link-news-wrap {
    max-width: 7rem;
    font-size: 13.5px;
    line-height: 1.15;
    text-align: center;
    white-space: normal !important;
  }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .header-inner .header-logo-wrap {
    flex: 0 0 210px !important;
    width: 210px !important;
    margin-left: -28px !important;
    margin-right: 0.35rem !important;
  }

  .header-inner .desktop-nav {
    gap: 0.15rem !important;
    padding-right: 0.25rem !important;
  }

  .header-inner .desktop-nav .nav-link-cm,
  .nav-life-dropdown-trigger,
  .nav-funeral-dropdown-trigger {
    padding-right: 5px !important;
    padding-left: 5px !important;
    font-size: 12px !important;
  }

  .nav-life-dropdown-trigger {
    max-width: 7rem;
    white-space: normal !important;
  }

  .header-inner .desktop-nav .nav-link-questions-wrap {
    max-width: 4.7rem !important;
  }

  .header-inner .desktop-nav .nav-link-news-wrap {
    max-width: 6.3rem;
    font-size: 11.5px !important;
  }

  .nav-funeral-dropdown-trigger {
    max-width: 5.8rem;
  }

  .header-inner > .header-actions {
    gap: 0.25rem !important;
    padding-right: 0 !important;
  }

  header .header-inner .header-actions .header-bbb-seal {
    display: none !important;
  }

  .header-actions .nav-about-dropdown-trigger {
    max-width: 6rem;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 12px;
    line-height: 1.15;
    white-space: normal !important;
  }

  .header-actions .btn-see-prices {
    padding: 9px 12px;
    font-size: 12.5px;
  }
}

@media (max-width: 991.98px) {
  .nav-life-mega {
    display: none !important;
  }
}
