/* =========================================================
   ON STAGE GALLERY
   ========================================================= */

.on-stage-gallery {
  width: 100%;
  padding: 70px 0 100px;
}

/* =========================================================
   GALLERY GRID
   ========================================================= */

.on-stage-gallery__grid {
  columns: 3 320px;
  column-gap: 24px;
}

/* =========================================================
   PHOTO
   ========================================================= */

.on-stage-gallery__item {
  position: relative;
  display: block;

  break-inside: avoid;
  margin: 0 0 24px;

  overflow: hidden;

  background: #f3f3f3;

  opacity: 1;
  transform: translateY(0);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;

  cursor: pointer;
}

/* =========================================================
   IMAGE
   ========================================================= */

.on-stage-gallery__item img {
  display: block;

  width: 100%;
  height: auto;

  transform: scale(1);

  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.5s ease;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* =========================================================
   IMAGE HOVER
   ========================================================= */

@media (hover: hover) {
  .on-stage-gallery__item:hover img {
    transform: scale(1.035);
    filter: brightness(0.94);
  }
}

/* =========================================================
   LOAD MORE WRAPPER
   ========================================================= */

.on-stage-gallery__load-more {
  display: flex;
  justify-content: center;

  margin-top: 55px;
}

/* =========================================================
   LOAD MORE BUTTON
   ========================================================= */

#on-stage-load-more {
  background: transparent;

  border: 1px solid var(--black-total);

  color: var(--black-total);

  padding: 12px 40px;

  text-transform: uppercase;

  font-size: 12px;
  font-weight: bold;

  letter-spacing: 1px;

  cursor: pointer;

  transition: all 0.2s ease;
}

/* =========================================================
   BUTTON HOVER
   ========================================================= */

#on-stage-load-more:hover {
  background: var(--black-total);
  color: #fff;
}

/* =========================================================
   BUTTON LOADING
   ========================================================= */

#on-stage-load-more.is-loading {
  opacity: 0.5;
  cursor: wait;
}

/* =========================================================
   BUTTON DISABLED
   ========================================================= */

#on-stage-load-more:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* =========================================================
   NEW PHOTOS ANIMATION
   ========================================================= */

.on-stage-gallery__item.is-new {
  animation: onStagePhotoReveal 0.7s ease both;
}

@keyframes onStagePhotoReveal {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {
  .on-stage-gallery {
    padding: 55px 0 80px;
  }

  .on-stage-gallery__grid {
    columns: 2 280px;
    column-gap: 18px;
  }

  .on-stage-gallery__item {
    margin-bottom: 18px;
  }
}

/* =========================================================
   MOBILE GALLERY
   ========================================================= */

@media (max-width: 600px) {
  .on-stage-gallery {
    padding: 35px 0 60px;
  }

  .on-stage-gallery__grid {
    columns: 1;
  }

  .on-stage-gallery__item {
    margin-bottom: 14px;
  }

  .on-stage-gallery__load-more {
    margin-top: 35px;
  }

  #on-stage-load-more {
    padding: 12px 30px;
    font-size: 11px;
  }
}

/* =========================================================
   ON STAGE LIGHTBOX
   ========================================================= */

