/* ================================================================
   EVN - Eventos Grid & Modal
   Namespace: .evn-
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────── */
.evn-app *,
.evn-app *::before,
.evn-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.evn-app {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  color: #1a1a2e;
  padding: 20px 0;
}

/* ── Loading ──────────────────────────────────────────────────── */
.evn-loading {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* ── Estado vazio ─────────────────────────────────────────────── */
.evn-empty {
  text-align: center;
  padding: 80px 20px;
}
.evn-empty-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
}
.evn-empty h3 {
  font-size: 1.3rem;
  color: #555;
  font-weight: 600;
}
.evn-empty p {
  margin-top: 8px;
  color: #999;
  font-size: 0.9rem;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.evn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 10px 4px;
}

/* ── Card ─────────────────────────────────────────────────────── */
.evn-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition:
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.evn-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

.evn-card:focus-visible {
  outline: 3px solid #121622;
  outline-offset: 3px;
}

/* Ribbon de data no topo do card */
.evn-card-ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 6px 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  z-index: 2;
  min-width: 60px;
}
.evn-ribbon-day {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: #121622;
}
.evn-ribbon-month {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
  margin-top: 2px;
}

/* Thumb do card */
/* VARIAÇÃO — altura mínima padronizada com cartaz completo */
.evn-card-thumb-wrap {
  width: 100%;
  min-height: 260px; /* altura mínima garantida */
  overflow: hidden;
  background: linear-gradient(135deg, #e8e4ff 0%, #d4d0ff 100%);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.evn-card-thumb-wrap img {
  width: 100%;
  height: auto;
  max-height: 420px; /* limita imagens muito altas */
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.evn-card:hover .evn-card-thumb-wrap img {
  transform: scale(1.03);
}
.evn-card-thumb-placeholder {
  width: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.35;
}

/* Corpo do card */
.evn-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.evn-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a2e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.evn-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.evn-card-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #666;
}
.evn-card-meta-item svg {
  flex-shrink: 0;
  opacity: 0.6;
  width: 14px;
  height: 14px;
}
.evn-card-meta-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Divider sutil */
.evn-card-divider {
  height: 1px;
  background: linear-gradient(to right, #e8e4ff, transparent);
  margin: 4px 0;
}

/* ── Paginação ────────────────────────────────────────────────── */
.evn-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.evn-page-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #e0deff;
  background: #fff;
  color: #121622;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
  font-size: 1.1rem;
}
.evn-page-btn:hover:not(:disabled) {
  background: #121622;
  border-color: #121622;
  color: #fff;
  transform: scale(1.08);
}
.evn-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.evn-page-info {
  font-size: 0.88rem;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.evn-page-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.evn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition: all 0.22s ease;
  cursor: pointer;
}
.evn-dot.evn-dot-active {
  background: #121622;
  width: 22px;
  border-radius: 4px;
}

/* ── Modal Overlay ────────────────────────────────────────────── */
.evn-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.65);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.evn-modal-overlay.evn-modal-open {
  opacity: 1;
  visibility: visible;
}

.evn-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  position: relative;
}
.evn-modal-overlay.evn-modal-open .evn-modal {
  transform: translateY(0) scale(1);
}

/* Lado esquerdo — Poster */
.evn-modal-poster {
  width: 42%;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #e8e4ff, #d4d0ff);
  position: relative;
}
.evn-modal-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.evn-modal-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  opacity: 0.25;
  min-height: 340px;
}

/* Lado direito — Conteúdo */
.evn-modal-content {
  flex: 1;
  padding: 36px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Scrollbar customizada na modal */
.evn-modal-content::-webkit-scrollbar {
  width: 4px;
}
.evn-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.evn-modal-content::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.evn-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0eeff;
  color: #121622;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: fit-content;
}

.evn-modal-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
	margin-bottom: 10px;
  color: #1a1a2e;
}

.evn-modal-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid #f0eeff;
  border-bottom: 1px solid #f0eeff;
  margin-top: 10px;
  margin-bottom: 18px;
}
.evn-modal-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #444;
}
.evn-modal-meta-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #121622;
  width: 16px;
  height: 16px;
}
.evn-modal-meta-label {
  font-weight: 700;
  margin-right: 4px;
  color: #1a1a2e;
}

.evn-modal-desc-wrap {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

/* Descrição na modal */
.evn-modal-desc-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b7280;
  margin-bottom: 8px;
}
.evn-modal-desc-text {
  font-size: 15px;
  line-height: 1.6;
	overflow: hidden;
	transition: max-height 0.3s ease;
  color: #374151;
}
.evn-modal-desc-text p {
  margin-bottom: 10px;
}
.evn-modal-desc-text p:last-child {
  margin-bottom: 0;
}

.evn-modal-see-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #121622;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.evn-modal-no-desc {
  font-size: 0.88rem;
  color: #bbb;
  font-style: italic;
}

/* Botão fechar */
.evn-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #eee;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}
.evn-modal-close:hover {
  background: #121622;
  color: #fff;
  border-color: #121622;
  transform: scale(1.1);
}

/* ── Responsivo ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .evn-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .evn-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .evn-modal {
    flex-direction: column;
    max-height: 92vh;
  }
  .evn-modal-poster {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
  }
  .evn-modal-poster-placeholder {
    min-height: 220px;
  }
  .evn-modal-content {
    padding: 24px 20px;
  }
  .evn-modal-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .evn-pagination {
    gap: 10px;
  }
  .evn-page-btn {
    width: 38px;
    height: 38px;
  }
}

/* ─────────────────────────────
   Ações do Modal (WhatsApp / Link)
───────────────────────────── */

.evn-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 10px 0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.evn-modal-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.evn-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 16px;

  border-radius: 8px;

  font-size: 14px;
  font-weight: 600;

  text-decoration: none;

  transition: all 0.2s ease;
}

.evn-modal-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.evn-modal-action-wa {
  background: #25d366;
  color: white;
}

.evn-modal-action-wa:hover {
  background: #1ebe5d;
}

.evn-modal-action-link {
  background: #1f2937;
  color: white;
}

.evn-modal-action-link:hover {
  background: #111827;
}
