.elementor-widget-lifelink-mega-menu,
.elementor-widget-lifelink-mega-menu > .elementor-widget-container {
  width: 100%;
  overflow: visible;
}

.lifelink-mega-menu-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  column-gap: 24px;
  width: 100%;
  max-width: 1628px;
  margin: 0 auto;
  position: relative;
  z-index: 20;
  box-sizing: border-box;
}

.lifelink-mega-logo {
  justify-self: start;
  align-self: end;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  padding: 0 0 0 24px;
  width: 374px;
}

.lifelink-mega-logo-link {
  display: block;
  line-height: 0;
}

.lifelink-mega-logo img {
  display: block;
  max-width: 250px;
  height: auto;
}

@media (min-width: 1440px) {
  .lifelink-mega-logo img {
    max-width: 350px;
  }
}

nav.lifelink-mega-menu {
  position: relative;
  z-index: 10;
  justify-self: center;
  align-self: end;
  width: auto;
}

ul.mega-first-level {
  list-style: none;
  padding: 6px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  height: 60px;
  border-radius: 1000px;
  border: 1px solid #d1d3e6;
  background-color: #ffffff;
  position: relative;
  box-sizing: border-box;
}

ul.mega-first-level > .menu-item {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: auto;
}

ul.mega-first-level > .menu-item > a,
ul.mega-first-level > .menu-item > .mega-item-link {
  font-family: "Roboto", Sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 47px;
  padding: 0 16px;
  color: #1b2482;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  text-decoration: none;
  background: none;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

ul.mega-first-level > .menu-item.kontakt-nav {
  position: absolute;
  right: 0;
}

ul.mega-first-level > .menu-item.kontakt-nav > a {
  height: 55px;
  border-radius: 1000px;
  background-color: #ffd741;
  color: #1b2482;
  border: 1px solid #ffd741;
  transition: 0.3s ease-out;
}

ul.mega-first-level > .menu-item.kontakt-nav.active > a,
ul.mega-first-level > .menu-item.kontakt-nav.active > a:hover {
  background-color: #1b2482;
  border-color: #1b2482;
  color: #ffffff;
}

ul.mega-first-level > .menu-item.kontakt-nav > a:hover {
  border-color: #1b2482;
  color: #1b2482;
}

ul.mega-first-level > .menu-item.active > a,
ul.mega-first-level > .menu-item.active > .mega-item-link,
ul.mega-first-level > .menu-item > a:hover,
ul.mega-first-level > .menu-item > .mega-item-link:hover {
  color: #ffffff;
}

ul.mega-first-level > .menu-item > .mega-item-link.active {
  color: #ffffff;
}

.mega-nav-bg {
  position: absolute;
  top: 6px;
  left: 0;
  width: 0;
  height: 47px;
  background-color: #1b2482;
  border-radius: 1000px;
  z-index: 1;
  opacity: 0;
  display: none;
  pointer-events: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

.lifelink-mega-panels {
  grid-column: 1 / -1;
  position: static;
}

.mega-menu-row {
  display: none;
  position: absolute;
  top: calc(100% + 18px);
  flex-direction: column;
  width: 100%;
  max-width: 1628px;
  box-shadow: 0px 20px 50px 0px rgba(0, 0, 0, 0.6);
  background-color: #ffffff;
  border-radius: 20px;
  left: 0;
  right: 0;
  overflow: hidden;
  z-index: 20;
  box-sizing: border-box;
}

.mega-menu-row.is-open {
  display: flex;
}

.mega-upper-row {
  display: flex;
  justify-content: space-between;
  padding: 50px 80px 50px 80px;
  gap: 0 120px;
}

.mega-text {
  width: 400px;
  flex-shrink: 0;
}

.mega-second-level {
  width: calc(100% - 400px);
  padding-top: 40px;
}

.mega-title {
  color: #1b2482;
  font-family: "Roboto", Sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: normal;
  margin: 0 0 20px 0;
}

.mega-description {
  color: #6c6d97;
  font-family: "Roboto", Sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  margin: 18px 0 0 0;
}

.mega-description p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.mega-second-level > ul,
.mega-second-level > ul > .menu-item {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-second-level > ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: start;
  align-content: start;
  grid-auto-flow: row;
  gap: 0 24px;
}

.mega-second-level > ul > .menu-item {
  border-style: solid;
  border-width: 0px 0px 1px 0px;
  border-color: #a4a7cd;
  padding: 16px 0 20px 0;
}

.mega-second-level .mega-sublink-icon:hover {
  color: #1b2482;
}

.active-sublink > .mega-sublink-icon .sub_icon-arrow {
  transform: translateX(0px);
  opacity: 1;
}

.active-sublink > .mega-sublink-icon .sub_icon-text {
  transform: translateX(10px);
  color: #1b2482;
}

.mega-sublink-icon {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.sub_icon-arrow {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none'%3E%3Cpath d='M12.4596 5.45962C12.7135 5.20578 12.7135 4.79422 12.4596 4.54038L8.32305 0.403806C8.0692 0.149966 7.65765 0.149965 7.40381 0.403806C7.14997 0.657647 7.14997 1.0692 7.40381 1.32305L11.0808 5L7.40381 8.67696C7.14996 8.9308 7.14996 9.34235 7.40381 9.59619C7.65765 9.85004 8.0692 9.85004 8.32304 9.59619L12.4596 5.45962ZM-5.68248e-08 5.65L12 5.65L12 4.35L5.68248e-08 4.35L-5.68248e-08 5.65Z' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E");
  background-color: #1a237e;
  border-radius: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 9px 9px;
  transform: translateX(-9px);
  opacity: 0;
  transition: 0.2s ease-out;
}

.sub_icon-text {
  font-family: "Roboto", Sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: normal;
  color: #6c6d97;
  transform: translateX(-28px);
  transition: 0.2s ease-out;
}

.mega-sublink-icon:hover .sub_icon-arrow {
  transform: translateX(0px);
  opacity: 1;
}

.mega-sublink-icon:hover .sub_icon-text {
  transform: translateX(10px);
  color: #1b2482;
}

.mega-lower-row {
  background-color: #f1f1f1;
  padding: 40px 80px 40px 80px;
  position: relative;
}

.mega-third-level {
  display: none;
}

.mega-third-level.show-sublink {
  display: block;
  max-height: 336px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: auto;
}

.mega-third-level.show-sublink::-webkit-scrollbar {
  width: 12px;
}

.mega-third-level.show-sublink::-webkit-scrollbar-track {
  background: #e6e6e6;
}

.mega-third-level.show-sublink::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 6px;
}

.mega-third-level.show-sublink::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.mega-third-level > ul,
.mega-third-level > ul > .menu-item {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-third-level > ul {
  column-count: 3;
  column-gap: 40px;
}

.mega-third-level > ul > .menu-item {
  padding-bottom: 16px;
  break-inside: avoid;
}

.mega-third-level > ul .mega-item-link {
  position: relative;
  color: #6c6d97;
  font-family: "Roboto", Sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: normal;
  text-decoration: none;
  transition: 0.4s ease-in-out;
}

.mega-third-level > ul .mega-item-link:after {
  content: "";
  width: 0;
  height: 1px;
  position: absolute;
  background-color: #1b2482;
  left: 0;
  bottom: -2px;
  transition: 0.4s ease-in-out;
}

.mega-third-level > ul .mega-item-link:hover,
.mega-third-level > ul .current-menu-item .mega-item-link {
  color: #1b2482;
}

.mega-third-level > ul .mega-item-link:hover:after,
.mega-third-level > ul .current-menu-item .mega-item-link:after {
  width: 100%;
}

.mega-close-btn {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: transparent;
  border: none;
  padding: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.5' y='0.5' width='49' height='49' rx='24.5' fill='white' stroke='%23D1D3E6'%3E%3C/rect%3E%3Cpath d='M33.9688 33.9688L15.9999 15.9999' stroke='%231B2482' stroke-width='1.5' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M16 34L25 25L34 16' stroke='%231B2482' stroke-width='1.5' stroke-linecap='round'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  right: 20px;
  top: 20px;
  cursor: pointer;
  z-index: 2;
}

.lifelink-mega-menu-wrap.is-standorte-page .lifelink-mega-portals {
  display: none;
}

ul.mega-first-level > .mega-standort-item {
  display: none;
}

.lifelink-mega-menu-wrap.is-standort-nav ul.mega-first-level {
  gap: 4px;
}

.lifelink-mega-menu-wrap.is-standort-nav .mega-nav-bg {
  display: none !important;
}

.lifelink-mega-menu-wrap.is-standort-nav ul.mega-first-level > .mega-main-item {
  display: none;
}

.lifelink-mega-menu-wrap.is-standort-nav
  ul.mega-first-level
  > .mega-standort-item {
  display: flex;
  align-items: center;
}

ul.mega-first-level > .mega-standort-item > .mega-item-link,
ul.mega-first-level > .mega-standort-item > a.mega-standort-link,
ul.mega-first-level > .mega-standort-item > button.mega-standort-link {
  padding: 0;
  line-height: normal;
  color: inherit;
  background: transparent;
  border: 0;
}

ul.mega-first-level > .mega-standort-item.active > a,
ul.mega-first-level > .mega-standort-item.active > .mega-item-link,
ul.mega-first-level > .mega-standort-item > a:hover,
ul.mega-first-level > .mega-standort-item > .mega-item-link:hover {
  color: inherit;
}

.mega-standort-link-inner {
  display: flex;
  align-items: center;
  padding: 13px 37px 13px 16px;
  border-radius: 24px;
  border: 1px solid #1b2482;
  position: relative;
  background-color: #ffffff;
  transition: 0.3s ease-out;
}

.mega-standort-link-text {
  color: #1b2482;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
  transition: 0.3s ease-out;
}

.mega-standort-arrows {
  position: absolute;
  transform: translate(50%, -50%);
  top: 50%;
  display: flex;
  right: 18px;
}

.mega-standort-arrows svg {
  transform: translateY(0);
  transition: 0.3s ease-out;
}

ul.mega-first-level
  > .mega-standort-item
  > .mega-item-link:hover
  .mega-standort-link-inner,
ul.mega-first-level
  > .mega-standort-termin.drop-active
  > .mega-item-link
  .mega-standort-link-inner {
  border-color: #1b2482;
  background-color: #1b2482;
}

ul.mega-first-level
  > .mega-standort-item
  > .mega-item-link:hover
  .mega-standort-link-text,
ul.mega-first-level
  > .mega-standort-termin.drop-active
  > .mega-item-link
  .mega-standort-link-text {
  color: #ffffff;
}

ul.mega-first-level
  > .mega-standort-item
  > .mega-item-link:hover
  .mega-standort-arrows
  svg,
ul.mega-first-level
  > .mega-standort-termin.drop-active
  > .mega-item-link
  .mega-standort-arrows
  svg {
  transform: translateY(5px);
}

ul.mega-first-level
  > .mega-standort-item
  > .mega-item-link:hover
  .mega-standort-arrows
  svg
  path,
ul.mega-first-level
  > .mega-standort-termin.drop-active
  > .mega-item-link
  .mega-standort-arrows
  svg
  path {
  fill: #ffffff;
}

ul.mega-first-level > .mega-standort-switcher {
  margin-right: 2px;
}

.mega-standort-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 47px;
  padding: 0 18px;
  border: none;
  border-radius: 1000px;
  background-color: #1b2482;
  color: #ffffff;
  font-family: "Roboto", Sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.mega-standort-switch:hover,
.mega-standort-switch:focus {
  color: #ffffff;
  background-color: #1b2482;
}

.mega-standort-switch svg {
  display: block;
  flex-shrink: 0;
}

.mega-standort-switch-text {
  display: block;
}

ul.mega-first-level > .mega-standort-termin {
  position: relative;
}

.mega-standort-termin-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  padding: 15px;
  border-radius: 10px;
  background: #1b2482;
  box-shadow: 0px 15px 30px 0px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: 0.3s ease-out;
  z-index: 30;
}

.mega-standort-termin.drop-active .mega-standort-termin-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-standort-termin-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-standort-termin-dropdown li {
  margin: 12px 0 0 0;
}

.mega-standort-termin-dropdown li:first-of-type {
  margin: 0;
}

.mega-standort-termin-dropdown a {
  color: #ffffff;
  display: block;
  text-decoration: none;
  white-space: nowrap;
  font-family: "Roboto", Sans-serif;
  font-size: 16px;
  line-height: 24px;
}

.mega-standort-termin-dropdown a:hover {
  text-decoration: underline;
}

.lifelink-mega-portals {
  justify-self: end;
  align-self: start;
  padding-top: 0;
  z-index: 30;
}

.lifelink-mega-menu-wrap .portal-menu-button {
  background: none;
  border: none;
  appearance: none;
  -webkit-appearance: none;
}

.lifelink-mega-menu-wrap .portal-menu-location-items {
  z-index: 40;
  max-height: 70vh;
  overflow-y: auto;
}

.lifelink-mega-menu-wrap .portal-menu-cluster-location-content a {
  display: block;
  color: #1b2482;
  text-decoration: none;
  padding: 2px 0;
  font-family: "Roboto", Sans-serif;
  font-size: 16px;
  line-height: 24px;
}

.lifelink-mega-menu-wrap .portal-menu-cluster-location-content a:hover {
  text-decoration: underline;
}

@media (max-height: 1100px) {
  .mega-third-level.show-sublink {
    max-height: 236px;
  }
}

@media (max-width: 1440px) {
  .mega-upper-row,
  .mega-lower-row {
    padding-left: 50px;
    padding-right: 50px;
  }

  .mega-text {
    width: 300px;
  }

  .mega-second-level {
    width: calc(100% - 300px);
  }

  .sub_icon-text {
    font-size: 24px;
  }

  .mega-title {
    font-size: 32px;
  }
}

@media (max-width: 1240px) {
  ul.mega-first-level > .menu-item:not(.mega-standort-item) > a,
  ul.mega-first-level > .menu-item:not(.mega-standort-item) > .mega-item-link {
    font-size: 16px;
    padding: 0 12px;
  }

  .mega-standort-switch {
    font-size: 16px;
    padding: 0 14px;
  }

  .mega-standort-link-inner {
    padding: 10px 32px 10px 14px;
  }

  .mega-standort-link-text {
    font-size: 16px;
  }

  .mega-upper-row {
    gap: 0 40px;
    padding: 40px 40px 40px 40px;
  }

  .mega-lower-row {
    padding: 30px 40px;
  }

  .mega-text {
    width: 240px;
  }

  .mega-second-level {
    width: calc(100% - 240px);
  }

  .sub_icon-text {
    font-size: 22px;
  }

  .mega-third-level > ul {
    column-gap: 24px;
  }

  .mega-third-level > ul .mega-item-link {
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
  .elementor-widget-lifelink-mega-menu {
    display: none;
  }
}
