/**
 * Portal Jijoca - Banner Styles
 * Estilos para exibição responsiva de banners
 */

/* Container geral de banners */
.banner-container {
    width: 100%;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.banner-container.banner-inline {
    margin: 15px 0;
}

/* Banner link */
.banner-link {
    display: block;
    transition: opacity 0.3s ease;
}

.banner-link:hover {
    opacity: 0.9;
}

/* Banner image */
.banner-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Placeholder para quando não há banner */
.banner-placeholder {
    border: 2px dashed #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #ffffff !important; /* Fundo branco */
    color: #999;
}

/* Posições específicas - Home */
.banner-home-topo {
    margin: 25px 0;
}

.banner-home-lateral {
    position: sticky;
    top: 20px;
    margin: 20px 0;
}

/* Posições específicas - Categoria e Post */
.banner-categoria,
.banner-post {
    margin: 30px auto;
    max-width: 728px;
}

/* Grid de banners (se necessário exibir múltiplos) */
.banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .banner-container {
        margin: 15px 0;
    }
    
    .banner-home-topo,
    .banner-categoria,
    .banner-post {
        margin: 20px 0;
    }
    
    /* Redimensionar banners grandes em mobile */
    .banner-container img {
        width: 100%;
        height: auto;
    }
    
    .banner-home-lateral {
        position: static;
        margin: 15px auto;
    }
    
    .banners-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .banner-container {
        margin: 10px 0;
    }
    
    .banner-placeholder {
        font-size: 12px;
        padding: 10px;
    }
}

/* Animação de carregamento */
.banner-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Estilos para diferentes formatos de banner */

/* Leaderboard (728x90) */
.banner-format-leaderboard {
    max-width: 728px;
}

/* Medium Rectangle (300x250) */
.banner-format-rectangle {
    max-width: 300px;
}

/* Square (300x300) */
.banner-format-square {
    max-width: 300px;
}

/* Wide Skyscraper (160x600) */
.banner-format-skyscraper {
    max-width: 160px;
}

/* Mobile Banner (320x50) */
.banner-format-mobile {
    max-width: 320px;
}

/* Acessibilidade */
.banner-link:focus {
    outline: 2px solid #E31E24;
    outline-offset: 2px;
}

/* Print - ocultar banners na impressão */
@media print {
    .banner-container,
    .banner-placeholder {
        display: none !important;
    }
}