img,
svg {
  max-width: 100%;
  height: auto;
  border: 0;
}

html:not(.touchevents) .gallery-caption {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translate(-50%, 0%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0);
  padding: 1.25em 1.5em;
  transition: all 0.2s ease;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}
@media (min-width: 640px) {
  html:not(.touchevents) .gallery-caption {
    font-size: 14px;
  }
}
html:not(.touchevents) .gallery-caption:before,
html:not(.touchevents) .gallery-caption:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: black;
  width: 100%;
  height: 100%;
  transition: all 0.3s ease 0s;
  z-index: -1;
}
html:not(.touchevents) .gallery-caption:before {
  top: auto;
  height: 3px;
  transform: scale(0, 1);
  transform-origin: bottom left;
  transition-delay: 0.6s;
}
html:not(.touchevents) .gallery-caption:after {
  transform: scale(1, 0);
  transform-origin: bottom;
  transition-delay: 0.3s;
}
html:not(.touchevents) .visible.gallery-caption,
.gallery-item:hover .gallery-caption {
  color: white;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease 0.3s;
}
html:not(.touchevents) .visible.gallery-caption:before,
.gallery-item:hover .gallery-caption:before {
  transform: scale(1, 1);
  transition-delay: 0s;
}
html:not(.touchevents) .visible.gallery-caption:after,
.gallery-item:hover .gallery-caption:after {
  transform: scale(1, 1);
}
html:not(.touchevents) .gallery-caption:empty {
  display: none;
}

.gallery-item a:after {
  margin: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  -webkit-clip-path: polygon(
    0 calc(100% - 1rem),
    0 100%,
    1rem 100%,
    1rem 0,
    0 0,
    0 1rem,
    100% 1rem,
    100% 0,
    calc(100% - 1rem) 0,
    calc(100% - 1rem) 100%,
    100% 100%,
    100% calc(100% - 1rem)
  );
  clip-path: polygon(
    0 calc(100% - 1rem),
    0 100%,
    1rem 100%,
    1rem 0,
    0 0,
    0 1rem,
    100% 1rem,
    100% 0,
    calc(100% - 1rem) 0,
    calc(100% - 1rem) 100%,
    100% 100%,
    100% calc(100% - 1rem)
  );
}
.gallery-item a:hover:after {
  transform: scale(0.9);
  border-color: white;
}

.gallery {
  font-family: "Montserrat", "HelveticaNeueLTStd", "Helvetica Neue", Helvetica,
    Arial, "Lucida Grande", sans-serif;
  width: 100%;
  display: grid;
  grid-template-rows: flow;
  grid-auto-flow: dense;
}
@media (max-width: 639px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 640px) and (max-width: 1019px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (1260px-px: 1020px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1260px) and (max-width: 1599px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1600px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  position: relative;
  background-color: rgba(181, 181, 181, 0.5);
  overflow: hidden;
  margin: 15px;
  border-radius: 10px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.gallery-item img,
.gallery-item a {
  display: block;
}
.vertical.gallery-item {
  grid-row: span 2;
}
.horizontal.gallery-item {
  grid-column: span 2;
}

.gallery-item a {
  display: block;
}

[class*="list"] .gallery-caption,
.gallery-size-thumbnail .gallery-caption {
  display: none;
}
