/* ==============================
   ESTILOS BASE
============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* ==============================
   HEADER
============================== */
header {
  background: #34526a;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}

header h1 {
  font-size: 2.5rem;
}

/* ==============================
   CONTENEDOR PRINCIPAL
============================== */
.contenedor {
  padding: 2rem;
}

.grid-dos-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.columna h2 {
  margin-bottom: 1rem;
  color: #34526a;
  border-bottom: 2px solid #34526a;
  padding-bottom: 0.5rem;
  font-size: 1.8rem;
}

/* ==============================
   TARJETAS NOTICIAS/EVENTOS
============================== */
.noticia {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.noticia:hover {
  transform: scale(1.02);
}

.noticia img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==============================
   LIGHTBOX
============================== */
.lightbox {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.cerrar {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
}

/* ==============================
   FOOTER
============================== */
footer {
  background: #b9bbdd;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

footer p {
  color: #000;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 768px) {
  .grid-dos-columnas {
    grid-template-columns: 1fr; /* Una columna en móvil */
  }
}

/* Agregar al final de noticia.css */

/* Mejora para el lightbox */
.cerrar:hover {
    color: #ff6b6b;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Mejorar accesibilidad - focus */
.noticia:focus {
    outline: 2px solid #34526a;
    outline-offset: 2px;
}

/* Loading para imágenes */
.noticia img {
    background: #f0f0f0;
    min-height: 200px;
}

/* Animación suave para el lightbox */
.lightbox {
    transition: opacity 0.3s ease;
}

/* Responsive mejorado */
@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .contenedor {
        padding: 1rem;
    }
    
    .cerrar {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
}

/* ==============================
   ESTILOS PARA CONTENIDO DINÁMICO
============================== */
.noticia-info {
    padding: 15px;
}

.noticia-info h3 {
    color: #34526a;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.noticia-descripcion {
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.noticia-fecha {
    color: #888;
    font-style: italic;
}

.sin-contenido, .error-carga {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 10px 0;
}

.sin-contenido p, .error-carga p {
    margin: 0;
    font-size: 1.1rem;
}

/* Mejoras para el lightbox */
.cerrar {
    cursor: pointer;
    transition: color 0.3s;
}

.cerrar:hover {
    color: #ff6b6b;
}