/**
 * Carrossel de Banners - Estilos
 */

.carousel-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

.carousel-item {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-item.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.carousel-indicators {
    display: none;
}

.banner-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
}

.banner-link:hover img {
    transform: scale(1.02);
}

/* ===== BANNER TOPO - Full Width Otimizado ===== */
.banner-section.banner-top {
    margin: 0;
    padding: 0;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    height: auto;
    overflow: hidden;
}

.banner-section.banner-top .carousel-banner {
    display: flex;
    width: 100%;
}

.banner-section.banner-top .carousel-item {
    width: 100%;
    height: auto;
}

.banner-section.banner-top img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

/* ===== BANNER RODAPÉ - Nova Estrutura ===== */

#banner_footer_main {
    width: 100%;
}

.banner-bottom--floating {
    width: 100%;
}

.publi-bottom {
    width: 100%;
    background: #f8f9fa;
    padding: 15px 0;
    position: relative;
}

.publi-bottom .container {
    max-width: 100%;
    padding: 0 15px;
}

.banner-bottom--close {
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1001;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border: none;
    color: #333;
    font-size: 18px;
    transition: all 0.2s ease;
}

.banner-bottom--close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.banner-bottom--close:active {
    transform: scale(0.95);
}

.center-align {
    display: flex;
    justify-content: center;
    width: 100%;
}

#banner_id_footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-footer-carousel {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

.banner-footer-slide {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease-in-out;
}

.banner-footer-slide.active {
    display: block;
}

.banner-footer-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Desktop - Banner Rodapé Normal (Seção Antes do Footer) */
.banner-section.banner-bottom {
    position: static;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0;
    padding: 0;
    z-index: auto;
    border-top: 1px solid #e0e0e0;
    box-shadow: none;
    width: 100%;
    background: white;
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.banner-section.banner-bottom .banner-bottom--floating {
    width: 100%;
    position: static;
    bottom: auto;
    height: auto;
}

.banner-section.banner-bottom .publi-bottom {
    padding: 20px 0;
    background: white !important;
    position: static;
    bottom: auto;
}

/* Botão fechar COMPLETAMENTE OCULTO no desktop */
#banner-bottom--close,
.banner-close-btn {
    display: none;
    visibility: hidden;
    pointer-events: none;
}

/* Mobile - Banner Rodapé como Popup Flutuante */
@media (max-width: 768px) {
    .banner-section.banner-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        margin: 0;
        z-index: 1050;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        max-height: 220px;
        overflow: hidden;
        padding: 0;
        animation: slideUpBanner 0.3s ease-out;
        transform: translateZ(0);
    }
    
    /* Animação de entrada (slide up) */
    @keyframes slideUpBanner {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .publi-bottom {
        background: white;
        padding: 15px 0;
        bottom: 0;
        position: relative;
    }
    
    .banner-footer-img {
        max-height: 190px;
        width: auto;
        margin: 0 auto;
    }
    
    /* Botão fechar visível no mobile - Posicionado à extrema direita */
    #banner-bottom--close,
    .banner-close-btn {
        display: flex;
        visibility: visible;
        pointer-events: auto;
        position: absolute;
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        z-index: 1051;
        transition: all 0.2s ease;
        padding: 0;
        margin: 0;
    }
    
    #banner-bottom--close:hover,
    .banner-close-btn:hover {
        background: rgba(0, 0, 0, 0.85) !important;
        transform: scale(1.1) !important;
    }
    
    #banner-bottom--close:active,
    .banner-close-btn:active {
        transform: scale(0.95) !important;
    }
    
    .banner-section.banner-bottom .banner-bottom--floating {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .banner-section.banner-bottom .publi-bottom {
        position: relative !important;
        bottom: auto !important;
        padding: 15px 0 !important;
        height: auto;
        min-height: 0;
    }
    
    /* Espaçamento para que conteúdo não sobreponha banner flutuante */
    body.banner-bottom-visible {
        padding-bottom: 220px;
    }
}

