.portfolio-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
}

.gallery-item {
  position: relative;
  width: calc(25% - 15px);
  border: 1px solid #1d2c6f;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(29, 44, 111, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .image-overlay {
  opacity: 1;
}

.overlay-icon {
  color: #fff;
  font-size: 1.8em;
}

.gallery-title {
  text-align: center;
  margin-top: 5px;
  font-size: 0.9em;
  color: #1d2c6f;
}

@media (max-width: 992px) {
  .gallery-item {
    width: calc(33.33% - 15px);
  }
}

@media (max-width: 768px) {
  .gallery-item {
    width: calc(50% - 15px);
  }
}

@media (max-width: 480px) {
  .gallery-item {
    width: 100%;
  }
}