.leistungen-grid .leistung {
  position: relative;
  * {
    position: relative !important;
  }
  .hidden-content {
    max-height: 50px;
    overflow: hidden;
    transition: 0.3s ease-in-out;
    display: flex;
    justify-content: end;
    @media (max-width: 767px) {
      max-height: 0;
    }
  }
  .elementor-widget-heading {
    margin-bottom: -20px;
    transition: 0.3s ease-in-out;
    @media (max-width: 767px) {
      max-width: 90%;
    }
  }
  &:after {
    content: "";
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    transition: 0.3s ease-in-out;
    background: linear-gradient(180deg, #007d67 0%, #003c4d 100%);
    opacity: 0;
    @media (max-width: 767px) {
      opacity: 1;
      background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.4) 100%
      );
    }
  }
  .elementor-button {
    background: linear-gradient(180deg, #007d67 0%, #003c4d 100%);
    color: #fff;
  }
  @media (min-width: 1024px) {
    &:hover {
      .elementor-widget-heading {
        margin: 0;
      }
      .hidden-content {
        max-height: 250px;
        overflow: hidden;
      }
      &:after {
        opacity: 1;
      }
      .elementor-button {
        border-color: #fff !important;
        background: #fff !important;
        color: var(--e-global-color-accent) !important;
      }
    }
  }
  @media (max-width: 1024px) {
    &.active {
      .elementor-widget-heading {
        margin: 0;
      }
      .hidden-content {
        max-height: 250px;
        overflow: hidden;
      }
      &:after {
        opacity: 1;
      }
      .elementor-button {
        border-color: #fff !important;
        background: #fff !important;
        color: var(--e-global-color-accent) !important;
      }
    }
  }
}
