/* Estrutura básica */
.carousel {
  width: 100%;
  margin: 0;
  position: relative;
}
.carousel-viewport {
  overflow: hidden;
  height: 600px;
  position: relative;
}
.carousel-track {
  display: flex;
  transition: transform 450ms ease;
  padding: 0;
  margin: 0;
  list-style: none;
  height: 100%;
}
.carousel-slide {
  min-width: 100%;
  position: relative;
  box-sizing: border-box;
  height: 100%;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Camada preta sobre a imagem --- */
.carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* transparência da camada */
  z-index: 1;
}

/* --- Legenda centralizada verticalmente à esquerda --- */
.slide-caption {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: #fff;
  padding: 1rem;
  max-width: 70%;
  text-align: left;
  z-index: 2; /* acima da camada preta */
}
.slide-caption h2 {
    margin: 0 0 0.25rem 0;
    font-size: clamp(1.4rem, 3.2vw, 2.4rem);
}
.slide-caption p {
    margin: 0 0 0.25px 0;
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    width: 60%;
}


.carousel-controls {
  position: absolute;
  bottom: 1.25rem; /* desceu do centro para base da imagem */
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between; /* setas nas extremidades */
  padding: 0 1rem;
  pointer-events: none; /* permite clique só nos botões */
  z-index: 3;
}

/* Setas alinhadas nas extremidades e clicáveis */
.carousel-btn.prev {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 0.6rem 0.9rem;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 4px; /* optei por bordas retas com leve arredondado */
}
.carousel-btn.next {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 0.6rem 0.9rem;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 4px;
}
.carousel-btn.prev:hover,
.carousel-btn.next:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}

/* Bullets centralizados */
.carousel-indicators {
  pointer-events: auto;
  position: static; /* tirar absolute para usar flex do pai */
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-grow: 1; /* para ocupar espaço entre as setas */
  z-index: 3;
}

.carousel-indicators button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}
.carousel-indicators button:hover {
  background: rgba(255, 255, 255, 0.8);
}
.carousel-indicators button[aria-selected="true"] {
  background: #fff;
  transform: scale(1.2);
}

/* --- Mobile tweaks --- */
@media (max-width: 640px) {
  .carousel-viewport {
    height: 400px;
  }
  .slide-caption {
    left: 8%;
    max-width: 85%;
    padding: 0.75rem;
  }
  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.4rem 0.6rem;
  }
}
