.cmp-gallery__wrap {
  display: flex;
  align-items: stretch;
}

.cmp-gallery.mfm--bottom-pad-default {
  padding-bottom: 80px;
}

.cmp-gallery__wrap h2 {
  font-size: 50px;
  font-weight: 500;
  line-height: 55px;
  letter-spacing: 0;
  width: 25%;
}

.cmp-gallery__wrap.cmp-gallery__wrap--fiftyfifty h2 {
  width: 100%;
}

.cmp-gallery__wrap.cmp-gallery__wrap--fiftyfifty .cmp-gallery__text {
  padding-bottom: 2rem;
}

.cmp-gallery__wrap.cmp-gallery__wrap--toptitle h2 {
  width: 100%;
  text-align: center;
}

.cmp-gallery__gallery-wrap {
  width: calc(100vw - 325px);
  max-width: 1350px;
  right: 0;
}

.cmp-gallery__list {
  position: relative;
}

.util-img-and-caption,
.util-video-and-caption {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  height: 100%;
  max-height: 571px;
}

a.util-img-and-caption,
a.util-video-and-caption {
  text-decoration: none;
}

.util-caption {
  position: absolute;
  padding: 2px 6px 0;
  bottom: 15px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 10px;
}

.cmp-gallery__wrap--fiftyfifty .util-caption,
.cmp-gallery__wrap--minimal .util-caption {
  right: 5px;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal .cmp-gallery__gallery-wrap,
.cmp-gallery__wrap.cmp-gallery__wrap--toptitle .cmp-gallery__gallery-wrap {
  width: calc(50vw + 650px);
  max-width: 100vw;
}

.cmp-gallery__wrap.cmp-gallery__wrap--toptitle.cmp-gallery__wrap--notitle .cmp-gallery__gallery-wrap {
  margin-top: 0;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal .util-img-and-caption {
  width: 1300px;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal .cmp-gallery__list {
  width: 100%;
}

.cmp-gallery__wrap.cmp-gallery__wrap--fiftyfifty .cmp-gallery__gallery-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  right: auto;
}

.cmp-gallery__item {
  margin-right: 32px;
}

.cmp-gallery__wrap--fiftyfifty .cmp-gallery__item {
  display: flex;
  width: 100%;
}

.cmp-gallery__wrap--fiftyfifty .util-video-and-caption {
  max-width: 644px;
  width: 100%;
}

.cmp-gallery__wrap--fiftyfifty .cmp-gallery__item,
.cmp-gallery__wrap--minimal .cmp-gallery__item {
  margin-right: 0;
}

.js-cmp-gallery__carousel button.flickity-button.flickity-prev-next-button.previous,
.js-cmp-gallery__carousel button.flickity-button.flickity-prev-next-button.next {
  display: none;
}

.cmp-gallery__text a.b-button {
  margin-bottom: 32px;
}

span.cmp-gallery__message-warning {
  text-decoration: none;
  top: -100px;
  display: block;
  position: relative;
  color: #b1abab;
  text-align: center;
}

.cmp-gallery__wrap--fiftyfifty .cmp-gallery__gallery-wrap,
.cmp-gallery__wrap--fiftyfifty .cmp-gallery__fifty-wrap {
  flex: 1;
}

.cmp-gallery__fifty-wrap {
  display: flex;
  justify-content: center;
}

.cmp-gallery__fifty-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 0;
  max-width: 400px;
}

.cmp-gallery__wrap.cmp-gallery__wrap--toptitle.cmp-gallery__height--portrait {
  justify-content: space-between;
  margin-bottom: 30px;
}

.cmp-gallery__wrap.cmp-gallery__wrap--sidetitle .cmp-gallery__item,
.cmp-gallery__wrap.cmp-gallery__wrap--toptitle .cmp-gallery__item {
  width: 634px;
}

.cmp-gallery__wrap.cmp-gallery__wrap--sidetitle.cmp-gallery__height--portrait .cmp-gallery__item video,
.cmp-gallery__wrap.cmp-gallery__wrap--toptitle.cmp-gallery__height--portrait .cmp-gallery__item {
  width: 438px;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal.cmp-gallery__height--portrait .cmp-gallery__item {
  width: 100%;
}

.cmp-gallery__wrap.cmp-gallery__wrap--sidetitle.cmp-gallery__height--portrait .cmp-gallery__item img,
.cmp-gallery__wrap.cmp-gallery__wrap--toptitle.cmp-gallery__height--portrait .cmp-gallery__item img {
  width: 100%;
  max-width: 634px;
  /*height: auto;*/
  height: 100%;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal.cmp-gallery__height--portrait .cmp-gallery__item.cmp-gallery__item--portrait .util-img-and-caption {
  text-align: center;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal.cmp-gallery__height--portrait .cmp-gallery__item.cmp-gallery__item--portrait img {
  width: 42.2%;
  height: auto;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal.cmp-gallery__height--portrait .cmp-gallery__item.cmp-gallery__item--portrait .cmp-gallery__text {
  width: 42.2%;
  margin: 0 auto;
}

.cmp-gallery__wrap.cmp-gallery__wrap--minimal.cmp-gallery__height--portrait .cmp-gallery__item.cmp-gallery__item--portrait .util-caption {
  right: 30%;
  max-width: 40%;
}

.cmp-gallery__item--landscape img {
  width: 100%;
  height: auto;
}

/* video */
.util-video-and-caption video {
  display: block;
  position: absolute;
  object-fit: cover;
  object-position: center;
}

/* video overlay */
.cmp-video__thumbnail {
  position: absolute;
  background-size: cover;
  background-position: center;
  height: 100%;
  width: 100%;
  cursor: pointer;
}

.cmp-video__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.cmp-video__play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.cmp-video__play-button::before {
  content: '';
  width: 0;
  height: 0;
  margin-left: 7px;
  border-style: solid;
  border-width: 20px 0 20px 36px;
  border-color: transparent transparent transparent white;
}

.cmp-video__item-thumb {
  width: 100%;
  height: 488px;
  background-size: cover;
  background-position: center;
}

.cmp-gallery__wrap--toptitle .cmp-video__item-thumb {
  width: 634px;
  height: 358px;
}

.cmp-gallery__wrap--toptitle.cmp-gallery__height--portrait .cmp-video__item-thumb {
  width: 634px;
  height: 100%;
}

.cmp-gallery__wrap--toptitle .cmp-video__item-thumb {
  width: 634px;
  /*height: 358px;*/
}

.cmp-gallery__wrap--toptitle .cmp-gallery__item.assetVideo {
  width: 100%;
  max-width: 634px;
  height: 100%;
}

.cmp-gallery__wrap--toptitle.cmp-gallery__height--portrait .cmp-gallery__item.assetVideo {
  width: 100%;
  max-width: 437px;
  height: 100%;
}

.cmp-gallery__wrap--sidetitle .cmp-video__item-thumb {
  height: 488px;
}

.cmp-gallery__wrap--toptitle.cmp-gallery__height--portrait .util-video-and-caption video,
.cmp-gallery__wrap--toptitle.cmp-gallery__height--portrait .cmp-video__item-thumb {
  max-height: 571px;
  width: 437px;
}

.util-video-and-caption iframe {
  top: 0;
  left: 0;
  width: 634px;
  height: 488px;
}

.cmp-gallery__wrap--toptitle .util-video-and-caption iframe {
  height: 358px;
}

@media (max-width: 767px) {
  .cmp-gallery .js-cmp-gallery__carousel.flickity-enabled {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .cmp-gallery__wrap--minimal
  .js-cmp-gallery__carousel.flickity-enabled
  .cmp-gallery__item--landscape,
  .cmp-gallery__wrap--sidetitle .js-cmp-gallery__carousel.flickity-enabled .cmp-gallery__item,
  .cmp-gallery__wrap--toptitle .js-cmp-gallery__carousel.flickity-enabled .cmp-gallery__item {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box;
    padding: 0 12px 12px;
  }

  .cmp-gallery .js-cmp-gallery__carousel.flickity-enabled img {
    display: block;
    width: 100%;
    /*height: auto;*/
  }

  .cmp-gallery .js-cmp-gallery__carousel.flickity-enabled video,
  .cmp-gallery .js-cmp-gallery__carousel.flickity-enabled iframe,
  .cmp-gallery .js-cmp-gallery__carousel.flickity-enabled .cmp-video__item-thumb {
    width: 100%;
  }

  /* room for dots so captions don’t touch them */
  .cmp-gallery .js-cmp-gallery__carousel.flickity-enabled .flickity-viewport {
    margin-bottom: 20px;
  }

  /* ensure captions wrap */
  .cmp-gallery .js-cmp-gallery__carousel .cmp-gallery__text,
  .cmp-gallery .js-cmp-gallery__carousel .cmp-gallery__text p {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    overflow-wrap: anywhere;
    margin-bottom: 1rem;
  }

  .cmp-gallery .js-cmp-gallery__carousel.flickity-enabled .flickity-viewport {
    margin-bottom: 20px;
  }

  .cmp-gallery .js-cmp-gallery__carousel .cmp-gallery__text,
  .cmp-gallery .js-cmp-gallery__carousel .cmp-gallery__text p {
    word-break: break-word;
  }
}

@media (max-width: 1024px) {
  .cmp-gallery__wrap {
    flex-direction: column;
  }

  .cmp-gallery__wrap h2 {
    width: 100%;
  }

  .cmp-gallery__gallery-wrap {
    position: relative;
    width: 100%;
  }

  .cmp-gallery__wrap.cmp-gallery__wrap--toptitle .cmp-gallery__gallery-wrap {
    margin-top: 0;
  }

  .cmp-gallery__wrap--fiftyfifty .cmp-gallery__item img {
    width: 100%;
    height: auto;
  }

  .cmp-gallery__wrap--fiftyfifty > h2,
  .cmp-gallery__wrap--minimal h2 {
    padding-left: 20px;
  }

  .cmp-gallery__wrap--minimal .util-img-and-caption {
    max-height: 400px;
    width: 100%;
  }

  .cmp-gallery__wrap--fiftyfifty .cmp-gallery__item,
  .cmp-gallery__wrap--fiftyfifty .cmp-gallery__item.embedVideo {
    width: 100%;
    height: auto;
  }

  .cmp-gallery__wrap--fiftyfifty .cmp-gallery__item {
    flex-direction: column;
  }

  .cmp-gallery__fifty-content {
    max-width: 100%;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .cmp-gallery__wrap.cmp-gallery__wrap--sidetitle {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cmp-gallery__wrap--fiftyfifty .cmp-gallery__item img {
    width: 100%;
    height: auto;
  }

  .cmp-gallery__wrap--minimal .cmp-gallery__item {
    max-width: none;
  }

  .cmp-gallery__wrap--minimal .cmp-gallery__item img {
    width: 100%;
    height: auto;
  }

  .cmp-gallery__wrap--minimal.cmp-gallery__wrap--toptitle .cmp-gallery__gallery-wrap {
    width: calc(50vw + 650px);
    max-width: 100vw;
  }

}

@media (min-width: 1025px) {
  .cmp-gallery__wrap--toptitle {
    flex-direction: column;
  }

  .js-cmp-gallery__carousel ol.flickity-page-dots {
    width: calc(100% - 174px);
    right: 0;
  }

  .js-cmp-gallery__carousel button.flickity-button.flickity-prev-next-button.previous,
  .js-cmp-gallery__carousel button.flickity-button.flickity-prev-next-button.next {
    display: inline-block;
    top: auto;
    left: 0;
    bottom: -40px;
    background: transparent;
    transform: none;
    width: 45px;
    height: 19px;
    border-radius: 0;
    overflow: hidden;
  }

  .js-cmp-gallery__carousel button.flickity-button.flickity-prev-next-button.next {
    right: auto;
    left: 80px;
  }

  .flickity-prev-next-button svg.flickity-button-icon {
    left: 0;
    top: -1px;
    width: 100px;
    height: 100px;
    pointer-events: none;
  }

  .flickity-prev-next-button.next svg.flickity-button-icon {
    top: -80px;
    left: -54px;
  }
}

@media (min-width: 1301px) {
  .cmp-gallery__gallery-wrap {
    width: calc(50vw + 325px);
  }
}

@media (max-width: 1320px) {
  .cmp-gallery__gallery-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cmp-gallery__wrap--sidetitle .cmp-gallery__gallery-wrap {
    padding-left: 0;
    padding-right: 0;
  }
}
