.custom-carousel-section {
  text-align: center;
  padding: 0;
}

.carousel {
  position: relative;
  width: 80%;
  margin: 0 auto;
  overflow: hidden;
  max-width: 960px;
  height: auto;
}

.carousel-track-container {
  overflow: hidden;
  height: auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  padding: 0;
  margin: 0;
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 500px;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* garante preenchimento uniforme sem distorcer */
  display: block;
}

.slide-caption {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  color: white;
  font-size: 4rem;
  font-style: italic;
  font-family: Georgia, serif;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  pointer-events: none;
  white-space: nowrap;
}

button.prev,
button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 2;
}

button.prev:hover,
button.next:hover {
  background: rgba(0, 0, 0, 0.6);
}

button.prev {
  left: 10px;
}

button.next {
  right: 10px;
}

.carousel-dots {
  text-align: center;
  margin-top: 15px;
}

.carousel-dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #999;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.carousel-dots .active {
  background: #333;
}

@media (max-width: 768px) {
  .slide-caption {
    font-size: 1.2rem;
    text-align: center;
    white-space: normal;
  }
  .carousel-slide {
    height: 60vh; /* Reduz altura em dispositivos menores */
  }
}