.rm-article-gallery {
  --rm-gallery-blue: #122f6f;
  --rm-gallery-red: #e01717;
  --rm-gallery-ink: #17213a;
  --rm-gallery-muted: #657084;
  --rm-gallery-line: rgba(18, 47, 111, 0.14);
  --rm-gallery-soft: #f4f7fb;
  position: relative;
  width: 100%;
  margin: 0 0 6px;
  color: var(--rm-gallery-ink);
  background: #fff;
}

.rm-article-gallery-after-body,
.rm-article-embed-after-body {
  clear: both;
  margin-top: 30px;
}

.rm-article-gallery-after-body + #node-single-comment,
.rm-article-embed-after-body + .rm-article-gallery-after-body,
.rm-article-embed-after-body + #node-single-comment {
  margin-top: 30px;
}

.rm-article-gallery-after-body--default .owl-carousel {
  margin-bottom: 0;
}

.rm-article-embed-after-body iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

.rm-article-gallery button {
  font: inherit;
}

.rm-article-gallery img {
  display: block;
  max-width: 100%;
}

.rm-article-gallery__stage,
.rm-article-gallery__story-feature {
  position: relative;
  overflow: hidden;
  background: #071328;
}

.rm-article-gallery__slide,
.rm-article-gallery__story-slide {
  display: none;
  margin: 0;
}

.rm-article-gallery__slide.is-active,
.rm-article-gallery__story-slide.is-active {
  display: block;
}

.rm-article-gallery__slide img {
  width: 100%;
  height: clamp(360px, 58vw, 700px);
  object-fit: contain;
  background: #071328;
}

.rm-article-gallery__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--rm-gallery-blue);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 28px;
  line-height: 42px;
  transform: translateY(-50%);
}

.rm-article-gallery__arrow--prev {
  left: 18px;
}

.rm-article-gallery__arrow--next {
  right: 18px;
}

.rm-article-gallery__count {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  border-radius: 8px;
  background: rgba(7, 19, 40, 0.78);
  color: #fff;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 700;
}

.rm-article-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--rm-gallery-line);
  border-top: 0;
  background: #fff;
}

.rm-article-gallery__thumb {
  height: 68px;
  min-width: 0;
  border: 3px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: var(--rm-gallery-soft);
  cursor: pointer;
  overflow: hidden;
}

.rm-article-gallery__thumb.is-active {
  border-color: var(--rm-gallery-red);
}

.rm-article-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rm-article-gallery__mosaic {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--rm-gallery-line);
  background: #fff;
}

.rm-article-gallery__tile {
  position: relative;
  grid-column: span 1;
  min-height: 150px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: var(--rm-gallery-soft);
  cursor: zoom-in;
  overflow: hidden;
}

.rm-article-gallery__tile--wide {
  grid-column: span 3;
  grid-row: span 2;
  min-height: 330px;
}

.rm-article-gallery__tile--tall {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 330px;
}

.rm-article-gallery__tile img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.rm-article-gallery__tile:hover img,
.rm-article-gallery__tile:focus img {
  transform: scale(1.04);
}

.rm-article-gallery__modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(7, 19, 40, 0.88);
}

.rm-article-gallery__modal.is-open {
  display: grid;
}

.rm-article-gallery__modal img {
  max-width: min(1180px, 96vw);
  max-height: 86vh;
  object-fit: contain;
  background: #071328;
}

.rm-article-gallery__modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--rm-gallery-blue);
  cursor: pointer;
  font-size: 26px;
  line-height: 42px;
}

.rm-article-gallery--story {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  border: 1px solid var(--rm-gallery-line);
}

.rm-article-gallery__story-feature {
  min-height: 620px;
}

.rm-article-gallery__story-slide img {
  width: 100%;
  height: 540px;
  object-fit: contain;
  background: #071328;
}

.rm-article-gallery__story-slide figcaption {
  min-height: 84px;
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}

.rm-article-gallery__story-slide b {
  display: block;
  margin-bottom: 4px;
  color: #f3b433;
  font-size: 13px;
  text-transform: uppercase;
}

.rm-article-gallery__story-list {
  max-height: 620px;
  overflow: auto;
  border-left: 1px solid var(--rm-gallery-line);
  background: #fbfcff;
}

.rm-article-gallery__story-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rm-gallery-line);
  background: transparent;
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.rm-article-gallery__story-item.is-active {
  background: rgba(224, 23, 23, 0.08);
}

.rm-article-gallery__story-item img {
  width: 118px;
  height: 86px;
  object-fit: cover;
  border-radius: 6px;
}

.rm-article-gallery__story-item b,
.rm-article-gallery__story-item span span {
  display: block;
}

.rm-article-gallery__story-item b {
  color: var(--rm-gallery-ink);
  font-size: 15px;
}

.rm-article-gallery__story-item span span {
  margin-top: 4px;
  color: var(--rm-gallery-muted);
  font-size: 13px;
}

@media (max-width: 991px) {
  .rm-article-gallery__mosaic,
  .rm-article-gallery--story {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rm-article-gallery--story {
    display: block;
  }

  .rm-article-gallery__story-list {
    max-height: none;
    border-left: 0;
  }

  .rm-article-gallery__tile,
  .rm-article-gallery__tile img {
    min-height: 180px;
  }

  .rm-article-gallery__tile--wide,
  .rm-article-gallery__tile--tall {
    grid-column: span 2;
    min-height: 260px;
  }
}

@media (max-width: 575px) {
  .rm-article-gallery__slide img,
  .rm-article-gallery__story-slide img {
    height: 360px;
  }

  .rm-article-gallery__thumbs {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

  .rm-article-gallery__thumb {
    height: 60px;
  }

  .rm-article-gallery__arrow {
    width: 38px;
    height: 38px;
    font-size: 22px;
    line-height: 34px;
  }

  .rm-article-gallery__story-item {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }

  .rm-article-gallery__story-item img {
    width: 88px;
    height: 70px;
  }
}
