/* ================================================================
   Agenda de Eventos – Estilos do Front-end
   Versão: 1.0.0
   Fonte de referência: layout REF (Inter, #137fec, cards responsivos)
   ================================================================ */

/* Google Fonts: Inter é enfileirada via PHP, aqui apenas fallback */
.ae-wrap,
.ae-wrap *,
.ae-wrap *::before,
.ae-wrap *::after {
    box-sizing: border-box !important;
}

.ae-wrap img {
    max-width: 100% !important;
    height: auto !important;
}

/* ────────────────────────────────────────────────────────────────
   GRID WRAPPER
   ──────────────────────────────────────────────────────────────── */
.ae-wrap .ae-grid {
    display: grid !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 8px 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    list-style: none !important;
}

/* Colunas responsivas */
.ae-wrap .ae-cols-1 {
    grid-template-columns: 1fr !important;
}

.ae-wrap .ae-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.ae-wrap .ae-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.ae-wrap .ae-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Tablet → máx 2 colunas */
@media (max-width: 900px) {

    .ae-wrap .ae-cols-3,
    .ae-wrap .ae-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile → 1 coluna */
@media (max-width: 560px) {

    .ae-wrap .ae-cols-2,
    .ae-wrap .ae-cols-3,
    .ae-wrap .ae-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .ae-wrap .ae-grid {
        gap: 16px !important;
    }
}

/* ────────────────────────────────────────────────────────────────
   CARD
   ──────────────────────────────────────────────────────────────── */
.ae-wrap .ae-card {
    background: #ffffff !important;
    border: 1px solid #e8edf2 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06) !important;
    transition: box-shadow .22s ease, transform .22s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: auto !important;
    min-width: 0 !important;
}

.ae-wrap .ae-card:hover {
    box-shadow: 0 8px 28px rgba(19, 127, 236, .12) !important;
    transform: translateY(-3px) !important;
}

/* ── Logo área superior ── */
.ae-wrap .ae-card__logo-wrap {
    height: 160px !important;
    background: linear-gradient(135deg, #eef5ff 0%, #f6f7f8 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ae-wrap .ae-card__logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform .35s ease !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ae-wrap .ae-card:hover .ae-card__logo {
    transform: scale(1.04) !important;
}

.ae-wrap .ae-card__logo-placeholder {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: #dbeafe !important;
    color: #137fec !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ── Corpo do card ── */
.ae-wrap .ae-card__body {
    padding: 20px 20px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    gap: 10px !important;
}

.ae-wrap .ae-card__title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Quebra em 2 linhas máximo */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.ae-wrap .ae-card__time {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin: 0 !important;
}

.ae-wrap .ae-card__time svg {
    flex-shrink: 0 !important;
    color: #137fec !important;
}

/* ── Botões ── */
.ae-wrap .ae-card__actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: auto !important;
    padding-top: 14px !important;
    border-top: 1px solid #f1f5f9 !important;
}

/* Se apenas 1 botão presente, ocupa coluna inteira */
.ae-wrap .ae-card__actions a:only-child {
    grid-column: 1 / -1 !important;
}

.ae-wrap .ae-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background .18s ease, transform .15s ease !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.ae-wrap .ae-btn:hover {
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

.ae-wrap .ae-btn--primary {
    background: #137fec !important;
    color: #ffffff !important;
}

.ae-wrap .ae-btn--primary:hover {
    background: #0e6bca !important;
    color: #ffffff !important;
}

.ae-wrap .ae-btn--secondary {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

.ae-wrap .ae-btn--secondary:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* ────────────────────────────────────────────────────────────────
   MENSAGEM VAZIA
   ──────────────────────────────────────────────────────────────── */
.ae-wrap .ae-no-events {
    text-align: center !important;
    color: #94a3b8 !important;
    font-size: 15px !important;
    padding: 32px !important;
    font-family: 'Inter', sans-serif !important;
}

/* ────────────────────────────────────────────────────────────────
   WRAPPER GERAL (para filtro + grid)
   ──────────────────────────────────────────────────────────────── */
.ae-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* ────────────────────────────────────────────────────────────────
   BARRA DE FILTRO
   ──────────────────────────────────────────────────────────────── */
.ae-wrap .ae-filter-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
    padding: 16px 20px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
}

.ae-wrap .ae-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 7px 16px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all .18s ease !important;
    line-height: 1 !important;
    font-family: inherit !important;
}

.ae-wrap .ae-filter-btn:hover {
    border-color: #137fec !important;
    color: #137fec !important;
    background: #f0f7ff !important;
}

.ae-wrap .ae-filter-btn--active {
    background: #137fec !important;
    border-color: #137fec !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(19, 127, 236, .25) !important;
}

/* Contador de resultados */
.ae-wrap .ae-filter-count {
    font-size: 13px !important;
    color: #64748b !important;
    margin: 0 0 16px !important;
    font-family: 'Inter', sans-serif !important;
}

.ae-wrap .ae-count-num {
    font-weight: 700 !important;
    color: #137fec !important;
}

/* Responsivo: scroll horizontal no mobile */
@media (max-width: 560px) {
    .ae-wrap .ae-filter-bar {
        gap: 6px !important;
        padding: 12px !important;
    }

    .ae-wrap .ae-filter-btn {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}

/* ────────────────────────────────────────────────────────────────
   DATA DO EVENTO (chip no card)
   ──────────────────────────────────────────────────────────────── */
.ae-wrap .ae-card__date {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #137fec !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 6px !important;
    padding: 4px 9px !important;
    margin: 0 !important;
    width: fit-content !important;
}

.ae-wrap .ae-card__date svg {
    flex-shrink: 0 !important;
    color: #137fec !important;
}