.on-stage-lightbox {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px;

  background: rgba(0, 0, 0, 0.94);

  opacity: 0;
  visibility: hidden;

  /*
   * Allow normal vertical scrolling gestures,
   * while JavaScript handles horizontal swipes.
   */
  touch-action: pan-y;

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

/* =========================================================
   LIGHTBOX OPEN
   ========================================================= */

.on-stage-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   LIGHTBOX CONTENT
   ========================================================= */

.on-stage-lightbox__content {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  /*
   * Important for swipe navigation.
   */
  touch-action: pan-y;

  pointer-events: none;
}

/* =========================================================
   LIGHTBOX IMAGE
   ========================================================= */

.on-stage-lightbox__content img {
  display: block;

  max-width: calc(100vw - 180px);
  max-height: calc(100vh - 100px);

  width: auto;
  height: auto;

  object-fit: contain;

  opacity: 0;

  transform: scale(0.96);

  pointer-events: none;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;

  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   LIGHTBOX IMAGE VISIBLE
   ========================================================= */

.on-stage-lightbox.is-visible .on-stage-lightbox__content img {
  opacity: 1;
  transform: scale(1);
}

/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.on-stage-lightbox__close {
  position: absolute;

  top: 25px;
  right: 30px;

  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 50px;
  height: 50px;

  padding: 0;

  border: 0;
  background: transparent;

  color: #fff;

  font-family: Arial, sans-serif;
  font-size: 42px;
  font-weight: 200;
  line-height: 1;

  cursor: pointer;

  pointer-events: auto;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.on-stage-lightbox__close:hover {
  opacity: 0.55;
  transform: rotate(90deg);
}

/* =========================================================
   LIGHTBOX ARROWS
   ========================================================= */

.on-stage-lightbox__arrow {
  position: absolute;

  top: 50%;

  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 60px;
  height: 60px;

  padding: 0;

  border: 0;
  background: transparent;

  color: #fff;

  cursor: pointer;

  pointer-events: auto;

  transform: translateY(-50%);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.on-stage-lightbox__arrow span {
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.on-stage-lightbox__arrow:hover {
  opacity: 0.55;
}

/* =========================================================
   PREVIOUS ARROW
   ========================================================= */

.on-stage-lightbox__arrow--prev {
  left: 25px;
}

.on-stage-lightbox__arrow--prev:hover {
  transform: translate(-5px, -50%);
}

/* =========================================================
   NEXT ARROW
   ========================================================= */

.on-stage-lightbox__arrow--next {
  right: 25px;
}

.on-stage-lightbox__arrow--next:hover {
  transform: translate(5px, -50%);
}

/* =========================================================
   BODY LOCK
   ========================================================= */

body.on-stage-lightbox-open {
  overflow: hidden;
}

/* =========================================================
   LIGHTBOX DESCRIPTION
   ========================================================= */

.on-stage-lightbox__description {
  width: 100%;
  max-width: 800px;

  margin-top: 18px;

  color: #fff;

  font-size: 13px;
  line-height: 1.5;

  text-align: center;

  opacity: 0;

  transform: translateY(8px);

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.on-stage-lightbox.is-visible .on-stage-lightbox__description {
  opacity: 0.9;
  transform: translateY(0);
}

/* =========================================================
   PHOTO DESCRIPTION TOOLTIP
   ========================================================= */

.on-stage-photo-tooltip {
  position: fixed;

  z-index: 100000;

  max-width: 300px;

  padding: 8px 12px;

  background: var(--black-total);
  color: var(--white);

  border-radius: 8px;

  font-size: 12px;
  line-height: 1.4;

  pointer-events: none;

  opacity: 0;
  visibility: hidden;

  transform: translateY(5px);

  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}

.on-stage-photo-tooltip.is-visible {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

/* =========================================================
   MOBILE LIGHTBOX
   ========================================================= */

@media (max-width: 600px) {
  .on-stage-lightbox {
    padding: 20px;

    /*
     * Keep horizontal gestures available to JS.
     */
    touch-action: pan-y;
  }

  .on-stage-lightbox__content {
    touch-action: pan-y;
  }

  .on-stage-lightbox__content img {
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
  }

  /* =====================================================
     CLOSE
     ===================================================== */

  .on-stage-lightbox__close {
    top: 10px;
    right: 12px;

    width: 44px;
    height: 44px;

    font-size: 34px;
  }

  /* =====================================================
     MOBILE ARROWS
     ===================================================== */

  .on-stage-lightbox__arrow {
    top: auto;
    bottom: 15px;

    width: 50px;
    height: 50px;

    transform: none;
  }

  .on-stage-lightbox__arrow--prev {
    left: 20px;
  }

  .on-stage-lightbox__arrow--next {
    right: 20px;
  }

  .on-stage-lightbox__arrow--prev:hover,
  .on-stage-lightbox__arrow--next:hover {
    transform: none;
  }

  /* =====================================================
     TOOLTIP
     ===================================================== */

  .on-stage-photo-tooltip {
    display: none;
  }

  /* =====================================================
     DESCRIPTION
     ===================================================== */

  .on-stage-lightbox__description {
    max-width: calc(100vw - 40px);

    margin-top: 12px;

    font-size: 12px;
  }
}
