/* ============================================================
   wedding-slideshow.css
   Locks the wedding image slideshow to the exact dimensions
   of wedding1 (2070 × 1380px — 3:2 landscape ratio).
   All images display at the same size and crop identically.
   ============================================================ */

/* ── Container: story-image wraps the slideshow ─────────────── */
.story-image {
  /* Enforce the 3:2 aspect ratio of wedding1 at all times */
  aspect-ratio: 3 / 2;

  /* Let it fill its grid column naturally */
  width: 100%;

  /* Clip anything that overflows */
  overflow: hidden;

  /* Existing brand styling preserved */
  border-radius: 34px;
  border: 8px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.32),
    0 8px  24px rgba(0, 0, 0, 0.18);

  /* Needed for absolute-positioned dots */
  position: relative;
}

/* ── Inner wrapper fills the locked container ───────────────── */
.slideshow-inner {
  position: relative;
  width:  100%;
  height: 100%;
}

/* ── Every slide fills the container exactly ────────────────── */
.slideshow-inner .slide {
  position: absolute;
  inset: 0;
  width:  100%;
  height: 100%;

  /* Fill the frame without distortion */
  object-fit: cover;

  /* Default: centre the crop so subjects stay visible */
  object-position: center center;

  border-radius: inherit;
  opacity: 0;
  transition: opacity 850ms ease;
  display: block;
}

/* Active slide sits on top */
.slideshow-inner .slide.active {
  opacity: 1;
  /* Keep in normal flow so the container respects aspect-ratio */
  position: relative;
  width:  100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ── Dots ────────────────────────────────────────────────────── */
.slideshow-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  appearance: none;
  -webkit-appearance: none;
  width:  9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.dot.active {
  background: #fff;
  transform: scale(1.35);
}

.dot:focus-visible {
  outline: 2px solid #f4c430;
  outline-offset: 3px;
}

/* ── Tablet (≤ 980px): stays 3:2, just narrower ─────────────── */
@media (max-width: 980px) {
  .story-image {
    aspect-ratio: 3 / 2;
    border-radius: 24px;
  }

  .slideshow-inner .slide,
  .slideshow-inner .slide.active {
    object-position: center top; /* show tops of dresses on narrow screens */
  }
}

/* ── Mobile (≤ 620px): taller crop preserves dress details ──── */
@media (max-width: 620px) {
  .story-image {
    /* Switch to a taller ratio on phones so gown detail shows */
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    border-width: 4px;
  }

  .slideshow-inner .slide,
  .slideshow-inner .slide.active {
    object-position: center top;
  }
}

/* ── Reduced motion: disable cross-fade ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .slideshow-inner .slide {
    transition: none;
  }
}
