.photo-coverflow {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.75rem 0 0.5rem;
  overflow: hidden;
}

.photo-coverflow-stage {
  position: relative;
  height: clamp(220px, 30vw, 400px);
}

.photo-coverflow-slide {
  --x: 0%;
  --s: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  aspect-ratio: 3 / 2;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #e8edf3;
  box-shadow: 0 10px 28px rgba(15, 32, 56, 0.28);
  transform: translate(-50%, -50%) translateX(var(--x)) scale(var(--s));
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.9s ease, filter 0.9s ease;
  cursor: pointer;
  overflow: hidden;
}

.photo-coverflow-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-coverflow-slide:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

.photo-coverflow-slide[data-pos="0"]  { --x: 0%;    --s: 1;    z-index: 5; cursor: default; }
.photo-coverflow-slide[data-pos="-1"] { --x: -66%;  --s: 0.6;  z-index: 4; filter: brightness(0.85); }
.photo-coverflow-slide[data-pos="1"]  { --x: 66%;   --s: 0.6;  z-index: 4; filter: brightness(0.85); }
.photo-coverflow-slide[data-pos="-2"] { --x: -104%; --s: 0.38; z-index: 3; filter: brightness(0.7); }
.photo-coverflow-slide[data-pos="2"]  { --x: 104%;  --s: 0.38; z-index: 3; filter: brightness(0.7); }
.photo-coverflow-slide[data-pos="-3"] { --x: -130%; --s: 0.25; z-index: 1; opacity: 0; pointer-events: none; }
.photo-coverflow-slide[data-pos="3"]  { --x: 130%;  --s: 0.25; z-index: 1; opacity: 0; pointer-events: none; }
.photo-coverflow-slide.is-wrapping { transition: none; }

.photo-coverflow-caption {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  color: #fff;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.1rem, 2.6vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 0 2px #e8660d, 0 0 6px #e8660d, 0 2px 10px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.photo-coverflow-slide[data-pos="0"] .photo-coverflow-caption { opacity: 1; }

.photo-coverflow-btn {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(41, 79, 124, 0.75);
  font-size: 1.3rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.photo-coverflow-btn:hover,
.photo-coverflow-btn:focus-visible { background: #294f7c; }
.photo-coverflow-btn--prev { left: 0.5rem; }
.photo-coverflow-btn--next { right: 0.5rem; }

@media (max-width: 700px) {
  .photo-coverflow-stage { height: clamp(200px, 56vw, 340px); }
  .photo-coverflow-slide { width: 72%; }
  .photo-coverflow-slide[data-pos="-1"] { --x: -62%; --s: 0.6; }
  .photo-coverflow-slide[data-pos="1"]  { --x: 62%;  --s: 0.6; }
  .photo-coverflow-slide[data-pos="-2"],
  .photo-coverflow-slide[data-pos="2"] { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-coverflow-slide { transition: opacity 0.3s ease; }
}

.photo-gallery-link-wrap {
  display: flex;
  justify-content: center;
  padding: 0.25rem 1rem 1rem;
}

.photo-gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  color: #0f3d1c;
  background: linear-gradient(135deg, #ffe14d, #6cc24a);
  box-shadow: 0 6px 16px rgba(76, 140, 40, 0.35);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.photo-gallery-link:hover,
.photo-gallery-link:focus-visible {
  color: #0f3d1c;
  background: linear-gradient(135deg, #6cc24a, #ffe14d);
  box-shadow: 0 8px 20px rgba(76, 140, 40, 0.45);
  transform: translateY(-2px);
}
