/* =========================
   RESET + PALETA GRIS PRO
========================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

:root{
  --color-50:  #F0F3F4;
  --color-100: #D6DDE0;
  --color-200: #BCC7CD;
  --color-300: #A2B1B9;
  --color-400: #889BA5;
  --color-500: #6E8591;
  --color-600: #5A6D77;
  --color-700: #46555D;
  --color-800: #323D43;
  --color-900: #1B2124;
  --color-950: #0B0D0F;

  --bg: var(--color-950);
  --panel: rgba(27,33,36,0.55);
  --panel2: rgba(11,13,15,0.70);

  --text: var(--color-50);
  --muted: rgba(240,243,244,0.75);
  --muted2: rgba(240,243,244,0.55);

  --line: rgba(240,243,244,0.10);
  --line2: rgba(240,243,244,0.16);

  --shadow: 0 18px 48px rgba(0,0,0,0.45);
  --shadow2: 0 10px 24px rgba(0,0,0,0.35);

  --r14: 14px;
  --r18: 18px;
  --r22: 22px;

  --ease: cubic-bezier(.2,.8,.2,1);
}

html{
  scrollbar-width:none;
  scroll-behavior:smooth;
}

body{
  min-height:100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x:hidden;
}

/* grid subtle */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.10;
  background-image:
    linear-gradient(90deg, rgba(240,243,244,0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(240,243,244,0.02) 1px, transparent 1px);
  background-size:56px 56px;
}

/* glow suave */
body::after{
  content:"";
  position:fixed;
  inset:-20%;
  pointer-events:none;
  background:
    radial-gradient(800px 500px at 15% 0%, rgba(240,243,244,0.08), transparent 60%),
    radial-gradient(700px 450px at 85% 10%, rgba(240,243,244,0.06), transparent 60%),
    radial-gradient(900px 600px at 50% 100%, rgba(240,243,244,0.05), transparent 60%);
  opacity: 1;
}

/* =========================
   NAVBAR
========================= */
.navbar{
  position: sticky;
  top: 0;
  z-index: 1000;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;

  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,13,15,0.80);
  backdrop-filter: blur(10px);
}

.logo{
  font-size: 1.15rem;
  font-weight: 1000;
  letter-spacing: .2px;
  color: rgba(240,243,244,0.95);
}

.logout-btn{
  text-decoration:none;
  color: rgba(240,243,244,0.92);
  font-weight: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(240,243,244,0.06);
  transition: transform .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}

.logout-btn:hover{
  transform: translateY(-1px);
  background: rgba(240,243,244,0.08);
  border-color: rgba(240,243,244,0.18);
}

/* =========================
   SECCIÓN
========================= */
.eventos{
  position:relative;
  z-index: 1;
  padding: 34px 16px 60px;
  min-height: 100vh;
}

.titulo-seccion{
  text-align:center;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  font-weight: 1100;
  letter-spacing: .2px;
  color: rgba(240,243,244,0.95);
  margin-bottom: 18px;
}

.titulo-seccion::after{
  content:"";
  display:block;
  width: 68px;
  height: 4px;
  margin: 12px auto 0;

}

/* =========================
   GRID CARDS
========================= */
.grid-eventos{
  width: min(1100px, calc(100% - 8px));
  margin: 0 auto;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* =========================
   CARD
========================= */
.card{
  position: relative;
  border-radius: var(--r22);
  overflow:hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow2);

  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease);
}

/* “brillito” */
.card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(500px 220px at 20% 0%, rgba(240,243,244,0.12), transparent 55%),
    radial-gradient(380px 220px at 80% 10%, rgba(240,243,244,0.08), transparent 60%);
  opacity: 0.85;
}

.card:hover{
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(240,243,244,0.18);
  background: rgba(27,33,36,0.62);
  box-shadow: var(--shadow);
}

.card img{
  width:100%;
  height: 185px;
  object-fit: cover;
  display:block;
  border-bottom: 1px solid var(--line);
  transition: transform .22s var(--ease), filter .22s var(--ease);
  filter: saturate(1.05) contrast(1.05);
}

.card:hover img{
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.08);
}

.contenido{
  position: relative;
  z-index: 1;
  padding: 14px 14px 16px;
  display:grid;
  gap: 10px;
}

.contenido h3{
  font-size: 1.08rem;
  font-weight: 1100;
  color: rgba(240,243,244,0.95);
  line-height: 1.2;
}

.contenido p{
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.fecha{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  width: fit-content;

  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240,243,244,0.10);
  background: rgba(11,13,15,0.35);
  color: rgba(240,243,244,0.88);
  font-weight: 1000;
  font-size: 0.84rem;
}

.fecha::before{
  content:"";
  opacity: .9;
}

/* contador + botón */
.contador{
  font-weight: 1000;
  font-size: 0.92rem;
  color: rgba(240,243,244,0.92);
  padding-top: 2px;
}

.contador-boton{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  margin-top: 4px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(240,243,244,0.10);
  background: rgba(240,243,244,0.06);
  color: rgba(240,243,244,0.92);
  font-weight: 1100;
  cursor:pointer;
  transition: transform .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}

.contador-boton:hover{
  transform: translateY(-1px);
  background: rgba(240,243,244,0.08);
  border-color: rgba(240,243,244,0.18);
}

/* =========================
   OVERLAY IMAGEN
========================= */
.imagen-overlay{
  position: fixed;
  inset: 0;
  background: rgba(11,13,15,0.76);
  backdrop-filter: blur(10px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 9999;
  cursor: pointer;
  padding: 18px;
}

.imagen-overlay img{
  max-width: min(980px, 96vw);
  max-height: 86vh;
  border-radius: var(--r22);
  border: 1px solid rgba(240,243,244,0.12);
  box-shadow: var(--shadow);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px){
  .navbar{
    padding: 12px 14px;
  }
  .logo{ font-size: 1.05rem; }
  .logout-btn{ padding: 9px 12px; }

  .card img{ height: 165px; }
}
