.title_news {
  color: #FFF !important;
  position: relative !important;
  z-index: 100 !important;
}

/* Container principal do carrossel */
.custom-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Cada slide do carrossel */
.carousel-page {
  position: relative;
  height: 400px;
  display: none;
}

.carousel-page.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
  position: relative;
}

/* Imagem de fundo do carrossel */
.carousel-background {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: 400px; /* garante limite visual */
  object-fit: cover; /* mantém proporção e preenche */
  object-position: center; /* centraliza o foco */
  z-index: 1 !important;
  pointer-events: none;
}

/* Conteúdo sobreposto */
.carousel-content {
  position: absolute !important;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  padding: 2rem;
  z-index: 50 !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.carousel-content h3 {
  position: relative !important;
  z-index: 100 !important;
  margin-bottom: 0.5rem;
  color: white !important;
}

.carousel-content p {
  position: relative !important;
  z-index: 100 !important;
  margin-bottom: 0.5rem;
  color: white !important;
}

/* Botão dentro do conteúdo - estilo gov.br */
.carousel-content .br-button,
.carousel-content a {
  margin-top: 1rem !important;
  position: relative !important;
  z-index: 150 !important;
  display: inline-block !important;
  width: fit-content !important;
  background-color: #FFFFFF !important;
  border: 2px solid #1351B4 !important;
  color: #1351B4 !important;
  padding: 0.5rem 1.5rem !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
  border-radius: 50rem !important;
}

.carousel-content .br-button:focus,
.carousel-content a:focus {
  outline: 2px solid #FFCD07 !important;
  outline-offset: 2px !important;
}

/* Setas de navegação */
.carousel-arrows {
  position: absolute !important;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 200 !important;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.carousel-arrows button {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 201 !important;
}

/* Navegação por pontos */
.carousel-nav {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  position: relative;
  z-index: 100;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dot.active {
  background: #1351B4;
}

.carousel-dot:hover {
  background: #0c3d87;
}

/* Animação de entrada */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .carousel-page {
    height: 250px; /* reduz a altura do carrossel */
  }

  .carousel-background {
    max-height: 250px;
  }

  .carousel-content {
    padding: 1rem;
  }

  .carousel-content h3 {
    font-size: 1.1rem;
  }

  .carousel-content p {
    font-size: 0.9rem;
  }
}
