/* RESPONSIVE: only scaling slideshow proportionally */
.slideshow {
  position: relative;
  width: clamp(240px, 30vw, 15em);
  aspect-ratio: 1 / 1;
  /* keeps it perfectly circular */
  max-width: 560px;
  /* original size on desktop */
  margin-top: 5em;

}

/* Slides */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

/* Circle container */
.circle {
  position: relative;
  width: 100%;
  height: 100%;
}

.circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 0px solid white;
  position: relative;
  z-index: 2;
}

.timer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  z-index: 3;
}

.progress {
  fill: none;
  stroke: #779bea;
  stroke-width: 1.3;
  stroke-dasharray: 312.59;
  stroke-dashoffset: 312.59;
}

.slide.active .progress {
  animation: countdown 5s linear forwards;
}

/* Label above photo */
.label {
  position: absolute;
  bottom: 100%;
  margin-bottom: 1.75em;
  left: 50%;
  transform: translateX(-50%);

  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.5em 0.875em;
  border-radius: 10px;
  border: 1px solid #779bea;

  font-size: 1.1rem;
  width: 10em;
  max-width: 15em;
  height: 4em;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  line-height: 1.5;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

@keyframes countdown {
  from {
    stroke-dashoffset: 312.59;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 1024px) {

  .slideshow {
    margin-top: 6.5em;
  }

}