/* ====== Ajuste por navbar fixed ====== */
:root{
  --sidebar-w: 280px;   /* ✅ ancho del sidebar */
  --nav-h: 70px;        /* ✅ alto de tu navbar fixed-top */
}

/* ✅ El main se corre a la derecha y baja debajo de la navbar */
.events-page{
  margin-left: var(--sidebar-w);
  padding-top: calc(var(--nav-h) + 24px);
  padding-left: 28px;
  padding-right: 28px;
  padding-bottom: 40px;
  min-height: 100vh;
  background: #f5f7fb;
}

/* ✅ En pantallas pequeñas (si tu sidebar se vuelve overlay) */
@media (max-width: 992px){
  .events-page{
    margin-left: 0;
    padding-top: calc(var(--nav-h) + 18px);
  }
}

.events-page{
  padding-top: 78px; /* ajusta si tu navbar es más alta */
  background: #f6f9ff;
}

/* ====== HERO ====== */
.events-hero{
  padding: 85px 10% 60px;
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
  background:
    radial-gradient(1100px 520px at 18% 12%, rgba(37,99,235,.20), transparent 60%),
    radial-gradient(900px 450px at 90% 25%, rgba(30,64,175,.16), transparent 55%),
    linear-gradient(180deg, #0b1d3a, #0b2450);
  color: #fff;
}

.events-hero-inner{ max-width: 980px; }

.events-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 800;
  margin-bottom: 14px;
}

.events-hero h1{
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.05;
}

.events-hero p{
  margin: 0 0 22px;
  max-width: 72ch;
  font-size: 1.08rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.9);
}

.events-cta{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: #fff;
  color: #0b2450;
  font-weight: 900;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.20);
  transition: transform .2s ease;
}
.events-cta:hover{ transform: translateY(-2px); }

/* ====== WRAP ====== */
.events-wrap{
 max-width: 1100px;
  margin: 0;
}

/* ====== CARD ====== */
.events-card{
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.08);
  padding: 28px;
}

.events-card-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.events-card h2{
  margin: 0;
  color: #0f172a;
  font-size: 1.8rem;
  font-weight: 900;
}

.events-meta{
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.6;
}

.events-sub{
  margin: 6px 0 0;
  color: #64748b;
  line-height: 1.6;
}

/* ====== Chips / botones superiores ====== */
.events-chip,
.events-chip-btn{
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  border: 1px solid rgba(30,64,175,.20);
  background: #eef2ff;
  color: #1e40af;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.events-chip:hover,
.events-chip-btn:hover{
  filter: brightness(0.98);
  transform: translateY(-1px);
}

/* ====== GRID EVENTO ====== */
.events-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.events-poster{
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}
.events-poster img{
  width: 100%;
  display: block;
  object-fit: cover;
}

/* INFO */
.events-info h3{
  margin: 0 0 10px;
  color: #0b2450;
  font-weight: 900;
  font-size: 1.2rem;
}

.events-info p{
  margin: 0 0 14px;
  color: #334155;
  line-height: 1.8;
  text-align: left;
}

.events-kpis{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.kpi{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.kpi-label{
  display:block;
  font-size:.85rem;
  color:#64748b;
  font-weight: 800;
}
.kpi-value{
  display:block;
  margin-top:4px;
  font-weight: 900;
  color:#0f172a;
}

/* Botones */
.events-actions{ display:flex; gap:12px; flex-wrap:wrap; }

.btn-primary{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  background:#2563eb;
  color:#fff;
  padding:12px 14px;
  border-radius:14px;
  font-weight: 900;
  transition:.2s ease;
}
.btn-primary:hover{ background:#1e40af; transform: translateY(-2px); }

.btn-ghost{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  background:#f1f5f9;
  color:#0b2450;
  border:1px solid rgba(15,23,42,.10);
  padding:12px 14px;
  border-radius:14px;
  font-weight: 900;
  transition:.2s ease;
}
.btn-ghost:hover{ transform: translateY(-2px); }

/* ====== GALERIA ====== */
.events-gallery{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.gallery-item{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  overflow:hidden;
  background:#f8fafc;
  padding:0;
  cursor:pointer;
  transition: transform .2s ease;
}
.gallery-item:hover{ transform: translateY(-3px); }

.gallery-item img{
  width:100%;
  height:150px;
  object-fit:cover;
  display:block;
}

/* ====== Próximos ====== */
.upcoming-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:14px;
}
.upcoming{
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.upcoming h3{ margin:0 0 10px; color:#0b2450; font-weight:900; }
.upcoming p{ margin:0 0 8px; color:#334155; line-height:1.7; }
.muted{ color:#64748b; }

/* ====== Apoyo ====== */
.support-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:14px;
}
.support-item, .support-cta{
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:16px;
  background:#fff;
}
.support-item h3, .support-cta h3{ margin:0 0 10px; font-weight:900; color:#0b2450; }
.support-item p, .support-cta p{ margin:0; color:#334155; line-height:1.75; }

/* ====== MODAL ====== */
.gallery-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}
.gallery-modal.open{ display:flex; }

.gallery-modal-inner{
  position: relative;
  width: min(980px, 96vw);
  background: #0b1220;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}
.gallery-modal-inner img{
  width:100%;
  height: auto;
  display:block;
}

.gallery-close{
  position:absolute;
  top: 10px;
  right: 10px;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  color:#fff;
  cursor:pointer;
}
.gallery-close:hover{ background: rgba(255,255,255,.20); }

/* ====== Responsive ====== */
@media (max-width: 1100px){
  .events-gallery{ grid-template-columns: repeat(4, 1fr); }
  .support-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px){
  .events-grid{ grid-template-columns: 1fr; }
  .events-kpis{ grid-template-columns: 1fr; }
  .events-gallery{ grid-template-columns: repeat(2, 1fr); }
  .upcoming-grid{ grid-template-columns: 1fr; }
}
/* =========================
   MODAL / LIGHTBOX GALERÍA
========================= */

/* Fondo */
.gallery-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;               /* 🔴 oculto por defecto */
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 99999;              /* 🔥 arriba de navbar/sidebar */
}

/* cuando abre */
.gallery-modal.open{
  display: flex;
}

/* Caja */
.gallery-modal-inner{
  position: relative;
  width: min(1100px, 95vw);
  height: min(80vh, 720px);
  background: #0b1220;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen grande */
#galleryModalImg{
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ se ve completa sin recortar */
  display: block;
}

/* Botón cerrar */
.gallery-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.gallery-close:hover{
  background: rgba(255,255,255,.2);
}
