.gallery-columns-1 {
  column-count: 1;
}
.gallery-columns-2 {
  column-count: 2;
}
.gallery-columns-3 {
  column-count: 3;
}
.gallery-columns-4 {
  column-count: 4;
}
.gallery-columns-5 {
  column-count: 5;
}
.gallery-columns-6 {
  column-count: 6;
}
.gallery-columns-7 {
  column-count: 7;
}
.gallery-columns-8 {
  column-count: 8;
}
.gallery-columns-9 {
  column-count: 9;
}

.gallery {
  column-gap: 10px;
}

.gallery figure {
  margin-bottom: 10px;
  break-inside: avoid;
}

.gallery figure.gallery-item a {
  display: block;
}

.gallery .wp-caption-text {
  line-height: 1.2em;
}

/* CAPTION ALIGNED */

.pg-align_caption .gallery {
  display: grid;
}

/* NO CAPTION */

.pg-no_caption .wp-caption-text {
  display: none;
  padding: 0;
}

.pg-carousel-wrapper .pg-no_caption img {
  height: calc(100vh - 50px);
}

/* HOVER CAPTION */

.pg-hover_caption .wp-caption-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  background: rgba(255, 255, 255, 0.75);
  z-index: 10;
  color: black;
  text-align: center;}
}

.pg-hover_caption .gallery-item:hover .wp-caption-text,
.pg-hover_caption .gallery-item:focus .wp-caption-text,
.pg-hover_caption .gallery-item:active .wp-caption-text {
  display: block;
}

.pg-hover_caption .gallery img {
  height: calc(100vh - 50px);
}

/* CAROUSEL AND EXHIBITION BASICS */

/*
html {
  scroll-snap-type: block proximity;
  scroll-behavior: smooth;
}
*/

