html,
body {
  height: 100%;
}

.carousel {
  height: 50%;
  max-height: 500px;
  overflow: hidden;
}

.carousel-inner {
  height: 100%;
}

.carousel-item,
.active {
  height: 100%;
  transition: opacity 0.5s ease-in-out;
}

.fill {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  position: relative;
}

.fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* Subtle overlay for readability */
  z-index: 1;
}

.carousel-caption {
  z-index: 2;
  background: rgba(0, 48, 135, 0.7);
  padding: 10px 20px;
  border-radius: 5px;
  animation: fadeInUp 1s ease-in-out;
}

.carousel-caption h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.carousel-caption p {
  font-size: 1rem;
  margin: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .carousel {
    height: 40%;
  }

  .carousel-caption h3 {
    font-size: 1.4rem;
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }
}