/* ==========================================================================
   1. NAVEGAÇÃO POR PÍLULAS (Filtros horizontais estilo iFood)
   ========================================================================== */
.scroll-horizontal {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 15px;
    -ms-overflow-style: none; /* Esconde a barra de rolagem no IE e Edge */
    scrollbar-width: none;    /* Esconde a barra de rolagem no Firefox */
}
/* Esconde a barra de rolagem no Chrome/Safari, mantendo a função de arrastar */
.scroll-horizontal::-webkit-scrollbar { display: none; }

.pilula {
    white-space: nowrap; border-radius: 50px; padding: 6px 16px;
    border: 1px solid #ddd; background: #fff; color: #555;
    font-weight: 600; font-size: 0.85rem; cursor: pointer;
    transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Estado Ativo: Força o fundo verde e texto branco para não sofrer conflito do Bootstrap */
.pilula.active {
    background: var(--primary-green, #198754) !important;
    color: #ffffff !important;
    border-color: var(--primary-green, #198754) !important;
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.3) !important;
}

/* No PC, os botões quebram a linha em vez de precisarem de scroll horizontal */
@media (min-width: 992px) {
    .scroll-horizontal { flex-wrap: wrap; overflow-x: visible; }
}

/* ==========================================================================
   2. CORES DE FUNDO DINÂMICAS (Para provas sem banner)
   ========================================================================== */
.bg-pastel-1 { background-color: #e3f2fd !important; } /* Azul claro */
.bg-pastel-2 { background-color: #e8f5e9 !important; } /* Verde claro */
.bg-pastel-3 { background-color: #fff3e0 !important; } /* Laranja claro */
.bg-pastel-4 { background-color: #fce4ec !important; } /* Rosa claro */
.bg-pastel-5 { background-color: #f3e5f5 !important; } /* Roxo claro */

/* Imagem padrão transparente centralizada */
.img-evento-default { width: 100%; height: 100%; object-fit: contain; padding: 15px; transition: transform 0.3s; }
.card-evento-portal:hover .img-evento-default { transform: scale(1.05); }

/* ==========================================================================
   3. ESTRUTURA DO CARD E ANIMAÇÕES
   ========================================================================== */
.card-evento-portal {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 10px;
    overflow: visible !important; /* Permite que o dropdown apareça */
}



.card-evento-portal:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important; }

/* Quando o dropdown estiver aberto, o card ganha prioridade total de profundidade */
.card-wrapper-js:has(.show) {
    position: relative;
    z-index: 3000 !important;
}

.dropdown-menu.show {
    display: block;
    position: absolute;
    z-index: 3100 !important;
}

/* Altura da área da imagem responsiva (maior no PC, menor no mobile) */
.img-evento-wrapper { height: 120px; position: relative; overflow: hidden; }
@media (min-width: 992px) { .img-evento-wrapper { height: 150px; } }

.img-evento-portal { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card-evento-portal:hover .img-evento-portal { transform: scale(1.05); }

/* Efeito para provas finalizadas (Filtro cinza que fica colorido ao passar o mouse) */
.card-finalizado .img-evento-portal { filter: grayscale(100%); opacity: 0.8; }
.card-finalizado:hover .img-evento-portal { filter: grayscale(0%); opacity: 1; }

/* ==========================================================================
   4. BADGES E SOBREPOSIÇÕES
   ========================================================================== */
.overlay-status { position: absolute; top: 8px; left: 8px; z-index: 2; }
.overlay-homologacao { position: absolute; top: 8px; right: 8px; z-index: 2; }
.badge-oficial { background: linear-gradient(45deg, #FFD700, #FFC107); color: #000; font-weight: 800; box-shadow: 0 2px 5px rgba(0,0,0,0.2); font-size: 0.65rem; }

/* Bandeiras dos Estados */
.bandeira-estado { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 3px rgba(0,0,0,0.2); margin-right: 4px; margin-bottom: 2px; }

/* ==========================================================================
   5. TIPOGRAFIA E BOTÕES DE AÇÃO
   ========================================================================== */
.titulo-card { font-size: 0.95rem; }
.btn-card-action { font-size: 0.75rem; letter-spacing: 0.5px; display: flex; align-items: center; justify-content: center; gap: 0.3rem; padding: 0.4rem; white-space: nowrap; }

/* Aumenta a fonte suavemente em telas maiores */
@media (min-width: 768px) {
    .btn-card-action { font-size: 0.75rem; padding: 0.375rem 0.5rem; }
    .titulo-card { font-size: 1.05rem; }
}