/* ═══════════════════════════════════════════════════════════════════════════
   EventFlow – Elementor Widget Styles
   Grade de Eventos totalmente personalizável
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.ef-el-wrapper {
    --ef-el-primary:    #2563eb;
    --ef-el-primary-dk: #1d4ed8;
    --ef-el-accent:     #f59e0b;
    --ef-el-danger:     #ef4444;
    --ef-el-text:       #1f2937;
    --ef-el-muted:      #6b7280;
    --ef-el-border:     #e5e7eb;
    --ef-el-bg:         #f9fafb;
    --ef-el-white:      #ffffff;
    --ef-el-radius:     10px;
    --ef-el-shadow:     0 2px 16px rgba(0,0,0,.08);
    position: relative;
    width: 100%;
}

/* ── Grid ─────────────────────────────────────────────────────────────────── */
.ef-el-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) { .ef-el-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .ef-el-grid { grid-template-columns: 1fr; } }

/* Masonry via CSS columns fallback */
.ef-el-masonry {
    display: block;
    column-count: 3;
    column-gap: 24px;
}
.ef-el-masonry .ef-el-card {
    break-inside: avoid;
    margin-bottom: 24px;
    display: block;
}
@media (max-width: 1024px) { .ef-el-masonry { column-count: 2; } }
@media (max-width: 600px)  { .ef-el-masonry { column-count: 1; } }

/* Estilo revista: primeiro item ocupa 2 colunas */
.ef-el-revistas .ef-el-card:first-child {
    grid-column: span 2;
}
.ef-el-revistas .ef-el-card:first-child .ef-el-card-img {
    height: 340px;
}
@media (max-width: 768px) {
    .ef-el-revistas .ef-el-card:first-child {
        grid-column: span 1;
    }
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.ef-el-card {
    background: var(--ef-el-white);
    border-radius: var(--ef-el-radius);
    box-shadow: var(--ef-el-shadow);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, background-color .2s;
    position: relative;
}
.ef-el-card.ef-el-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,.14);
}
.ef-el-card.ef-el-cancelado { opacity: .65; }

/* Card imagem */
.ef-el-card-img-link { display: block; overflow: hidden; }
.ef-el-card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--ef-el-border);
    position: relative;
    transition: transform .35s ease;
}
.ef-el-card:hover .ef-el-card-img { transform: scale(1.03); }

/* Card body */
.ef-el-card-body { padding: 18px; }
.ef-el-card-data {
    font-size: .82rem;
    color: var(--ef-el-primary);
    font-weight: 600;
    margin: 0 0 6px;
}
.ef-el-card-title {
    font-size: 1.05rem;
    margin: 0 0 8px;
    line-height: 1.35;
}
.ef-el-card-title a {
    color: var(--ef-el-text);
    text-decoration: none;
    transition: color .2s;
}
.ef-el-card-title a:hover { color: var(--ef-el-primary); }
.ef-el-card-local {
    font-size: .82rem;
    color: var(--ef-el-muted);
    margin: 0 0 12px;
}
.ef-el-card-excerpt {
    font-size: .88rem;
    color: var(--ef-el-muted);
    line-height: 1.5;
    margin: 0 0 14px;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */
.ef-el-badge {
    position: absolute;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 700;
    border-radius: 4px;
    top: 12px;
    color: #fff;
}
.ef-el-badge-cancelado { left: 12px;  background: var(--ef-el-danger); }
.ef-el-badge-destaque  { right: 12px; background: var(--ef-el-accent); }
.ef-el-badge-cancelado-sm,
.ef-el-badge-destaque-sm {
    display: inline-block;
    position: static;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
    vertical-align: middle;
}
.ef-el-badge-cancelado-sm { background: var(--ef-el-danger); }
.ef-el-badge-destaque-sm  { background: var(--ef-el-accent); }

/* ── Data Badge sobre imagem ──────────────────────────────────────────────── */
.ef-el-data-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--ef-el-primary);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 700;
    z-index: 2;
}
.ef-el-data-bloco {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,.95);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
    z-index: 2;
    line-height: 1.1;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.ef-el-data-bloco .dia {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ef-el-primary);
    line-height: 1;
}
.ef-el-data-bloco .mes {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    color: var(--ef-el-muted);
    letter-spacing: .05em;
}

