/* Project gallery and lightbox (js/gallery.js). Photos keep their proportions at a fixed height,
   like the WP Carousel Pro strip it replaces: 300px on desktop, 180px on phones. */
.gtp-gallery {
  overflow: hidden; /* clips the spring at the ends of the strip */
}

.gtp-gallery__track {
  position: relative;
  display: flex;
  column-gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.gtp-gallery__track::-webkit-scrollbar {
  display: none;
}

.gtp-gallery__item {
  flex: none;
  display: block;
  height: 300px;
  scroll-snap-align: start;
  border: 0;
  cursor: zoom-in;
}

.gtp-gallery--scrolls .gtp-gallery__track {
  cursor: grab;
}

.gtp-gallery--dragging .gtp-gallery__track {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}

.gtp-gallery--dragging .gtp-gallery__item {
  cursor: grabbing;
}

.gtp-gallery__item img {
  -webkit-user-drag: none;
  user-select: none;
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
}

.gtp-gallery__item:focus-visible {
  outline: 2px solid #64bed2;
  outline-offset: 2px;
}

.gtp-gallery__nav {
  display: none;
  gap: 10px;
  margin-top: 20px;
}

.gtp-gallery--scrolls .gtp-gallery__nav {
  display: flex;
}

/* Same round arrows as on the home page (#oferta h3). */
.gtp-gallery__arrow {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 100%;
  background: url("../img/navigation-arrow-black.svg") center/cover no-repeat;
  cursor: pointer;
  transition: transform 250ms ease-in-out;
}

.gtp-gallery__arrow--next {
  transform: scaleX(-1);
}

.gtp-gallery__arrow--prev:hover {
  transform: scale(1.1);
}

.gtp-gallery__arrow--next:hover {
  transform: scaleX(-1) scale(1.1);
}

@media screen and (max-width: 767px) {
  .gtp-gallery__item {
    height: 180px;
  }

  /* Phones swipe the strip, as before (the plugin hid the arrows there). */
  .gtp-gallery--scrolls .gtp-gallery__nav {
    display: none;
  }
}

/* Lightbox */
html.gtp-lightbox-open {
  overflow: hidden;
}

.gtp-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(15, 27, 50, 0.96);
  color: #fff;
  font-family: Inter, sans-serif;
}

.gtp-lightbox[open] {
  display: flex;
  flex-direction: column;
}

.gtp-lightbox::backdrop {
  background: rgba(15, 27, 50, 0.96);
}

.gtp-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
}

.gtp-lightbox__counter {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.gtp-lightbox__close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.gtp-lightbox__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 90px;
  overflow: hidden;
}

.gtp-lightbox__ghost {
  position: absolute;
  max-width: none;
  max-height: none;
  pointer-events: none;
}

.gtp-lightbox__figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-height: 100%;
  margin: 0;
}

.gtp-lightbox__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 220px);
  max-height: calc(100dvh - 220px);
  object-fit: contain;
}

.gtp-lightbox__caption {
  max-width: 800px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

/* Fixed to the edges of the screen, not to the photo. */
.gtp-lightbox__arrow {
  position: fixed;
  top: 50%;
  z-index: 1;
  margin-top: -20px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 100%;
  background: url("../img/arrow-circle.svg") center/cover no-repeat;
  cursor: pointer;
}

.gtp-lightbox__arrow--prev {
  left: 30px;
}

.gtp-lightbox__arrow--next {
  right: 30px;
  transform: scaleX(-1);
}

.gtp-lightbox__thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 15px 15px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gtp-lightbox__thumb {
  flex: none;
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  opacity: 0.55;
  cursor: pointer;
}

.gtp-lightbox__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gtp-lightbox__thumb:hover,
.gtp-lightbox__thumb[aria-current="true"] {
  opacity: 1;
}

.gtp-lightbox__thumb[aria-current="true"] {
  border-color: #64bed2;
}

.gtp-lightbox button:focus-visible {
  outline: 2px solid #64bed2;
  outline-offset: 2px;
}

@media screen and (max-width: 767px) {
  .gtp-lightbox__arrow {
    display: none;
  }

  .gtp-lightbox__stage {
    padding: 0;
  }

  .gtp-lightbox__image {
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 190px);
  }

  .gtp-lightbox__thumb {
    width: 56px;
    height: 42px;
  }
}
