/* CONTAINER PRINCIPAL */
.custom-carousel {
    position: relative;
    width: 100%;
    height: 600px; /* Aumentei um pouco para banners mais imponentes */
    background-color: #000;
    overflow: hidden;
    display: block;
    margin: 0;
    padding: 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* COMPORTAMENTO DOS SLIDES */
.custom-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.custom-slide.active {
    opacity: 1;
    z-index: 2; /* Slide ativo sempre na frente */
}

.custom-slide img {
    width: 100%;
    height: 100%;
    /* O SEGREDO: object-fit cover preenche tudo, position foca no topo */
    object-fit: cover; 
    object-position: center top; 
}

/* LEGENDA/TEXTO */
.custom-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 20px 30px; /* Aumentei o respiro do degradê */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: #fff;
    text-align: center;
    z-index: 5;
}

.custom-caption h2 {
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* AJUSTE PARA CELULARES (RESPONSIVIDADE) */
@media (max-width: 768px) {
    .custom-carousel {
        height: 400px; /* Altura menor para telas pequenas, evita distorção */
    }
    
    .custom-caption {
        padding: 40px 15px 20px;
    }

    .custom-caption h2 {
        font-size: 1.5rem;
    }
}

/* AJUSTE PARA TELAS MUITO PEQUENAS */
@media (max-width: 480px) {
    .custom-carousel {
        height: 300px; /* Ideal para visualização em pé no celular */
    }
}