/* Container */
.slideshow {
  position: relative;
  height: auto;
  margin: auto;
  overflow: hidden;
  border-radius: 12px; /* optional, for clean edges */
    z-index: 0;
}

.slideshow.hor {
  max-width: 800px; /* adjust as needed */
  max-height: 530px;
}

.slideshow.ver {
  max-width: 600px; /* adjust as needed */
  max-height: 900px;
}

/* Each slide */
.slide {
  display: none;
  width: 100%;
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease; /* fade effect */
}

.slide.active {
  display: block;
  opacity: 1;
}

/* Images */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* key for handling different aspect ratios */
  display: block;
}

/* Fade effect */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

/* Arrows */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%); /* cleaner vertical centering */
  width: 40px;
  height: 40px;
  line-height: 40px; /* centers the arrow inside */
  text-align: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  user-select: none;
  transition: background 0.3s;
}

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.7);
}

.prev {
  left: 12px;
}

.next {
  right: 12px;
}

/* Dots */
.dots {
  text-align: center;
  position: absolute;
  bottom: 12px;
  width: 100%;
}

.dot {
  cursor: pointer;
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: rgba(255,255,255,0.6);
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s;
}

.active-dot, .dot:hover {
  background-color: white;
}
