/* carrossel.css */

/* ============================= */
/* Contêiner do carrossel        */
/* ============================= */
.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  height: 400px;            /* <— altura fixa do carrossel */
}

/* Área que desliza */
.carousel-inner {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;             /* ocupa toda a altura do pai */
}

/* Cada slide */
.carousel-inner .carousel-item {
  min-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;            /* para centralizar o img */
  align-items: center;
  justify-content: center;
  height: 100%;             /* ocupa toda a altura do pai */
}

/* Imagem dentro do slide */
.carousel-inner .carousel-item img {
  max-height: 100%;         /* não excede a altura do slide */
  width: auto;              /* mantém proporção */
  object-fit: contain;
  display: block;
}

/* ============================= */
/* Botões de navegação           */
/* ============================= */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s;
}

.carousel-control:hover {
  background-color: rgba(0,0,0,0.8);
}

.carousel-control.prev {
  left: 10px;
}

.carousel-control.next {
  right: 10px;
}

/* ============================= */
/* Indicadores (dots) — opcional */
/* ============================= */
.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  background-color: rgba(255,255,255,0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
}

.carousel-indicators button.active,
.carousel-indicators button:hover {
  background-color: rgba(255,255,255,0.9);
}

/* ============================= */
/* Responsividade                */
/* ============================= */
@media (max-width: 768px) {
  .carousel {
    height: 300px;          /* altura menor em tablets */
  }
  .carousel-control {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    line-height: 32px;
  }
}

@media (max-width: 480px) {
  .carousel {
    height: 200px;          /* altura ainda menor em smartphones */
  }
  .carousel-control {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    line-height: 28px;
  }
}
