/* ===============================
   NOTICIAS
================================ */

.news-section {
  padding: 3rem 1rem;
  padding-bottom: 0;
  max-width: 1200px;
  margin: auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  justify-items: center;
}

.news-grid:has(.news-card:nth-child(1):last-child) {
  grid-template-columns: 1fr;
}

.news-grid:has(.news-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.news-card {
  height: 280px;               /* ALTURA PREDEFINIDA */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  cursor: pointer;
  background: #fff;
  aspect-ratio: 4 / 5;
  
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* No recorta texto */
  transition: transform .3s;
  aspect-ratio: 4 / 5;
}

.news-card:hover img {
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, 2fr);
  }
}

@media (max-width: 600px) {
  .news-grid {
    grid-template-columns: repeat(2, 2fr);
  }

  .news-card {
    height: auto; /* Más grande en móvil */
  }

  .news-card img {
    height: auto;
  }
}

/* -------- MODAL -------- */

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 12px;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
