/* ============================================================
   Ticket Go — eventos.css
   Event catalog page: header, search, filters, card grid, empty state
   ============================================================ */

/* ---------------------------------------------------------------
   Catalog header
   --------------------------------------------------------------- */
.catalog-head { padding: 140px 0 30px; }
.catalog-head h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 10px;
}
.catalog-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 30px;
  max-width: 620px;
}

/* ---------------------------------------------------------------
   Search bar
   --------------------------------------------------------------- */
.search-wrap { position: relative; max-width: 560px; }
.search-wrap svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 15px 18px 15px 50px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  outline: none;
  border-color: var(--purple-light);
  background: var(--bg-card-elevated);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

/* ---------------------------------------------------------------
   Filter bar
   --------------------------------------------------------------- */
.filter-bar { padding: 6px 0 26px; }
.filter-group {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.filter-group::-webkit-scrollbar { display: none; }
.filter-group + .filter-group { margin-top: 4px; }
.filter-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.pill {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-low);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease),
              border-color var(--ease), transform var(--ease);
}
.pill:hover {
  border-color: var(--purple-light);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.pill.active {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  color: #fff;
  border-color: transparent;
}

/* ---------------------------------------------------------------
   Events grid
   --------------------------------------------------------------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 90px;
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* Fade-out state set by JS before repaint (180ms out, 200ms back in) */
.events-grid.is-fading {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------------------------------------------------
   Event card
   --------------------------------------------------------------- */
.ev-card {
  --card-accent: #8B5CF6;
  background: var(--bg-card);
  border: 1px solid var(--border-low);
  border-radius: 18px;
  overflow: hidden;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.ev-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.7),
              0 0 0 1px var(--card-accent),
              0 14px 40px -18px var(--card-accent);
}
.ev-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Banner */
.ev-banner {
  position: relative;
  height: 150px;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  overflow: hidden;
}
.ev-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}
.ev-cat-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}
.ev-cat-label {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.ev-avail {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0B0B12;
  background: var(--green-success, #34D399);
  box-shadow: 0 6px 16px -6px rgba(52, 211, 153, 0.8);
}

/* Body */
.ev-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 18px 20px;
}
.badge-destacado {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
  background: rgba(255,102,0,0.15);
  color: var(--orange-light);
  border: 1px solid rgba(255,102,0,0.4);
}
.ev-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.ev-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.ev-meta svg {
  flex-shrink: 0;
  stroke: var(--card-accent);
}

/* Footer */
.ev-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-low);
}
.ev-price {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.ev-price strong {
  display: block;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.ev-footer .btn { flex-shrink: 0; }

/* ---------------------------------------------------------------
   Loading state
   --------------------------------------------------------------- */
.events-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

/* ---------------------------------------------------------------
   Empty state
   --------------------------------------------------------------- */
.no-results {
  display: none;
  text-align: center;
  padding: 80px 20px 120px;
  color: var(--text-secondary);
}
.no-results.show { display: block; }
.no-results svg {
  width: 56px;
  height: 56px;
  stroke: var(--text-muted);
  margin: 0 auto 18px;
}
.no-results h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------
   Responsive: 3 cols ≥1024 / 2 cols ≥640 / 1 col mobile
   --------------------------------------------------------------- */
@media (max-width: 1023px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .events-grid { grid-template-columns: 1fr; gap: 18px; }
  .catalog-head { padding-top: 120px; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .events-grid,
  .events-grid.is-fading,
  .ev-card,
  .pill { transition: none; }
  .ev-card:hover { transform: none; }
}
