/* ═══════════════════════════════════════════════════════════════
   EventFlow – Frontend Styles
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ef-primary:    #2563eb;
  --ef-primary-dk: #1d4ed8;
  --ef-accent:     #f59e0b;
  --ef-danger:     #ef4444;
  --ef-success:    #22c55e;
  --ef-text:       #1f2937;
  --ef-muted:      #6b7280;
  --ef-border:     #e5e7eb;
  --ef-bg:         #f9fafb;
  --ef-white:      #ffffff;
  --ef-radius:     10px;
  --ef-shadow:     0 2px 16px rgba(0,0,0,.08);
  --ef-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Base ──────────────────────────────────────────────────────── */
.ef-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; background: var(--ef-primary); color: #fff;
  border: none; border-radius: 6px; font-size: .9rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background .2s, transform .1s;
}
.ef-btn:hover { background: var(--ef-primary-dk); color: #fff; transform: translateY(-1px); }
.ef-btn-sm    { padding: 6px 12px; font-size: .8rem; }
.ef-btn-lg    { padding: 14px 28px; font-size: 1rem; }
.ef-btn-outline {
  background: transparent; color: var(--ef-primary);
  border: 2px solid var(--ef-primary);
}
.ef-btn-outline:hover { background: var(--ef-primary); color: #fff; }
.ef-nenhum { color: var(--ef-muted); font-style: italic; padding: 20px 0; }
.ef-tag {
  display: inline-block; padding: 3px 10px; background: var(--ef-bg);
  border-radius: 20px; font-size: .8rem; color: var(--ef-primary);
  border: 1px solid var(--ef-border); text-decoration: none; margin-right: 4px;
}
.ef-cancelado { opacity: .65; }
.ef-badge-cancelado {
  position: absolute; top: 12px; left: 12px;
  background: var(--ef-danger); color: #fff;
  padding: 4px 10px; border-radius: 4px; font-size: .75rem; font-weight: 700;
}
.ef-badge-destaque {
  position: absolute; top: 12px; right: 12px;
  background: var(--ef-accent); color: #fff;
  padding: 4px 10px; border-radius: 4px; font-size: .75rem; font-weight: 700;
}
.ef-badge-destaque-sm, .ef-badge-cancelado-sm {
  font-size: .7rem; padding: 2px 6px; border-radius: 4px; vertical-align: middle;
}
.ef-badge-destaque-sm { background: var(--ef-accent); color: #fff; }
.ef-badge-cancelado-sm { background: var(--ef-danger); color: #fff; }

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

.ef-card {
  background: var(--ef-white); border-radius: var(--ef-radius);
  box-shadow: var(--ef-shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s; position: relative;
}
.ef-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.ef-card-img {
  height: 200px; background-size: cover; background-position: center;
  background-color: var(--ef-border); position: relative;
}
.ef-card-img-link { display: block; }
.ef-card-body { padding: 18px; }
.ef-card-data  { font-size: .82rem; color: var(--ef-primary); font-weight: 600; margin: 0 0 6px; }
.ef-card-title { font-size: 1.05rem; margin: 0 0 8px; line-height: 1.3; }
.ef-card-title a { color: var(--ef-text); text-decoration: none; }
.ef-card-title a:hover { color: var(--ef-primary); }
.ef-card-local { font-size: .82rem; color: var(--ef-muted); margin: 0 0 14px; }

/* ── Lista ─────────────────────────────────────────────────────── */
.ef-lista { list-style: none; margin: 0; padding: 0; }
.ef-lista-mes {
  padding: 10px 16px; background: var(--ef-primary); color: #fff;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  border-radius: 6px; margin: 24px 0 4px;
}
.ef-lista-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border-bottom: 1px solid var(--ef-border);
  transition: background .15s;
}
.ef-lista-item:hover { background: var(--ef-bg); }
.ef-lista-data {
  display: flex; flex-direction: column; align-items: center;
  min-width: 52px; background: var(--ef-primary); color: #fff;
  border-radius: 8px; padding: 8px 6px; text-align: center;
}
.ef-dia     { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.ef-mes-abv { font-size: .7rem; font-weight: 600; }
.ef-lista-thumb { display: none; }
@media (min-width: 640px) {
  .ef-lista-thumb { display: block; width: 80px; height: 60px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
  .ef-lista-thumb img { width: 100%; height: 100%; object-fit: cover; }
}
.ef-lista-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ef-lista-titulo { font-size: 1rem; font-weight: 600; color: var(--ef-text); text-decoration: none; }
.ef-lista-titulo:hover { color: var(--ef-primary); }
.ef-lista-hora, .ef-lista-local { font-size: .8rem; color: var(--ef-muted); }
.ef-lista-acao { margin-left: auto; }

/* ── Calendário ────────────────────────────────────────────────── */
.ef-calendario { font-family: var(--ef-font); margin: 20px 0; }
.ef-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--ef-primary); color: #fff;
  border-radius: var(--ef-radius) var(--ef-radius) 0 0;
  font-size: 1rem; font-weight: 600;
}
.ef-cal-nav-btn {
  color: #fff; text-decoration: none; font-size: 1.4rem;
  padding: 0 12px; line-height: 1;
}
.ef-cal-nav-btn:hover { opacity: .8; }
.ef-cal-table { width: 100%; border-collapse: collapse; }
.ef-cal-table th {
  background: var(--ef-primary-dk); color: #fff;
  padding: 8px; text-align: center; font-size: .82rem;
}
.ef-cal-dia {
  padding: 6px; vertical-align: top; border: 1px solid var(--ef-border);
  min-height: 80px; background: var(--ef-white);
}
.ef-cal-hoje  { background: #eff6ff; }
.ef-cal-tem-evento { background: #fef3c7; }
.ef-cal-num { font-size: .85rem; font-weight: 600; display: block; }
.ef-cal-vazio { background: var(--ef-bg); border: 1px solid var(--ef-border); }
.ef-cal-eventos { list-style: none; padding: 0; margin: 4px 0 0; }
.ef-cal-eventos li { font-size: .72rem; }
.ef-cal-eventos a {
  color: var(--ef-primary); text-decoration: none;
  display: block; padding: 1px 4px; border-radius: 3px;
  background: #dbeafe; margin-bottom: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ef-cal-eventos li.ef-cancelado a { background: #fee2e2; color: var(--ef-danger); }

/* ── Timeline ──────────────────────────────────────────────────── */
.ef-timeline { position: relative; padding: 20px 0; }
.ef-tl-linha {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px;
  background: var(--ef-border); transform: translateX(-50%);
  z-index: 0;
}
@media (max-width: 640px) { .ef-tl-linha { left: 20px; } }
.ef-tl-item {
  display: flex; justify-content: flex-end;
  width: 50%; padding-right: 40px; position: relative; margin-bottom: 32px;
}
.ef-tl-right { justify-content: flex-start; padding-right: 0; padding-left: 40px; margin-left: 50%; }
.ef-tl-dot {
  position: absolute; right: -8px; top: 20px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ef-primary); border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--ef-primary);
}
.ef-tl-right .ef-tl-dot { right: auto; left: -8px; }
.ef-tl-content {
  background: var(--ef-white); padding: 18px 20px;
  border-radius: var(--ef-radius); box-shadow: var(--ef-shadow);
  max-width: 420px;
}
.ef-tl-data { font-size: .8rem; color: var(--ef-primary); font-weight: 600; margin-bottom: 6px; }
.ef-tl-content h3 { margin: 0 0 8px; font-size: 1rem; }
.ef-tl-content h3 a { color: var(--ef-text); text-decoration: none; }
.ef-tl-content h3 a:hover { color: var(--ef-primary); }
.ef-tl-local { font-size: .82rem; color: var(--ef-muted); }
@media (max-width: 640px) {
  .ef-tl-item, .ef-tl-right { width: 100%; margin-left: 0; padding-left: 48px; padding-right: 0; justify-content: flex-start; }
  .ef-tl-dot { right: auto; left: 12px; }
}

/* ── Countdown ─────────────────────────────────────────────────── */
.ef-countdown {
  background: linear-gradient(135deg, var(--ef-primary), var(--ef-primary-dk));
  color: #fff; border-radius: var(--ef-radius); padding: 24px;
  text-align: center; margin: 20px 0;
}
.ef-countdown-label { font-size: .9rem; opacity: .85; margin: 0 0 16px; }
.ef-countdown-boxes { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.ef-cd-box {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.15); border-radius: 8px; padding: 14px 20px; min-width: 80px;
}
.ef-cd-num { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.ef-cd-box span:last-child { font-size: .75rem; opacity: .8; margin-top: 4px; }
.ef-countdown-encerrado { color: var(--ef-muted); font-style: italic; }

/* ── Widget ────────────────────────────────────────────────────── */
.ef-widget-lista { list-style: none; margin: 0; padding: 0; }
.ef-widget-item  { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ef-border); align-items: center; }
.ef-widget-data  {
  display: flex; flex-direction: column; align-items: center;
  background: var(--ef-primary); color: #fff; border-radius: 6px;
  padding: 6px 8px; min-width: 44px; text-align: center;
}
.ef-widget-dia   { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.ef-widget-mes   { font-size: .65rem; font-weight: 600; }
.ef-widget-info  a { color: var(--ef-text); text-decoration: none; font-size: .9rem; font-weight: 600; }
.ef-widget-info  a:hover { color: var(--ef-primary); }
.ef-widget-ver-todos { margin-top: 12px; font-size: .85rem; }
.ef-widget-ver-todos a { color: var(--ef-primary); }

/* ── Archive ───────────────────────────────────────────────────── */
.ef-archive-header { margin-bottom: 30px; }
.ef-archive-header h1 { font-size: 2rem; }
.ef-filtros { background: var(--ef-white); border: 1px solid var(--ef-border); border-radius: var(--ef-radius); padding: 20px; margin-bottom: 24px; }
.ef-filtros-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ef-filtro-grupo { display: flex; flex-direction: column; gap: 4px; }
.ef-filtro-grupo label { font-size: .8rem; font-weight: 600; color: var(--ef-muted); }
.ef-filtro-grupo select,
.ef-filtro-grupo input[type="text"] {
  padding: 8px 12px; border: 1px solid var(--ef-border); border-radius: 6px;
  font-size: .9rem; background: var(--ef-white);
}
.ef-filtro-busca input { min-width: 200px; }
.ef-view-selector { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ef-view-btn {
  padding: 8px 16px; border: 1px solid var(--ef-border); border-radius: 6px;
  color: var(--ef-muted); text-decoration: none; font-size: .85rem; transition: all .2s;
}
.ef-view-btn:hover, .ef-view-btn.active {
  background: var(--ef-primary); color: #fff; border-color: var(--ef-primary);
}
.ef-paginacao { margin-top: 30px; text-align: center; }
.ef-paginacao a,
.ef-paginacao span {
  display: inline-block; padding: 8px 14px; margin: 0 3px;
  border: 1px solid var(--ef-border); border-radius: 6px; text-decoration: none; color: var(--ef-text);
}
.ef-paginacao .current { background: var(--ef-primary); color: #fff; border-color: var(--ef-primary); }
.ef-sem-eventos { text-align: center; padding: 60px 20px; color: var(--ef-muted); }

/* ── Single ────────────────────────────────────────────────────── */
.ef-aviso-cancelado {
  background: var(--ef-danger); color: #fff; padding: 16px 24px;
  font-size: 1rem; border-radius: var(--ef-radius); margin-bottom: 20px;
}
.ef-single-banner {
  width: 100%; height: 380px; background-size: cover; background-position: center;
  border-radius: var(--ef-radius); margin-bottom: 30px; position: relative;
  background-color: var(--ef-border);
}
.ef-single-container { max-width: 860px; margin: 0 auto; }
.ef-single-cats { margin-bottom: 12px; }
.ef-single-titulo { font-size: 2rem; margin: 0 0 20px; line-height: 1.25; }
.ef-single-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.ef-meta-item { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.ef-meta-icon { font-size: 1.2rem; }
.ef-countdown-wrapper { margin-bottom: 30px; }
.ef-single-content { font-size: 1rem; line-height: 1.7; margin-bottom: 30px; }
.ef-single-link { margin-bottom: 30px; }
.ef-single-mapa { margin-bottom: 30px; }
.ef-single-mapa h3 { font-size: 1.1rem; margin-bottom: 12px; }
.ef-mapa-embed { border-radius: var(--ef-radius); overflow: hidden; border: 1px solid var(--ef-border); }
.ef-single-acoes { background: var(--ef-bg); padding: 24px; border-radius: var(--ef-radius); margin-bottom: 30px; }
.ef-single-acoes h3 { margin: 0 0 16px; font-size: 1rem; }
.ef-acoes-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ef-social-share { display: flex; gap: 10px; }
.ef-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: #fff;
  text-decoration: none; transition: opacity .2s;
}
.ef-share-btn:hover { opacity: .85; }
.ef-share-wa { background: #25d366; }
.ef-share-fb { background: #1877f2; }
.ef-share-tw { background: #000; }
.ef-single-nav {
  display: flex; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--ef-border); padding-top: 24px; margin-top: 30px;
  flex-wrap: wrap;
}
.ef-nav-prev, .ef-nav-next {
  color: var(--ef-primary); text-decoration: none; font-size: .9rem;
}

/* ── Hoje ──────────────────────────────────────────────────────── */
.ef-hoje { border-left: 4px solid var(--ef-accent); padding-left: 16px; margin: 20px 0; }
.ef-hoje-titulo { font-size: 1.1rem; margin-bottom: 10px; }

/* ── Print ─────────────────────────────────────────────────────── */
@media print {
  .ef-single-acoes, .ef-single-nav, .ef-single-banner + * .ef-single-acoes,
  .ef-view-selector, .ef-filtros { display: none !important; }
  .ef-single-banner { height: 200px; }
}
