.cpg-gallery {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
}

.cpg-gallery * {
  box-sizing: border-box;
}

.cpg-gallery-items {
  width: 100%;
}

.cpg-item-btn {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--cpg-reveal-duration, 320ms) ease,
    transform var(--cpg-reveal-duration, 320ms) ease;
}

.cpg-gallery.cpg-preload .cpg-item-btn {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.cpg-gallery.cpg-ready .cpg-item-btn,
.cpg-gallery.cpg-preload.cpg-ready .cpg-item-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cpg-item-frame {
  display: block;
  border: var(--cpg-border-width) solid #efefef;
  box-shadow: var(--cpg-shadow);
  background: #efefef;
  overflow: hidden;
}

.cpg-item-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cpg-item-frame--max-one-size {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpg-item-frame--max-one-size img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cpg-mode-bw .cpg-item-frame img {
  filter: grayscale(100%);
  transition: filter 0.2s ease;
}

.cpg-mode-bw .cpg-item-btn:hover .cpg-item-frame img,
.cpg-mode-bw .cpg-item-btn:focus-visible .cpg-item-frame img {
  filter: grayscale(0%);
}

.cpg-gallery-items--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.cpg-gallery-items--grid .cpg-item-btn {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.cpg-gallery-items--photowall {
  --cpg-photowall-col-min: 190px;
  --cpg-photowall-row-height: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--cpg-photowall-col-min), 1fr));
  grid-auto-rows: var(--cpg-photowall-row-height);
  grid-auto-flow: dense;
  gap: 1rem;
}

.cpg-gallery-items--photowall .cpg-item-btn {
  display: block;
  width: 100%;
  margin: 0;
  grid-row-end: span 30;
  align-self: stretch;
}

.cpg-context-page .cpg-gallery-items--photowall .cpg-item-frame {
  width: 100%;
  height: 100%;
}

.cpg-gallery-items--photowall .cpg-item-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cpg-gallery-items--polaroid {
  position: relative;
  min-height: 460px;
  margin-bottom: 1.5rem;
}

.cpg-gallery-items--polaroid .cpg-item-btn {
  display: block;
  aspect-ratio: 4 / 3;
}

.cpg-gallery-items--polaroid.is-mobile {
  min-height: 0 !important;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.cpg-gallery-items--polaroid.is-mobile .cpg-item-btn {
  position: static !important;
  width: 100% !important;
  transform: none !important;
  left: auto !important;
  top: auto !important;
}

.cpg-group {
  margin-bottom: 2rem;
}

.cpg-group-title {
  margin: 0 0 0.9rem;
  text-transform: uppercase;
}

.cpg-collapsible .cp-accordion-item {
  border-bottom: 1px solid #2d2d2d;
}

.cpg-collapsible .cp-accordion-item:first-child {
  border-top: 1px solid #2d2d2d;
}

.cpg-collapsible .cp-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cpg-collapsible .cp-accordion-trigger {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 1rem 0;
  color: inherit;
  text-decoration: none;
}

.cpg-collapsible .cp-event-title-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cpg-collapsible .cp-event-title-wrap .cp-heading {
  margin: 0;
  line-height: 1.05;
  text-transform: uppercase;
}

.cpg-collapsible .cp-event-head-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.cpg-collapsible .cp-event-symbol-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cpg-collapsible .cp-accordion-symbol {
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: url("../img/plus.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.cpg-collapsible .cp-accordion-symbol.is-open {
  background-image: url("../img/minus.svg");
}

.cpg-collapsible .cp-accordion-panel {
  padding: 0 0 1.2rem;
}

.cpg-acc-text {
  margin-bottom: 1rem;
}

.cpg-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
  z-index: 99999;
}

.cpg-lightbox.is-open {
  display: flex;
}

.cpg-lightbox img {
  max-width: min(92vw, 1500px);
  max-height: 88vh;
  object-fit: contain;
}

.cpg-lightbox-close,
.cpg-lightbox-nav {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.cpg-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-size: 2.3rem;
  line-height: 1;
}

.cpg-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  line-height: 1;
  padding: 0.2rem 0.7rem;
}

.cpg-lightbox-nav.prev {
  left: 1rem;
}

.cpg-lightbox-nav.next {
  right: 1rem;
}

@media (max-width: 1199.98px) {
  .cpg-gallery-items--photowall {
    --cpg-photowall-col-min: 170px;
  }
}

@media (max-width: 991.98px) {
  .cpg-gallery-items--grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .cpg-gallery-items--photowall {
    --cpg-photowall-col-min: 150px;
  }
}

@media (max-width: 640px) {
  .cpg-gallery-items--polaroid.is-mobile {
    grid-template-columns: 1fr;
  }

  .cpg-lightbox-nav {
    font-size: 2.1rem;
  }
}
