/**
 * CN Banners - Estilos
 * Responsivo limitado a 728px
 */

/* Container de banner prefeitura */
.cn-banner-container {
    position: relative;
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
    aspect-ratio: 728 / 90;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    text-align: center;
}

.cn-banner-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cn-banner-container a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Slot AdSense - Responsivo limitado a 728px */
.cn-adsense-slot {
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
    min-height: 90px;
    text-align: center;
    overflow: hidden;
    border-radius: 4px;
    background: #f8f9fa;
}

/* Forca o ins a respeitar o container */
.cn-adsense-slot ins.adsbygoogle {
    display: block !important;
    width: 100% !important;
    max-width: 728px !important;
    margin: 0 auto !important;
}

/* Slot vazio (sem AdSense configurado) */
.cn-adsense-empty {
    background: transparent;
    min-height: 0;
    height: 0;
    margin: 0 auto;
}

/* Mobile */
@media (max-width: 728px) {
    .cn-banner-container {
        aspect-ratio: auto;
        height: auto;
    }
    
    .cn-banner-container img {
        height: auto;
        aspect-ratio: 728 / 90;
    }
    
    .cn-adsense-slot {
        min-height: 50px;
    }
}

/* Animacao de rotacao */
.cn-banner-rotativo {
    position: relative;
}

.cn-banner-rotativo img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.cn-banner-rotativo img.active {
    opacity: 1;
}