/* ── Botão do card ────────────────────────────────────────────────────────── */
.ef-el-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--ef-el-primary);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .2s, color .2s, transform .15s, box-shadow .2s;
    margin-top: 6px;
}
.ef-el-btn:hover {
    background: var(--ef-el-primary-dk);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.ef-el-btn-sm { padding: 6px 14px; font-size: .8rem; }

/* ── Layout Lista ─────────────────────────────────────────────────────────── */
.ef-el-lista {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ef-el-card-lista {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--ef-el-border);
    border-radius: 0;
    box-shadow: none;
    background: var(--ef-el-white);
    transition: background .15s;
}
.ef-el-card-lista:first-child { border-radius: var(--ef-el-radius) var(--ef-el-radius) 0 0; }
.ef-el-card-lista:last-child  { border-bottom: none; border-radius: 0 0 var(--ef-el-radius) var(--ef-el-radius); }
.ef-el-card-lista.ef-el-hover-lift:hover { transform: none; background: var(--ef-el-bg); box-shadow: none; }
.ef-el-lista-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    background: var(--ef-el-primary);
    color: #fff;
    border-radius: 8px;
    padding: 8px 6px;
    line-height: 1;
    flex-shrink: 0;
}
.ef-el-lista-data .dia { font-size: 1.4rem; font-weight: 800; }
.ef-el-lista-data .mes { font-size: .65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ef-el-lista-info {
    flex: 1;
    min-width: 0;
}
.ef-el-lista-titulo {
    display: block;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ef-el-text);
    text-decoration: none;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ef-el-lista-titulo:hover { color: var(--ef-el-primary); }
.ef-el-meta {
    display: inline-block;
    font-size: .78rem;
    color: var(--ef-el-muted);
    margin-right: 12px;
}

/* ── Layout Timeline ──────────────────────────────────────────────────────── */
.ef-el-timeline {
    position: relative;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ef-el-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--ef-el-primary), var(--ef-el-border));
}
.ef-el-card-timeline {
    position: relative;
    margin-bottom: 28px;
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding-left: 20px;
    overflow: visible;
}
.ef-el-card-timeline.ef-el-hover-lift:hover { transform: none; box-shadow: none; }
.ef-el-tl-dot {
    position: absolute;
    left: -27px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ef-el-primary);
    border: 3px solid var(--ef-el-white);
    box-shadow: 0 0 0 2px var(--ef-el-primary);
    z-index: 2;
}
.ef-el-tl-content {
    background: var(--ef-el-white);
    border-radius: var(--ef-el-radius);
    padding: 16px 20px;
    box-shadow: var(--ef-el-shadow);
    border-left: 3px solid var(--ef-el-primary);
}
.ef-el-tl-data {
    font-size: .8rem;
    color: var(--ef-el-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

/* ── Filtros por categoria ────────────────────────────────────────────────── */
.ef-el-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: center;
}
.ef-el-filtro-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 50px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}
.ef-el-filtro-btn:hover { background: #e5e7eb; color: #374151; transform: translateY(-1px); }
.ef-el-filtro-btn.ativo {
    background: var(--ef-el-primary);
    color: #fff;
}

/* ── Load More ────────────────────────────────────────────────────────────── */
.ef-el-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 36px;
    gap: 16px;
    justify-content: center;
}
.ef-el-load-more-btn {
    padding: 14px 40px;
    border: 2px solid var(--ef-el-primary);
    border-radius: 50px;
    background: #fff;
    color: var(--ef-el-primary);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s, box-shadow .2s;
    letter-spacing: .02em;
}
.ef-el-load-more-btn:hover:not(:disabled) {
    background: var(--ef-el-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,99,235,.25);
}
.ef-el-load-more-btn:disabled { opacity: .7; cursor: not-allowed; }

/* Paginação */
.ef-el-paginacao {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.ef-el-page-btn {
    min-width: 40px;
    height: 40px;
    border: 2px solid var(--ef-el-border);
    border-radius: 8px;
    background: #fff;
    color: var(--ef-el-text);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.ef-el-page-btn:hover { border-color: var(--ef-el-primary); color: var(--ef-el-primary); }
.ef-el-page-btn.ativo {
    background: var(--ef-el-primary);
    border-color: var(--ef-el-primary);
    color: #fff;
}

/* Mensagem sem mais */
.ef-el-sem-mais {
    font-size: .88rem;
    color: var(--ef-el-muted);
    font-style: italic;
    text-align: center;
    padding: 8px 0;
}

/* ── Spinner (scroll infinito) ────────────────────────────────────────────── */
.ef-el-spinner-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}
.ef-el-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ef-el-border);
    border-top-color: var(--ef-el-primary);
    border-radius: 50%;
    animation: ef-spin .7s linear infinite;
}
@keyframes ef-spin { to { transform: rotate(360deg); } }

/* ── Estado vazio ─────────────────────────────────────────────────────────── */
.ef-el-vazio {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--ef-el-muted);
}
.ef-el-vazio i {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    opacity: .5;
}
.ef-el-vazio p { font-size: 1rem; font-style: italic; margin: 0; }

/* ── Responsivo geral ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ef-el-card-lista { flex-wrap: wrap; }
    .ef-el-load-more-btn { padding: 12px 28px; font-size: .88rem; }
    .ef-el-filtros { gap: 6px; }
    .ef-el-filtro-btn { padding: 6px 14px; font-size: .8rem; }
}
