:root{
  --bg: #10155b;           /* fondo muy oscuro */
  --card-bg: #07122a;      /* ligeramente más claro para cards */
  --gold: #d4af37;         /* oro */
  --white: #ffffff;
  --muted: rgba(255,255,255,0.75);
  --radius: 12px;
  --gap: 16px;
  --max-width: 1200px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/* Page */
html,body{
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Container */
.container{
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 16px;
}

/* Grid de eventos */
.events-grid{
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr; /* mobile */
  justify-items: stretch;     /* las cards ocupan toda la columna */
}

/* tablets / small screens: 2 columns */
@media (min-width: 700px){
  .events-grid{
    grid-template-columns: repeat(2, 1fr);
    justify-items: stretch;
  }
}

/* desktop: 3 columns */
@media (min-width: 1100px){
  .events-grid{
    grid-template-columns: repeat(3, 1fr);
    justify-items: stretch;
  }
}

/* Card */
.card{
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  transition: transform .18s ease, box-shadow .18s ease;
  width: 100%;
  background-color: var(--card-bg);
}

/* Hover */
.card:hover{
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
}

/* Imagen cuadrada */
.card .thumb{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #05203b;
}

/* Card body */
.card .card-body{
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Title con 2 líneas fijas y ... si se pasa */
.card .title{
  font-size: 1.05rem;
  margin: 0;
  color: var(--gold);
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* máximo 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.4em;
  line-clamp: 2; /* estándar */
}

/* META - lugar, direccion, fecha y hora */
.card .meta{
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  display: block;
}

/* Lugar: primera línea */
.card .meta .lugar{
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dirección: segunda línea */
.card .meta .direccion{
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fecha: tercera línea */
.card .meta .fecha{
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hora: cuarta línea */
.card .meta .hora{
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* descripcion */
.card .desc{
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.2;
  min-height: 2.4em;
}

/* CONTROLS - centrado */
.card .controls{
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 8px;
  width: 100%;
}

/* gold button */
.btn-gold{
  background: linear-gradient(180deg, var(--gold), #b88f2a);
  color: #07122a;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(212,175,55,0.18);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  margin: 0 auto;
}

.btn-gold:hover{
  transform: translateY(-2px);
  background: linear-gradient(180deg, #e4c25a, #b88f2a);
  box-shadow: 0 10px 26px rgba(212,175,55,0.22);
}

.btn-gold:focus{
  outline: 3px solid rgba(212,175,55,0.18);
  outline-offset: 3px;
}

/* secondary text button */
.btn-ghost{
  background: transparent;
  color: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}

/* linea dorada separadora */
.gold-line{
  height: 4px;
  background: linear-gradient(90deg, rgba(212,175,55,0.12), rgba(212,175,55,0.6), rgba(212,175,55,0.12));
  border-radius: 4px;
  margin: 8px 0;
}

/* Error box */
.error{
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,0,0,0.08);
  color: #ffdddd;
}

/* Barra superior */
.topbar {
  background: var(--gold);
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.topbar-content {
  max-width: var(--max-width);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
}

.topbar .logo {
  height: 36px;
  width: 36px;
  object-fit: cover;
}

.topbar .brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bg);
  line-height: 1;
}

/* Footer */
.site-footer {
  background: var(--gold);
  padding: 6px 0;
  margin-top: 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Row de iconos */
.social-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px; /* más separación para Términos */
}

/* Iconos y links */
.social-link, .term-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--bg);
  text-decoration: none;
  font-size: 1.2rem;
  border-radius: 6px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.social-link svg {
  width: 28px;
  height: 28px;
  fill: var(--bg);
}

/* Hover sutil */
.social-link:hover, .term-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Texto copyright */
.footer-copy {
  color: var(--bg);
  font-size: 0.8rem;
  text-align: center;
  margin: 2px 0 0;
}

/* responsive: centrado en móviles, left-aligned en pantallas grandes */
@media (min-width: 700px) {
  .footer-inner {
    align-items: center;
  }
  .social-row {
    justify-content: center;
  }
  .footer-copy {
    margin-left: 0;
  }
}
