.gallery-image {
  cursor: pointer;
  box-sizing: border-box;
  align-self: center;
}

.wpce-gallery {
  margin-bottom: 1px;
  background-color: #fff;
}
.wpce-gallery .group-title {
  background-color: #fff;
  margin: 0;
  padding: 15px 20px;
  transition: background-color ease-in-out 150ms;
  cursor: pointer;
}
.wpce-gallery .group-title:before {
  content: "\f107";
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin-right: 10px;
}
.wpce-gallery .group-title:hover {
  background-color: hsl(0, 0%, 105%);
  color: #CC0000;
}
.wpce-gallery .group-title:active {
  background-color: rgb(98%, 98%, 98%);
}
.wpce-gallery .gallery-group-description p {
  margin-top: 0;
}
.wpce-gallery .content {
  display: none;
  padding: 0 15px 15px 15px;
}
.wpce-gallery .content:after {
  display: flex;
  content: "";
  clear: both;
}
.wpce-gallery.active {
  margin-left: 0px;
  margin-right: 0px;
}
.wpce-gallery.active .group-title {
  color: #CC0000;
}
.wpce-gallery.active .group-title:before {
  content: "\f106";
}
.wpce-gallery.active .content {
  display: flex;
}

.gallery-grid.grid-layout {
  --cols-xs: 6;
  --cols-s: 6;
  --cols-md: 6;
  --cols-lg: 6;
}
@media (min-width: 992px) {
  .gallery-grid.grid-layout {
    --grid-layout-gap: max(var(--layout-gap), 50px) 65px;
  }
}

.gallery-control {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  font: inherit;
  line-height: 1;
  letter-spacing: inherit;
  word-spacing: inherit;
  white-space: nowrap;
  background: none;
  color: inherit;
  text-align: left;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 150;
  cursor: pointer;
  transition: background-color ease 200ms;
  color: #CC0000;
}
@media (min-width: 768px) {
  .gallery-control {
    position: absolute;
  }
}
.gallery-control:disabled {
  opacity: 0.6;
  cursor: default;
}
.gallery-control.control-prev, .gallery-control.control-next {
  bottom: 0;
}
@media (min-width: 768px) {
  .gallery-control.control-prev, .gallery-control.control-next {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }
}
.gallery-control.control-prev svg, .gallery-control.control-next svg {
  width: 16px;
  height: auto;
}
.gallery-control.control-next {
  grid-area: next;
  right: 0;
  padding: 20px 15px 20px 20px;
}
.gallery-control.control-prev {
  grid-area: prev;
  left: 0;
  padding: 20px 20px 20px 15px;
}
.gallery-control.control-close {
  grid-area: main;
  align-self: flex-start;
  justify-self: flex-end;
  right: 0;
  top: 0;
  padding: 20px;
}

.control-caption {
  grid-area: caption;
  display: none;
  background-color: #fff;
  padding: 8px 30px;
  left: 51px;
  right: 51px;
  bottom: 0;
}
.control-caption.active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
@media (min-width: 768px) {
  .control-caption {
    position: fixed;
    bottom: 10px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 20px 35px;
  }
}

.gallery-overlay {
  background-color: rgba(220, 220, 220, 0.95);
  position: fixed;
  z-index: 130;
  left: 0;
  top: var(--admin-bar-height, 0);
  bottom: 0;
  width: 100%;
  user-select: none;
}
@media (max-width: 767px) {
  .gallery-overlay {
    display: grid;
    height: 100%;
    grid-template-rows: 1fr auto;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "main main main" "prev caption next";
  }
}
.gallery-overlay .content {
  grid-area: main;
  text-align: center;
  height: 100%;
  width: 100%;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  display: -ms-flexbox;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjQ0MwMDAwIiBkPSJNNzMgNTBjMC0xMi43LTEwLjMtMjMtMjMtMjNTMjcgMzcuMyAyNyA1MG0zLjkgMGMwLTEwLjUgOC41LTE5LjEgMTkuMS0xOS4xUzY5LjEgMzkuNSA2OS4xIDUwIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIGF0dHJpYnV0ZVR5cGU9IlhNTCIgdHlwZT0icm90YXRlIiBkdXI9IjFzIiBmcm9tPSIwIDUwIDUwIiB0bz0iMzYwIDUwIDUwIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPjwvcGF0aD48L3N2Zz4=);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100px 100px;
}
.gallery-overlay .content img,
.gallery-overlay .content .gallery-image {
  --padding: 40px;
  --additional-padding-bottom: 0px;
  animation: gallery-image-reveal linear 0.3s;
  border: 5px solid #fff;
  max-height: calc(100% - var(--padding) - var(--additional-padding-bottom) - var(--admin-bar-height));
  max-width: calc(100% - var(--padding));
  margin-top: calc(-1 * var(--admin-bar-height) - var(--additional-padding-bottom));
  width: auto;
  height: auto;
  flex-shrink: 0;
  flex-grow: 0;
  transition: opacity 200ms;
}
.gallery-overlay .content img.with-caption,
.gallery-overlay .content .gallery-image.with-caption {
  --additional-padding-bottom: 24px;
}

.gallery .gallery-image {
  transition: all ease 200ms;
}
.gallery .gallery-image:hover {
  transform: scale(1.05);
}
