/* Quiet depth only inside cropped photographs; captions and controls stay still.
   Each overscan retains 4px beyond the maximum offset, preventing exposed edges. */
@media (prefers-reduced-motion:no-preference) {
  .calea-enhanced #proyecto .calea-atmosphere-project .w-slide img {
    object-position:var(--calea-panorama-focus, var(--calea-focus, 50% 50%));
  }
}
.calea-enhanced #calea-beach .calea-atmosphere-beach .w-lightbox {
  position:relative;
  height:auto;
  aspect-ratio:1.9;
  overflow:hidden;
  --calea-atmosphere-overscan:16px;
}
.calea-closing-image.calea-atmosphere-closing {
  position:relative;
  overflow:hidden;
  --calea-atmosphere-overscan:30px;
}
/* Match the existing reel's photo box exactly; captions remain in normal flow.
   The frame stays even with reduced motion, when the original img sizing wins. */
.calea-enhanced .galerias-pv-zd_escr .calea-destination-photo {
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:var(--calea-reel-ratio,16 / 9);
  overflow:hidden;
  border-radius:8px;
  --calea-atmosphere-overscan:14px;
}
.calea-enhanced .galerias-pv-zd_escr .calea-destination-photo:has(> img:focus-visible:not(.calea-gallery-pointer-return)) {
  outline:2px solid #7c6748;
  outline-offset:-5px;
}
.calea-enhanced .galerias-pv-zd_escr .calea-destination-photo > img:focus-visible {
  outline:none;
}
.calea-enhanced .galerias-pv-zd_escr .calea-atmosphere-destination .calea-destination-photo > img:not(.calea-complete-composition) {
  position:absolute;
  left:0;
  top:calc(-1 * var(--calea-atmosphere-overscan));
  width:100%;
  height:calc(100% + var(--calea-atmosphere-overscan) * 2);
  aspect-ratio:auto;
  border-radius:0;
  object-fit:cover;
  transform:translate3d(0,var(--calea-atmosphere-y,0px),0);
}
.calea-enhanced #calea-beach .calea-atmosphere-beach .w-lightbox img,
.calea-closing-image.calea-atmosphere-closing > .calea-closing-photo {
  position:absolute;
  left:0;
  top:calc(-1 * var(--calea-atmosphere-overscan));
  display:block;
  width:100%;
  height:calc(100% + var(--calea-atmosphere-overscan) * 2);
  max-height:none;
  aspect-ratio:auto;
  object-fit:cover;
  transform:translate3d(0,var(--calea-atmosphere-y,0px),0);
}
.calea-atmosphere-beach.is-atmosphere-visible .w-lightbox img,
.calea-atmosphere-closing.is-atmosphere-visible > .calea-closing-photo {
  will-change:transform;
}
@media (max-width:700px) {
  .calea-enhanced #calea-beach .calea-atmosphere-beach .w-lightbox {
    --calea-atmosphere-overscan:10px;
  }
  .calea-closing-image.calea-atmosphere-closing {
    --calea-atmosphere-overscan:16px;
  }
  .calea-enhanced .galerias-pv-zd_escr .calea-destination-photo {
    --calea-atmosphere-overscan:8px;
  }
}

/* The photo moves within its frame, independently of scroll depth and slider movement. */
@media (prefers-reduced-motion:no-preference) {
  .calea-enhanced :is(.w-slide, .calea-floorplan-open, .contenedor-imagen-ubicacion) {
    overflow:hidden;
  }
  .calea-enhanced :is(.w-lightbox img, .w-slide img, .calea-closing-photo, .calea-tower-media > img, .calea-floorplan) {
    scale:var(--calea-photo-scale, var(--calea-scroll-scale, 1));
    transition:scale .6s ease;
  }
  .calea-enhanced .w-slide img.calea-complete-composition {
    --calea-scroll-scale:1;
  }
  .calea-enhanced :is(.w-lightbox, .w-slide img, .calea-closing-image, .calea-tower-media, .calea-floorplan-open).calea-pen-hover {
    --calea-photo-scale:calc(1.025 + (var(--calea-scroll-scale, 1) - 1) * .25);
  }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .calea-enhanced :is(.w-lightbox, .w-slide img, .calea-closing-image, .calea-tower-media, .calea-floorplan-open):hover {
    --calea-photo-scale:calc(1.025 + (var(--calea-scroll-scale, 1) - 1) * .25);
  }
}
@media (prefers-reduced-motion:reduce) {
  .calea-enhanced #calea-beach .calea-atmosphere-beach .w-lightbox img,
  .calea-closing-image.calea-atmosphere-closing > .calea-closing-photo,
  .calea-enhanced .galerias-pv-zd_escr .calea-atmosphere-destination .calea-destination-photo > img {
    transform:none;
    will-change:auto;
  }
}
