/* Portfolio-style carousel scoped to the wedding service page. */
.wedding-carousel {
  width: 100%;
  min-width: 0;
  --wedding-card-height: clamp(280px, 40vw, 520px);
  --wedding-step: clamp(100px, 20vw, 280px);
}

.wedding-carousel__track {
  position: relative;
  width: 100%;
  height: clamp(360px, 47vw, 600px);
  overflow: hidden;
  isolation: isolate;
  perspective: 1000px;
  touch-action: pan-y pinch-zoom;
}

.wedding-carousel__card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62%, calc(var(--wedding-card-height) * var(--wedding-photo-ratio)));
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(156, 211, 92, 0.52);
  border-radius: 34px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(156, 211, 92, 0.14), 0 22px 52px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  transform-origin: center;
  transition: transform 760ms cubic-bezier(0.16, 1, 0.3, 1), filter 760ms cubic-bezier(0.16, 1, 0.3, 1), opacity 620ms ease-out;
  -webkit-tap-highlight-color: transparent;
}

.wedding-carousel__card[hidden] { display: none; }

.wedding-carousel__card[data-offset="0"] {
  z-index: 5;
  opacity: 1;
  filter: none;
  transform: translate(-50%, -50%) rotate(-1deg);
}

.wedding-carousel__card[data-offset="-1"] {
  z-index: 3;
  opacity: 0.82;
  filter: brightness(0.86);
  transform: translate(calc(-50% - var(--wedding-step)), -50%) rotateY(10deg) rotate(-5deg) scale(0.84);
}

.wedding-carousel__card[data-offset="1"] {
  z-index: 3;
  opacity: 0.82;
  filter: brightness(0.86);
  transform: translate(calc(-50% + var(--wedding-step)), -50%) rotateY(-10deg) rotate(5deg) scale(0.84);
}

.wedding-carousel__card[data-offset="-2"] {
  z-index: 1;
  opacity: 0.4;
  filter: brightness(0.7);
  transform: translate(calc(-50% - var(--wedding-step) * 1.85), -50%) rotateY(14deg) rotate(-8deg) scale(0.62);
}

.wedding-carousel__card[data-offset="2"] {
  z-index: 1;
  opacity: 0.4;
  filter: brightness(0.7);
  transform: translate(calc(-50% + var(--wedding-step) * 1.85), -50%) rotateY(-14deg) rotate(8deg) scale(0.62);
}

.wedding-carousel__card picture,
.wedding-carousel__card img {
  display: block;
  width: 100%;
  height: auto;
}

.wedding-carousel__card img {
  object-fit: contain;
  user-select: none;
}

.wedding-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.65rem;
}

.wedding-carousel__status {
  min-width: 3.5rem;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.wedding-carousel__card:focus-visible,
.wedding-carousel .album-arrow:focus-visible {
  outline: 2px solid #d5ff9f;
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .wedding-carousel {
    --wedding-card-height: clamp(280px, 101vw, 470px);
    --wedding-step: clamp(70px, 21vw, 120px);
  }
  .wedding-carousel__track { height: clamp(330px, 113vw, 520px); }
  .wedding-carousel__card {
    width: min(92%, calc(var(--wedding-card-height) * var(--wedding-photo-ratio-mobile)));
    border-radius: 28px;
  }
  .wedding-carousel__card[data-offset="0"] { transform: translate(-50%, -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .wedding-carousel__card { transition: none; }
}

/* The shared navigation switches to a dropdown at 760px, but its narrow
   width starts at 768px. Keep the desktop row fitted between those widths. */
@media (min-width: 761px) and (max-width: 768px) {
  body[data-page="wedding-fotograf"] .nav-links {
    width: auto;
    min-width: 0;
  }
}
