.ti-jumpmarks {
  width: 100%;
  color: #1e3557;
  height: 50px;
}

.ti-jumpmarks__desktop {
  display: block;
}

.ti-jumpmarks__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 60px;
}

.ti-jumpmarks__item {
  border-top: 1px solid currentColor;
  padding-top: 0.875rem;
}

.ti-jumpmarks__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;

  /* Wichtig: font-size / line-height entfernt,
     damit Elementor Group_Control_Typography wirkt */
}

.ti-jumpmarks__icon {
  flex: 0 0 auto;
  line-height: 1;
}

.ti-jumpmarks__link:focus-visible,
.ti-jumpmarks__toggle:focus-visible,
.ti-jumpmarks__mobile-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Mobile dropdown default hidden on desktop */
.ti-jumpmarks__mobile {
  display: none;
}

@media (max-width: 1920px) {
  .ti-jumpmarks__list {
    column-gap: 40px;
  }
}

/* <= 1023px => Dropdown */
@media (max-width: 1023px) {
  .ti-jumpmarks__desktop {
    display: none;
  }

  .ti-jumpmarks__mobile {
    display: block;
    border-top: 1px solid currentColor;
  }

  .ti-jumpmarks__toggle {
    width: 100%;
    border: 0;
    background: transparent !important;
    color: inherit;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;

    /* Wichtig: font-size / line-height entfernt */
  }

  .ti-jumpmarks__toggle:hover,
  .ti-jumpmarks__toggle:focus-visible {
    color: inherit;
  }

  .ti-jumpmarks__toggle[aria-expanded="true"] .ti-jumpmarks__icon {
    transform: rotate(180deg);
  }

  .ti-jumpmarks__panel {
    border-top: 1px solid currentColor;

    /* Animation-Basis */
    height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition:
      height 280ms cubic-bezier(0.25, 0.8, 0.25, 1),
      opacity 180ms ease,
      visibility 0s linear 280ms;
    /* nach dem Zuklappen ausblenden */
    will-change: height;
  }

  .ti-jumpmarks__panel.ti-jumpmarks__panel--open {
    visibility: visible;
    opacity: 1;
    transition:
      height 280ms cubic-bezier(0.25, 0.8, 0.25, 1),
      opacity 180ms ease,
      visibility 0s linear 0s;
  }

  .ti-jumpmarks__mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .ti-jumpmarks__mobile-item {
    border-bottom: 1px solid currentColor;
  }

  .ti-jumpmarks__mobile-item:last-child {
    border-bottom: 0;
  }

  .ti-jumpmarks__mobile-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem 0;

    /* Wichtig: font-size / line-height entfernt */
  }
}

/* Icon-Basis */
.ti-jumpmarks__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 17px;
  overflow: hidden;
  line-height: 1;
  margin-right: 6px;
}

.ti-jumpmarks__icon svg {
  width: 10px;
  height: 17px;
  display: block;
}

/* Desktop-Link: Animation wie gewünscht */
.ti-jumpmarks__desktop .ti-jumpmarks__link .ti-jumpmarks__icon svg {
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 300ms cubic-bezier(0, 0.25, 0.2, 1),
    opacity 140ms ease;
  will-change: transform, opacity;
}

/* zweiter Pfeil von oben */
.ti-jumpmarks__desktop .ti-jumpmarks__link .ti-jumpmarks__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(-18px);
  transition:
    transform 300ms cubic-bezier(0, 0.25, 0.2, 1),
    opacity 140ms ease;
  will-change: transform, opacity;

  /* Farbe aus currentColor übernehmen */
  background-color: currentColor;

  /* SVG als Maske */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='17' viewBox='0 0 10 17'%3E%3Cpath d='M-6.1767e-06 10.4013C0.799994 10.8013 1.51999 11.2013 2.15999 11.6013C2.79999 12.0279 3.37333 12.4546 3.87999 12.8813L3.87999 9.37083e-09L5.23999 6.88183e-08L5.23999 12.8813C5.74666 12.4546 6.31999 12.0279 6.95999 11.6013C7.59999 11.2013 8.31999 10.8013 9.11999 10.4013L9.11999 11.4812C7.22666 13.1346 5.78666 14.8813 4.79999 16.7213L4.31999 16.7213C3.35999 14.8813 1.91999 13.1346 -6.22391e-06 11.4812L-6.1767e-06 10.4013Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='17' viewBox='0 0 10 17'%3E%3Cpath d='M-6.1767e-06 10.4013C0.799994 10.8013 1.51999 11.2013 2.15999 11.6013C2.79999 12.0279 3.37333 12.4546 3.87999 12.8813L3.87999 9.37083e-09L5.23999 6.88183e-08L5.23999 12.8813C5.74666 12.4546 6.31999 12.0279 6.95999 11.6013C7.59999 11.2013 8.31999 10.8013 9.11999 10.4013L9.11999 11.4812C7.22666 13.1346 5.78666 14.8813 4.79999 16.7213L4.31999 16.7213C3.35999 14.8813 1.91999 13.1346 -6.22391e-06 11.4812L-6.1767e-06 10.4013Z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

/* Hover/Fokus: alter Pfeil runter, neuer von oben rein */
.ti-jumpmarks__desktop .ti-jumpmarks__link:hover .ti-jumpmarks__icon svg,
.ti-jumpmarks__desktop
  .ti-jumpmarks__link:focus-visible
  .ti-jumpmarks__icon
  svg {
  transform: translateY(18px);
  opacity: 0;
}

.ti-jumpmarks__desktop .ti-jumpmarks__link:hover .ti-jumpmarks__icon::before,
.ti-jumpmarks__desktop
  .ti-jumpmarks__link:focus-visible
  .ti-jumpmarks__icon::before {
  transform: translateY(0);
  opacity: 1;
}
