/* ============================================
   ESTILOS PARA PUBLICIDADES
   ============================================ */

/* Container Geral das Publicidades */
.ad-banner {
    margin: 20px 0;
    text-align: center;
    clear: both;
}

.ad-banner-top {
    margin: 20px 0 30px 0;
}

.ad-content-real {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

/* Label "Publicidade" */
.ad-label {
    font-size: 10px;
    color: #ffffff;
    background: #ff9300;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 3px;
    display: inline-block;
}

/* Imagens de Publicidade */
.ad-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ad-image:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

/* Link de Texto (quando não há imagem) */
.ad-text-link {
    display: block;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ad-text-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.ad-title {
    font-size: 18px;
    font-weight: 600;
}

/* Tamanhos Específicos */
.ad-970x250 {
    max-width: 970px;
    margin: 0 auto;
}

.ad-970x250 .ad-image {
    min-height: 250px;
    object-fit: cover;
}

.ad-728x90 {
    max-width: 728px;
    margin: 0 auto;
}

.ad-728x90 .ad-image {
    min-height: 90px;
    object-fit: cover;
}

.ad-300x250 {
    max-width: 300px;
    margin: 0 auto;
}

.ad-300x250 .ad-image {
    min-height: 250px;
    object-fit: cover;
}

.ad-320x50 {
    max-width: 320px;
    margin: 0 auto;
}

.ad-320x50 .ad-image {
    min-height: 50px;
    object-fit: cover;
}

/* Publicidade Sidebar */
.sidebar .ad-banner {
    margin: 20px 0;
    width: 100%;
}

/* Publicidade Móvel Sticky (fixa no rodapé em mobile) */
.ad-mobile-sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 5px;
}

/* Botão para fechar publicidade mobile */
.ad-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.ad-close-btn:hover {
    background: rgba(0,0,0,0.8);
}

/* Responsividade */
@media (max-width: 768px) {
    .ad-970x250,
    .ad-728x90 {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .ad-970x250 .ad-image,
    .ad-728x90 .ad-image {
        min-height: auto;
    }
    
    .ad-mobile-sticky {
        display: block;
    }
    
    /* Adicionar padding ao body para não cobrir conteúdo */
    body.has-mobile-ad {
        padding-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .ad-banner {
        margin: 15px 0;
    }
    
    .ad-label {
        font-size: 9px;
    }
}

/* Animação de Carregamento */
.ad-banner.loading {
    position: relative;
    min-height: 250px;
    background: #f5f5f5;
}

.ad-banner.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

