/* Estilos para /eventos-pasados — se sirven como archivo estático */

.ev-hero {
  background: linear-gradient(145deg, #0f2548 0%, #1d5f87 100%);
  padding: 72px 24px 64px;
  font-family: Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.ev-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #a8d8f0;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.18s;
}
.breadcrumb:hover { color: #ffffff; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60b8e8;
  margin-bottom: 12px;
}
.ev-hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 14px;
  line-height: 1.1;
}
.ev-hero p {
  font-size: 17px;
  color: #a8d8f0;
  margin: 0;
  max-width: 540px;
  line-height: 1.65;
}

.ev-section {
  background: #f8fafc;
  padding: 64px 24px 100px;
  font-family: Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ev-loading {
  text-align: center;
  padding: 60px 24px;
  color: #94a3b8;
  font-size: 15px;
}
.ev-empty {
  text-align: center;
  padding: 60px 24px;
  color: #94a3b8;
  font-size: 15px;
}
.hidden { display: none !important; }

/* Grid */
.eventos-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.eventos-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  min-height: 380px;
  align-items: stretch;
}
.eventos-bottom-wrap {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.eventos-bottom-clip {
  flex: 1;
  overflow: hidden;
}
.eventos-bottom {
  display: flex;
  gap: 14px;
  will-change: transform;
}
.eventos-bottom .evento-card {
  flex: 0 0 calc(50% - 7px);
  min-width: 0;
}

/* Botones carrusel */
.car-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  background: #0f2548;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
  padding: 0;
}
.car-btn svg { width: 18px; height: 18px; }
.car-btn:hover:not(:disabled) { background: #1d5f87; transform: scale(1.05); }
.car-btn:disabled { opacity: 0.25; cursor: default; }

/* Card normal */
.evento-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(145deg, #0f2548 0%, #1d4068 100%);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 7px 24px;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.evento-card:hover {
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 4px 16px rgba(15,37,72,0.2);
  transform: translateX(3px);
}
.fecha-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 8px 12px;
}
.dia-sm { font-size: 22px; font-weight: 800; color: #ffffff; line-height: 1; }
.mes-sm { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #a8d8f0; margin-top: 2px; }
.evento-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.evento-body h4 { font-size: 15px; font-weight: 700; color: #ffffff; margin: 0; line-height: 1.3; }

.meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.meta span { display: flex; align-items: center; gap: 5px; color: #a8d8f0; }
.meta svg { width: 14px; height: 14px; flex-shrink: 0; }
.modalidad {
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px !important;
  display: flex;
  align-items: center;
  gap: 4px;
}
.evento-card .modalidad.presencial { background: #dbeafe; color: #3a8bbf !important; }
.evento-card .modalidad.virtual    { background: #cffafe; color: #0e7490 !important; }

/* Card doble */
.evento-card-doble {
  display: block;
  padding: 0;
  position: relative;
  overflow: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
  flex: 1;
}
.evento-card-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 16px;
}

/* Banner full-width */
.eventos-banner-wrap { display: flex; flex-direction: column; gap: 12px; }
.eventos-banner-clip { width: 100%; overflow: hidden; border-radius: 16px; }
.eventos-banner-track { display: flex; will-change: transform; }
.evento-banner-full {
  flex: 0 0 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
}
.evento-banner-img { width: 100%; height: auto; display: block; object-fit: cover; border-radius: 16px; }
.banner-nav { display: flex; justify-content: center; gap: 10px; }

/* Overlay hover */
.banner-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 54, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
.evento-card-doble:hover .banner-hover-overlay,
.evento-card:hover .banner-hover-overlay,
.evento-banner-full:hover .banner-hover-overlay { opacity: 1; }

.overlay-btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; }

.btn-registrate {
  background: #ffffff;
  color: #0f2548;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: background 0.18s, transform 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-registrate:hover { background: #e0eaff; transform: translateY(-2px); }

.btn-agenda {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.8);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}
.btn-agenda:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

.banner-registrate {
  transform: translateY(6px);
  transition: background 0.18s, transform 0.2s !important;
}
.evento-card-doble:hover .banner-registrate,
.evento-card:hover .banner-registrate,
.evento-banner-full:hover .banner-registrate { transform: translateY(0); }

/* Botón galería en cards */
.btn-galeria {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.55);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-family: Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  transition: background 0.18s, transform 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-galeria:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }

/* ── Modal galería ── */
.gal-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gal-modal.open { display: flex; }

.gal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 54, 0.88);
  backdrop-filter: blur(4px);
}

.gal-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}

.gal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1.5px solid #e2e8f0;
  flex-shrink: 0;
}
.gal-modal-titulo {
  font-size: 17px;
  font-weight: 800;
  color: #0f2548;
  margin: 0;
}
.gal-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  color: #374151;
  flex-shrink: 0;
  transition: background 0.15s;
}
.gal-modal-close:hover { background: #e2e8f0; }

.gal-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.gal-thumb-btn {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #0f2548;
  padding: 0;
  transition: transform 0.18s, box-shadow 0.18s;
}
.gal-thumb-btn:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(15,37,72,0.3); }
.gal-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-no-thumb { width: 100%; height: 100%; background: linear-gradient(145deg,#0f2548,#1d4068); }

.gal-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 18px 8px 6px;
  line-height: 1.3;
  text-align: left;
}

.gal-play-ico {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: rgba(255,255,255,0.9);
}
.gal-yt-ico {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 38px;
  height: 38px;
  background: rgba(220,38,38,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}

.gal-loading {
  grid-column: 1/-1;
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
  font-size: 15px;
}

/* ── Lightbox ── */
.gal-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.96);
  align-items: center;
  justify-content: center;
}
.gal-lightbox.open { display: flex; }

.gal-lb-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-lb-content img   { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 8px; display: block; }
.gal-lb-content video { max-width: 100%; max-height: 85vh; border-radius: 8px; display: block; }
.gal-lb-content iframe {
  width: 80vw;
  height: 45vw;
  max-height: 80vh;
  border-radius: 8px;
  border: none;
}

.gal-lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10;
}
.gal-lb-close:hover { background: rgba(255,255,255,0.28); }

.gal-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10;
}
.gal-lb-nav:hover:not(:disabled) { background: rgba(255,255,255,0.25); }
.gal-lb-nav:disabled { opacity: 0.18; cursor: default; }
.gal-lb-prev { left: 14px; }
.gal-lb-next { right: 14px; }

.gal-lb-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  font-weight: 600;
  font-family: Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Responsive */
@media (max-width: 860px) {
  .ev-container { padding: 0 20px; }
  .eventos-top { grid-template-columns: 1fr; min-height: unset; }
  .eventos-top .evento-card-doble { min-height: 320px; }
  .eventos-bottom .evento-card { flex: 0 0 100%; }
  .gal-thumb-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .gal-lb-content iframe { width: 95vw; height: 54vw; }
  .gal-lb-nav { width: 40px; height: 40px; font-size: 24px; }
}
@media (max-width: 500px) {
  .evento-card { padding: 16px; gap: 14px; }
  .gal-modal-box { border-radius: 14px; }
  .gal-thumb-grid { grid-template-columns: 1fr 1fr; padding: 14px 16px; }
}
