/*!* Justified gallery styles*/

/* Basic image styling */
.img {
  max-width: 100%;
  height: auto;
}

/* Main gallery container */
.gallery {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

.gallery .gallery-item {
  margin: 0 10px;
  margin-bottom: 20px;
  overflow: hidden;
  max-width: calc(100% - 20px);
}

.gallery .gallery-item img {
  user-select: none;
  width: 100%;
  vertical-align: middle;
  transition: .3s;
}

.gallery.zoomable .gallery-item:hover img {
  transform: scale(1.05);
  cursor: zoom-in;
}

/* Justified gallery layout - grows to fill remaining space */
.gallery::after {
  content: "";
  flex-grow: 99999;
  min-width: calc(100vw/3);
}

/* Mobile responsive */
@media(max-width: 460px) {
  .gallery {
    flex-direction: column;
  }

  .gallery .gallery-item {
    width: calc(100% - 20px) !important;
  }
}

/* Gallery slider specific styles */
.gallery-slider .swiper-slide img {
  width: 100%;
}

.gallery-slider .swiper-button-prev,
.gallery-slider .swiper-button-next {
  color: #fff;
  opacity: 0;
  transition: .3s;
}

.gallery-slider:hover .swiper-button-prev,
.gallery-slider:hover .swiper-button-next {
  opacity: 1;
}

.gallery-slider:hover .swiper-button-prev {
  left: 30px;
}

.gallery-slider:hover .swiper-button-next {
  right: 30px;
}

/* Image variants for dark mode */
.img-light {
  display: initial;
}

.img-dark {
  display: none;
}

.dark .img-light {
  display: none;
}

.dark .img-dark {
  display: initial;
}

/* Content images */
.content img {
  max-width: 100%;
  margin-bottom: 1.5rem;
  height: auto;
  display: inline-block;
}

.content img.glightbox {
  cursor: pointer;
}

.content img.img-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.content img.img-left {
  display: block;
  margin-left: 0;
  margin-right: auto;
}

.content img.img-right {
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.content img.img-float-left {
  float: left;
  margin-right: 1.5rem;
}

.content img.img-float-right {
  float: right;
  margin-left: 1.5rem;
}

.content figure {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.content figure img {
  margin-bottom: .7rem;
}

.content figure.img-center {
  display: block;
  text-align: center;
}

.content figure.img-left {
  display: block;
  text-align: left;
}

.content figure.img-right {
  display: block;
  text-align: right;
}

.content figure.img-float-left {
  float: left;
  margin-right: 1.5rem;
}

.content figure.img-float-right {
  float: right;
  margin-left: 1.5rem;
}