.galleries {
  column-count: 3;
  column-gap: 20px;
  column-fill: balance;
}

@media (max-width: 768px) {
  .galleries {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .galleries {
    column-count: 1;
  }
}

.galleries-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); */
  transition: all 0.3s ease;
  background: white;
}

.galleries-item:hover {
  transform: translateY(-5px);
  /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); */
}

.galleries-item a {
  display: block;
  position: relative;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 15px;
  overflow: hidden;
}

.galleries-item img {
  width: 100%;
  /* height: auto; */
  display: block;
  border-radius: 15px;
}


/* Search Icon Overlay */
.search-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: white;
  opacity: 0;
  transition: all 0.3s ease;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.galleries-item:hover .search-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Image overlay effect */
.galleries-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: rgba(0, 0, 0, 0.3); */
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 15px;
  z-index: 1;
}

.galleries-item:hover::before {
  opacity: 1;
}

.search-icon {
  z-index: 2;
}

/* Loading animation */
.galleries-item img {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@media(max-width: 1024px) {
  .galleries-item img {
    height: 300px;
    object-fit: cover;
  }
}
