.map-cards-block {
  position: relative;
  width: 100%;
  background-color: #e6e6e6;
  margin: 80px 0;

  @include sm {
    margin: 50px 0;
  }

  &__wrapper {
    width: 100%;
    margin: 0 auto;
  }

  &__map-container {
    width: 100%;
    position: relative;
    background-color: $background-blue;
    overflow: hidden;

    .popup-tip-anchor {
      height: 0;
      position: absolute;
      width: 200px;
    }

    .popup-bubble-anchor {
      position: absolute;
      width: 100%;
      bottom: 0;
      left: 0;
    }

    .card-marker {
      background: url("../img/svg/project-marker.svg") no-repeat center;
      opacity: 0;
      transform: translateY(-200px);
      transition-property: opacity, transform;
      transition-duration: 100ms, 300ms;
      transition-timing-function: linear, cubic-bezier(0.77, 0.53, 0.33, 1.37);

      &.green {
        background: url("../img/svg/project-marker-green.svg") no-repeat center;
      }

      &.yellow {
        background: url("../img/svg/project-marker-yellow.svg") no-repeat center;
      }

      &.grey,
      &.blue,
      &.primary,
      &.secondary,
      &.vivid-blue {
        background: url("../img/svg/project-marker-blue.svg") no-repeat center;
      }

      &.orange {
        background: url("../img/svg/project-marker-orange.svg") no-repeat center;
      }

      &.js-marker-show {
        opacity: 0.6 !important;
        transform: translateY(0);
      }

      &:hover {
        transform: scale(1.35);
        opacity: 0.9 !important;
      }
    }

    .card-map-infobox {
      position: absolute;
      width: 257px;
      border-radius: 10px;
      overflow: hidden;
      background: $secondary-color;
      box-shadow: 0px 0px 30px #00000033;
      transform: translate(-50%, -50%) scale(0.4);
      transition: all 200ms ease-out;
      opacity: 0;

      img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        display: block;
      }

      &__content {
        padding: 16px;
        font-family: var(--font-default);;
        color: $white;

        a {
          color: $white;

          &:after {
            border-top: 2px solid $white;
            border-right: 2px solid $white;
          }
        }

        p {
          color: $white;
        }

        &.card-map-infobox--yellow {
          color: $primary-color;

          a {
            color: $primary-color;

            &:after {
              border-top: 2px solid $primary-color;
              border-right: 2px solid $primary-color;
            }
          }

          p {
            color: $primary-color;
          }
        }
      }

      &__label {
        font-weight: 400;
        font-size: 13px;
        line-height: 16px;
        margin-bottom: 8px;
        letter-spacing: 0.2px;
        text-transform: uppercase;
      }

      &__title {
        font-weight: 700;
        font-size: 18px;
        line-height: 22px;
        overflow: hidden;
        max-height: 48px;
      }

      &__excerpt {
        font-weight: 400;
        font-size: 14px;
        line-height: 18px;
        letter-spacing: 0.2px;
        overflow: hidden;
        max-height: 53px;
      }

      &__link {
        text-align: right;
        margin-top: 14px;

        a {
          font-weight: 700;
          font-size: 16px;
          line-height: 20px;
          letter-spacing: 0.2px;
          display: block;

          &:after {
            content: "";
            display: inline-block;
            width: 10px;
            height: 10px;
            margin-left: 3px;
            transform: rotate(45deg) scale(0.7);
          }
        }
      }

      &__close {
        position: absolute;
        right: 8px;
        top: 8px;
        height: 32px;
        width: 32px;
        background-color: rgba($color: $primary-color, $alpha: 0.4);
        border-radius: 100%;

        &:before,
        &:after {
          content: "";
          position: absolute;
          display: block;
          top: 47%;
          left: 50%;
          width: 14px;
          height: 1px;
          border-top: 1px solid $white;
          transform: translate(-50%, 50%) rotate(45deg);
        }

        &:after {
          transform: translate(-50%, 50%) rotate(-45deg);
        }
      }

      p {
        margin: 10px 0;
        font-size: 14px;
        line-height: 23px;
        max-height: 69px;
        overflow: hidden;
      }

      &--green,
      &--grey {
        background-color: $topic-green;
      }
      &--yellow {
        background-color: $topic-yellow;
      }
      &--blue {
        background-color: $topic-blue;
      }
      &--orange {
        background-color: $topic-orange;
      }
    }

    .js-show .card-map-infobox {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  }

  &__map {
    width: 100%;
    height: 670px;

    > div {
      background-color: $background-blue !important;
    }
  }

  &__map-background {
    background-color: $background-blue;
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    z-index: -2;
  }
}
