/* =========================================================
   ACF Photo Gallery used on Italian brands
need to add more descriptive css class 
rename file, add italian in front of it
========================================================= */

/* Wrapper */
.gallery-section .swiper-gallery-wrapper {
  margin: 0 auto;
  position: relative;
}

/* Desktop: keep images from getting too tall.
   NOTE: This assumes you still want to limit height based on header + space.
*/
@media screen and (min-width: 1025px) {
  .pellizzoni.gallery-section .swiper-gallery-wrapper .my-custom-swiper img {
    max-height: calc(100vh - var(--header-height) - 300px);
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

/* Main Swiper container */
.gallery-section .swiper-container.my-custom-swiper {
  width: 100%;
  height: auto;
  overflow: hidden;
}

/* Slides */
.pellizzoni.gallery-section .swiper-container.my-custom-swiper .swiper-slide {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Images */
.pellizzoni.gallery-section .swiper-container.my-custom-swiper .swiper-slide img {
  max-width: 100%;
  height: auto;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox zoom tweak (kept as-is)
   NOTE: This selector is very specific to Elementor lightbox behavior.
*/
@media screen and (min-width: 768px) {
  .pellizzoni.gallery-section .swiper-slide.elementor-lightbox-item.swiper-slide-active.swiper-slide-zoomed img {
    transform: translate3d(0px, 0px, 0px) scale(1.4) !important;
  }
}

/* Fallback: if Swiper is not initialized yet, show only the first slide.
   This prevents multiple images from stacking.
*/
.gallery-section .swiper-gallery-wrapper .swiper-container.my-custom-swiper:not(.swiper-initialized) .swiper-wrapper .swiper-slide:not(:first-child) {
  display: none;
}

/* Aspect ratio control (kept, but you might want to remove this)
   This forces a square slide.
   If your images should keep natural aspect ratio, comment this out.
*/
.pellizzoni.gallery-section .swiper-gallery-wrapper .swiper-container.my-custom-swiper .swiper-slide {
  aspect-ratio: 1/1;
  aspect-ratio: 388 / 578;
}

.pellizzoni.gallery-section .swiper-gallery-wrapper a {
  height: 100%;
}


/*NAV*/


.gallery-section .swiper-container.my-custom-swiper {
  overflow: hidden;
}

.gallery-section .swiper-button-next {
  background-image: url(/wp-content/uploads/2025/09/Next-C.svg);
  background-size: contain;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  right: -50px !important;
}

.gallery-section .swiper-button-prev {
  background-image: url(/wp-content/uploads/2025/09/Previous-C.svg);
  background-size: contain;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  left: -50px !important;
}

@media (max-width: 1024px) {
  .gallery-section .swiper-button-prev {
    left: 0px !important;
    display: none !important;
  }

  .gallery-section .swiper-button-next {
    right: 0px !important;
    display: none !important;
  }
}

@media (min-width: 1025px) and (max-width: 1500px) {

  .gallery-section .swiper-button-prev,
  .gallery-section .swiper-button-next {
    background-color: white;
    border-radius: 50px;
    background-size: cover;
  }

  .gallery-section .swiper-button-prev {
    left: 20px !important;
  }

  .gallery-section .swiper-button-next {
    right: 20px !important;
  }
}

.swiper-button-next:after,
.swiper-button-prev:after {
  visibility: hidden;
}

.swiper-pagination-bullet-active {
  background: #505050 !important;
}

.single-post .elementor-slideshow__title {
  display: none;
}