.pg-exhibition-wrapper {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.pg-carousel-wrapper {
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.pg-carousel .gallery figure.gallery-item,
.pg-exhibition .gallery figure.gallery-item,
.pg-carousel .gallery figure.gallery-item .gallery-icon,
.pg-exhibition .gallery figure.gallery-item .gallery-icon,
.pg-carousel .gallery figure.gallery-item .gallery-icon img,
.pg-exhibition .gallery figure.gallery-item .gallery-icon img,
.pg-carousel .gallery figure.gallery-item figcaption.wp-caption-text,
.pg-exhibition .gallery figure.gallery-item figcaption.wp-caption-text {
  /* nuke theme borders */
  border: none;
}

.pg-carousel .wp-caption-text, .pg-exhibition .wp-caption-text {
  text-align: right;
}

.pg-carousel.pg-hover_caption .wp-caption-text,
.pg-exhibition.pg-hover_caption .wp-caption-text {
  text-align: center;
}

.pg-carousel-wrapper, .pg-exhibition-wrapper {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.pg-exhibition-wrapper {
  height: 100vh;
}

.pg-carousel, .pg-exhibition {
  width: 100%;
  height: 100%;
  display: block;
  overflow-x: scroll;
  overflow-y: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  touch-action: pan-x pan-y pinch-zoom;
  padding: 0;
  box-sizing: border-box;
  transition: transform .5s ease-out;
}

.pg-carousel::-webkit-scrollbar, .pg-exhibition::-webkit-scrollbar {
  display: none; /* Chrome and Opera */
}

.pg-exhibition {
  padding: 2em 1em;
}

.pg-carousel header {
  position: absolute;
  font-size: 1.1em;
  display: block;
  z-index: 10;
  font-variant: small-caps;
  -moz-font-feature-settings: 'smcp' on;
  -webkit-font-feature-settings: 'smcp' on;
  -ms-font-feature-settings: 'smcp' on;
  font-feature-settings: 'smcp' on;
}

.pg-carousel header {
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0)75%);
  padding: 0.5ex 1ex 1ex 1ex;
  color: #f2f2f2;
}

.pg-carousel:hover header,
.pg-carousel:focus header,
.pg-carousel:active header {
  display: none;
}

.pg-carousel .gallery {
  display: table;
  height: 100%;
  width: 100%;
  white-space: nowrap;
  position: relative;
  margin: 10px -20px 10px -10px;
  padding: 0;
  box-sizing: border-box;
  overflow-x: visible;
  overflow-y: hidden;
}

.pg-exhibition .gallery,
.pg-exhibition .gallery * {
  display: flex;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  position: relative;
  box-sizing: border-box;
}

.pg-exhibition.pg-no_caption .gallery .wp-caption-text {
  display: none;
}

.pg-exhibition .gallery .wp-caption-text {
  text-align: right;
  line-height: 2;
}

.pg-exhibition .gallery {
  flex-direction: row;
  align-items: center;
  overflow: visible;
  height: 100%;
  width: 100%;
  max-width: 100vw;
  max-height: 100vh;
}

.pg-carousel .gallery .gallery-item {
  display: inline-table;
  float: none;
  white-space: normal;
  width: auto;
  height: 100%;
  padding: 0;
  margin: 0 5px;
  position: relative;
  box-sizing: border-box;
  border: none;
  vertical-align: top;
}

.pg-exhibition .gallery .gallery-item {
  display: none;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.pg-exhibition-wrapper .gallery .gallery-icon {
  overflow: hidden;
}

.pg-exhibition .gallery figure.active {
  display: flex;
}

.pg-carousel .gallery .gallery-item:first-child {
  margin-left: 0px;
}

.pg-carousel .gallery .gallery-item:last-child {
  margin-right: 0px;
}

.pg-carousel .gallery img {
  max-height: 100vh;
  max-width: none;
  min-width: 150px;
  min-height: 150px;
  width: auto;
  box-sizing: border-box;
  border: none;
  pointer-events: none;
}

/* Image height :
 *   32 px : WP adminbar height
 *   1em : one line of text caption
 *   20 px : 2 × 10 px of carousel margins top/bottom
 */

/* default */
.pg-carousel .gallery img {
  height: calc(100vh - 1.2em - 20px);
}

.admin-bar .pg-carousel .gallery img {
  height: calc(100vh - 1.2em - 20px - 32px);
}

/* no captions */
.pg-carousel.pg-no_caption .gallery img,
.pg-carousel.pg-hover_caption .gallery img {
  height: calc(100vh - 20px);
}

.admin-bar .pg-carousel.pg-no_caption .gallery img,
.admin-bar .pg-carousel.pg-hover_caption .gallery img {
  height: calc(100vh - 20px - 32px);
}

.pg-exhibition .gallery img {
  display: inline-flex;
  align-self: center;
  max-width: none;
  max-height: none;
  pointer-events: none;
}


/* Looks */

.pg-exhibition-wrapper .look-modern,
.pg-exhibition-wrapper .look-classic,
.pg-exhibition-wrapper .look-box,
.pg-exhibition-wrapper .look-box-dark,

.pg-exhibition-wrapper .look-box-bright {
  background: linear-gradient(180deg, rgb(255, 255, 255), rgba(0, 0, 0, 0.005)),
  radial-gradient(circle at center, rgb(255, 255, 255) 0,
  rgba(255, 255, 255, 0.5) 50%,
  rgba(200, 200, 200, 0.67) 67%,
  rgba(200, 200, 200, 0.75) 75%,
  rgb(255, 255, 255) 100%);
}

.pg-no_caption.look-classic .pg-exhibition,
.pg-no_caption.look-box .pg-exhibition,
.pg-no_caption.look-box-bright .pg-exhibition,
.pg-no_caption.look-box-dark .pg-exhibition {
  padding: 4em 2em;
}

.pg-show_caption.look-classic .pg-exhibition,
.pg-show_caption.look-box .pg-exhibition,
.pg-show_caption.look-box-bright .pg-exhibition,
.pg-show_caption.look-box-dark .pg-exhibition {
  padding: 5em 2em;
}

.pg-exhibition-wrapper .look-modern .gallery .gallery-icon {
  box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.25),
  0 1em 2em rgba(0, 0, 0, 0.25),
  0 0.25em 0.5em rgba(0, 0, 0, 0.25);
}

.pg-exhibition-wrapper .look-classic .gallery figure.gallery-item .gallery-icon {
  padding: 1em;
  background-color: #ededeb;
  border: 0.25em solid #333;
  box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.25),
              0 1em 2em rgba(0, 0, 0, 0.25),
              0 0.25em 0.5em rgba(0, 0, 0, 0.25);
}

