.carousel-item {
    height: 100vh;
    background-size: cover;
    background-position: center;
}

.custom-carousel-item {
    background-size: contain !important; /* Ajustar la imagen completamente */
    background-position: center; /* Centrar la imagen */
    background-repeat: no-repeat; /* Evitar repeticiones */
    padding: 20px; /* Añadir margen interno */
    height: calc(100vh - 40px); /* Ajustar altura considerando el padding */
}

.carousel-control-prev, .carousel-control-next {
    display: none;
}

#newsCarousel:hover .carousel-control-prev,
#newsCarousel:hover .carousel-control-next {
    display: block;
}

.carousel-item .imagen-texto {
    background-size: contain !important;
    background-position: center center;
    background-repeat: no-repeat;
    height: 50vh;
    margin: 0 auto;
    max-width: 100%;
}

.texto-custom h5 {
    font-size: 2rem;
    color: #0088cc;
    text-align: center;
}

.texto-custom p {
    font-size: 1.5rem;
    color: #333333;
    line-height: 1.6;
}

.carousel-item img {
    width: 100%;
    height: 100vh;
    object-fit: contain;
    object-position: center;
    margin: 20px;
}

.carousel-item div[style*="background-image"] {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    height: 96vh;
    margin: 20px;
}

/* --- Barra de Progreso --- */

.progress-bar-container {
    /* Posiciona la barra en la parte inferior del slide */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px; /* Altura de la barra, ligeramente más visible */
    background-color: rgba(0, 0, 0, 0.3); /* Fondo oscuro semitransparente */
    z-index: 1000;
    overflow: hidden; /* Oculta el desbordamiento durante la transición */
}

.progress-bar-fill {
    height: 100%;
    width: 0%; /* La barra empieza vacía */
    background-color: #1c4595; /* Color amarillo/naranja brillante para contraste */
    /* La transición se añade dinámicamente por JavaScript */
}