.news-list {
  max-width: 800px;
  margin: auto;
}
.news-item {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden; /* <-- added to include floated image */
}
.news-header h2 {
  margin: 0.5em 0em 0.5em 0em;
}
.news-date {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 0.9em;
  color: gray;
}
.main-image {
  max-height: 100px;
  float: left;
  margin: 10px 15px 10px 0;
  cursor: pointer;
}

.image-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.image-grid img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
  object-fit: cover;
}

.pagination {
  text-align: center;
  margin: 20px 0;
}
.pagination a {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
}
.pagination a.active {
  background: #0073e6;
  color: white;
  font-weight: bold;
  border-color: #0073e6;
}
.pagination a:hover {
  background: #f0f0f0;
}

/* Lightbox styling */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}
.lightbox-content {
    max-height: 90vh;
    max-width: 90%;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

@media (max-width: 768px) {
    .news-list {
        padding: 1rem;
    }
}
