/* ==========================================================================
   Anúncios no Artigo — estilos do shortcode [anuncio]
   ========================================================================== */

.aa-anuncio {
    --aa-radius: 16px;
    --aa-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
    --aa-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.14), 0 4px 10px rgba(0, 0, 0, 0.08);
    --aa-primary: #ff5a1f;
    --aa-primary-dark: #e34810;
    --aa-text: #1a1a1a;
    --aa-muted: #5b6573;
    --aa-bg: #ffffff;
    --aa-border: #ececf1;

    margin: 32px auto;
    max-width: 720px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--aa-text);
}

.aa-anuncio .aa-link-wrap {
    position: relative;
    display: block;
    background: var(--aa-bg);
    border: 1px solid var(--aa-border);
    border-radius: var(--aa-radius);
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: var(--aa-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.aa-anuncio .aa-link-wrap:hover {
    transform: translateY(-3px);
    box-shadow: var(--aa-shadow-hover);
}

.aa-anuncio .aa-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.aa-anuncio .aa-imagem {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #f3f3f7;
}

.aa-anuncio .aa-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--aa-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(255, 90, 31, 0.35);
}

.aa-anuncio .aa-conteudo {
    padding: 22px 24px 24px;
}

.aa-anuncio .aa-titulo {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--aa-text);
}

.aa-anuncio .aa-descricao {
    margin: 0 0 18px;
    font-size: 15px;
    color: var(--aa-muted);
}

.aa-anuncio .aa-botao {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--aa-primary);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    padding: 11px 22px;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.aa-anuncio .aa-link-wrap:hover .aa-botao {
    background: var(--aa-primary-dark);
}

.aa-anuncio .aa-botao svg {
    transition: transform 0.2s ease;
}

.aa-anuncio .aa-link-wrap:hover .aa-botao svg {
    transform: translateX(3px);
}

/* ----------- Estilo "banner" (horizontal, mais compacto) --------------- */
@media (min-width: 600px) {
    .aa-anuncio.aa-estilo-banner .aa-link-wrap {
        display: grid;
        grid-template-columns: 220px 1fr;
    }
    .aa-anuncio.aa-estilo-banner .aa-imagem {
        height: 100%;
        aspect-ratio: auto;
    }
    .aa-anuncio.aa-estilo-banner .aa-conteudo {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ----------- Dark mode (segue o tema do site) -------------------------- */
@media (prefers-color-scheme: dark) {
    .aa-anuncio {
        --aa-bg: #1c1f24;
        --aa-text: #f3f4f6;
        --aa-muted: #aab0bb;
        --aa-border: #2a2e36;
        --aa-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
        --aa-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.4);
    }
}

/* ----------- Skeleton (enquanto o JS carrega o anúncio) --------------- */
.aa-anuncio.aa-loading {
    min-height: 320px;
}
.aa-anuncio.aa-loading .aa-skeleton {
    width: 100%;
    height: 320px;
    border-radius: var(--aa-radius);
    background: linear-gradient(90deg, #f0f0f4 0%, #e6e6ec 50%, #f0f0f4 100%);
    background-size: 200% 100%;
    animation: aa-shimmer 1.4s infinite linear;
}
@keyframes aa-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (prefers-color-scheme: dark) {
    .aa-anuncio.aa-loading .aa-skeleton {
        background: linear-gradient(90deg, #23262d 0%, #2e323a 50%, #23262d 100%);
        background-size: 200% 100%;
    }
}

/* ----------- Mobile --------------------------------------------------- */
@media (max-width: 480px) {
    .aa-anuncio .aa-titulo { font-size: 19px; }
    .aa-anuncio .aa-descricao { font-size: 14px; }
    .aa-anuncio .aa-conteudo { padding: 18px 18px 20px; }
}
