* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f7fa;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.35rem;
}

.subtitle {
  color: #666;
  font-size: 1rem;
}

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  color: #666;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error */
.error {
  text-align: center;
  padding: 3rem 1rem;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 12px;
}

/* Grid de eventos */
.eventos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .eventos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tarjeta de evento */
.evento-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.evento-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.evento-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #e5e7eb;
}

.evento-card .contenido {
  padding: 1.1rem 1.25rem 1.35rem;
}

.evento-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #111;
}

.evento-card .meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.35rem;
}

.evento-card .lugar {
  font-size: 0.875rem;
  color: #3b82f6;
  font-weight: 500;
}

/* Página de detalle */
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.back-link:hover {
  text-decoration: underline;
}

.evento-detalle {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.evento-detalle .evento-imagen {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: #e5e7eb;
}

.evento-detalle .evento-info {
  padding: 1.75rem;
}

.evento-detalle h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #111;
}

.evento-detalle .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.evento-detalle .lugar {
  font-size: 1rem;
  color: #3b82f6;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.evento-detalle .descripcion {
  font-size: 1.05rem;
  color: #333;
  line-height: 1.7;
  white-space: pre-line;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.25rem;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
}

.btn:hover {
  background: #2563eb;
}

/* Sin imagen */
.sin-imagen {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
}