.pg-exhibition-wrapper .look-classic .gallery img {
  box-shadow: inset 0px 2px 3px rgba(0, 0, 0, 0.1),inset 0px 2px 2px rgba(0, 0, 0, 0.05);
  border-right: 0.1em solid #fcfcfa;
  border-left: 0.1em solid #fcfcfa;
  border-top: 0.1em solid #f2f2f0;
  border-bottom: 0.1em solid #fdfdfb;
  padding: 0.15em;
  background-color: white;
}

.pg-exhibition-wrapper .look-box .gallery .gallery-icon,
.pg-exhibition-wrapper .look-box-dark .gallery .gallery-icon,
.pg-exhibition-wrapper .look-box-bright .gallery .gallery-icon {
  padding: 1em;
  box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.25),
              0 1em 2em rgba(0, 0, 0, 0.25),
              0 0.25em 0.5em rgba(0, 0, 0, 0.25),
              inset 0 0.25em 1.5em 0 rgba(0, 0, 0, 0.75);
}

.pg-exhibition-wrapper .look-box .gallery img,
.pg-exhibition-wrapper .look-box-bright .gallery img,
.pg-exhibition-wrapper .look-box-dark .gallery img {
  box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.75);
}

.pg-exhibition-wrapper .look-box .gallery figure.gallery-item .gallery-icon {
  background-color: #777;
  border: 0.25em solid #666;
}

.pg-exhibition-wrapper .look-box-dark .gallery figure.gallery-item .gallery-icon {
  background-color: #555;
  border: 0.25em solid #444;
}

.pg-exhibition-wrapper .look-box-bright .gallery figure.gallery-item .gallery-icon {
  background-color: #999;
  border: 0.25em solid #888;
}

/* Next & previous buttons */
.gallery-prev, .gallery-next {
  width: 15%;
  height: 100%;
  position: absolute;
  top: 0;
  cursor: pointer;
  z-index: 10;
}

.gallery-prev { left: 0; }
.gallery-next { right: 0; }

.gallery-prev span, .gallery-next span {
  cursor: pointer;
  position: absolute;
  top: 50%;
  text-align: center;
  padding: 7px 2px;
  margin-top: -15px;
  font-size: 15px;
  user-select: none;
  color: #333;
  font-weight: normal;
  user-select: none;
  box-sizing: border-box;
  background-color: rgba(51, 51, 51, 0.0);
}

.pg-exhibition .gallery-prev span, .pg-exhibition .gallery-next span {
  background-color: rgb(51, 51, 51, 0.0);
}

.gallery-prev span {
  left: 0;
  padding-right: 10px;
  border-radius: 0 19px 19px 0;
}

.gallery-next span{
  right: 0;
  padding-left: 10px;
  border-radius: 19px 0 0 19px;
}

.gallery-prev:hover span, .gallery-next:hover span {
  opacity: 80%;
}

/* On hover, add a black background color with a little bit see-through */
a.gallery-prev:hover span, a.gallery-next:hover span {
  background-color: rgba(0,0,0,1);
  opacity: 80%;
  text-transform: none;
  text-decoration: none!important;
  color: white;
}
