﻿/* ===================== BASE ===================== */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ===================== TEMA TREVO DA SORTE (VERDE) ===================== */
body {
    background: linear-gradient(135deg, #1b5e20 0%, #00c853 100%); /* verde vivo → verde escuro */
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

.card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    margin-bottom: 20px;
    background: #ffffff; /* conteúdo claro e legível */
    color: #212529;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%); /* verde médio → escuro */
}

.bg-gradient-success {
    background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
}

.btn-pix {
    background: linear-gradient(135deg, #43a047 0%, #00c853 100%);
    border: none;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: all .2s ease;
}

    .btn-pix:hover {
        background: linear-gradient(135deg, #00c853 0%, #2e7d32 100%);
        color: #fff;
        transform: translateY(-2px);
    }

.meta-achieved {
    background: linear-gradient(90deg, #ffd54f, #ffca28, #ffb300); /* dourado */
    color: #1b5e20;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
}

.vendas-status {
    border-radius: 10px;
    padding: 10px 15px;
    margin: 10px 0;
    font-weight: 600;
}

.status-abertas {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.status-encerradas {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status-nao-iniciadas {
    background: #fffde7;
    color: #f57f17;
    border: 1px solid #fff59d;
}

/* ===================== ESPAÇAMENTO ===================== */
.card-body {
    padding: 1.25rem;
}

.card + .card {
    margin-top: 1.5rem;
}

/* ===================== VALIDAÇÃO FORM ===================== */
.is-valid {
    border-color: #198754 !important;
    background-color: #f8fff9 !important;
}

.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

.form-control:focus.is-valid {
    box-shadow: 0 0 0 0.2rem rgba(25,135,84,.25) !important;
}

.form-control:focus.is-invalid {
    box-shadow: 0 0 0 0.2rem rgba(220,53,69,.25) !important;
}

/* ============ REGIÕES ============ */
.ad-region {
    width: 100%;
    margin: 20px 0;
}

/* ============ CARD DO ANÚNCIO ============ */
.ad-container {
    position: relative;
    overflow: hidden;
    border-radius: .5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: transform .3s ease, box-shadow .3s ease;
    width: 100%;
    display: flex; /* centraliza a imagem no eixo cruzado */
    align-items: center;
    justify-content: center;
}

    .ad-container:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,.15);
    }

/* Área clicável */
.ad-content {
    display: block;
    position: relative;
    width: 100%;
    line-height: 0; /* remove gap da <img> */
    text-align: center;
    text-decoration: none;
    color: inherit;
}

/* ===== TOP e MIDDLE (mantidos como antes) ===== */
#ad-top-container .ad-content,
#ad-middle-container .ad-content {
    aspect-ratio: 16 / 4; /* faixa larga */
}

/* ===== SIDE (UNIFICADO 3:1) ===== */
#ad-sidebar-container .ad-content {
    aspect-ratio: 3 / 1; /* agora igual ao mobile */
}

/* Imagem SEM CORTES */
.ad-image,
.ad-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* nunca corta a arte */
    border-radius: 8px;
    margin: 0 auto;
}

/* Etiqueta “Publicidade” */
.ad-label {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 2;
    padding: .15rem .5rem;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .35rem;
    font-size: .75rem;
    line-height: 1;
    color: #666;
    pointer-events: none;
}

/* Esconde regiões vazias */
.ad-region:empty,
.ad-container:empty {
    display: none;
}




/* ===================== TOP 3 COTISTAS ===================== */
#top3Cotistas .bg-light {
    border: 1px solid #e9ecef;
    transition: transform .2s ease;
}

    #top3Cotistas .bg-light:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

#top3Cotistas .col-lg-4,
#top3Cotistas .col-md-6 {
    display: flex;
}

#top3Cotistas .d-flex {
    width: 100%;
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 1rem;
    }

    body {
        overflow-x: hidden;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .badge {
        font-size: .75rem !important;
        line-height: 1.2;
        word-break: break-word;
        white-space: normal;
    }

    .btn-sm {
        font-size: .75rem;
        padding: .25rem .5rem;
    }

    .badge.fs-6 {
        font-size: .7rem !important;
        padding: .25rem .4rem;
        margin: .1rem;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .col-3, .col-md-3 {
        padding-left: 5px;
        padding-right: 5px;
    }

    .g-recaptcha {
        transform: scale(.85);
        transform-origin: 0 0;
        margin-bottom: 10px;
    }

    h1, h2, h3, h4, h5, h6 {
        word-break: break-word;
    }

    .lead {
        font-size: 1rem;
        line-height: 1.4;
    }

    .text-center .row {
        justify-content: center;
    }

    .text-center .col-3 {
        flex: 0 0 auto;
        width: auto;
        margin: .2rem;
    }

    /* imagens de anúncio menores no mobile */
    .ad-image,
    .ad-container img {
        max-height: 150px;
    }
}
