/* =============================================
   Private Conciergerie - Image Fixes
   Better handling for portrait & landscape images
   ============================================= */

/* Prevent images from causing layout shifts */
.destination-carousel img,
.service-card img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Founder image specific - keep object-fit cover */
.founder-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Swiper slide image improvements */
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
}

/* Handle both portrait and landscape images properly */
.destination-carousel .swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.destination-carousel .swiper-slide img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  width: auto;
  height: auto;
  object-fit: cover;
}

/* For images that are wider than tall (landscape) */
.destination-carousel .swiper-slide img[data-orientation="landscape"] {
  width: 100%;
  height: auto;
  min-height: 100%;
}

/* For images that are taller than wide (portrait) */
.destination-carousel .swiper-slide img[data-orientation="portrait"] {
  height: 100%;
  width: auto;
  min-width: 100%;
}

/* Prevent zoom on active slide from affecting layout */
.destination-carousel .swiper-slide-active img {
  transform: translate(-50%, -50%) scale(1.02);
  transform-origin: center center;
}

/* Ensure smooth transitions without layout shift */
.swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  transition-property: transform;
  box-sizing: content-box;
}

/* Fix for images loading */
.swiper-lazy-preloader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Prevent scroll during image load */
.swiper-container {
  overflow: hidden;
}

/* Better image rendering */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@supports (image-rendering: -moz-crisp-edges) {
  img {
    image-rendering: -moz-crisp-edges;
  }
}

/* Prevent images from being draggable */
.destination-carousel img,
.swiper-slide img {
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* Fix for high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .destination-carousel .swiper-slide img {
    image-rendering: auto;
  }
}

