.background .image {
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-repeat: no-repeat;
  background-position: 50% 50%;

  /* stretch */
  /*background-size: 100% 100% !important;*/
  /* fill */
  background-size: cover;
}

.foreground .image-container {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 50%;
  width: 100%;
  height: 0;
}

.block.image.fit-height .block-media {
  max-height: 100vh;
  overflow: hidden;
}

/* dirty hack for clickeable image */
.image.has-link img {
  cursor: pointer;
  visibility: visible !important;
}

.image.has-link .image-container {
  display: none;
}

/*
 * Filters
 */

.filter-grayscale {
  -webkit-filter: grayscale(70%);
  filter: grayscale(70%);
}

.filter-black-white {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}

.filter-sepia {
  -webkit-filter: sepia(80%);
  filter: sepia(80%);
}

.filter-blur {
  -webkit-filter: blur(5px);
  filter: blur(5px);
}

.filter-brightness {
  -webkit-filter: brightness(50%);
  filter: brightness(50%);
}

.filter-brightness-20 {
  -webkit-filter: brightness(20%);
  filter: brightness(20%);
}

.filter-brightness-80 {
  -webkit-filter: brightness(80%);
  filter: brightness(80%);
}

.image.block > img {
  max-width: 100%;
  max-height: 100%;
}

.image.block.size-large > img {
  width: 100%;
}

body.mobile-view {
  .block.image.fit-height .block-media, .imm-panel .block.image .block-media {
    max-height: none;
    overflow: visible;
  }
}
