/* -----------------------------------------------
   Campaign Banner
----------------------------------------------- */

.campaignOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease forwards;
}

.campaign-banner {
    background-color: #1a1a2e;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    text-align: center;
    /* flexbox empurra o conteúdo para o fundo */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem clamp(1.5rem, 4vw, 3rem);
    min-height: clamp(260px, 32vw, 420px);
    border-radius: 16px;
    width: 100%;
    max-width: 950px;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
    position: relative;
    animation: fadeInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

    .campaign-banner::-webkit-scrollbar {
        width: 4px;
    }

    .campaign-banner::-webkit-scrollbar-track {
        background: transparent;
    }

    .campaign-banner::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    /* Overlay escuro — modo padrão (texto branco sobre imagem escura) */
    .campaign-banner.has-image::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 16px;
        background: linear-gradient( to bottom, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.0) 45%, rgba(0, 0, 0, 0.55) 100% );
        pointer-events: none;
        z-index: 0;
    }

    /* Modo claro — texto escuro sobre imagem clara */
    .campaign-banner.has-image.overlay-light::before {
        background: rgba(255, 255, 255, 0.08);
    }

    /* Conteúdo acima do overlay */
    .campaign-banner > * {
        position: relative;
        z-index: 1;
    }

    /* Títulos */
    .campaign-banner h2 {
        font-size: clamp(1.2rem, 2.8vw, 2rem) !important;
        font-weight: 700 !important;
        margin: 0 0 0.5rem !important;
        color: #fff;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
        animation: slideDown 0.6s ease forwards;
        line-height: 1.2;
    }

/* Corpo */
.campaign-body {
    font-size: clamp(0.75rem, 1.5vw, 0.95rem) !important;
    font-weight: 400 !important;
    margin: 0 0 1.25rem !important;
    animation: fadeIn 0.9s ease forwards;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
}

/* Modo claro: sem text-shadow */
.campaign-banner.overlay-light h2,
.campaign-banner.overlay-light .campaign-body {
    text-shadow: none !important;
}

/* Parágrafo wrapper do CTA */
.campaign-banner p {
    margin: 0 !important;
}

/* Botão fechar */
.campaign-close-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.30) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    color: #fff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s, transform 0.15s;
    z-index: 2 !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.campaign-banner.overlay-light .campaign-close-btn {
    background: rgba(0, 0, 0, 0.40) !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
}

.campaign-close-btn:hover {
    background: rgba(0, 0, 0, 0.60) !important;
    transform: scale(1.08);
}

/* CTA button — !important para sobrepor CSS do site */
.cta-button {
    display: inline-block !important;
    background: #fff !important;
    color: #0078d7 !important;
    padding: 0.45rem 1.5rem !important;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem) !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    border: none !important;
    transition: background 0.25s, color 0.25s, transform 0.2s, box-shadow 0.25s;
    animation: bounce 2.5s ease infinite;
    margin-top: 0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer !important;
}

    .cta-button:hover {
        background: #0078d7 !important;
        color: #fff !important;
        transform: translateY(-3px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3) !important;
        animation: none;
    }

    .cta-button:active {
        transform: translateY(-1px);
    }

/* -----------------------------------------------
   Animações
----------------------------------------------- */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.90);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* -----------------------------------------------
   Responsividade
----------------------------------------------- */
@media (max-width: 480px) {
    .campaign-banner {
        min-height: 220px;
        border-radius: 12px;
        padding: 1.5rem 1rem;
    }

    .campaign-close-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 1rem !important;
    }
}