/* ---------- Gallery Grid ---------- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 250px; /* same height for all */
  object-fit: cover; /* keeps proportion */
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ---------- Modal ---------- */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1050; /* just below navbar if navbar has 1060+ */
  left: 0;
  top: 70px; /* start below navbar (adjust if navbar taller) */
  width: 100%;
  height: calc(100% - 70px); /* avoid covering navbar */
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  display: block;
  margin: auto;
  margin-top: 30px;
  object-fit: cover;
  max-width: 50%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
  animation: zoomIn 0.3s ease;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.close-btn:hover {
  color: #ff5555;
}

/* Animations */
@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .gallery-item img {
    height: 200px;
  }
  .modal-content {
    max-width: 90%;
    max-height: 75%;
  }
}