/* =========================================================
   Photo Stack Slider (Elementor Extra widget: ee-media-photo-stack-slider)
   One photo at a time with two cards peeking out underneath.
   Sizes and colors are set from the widget's Style tab through
   the --ee-ps-* variables below.
   ========================================================= */

.ee-media-photo-stack {
  --ee-ps-w: 540px;
  --ee-ps-ratio: 4 / 5;
  --ee-ps-radius: 8px;
  --ee-ps-speed: 0.9s;      /* the script reads this */
  --ee-ps-bg: #fdf5f2;
  --ee-ps-stack: #eadfdb;
  --ee-ps-brand: #e30b2c;
  position: relative;
  width: var(--ee-ps-w);
  max-width: 100%;
  aspect-ratio: var(--ee-ps-ratio);
  margin: 0 auto;
  isolation: isolate;
  outline: none;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.ee-media-photo-stack--stacked { margin-bottom: 64px; } /* room for the stacked cards */

/* two cards peeking out underneath, so it reads as a stack */
.ee-media-photo-stack__stack {
  position: absolute;
  inset: 0;
  border-radius: var(--ee-ps-radius);
  background: var(--ee-ps-stack);
  pointer-events: none;
}
.ee-media-photo-stack__stack--1 { z-index: 0;  transform: translateY(40px) scale(0.94); opacity: 0.85; }
.ee-media-photo-stack__stack--2 { z-index: -1; transform: translateY(78px) scale(0.88); opacity: 0.5; }

/* the window the photos move through */
.ee-media-photo-stack__window {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: var(--ee-ps-radius);
  background: var(--ee-ps-stack);
  box-shadow: 0 30px 60px -24px rgba(60, 20, 20, 0.45);
  transform: translateZ(0); /* keeps rounded corners clipping during animation */
}
.ee-media-photo-stack:focus-visible .ee-media-photo-stack__window {
  box-shadow:
    0 0 0 4px var(--ee-ps-bg),
    0 0 0 7px var(--ee-ps-brand),
    0 30px 60px -24px rgba(60, 20, 20, 0.45);
}

.ee-media-photo-stack__slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  will-change: transform;
}
.ee-media-photo-stack__slide.ee-is-active,
.ee-media-photo-stack__slide.ee-is-leaving { visibility: visible; }
.ee-media-photo-stack__slide.ee-is-active  { z-index: 2; }
.ee-media-photo-stack__slide.ee-is-leaving { z-index: 1; }

.ee-media-photo-stack .ee-media-photo-stack__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* the outgoing photo dims as the new one slides over it */
.ee-media-photo-stack__shade {
  position: absolute;
  inset: 0;
  background: #2a1414;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ee-ps-speed) ease;
}
.ee-media-photo-stack__slide.ee-is-leaving .ee-media-photo-stack__shade { opacity: 0.45; }

/* paw stamp on the photo in focus */
.ee-media-photo-stack__paw {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ee-ps-bg);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px -6px rgba(60, 20, 20, 0.35);
  transform: scale(0) rotate(-30deg);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ee-media-photo-stack .ee-media-photo-stack__paw__img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}
.ee-media-photo-stack__slide.ee-is-active .ee-media-photo-stack__paw {
  transform: scale(1) rotate(0deg);
  transition-delay: calc(var(--ee-ps-speed) * 0.7);
}

.ee-media-photo-stack__sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ee-media-photo-stack__empty {
  padding: 24px;
  border: 1px dashed #c9c9c9;
  text-align: center;
  color: #7a7a7a;
}

@media (max-width: 640px) {
  .ee-media-photo-stack { --ee-ps-w: min(88vw, 440px); }
}

@media (prefers-reduced-motion: reduce) {
  .ee-media-photo-stack { --ee-ps-speed: 0.01s; }
}
