.wp-block-image {
  img {
    width: 100%;
  }

  figcaption {
    color: $brand-primary;

    a {
      transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
      transition: all 0.4s;
    }

    @include breakpoint(large down) {
      a {
        font-size: 1rem;
      }
    }

    a:hover {
      color: $brand-white;
      background-color: $brand-primary;
      transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
      transition: all 0.4s;
    }
  }

  &.amds-has-overlay {
    position: relative;

    figcaption {
      position: absolute;

      top: 0px;
      left: 0;
      height: 100%;
      width: 100%;

      margin: 0;
      padding: $global-padding*2;

      color: $brand-white;
      font-size: 22px;
      line-height: 1.25rem;

      b, strong {
        padding-bottom: $global-padding/2;

        font-family: $brand-font-bold;
        font-size: 1.5rem;
        text-transform: uppercase;

        line-height: 1.2;

        display: block;
      }

      a {
        position: absolute;
        bottom: $global-padding*2;

        display: inline-block;
        font-family: $brand-font-regular;
        font-size: .75rem;
        font-weight: 600;
        margin-top: $global-padding;
        padding: 10px $global-padding;

        border: 2px solid $brand-white;
        background-color: transparent;
        color: $brand-white;
        line-height: 1.25rem;

        transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
        transition: all 0.4s;
      }

      a:hover {
        color: black;
        mix-blend-mode: screen;
        background-color: $brand-white;
      }

      @media only screen and (max-width: 1600px) {
        font-size: 20px;

        b, strong {
          font-size: 1rem;
          padding-bottom: 0;
          margin-bottom: -$global-padding/2;
        }

        a {
          bottom: 2rem;
        }
      }

      @media only screen and (max-width: 1440px) {
        span {
          display: none;
        }
      }

      @include breakpoint(large down) {
        font-size: 18px;

        b, strong {
          font-size: 1rem;
        }

        a {
          bottom: $global-padding*2;
        }
      }

      @media only screen and (min-width: 640px) and (max-width: 768px) {
        b, strong {
          font-size: 1.125rem;
        }

        span {
          display: block;
        }
      }

      @include breakpoint(small down) {
        padding: $global-padding;

        b, strong {
          font-size: 22px;
        }

        a {
          bottom: $global-padding;
        }
      }

      @media only screen and (max-width: 350px) {
        b, strong {
          font-size: 20px;
        }
      }
    }

    &.secondary {
      figcaption {
        background: transparentize($brand-secondary, .2);
      }
    }

    &.primary {
      figcaption {
        background: transparentize($brand-primary, .2);
      }
    }
  }

  &.meg-has-overlay {
    position: relative;
    margin-bottom: 100px;

    figcaption {
      position: absolute;

      top: 0;
      left: 10vw;
      height: 100%;
      width: 50%;

      margin: 0;
      padding: 150px 0;

      font-size: 1.5rem;
      line-height: 1.2;
      color: $brand-primary;

      b, strong {
        font-family: $brand-font-bold;
      }

      em {
        display: inline-block;
        margin-top: $global-padding;

        font-style: normal;
        font-family: $brand-font-bold;
        font-size: 3rem;
      }

      @include breakpoint(large down) {
        padding: 110px 0;
        font-size: 1rem;
        line-height: 1.3;
      }
    }

    &.meg-contact {
      figcaption {
        a:hover {
          background-color: transparent;
        }

        strong:hover {
          color: $brand-secondary;
        }
      }

      @media only screen and (max-width: 1440px) and (min-width: 1025px) {
        figcaption {
          font-size: 1.25rem;
        }
      }

      @include breakpoint(medium down) {
        figcaption {
          padding: 50px 0;
          font-size: .875rem;
          width: 50%;

          a {
            font-size: .875rem;
          }
        }
      }

      @include breakpoint(small down) {
        figcaption {
          padding: 40px 0;
          font-size: .75rem;
          width: 85%;

          a {
            font-size: .75rem;
          }
        }
      }
    }

    &.meg-job-contact {
      figcaption {
        @include breakpoint(small down) {
          font-size: 18px;
          position: relative;
          padding: 0 0 40px 0;
          top: 40px;
          width: 80%;
        }
      }
    }

    &.impression-overlay {
      figcaption {
        font-size: 24px;
        top: 25%;
        left: unset;
        right: $container-padding/2;
        width: 25%;
        color: $brand-white;

        b, strong {
          display: block;
          font-size: 1.5rem;
        }

        a {
          display: inline-block;
          font-size: 18px;
          font-weight: 600;
          margin-top: 30px;
          padding: 10px 20px;
          color: $brand-white;
          border: 2px solid $brand-white;
          line-height: 1.25rem;
        }

        a:hover {
          color: black;
          mix-blend-mode: screen;
          background-color: $brand-white;
        }

        @media only screen and (max-width: 1440px) {
          font-size: 20px;
          top: 12.5%;

          b, strong {
            font-size: 1.125rem;
          }
        }

        @include breakpoint(large down) {
          font-size: 18px;
          top: 0;

          b, strong {
            font-size: 1rem;
          }
        }

        @include breakpoint(medium down) {
          position: relative;
          padding: 0 10vw;
          right: unset;
          text-align: center;
          top: 40px;
          width: 100%;

          strong {
            color: $brand-primary;
          }

          span {
            color: black;
          }

          a {
            border-color: $brand-primary;
            color: $brand-primary;
          }

          a:hover {
            color: white;
            background-color: $brand-primary;
            mix-blend-mode: initial;
          }
        }
      }
    }
  }

  &.meg-scrollpoint {
    margin-bottom: 0;

    position: relative;
    top: -$global-padding*6;
    left: 0;

    opacity: 1;
    z-index: 1;

    img {
      border-radius: 20px;
    }

    img:hover {
      cursor: pointer;
    }

    @include breakpoint(small down) {
      top: -$global-padding*7;

      img {
        width: 40px;
        height: 40px;
      }
    }

    @media only screen and (max-height: 400px) {
      opacity: 0;
    }
  }
}

.wp-column-social {
  .wp-block-image {
    margin-bottom: 0;
  }
}

.meg-customers {
  .wp-block-image {
    margin-bottom: 3rem;
  }
}

.meg-more {
  .wp-block-image {
    figcaption {
      a:hover {
        background: transparent;
        color: $brand-secondary;
      }
    }
  }
}

.meg-job-text+figure {
  &.wp-block-image.meg-has-overlay {
    margin-bottom: 0;
  }
}