/* === AMS Zoom Gallery Styles (Ken Burns restart, Swiper-based) === */

/* Hide all slides until Swiper initializes */
.ams-gallery-swiper .swiper-slide {
  visibility: hidden;
}
.ams-gallery-swiper.swiper-initialized .swiper-slide {
  visibility: visible;
}

/* Force only the first slide visible before init */
.ams-gallery-swiper .swiper-slide:first-child {
  visibility: visible;
  opacity: 1 !important;
}

/* Gallery container */
.ams-gallery-swiper {
  width: 100%;
  height: 100vh; /* adjust to 75vh if preferred */
  position: relative;
  overflow: hidden;
}

/* Ensure wrapper and slides fill the container */
.ams-gallery-swiper .swiper-wrapper,
.ams-gallery-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

/* Image wrapper with Ken Burns animation hooks */
.ams-image-wrapper {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform-origin: center;
  will-change: transform;
  animation: none; /* default off */
}

/* Run animation only when .is-animate + class is present */
.ams-image-wrapper.is-animate.zoom-in {
  animation: kenburnsZoomIn var(--kb-duration, 12000ms) linear 1 both;
}
.ams-image-wrapper.is-animate.zoom-out {
  animation: kenburnsZoomOut var(--kb-duration, 12000ms) linear 1 both;
}
.ams-image-wrapper.is-animate.zoom-in-left {
  animation: kenburnsZoomInLeft var(--kb-duration, 12000ms) linear 1 both;
}
.ams-image-wrapper.is-animate.zoom-in-right {
  animation: kenburnsZoomInRight var(--kb-duration, 12000ms) linear 1 both;
}
.ams-image-wrapper.is-animate.none {
  animation: none;
}

/* Keyframes - tweak scale & translate to taste */
@keyframes kenburnsZoomIn {
  0%   { transform: scale(1) translateX(0); }
  100% { transform: scale(1.10) translateX(0); }
}
@keyframes kenburnsZoomOut {
  0%   { transform: scale(1.10) translateX(0); }
  100% { transform: scale(1) translateX(0); }
}
@keyframes kenburnsZoomInLeft {
  0%   { transform: scale(1) translateX(0); }
  100% { transform: scale(1.10) translateX(-40px); }
}
@keyframes kenburnsZoomInRight {
  0%   { transform: scale(1) translateX(0); }
  100% { transform: scale(1.10) translateX(40px); }
}

/* Smooth fade easing for Swiper fade effect */
.swiper-fade .swiper-slide {
  transition: opacity 0.8s cubic-bezier(0.25,0.46,0.45,0.94) !important;
}

/* Responsive tweak */
@media (max-width: 768px) {
  .ams-gallery-swiper {
    height: 75vh;
  }
}
