/* Testimonial carousel, overlaid on a photo frame. Behaviour: js/carousel.js */

.testimonial-carousel {
  max-width: 680px;
  margin: 16px auto 0;
}

.testimonial-track {
  position: relative;
  min-height: 380px;
}

.testimonial-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.testimonial-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.testimonial-slide .stars {
  margin-bottom: 22px;
  color: var(--brass);
  font-size: 1.05rem;
  letter-spacing: 3px;
}

.testimonial-slide .quote {
  max-width: 56ch;
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.testimonial-dots .dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s;
}

.testimonial-dots .dot.active {
  background: var(--brass);
}

@media (max-width: 600px) {
  .testimonial-track {
    min-height: 460px;
  }

  .testimonial-slide .quote {
    font-size: 1.1rem;
  }
}

/* Photo with the carousel laid over its lower half */
.photo-frame--carousel {
  min-height: min(64vh, 600px);
}

.photo-frame--carousel::before {
  display: none;
}

.photo-frame--carousel::after {
  background: linear-gradient(180deg, rgba(20, 24, 28, 0) 20%, rgba(20, 24, 28, 0.6) 55%, var(--bg) 96%);
}

.photo-frame--carousel img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-position: 78% 8%;
}

.photo-frame--carousel .testimonial-carousel {
  position: absolute;
  bottom: 36px;
  left: 50%;
  z-index: 2;
  width: calc(100% - 64px);
  max-width: 600px;
  margin: 0;
  transform: translateX(-50%);
}

.photo-frame--carousel .testimonial-slide .stars {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.photo-frame--carousel .testimonial-slide .quote {
  color: rgba(237, 233, 226, 0.94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}
