.carousel {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  background: #fff;
}

.carousel-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.carousel .item {
  flex: 1 0 100%;
  height: auto;
  background: #fff;
  transition: opacity 0.5s;
}

.carousel-inner > .item > img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;         /* Faz a imagem cobrir o contêiner, cortando o que ultrapassa */
  object-position: top center; /* Prioriza mostrar a parte superior da imagem */
}

.carousel-caption {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  /* background: rgba(20, 53, 100, 0.7); */
  color: #fff;
  padding: 8px 12px;
  font-size: 1rem;
  z-index: 10;
}

.carousel-caption h1 {
    color: #ed8022;
}

.carousel-caption p {
    color: #fff;
}

/* Botão */
.carousel-caption .btn {
  background: #ed8022;
  padding: 10px 15px;
  color: #143564;
  border-radius: 5px;
  display: inline-block;
  margin-top: 10px; /* Adiciona um espaçamento acima do ícone */
}

.carousel-caption .btn:hover {
  background: #fff;
  padding: 10px 15px;
  color: #143564;
  border-radius: 5px;
}

/* Fade effects */
.carousel-fade .carousel-inner .item { opacity: 1; }
.carousel-fade .carousel-inner .active { opacity: 1; }

@media (max-width: 500px) {
  .carousel-caption {
    font-size: 0.8rem;
    padding: 4px 6px;
    bottom: 2px;
  }
}

/* Tablets 
@media (max-width: 992px) {
  .carousel-caption h1 {
    font-size: 2rem;
  }
  .carousel-caption p {
    font-size: 1.1rem;
  }
}*/

/* Smartphones 
@media (max-width: 768px) {
  .carousel-caption h1 {
    font-size: 1.5rem;
  }
  .carousel-caption p {
    font-size: 1rem;
  }
    .carousel-caption {
    font-size: 0.9rem;
    padding: 6px 8px;
    bottom: 8px;
  }
}*/

/* Telas pequenas */
@media (max-width: 500px) {
  .carousel-caption h1 {
    font-size: 1.5rem;
  }
  .carousel-caption p {
    font-size: 1.2rem;
  }
}

/* Desktops */
@media (min-width: 993px) {
  .carousel {
    width: 100%;
    max-height: 460px;  /* limita altura máxima */
    margin: 40px auto 60px auto;
    overflow: hidden;
    position: relative;
  }
  .carousel-inner > .item > img {
    width: 100%;
    max-height: 460px;  /* limita altura da imagem */
    object-fit: cover;  /* ajusta imagem para cobrir área sem distorcer */
    height: 100%;
    display: block;
  }
  .carousel-caption h1 {
    font-size:5.0rem;
    font-weight: bold;
    margin: 0 0 12px 0;
    line-height: 1.1;
  }
  .carousel-caption p {
    font-size: 2.0rem; /* tamanho padrão */
    margin: 0;
  }
}

@media only screen and (max-width: 900px) and (orientation: landscape) {
  .carousel,
  .carousel .item {
    height: 55vh !important;  /* usa parte relevante da tela */
    min-height: 180px;
    max-height: 70vh;         /* limita para não passar demais */
  }
  .carousel-inner .item img {
    height: 100% !important;
    max-height: 70vh !important;
    object-fit: cover;
  }
  .carousel-caption {
    font-size: 1rem;
    padding-bottom: 10px;
  }
}