/**
 * SkyPath Andes - Gallery carousel.
 */

.skypath-gallery,
.skypath-gallery * {
  box-sizing: border-box;
}

.skypath-gallery {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  overflow: hidden;
  background: var(--idx-background, #f7f8f4);
}

.skypath-gallery__row,
.skypath-gallery__swiper {
  display: block;
  width: 100%;
  overflow: hidden;
}

.skypath-gallery__row + .skypath-gallery__row {
  margin-top: 0;
}

.skypath-gallery .swiper-wrapper {
  gap: 0 !important;
  transition-timing-function: linear !important;
}

.skypath-gallery .swiper-slide {
  height: auto;
  margin: 0 !important;
  padding: 0 !important;
}

.skypath-gallery__row--reverse {
  direction: rtl;
}

.skypath-gallery__row--reverse .skypath-gallery__item {
  direction: ltr;
}

.skypath-gallery__item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  background: var(--idx-text, #17232b);
  color: #fff;
  text-decoration: none;
}

/* Higher specificity than Elementor's global .elementor img reset. */
.elementor .skypath-gallery .swiper-slide > a.skypath-gallery__item > img.skypath-gallery__image,
.skypath-gallery .swiper-slide > a.skypath-gallery__item > img.skypath-gallery__image {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(.22, 1, .36, 1);
}

.skypath-gallery__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(5, 27, 42, 0.56) 0%,
    rgba(5, 27, 42, 0.10) 42%,
    rgba(5, 27, 42, 0) 68%
  );
  opacity: 0.84;
  transition: opacity 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .skypath-gallery__item:hover .skypath-gallery__image,
  .skypath-gallery__item:focus-visible .skypath-gallery__image {
    transform: scale(1.035);
  }

  .skypath-gallery__item:hover .skypath-gallery__shade,
  .skypath-gallery__item:focus-visible .skypath-gallery__shade {
    opacity: 1;
  }
}

.skypath-gallery__item:focus-visible {
  outline: 3px solid var(--idx-secondary, #6a8c26);
  outline-offset: -3px;
}

@media (max-width: 767px) {
  .skypath-gallery [data-mobile-hidden] {
    display: none !important;
  }


}

@media (prefers-reduced-motion: reduce) {
  .skypath-gallery__image,
  .skypath-gallery__shade {
    transition: none;
  }
}


/* =========================================================
   PREWARM STATE
   JS applies this only while Gallery images decode before Swiper init.
   The reserved height prevents CLS and the user never sees raw slides build.
   ========================================================= */

.skypath-gallery.is-carousel-pending {
  height: calc((100vw / 6) * 2);
  min-height: calc((100vw / 6) * 2);
  visibility: hidden;
}

.skypath-gallery.is-carousel-ready {
  height: auto;
  min-height: 0;
  visibility: visible;
}

@media (max-width: 1024px) {
  .skypath-gallery.is-carousel-pending {
    height: calc((100vw / 3) * 2);
    min-height: calc((100vw / 3) * 2);
  }
}

@media (max-width: 767px) {
  .skypath-gallery.is-carousel-pending {
    height: calc(100vw / 1.28);
    min-height: calc(100vw / 1.28);
  }
}
