.custom-gallery-section .gallery-item {
  text-align: center;
}

.gallery-item .image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.gallery-item .image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease-in-out;
}

.gallery-item .image-wrapper .overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item .image-wrapper:hover img {
  transform: scale(1.05);
}

.gallery-item .image-wrapper:hover .overlay {
  opacity: 1;
}

.gallery-item .overlay i {
  color: #fff;
  font-size: 24px;
}

.img-title-btn {
  margin-top: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.img-title-btn:hover {
  background-color: #0056b3;
}
.custom-gallery-section .image-wrapper {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.custom-gallery-section .image-wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease-in-out;
  border: 3px solid #ccc;
}


.custom-gallery-section .image-wrapper:hover img {
  transform: scale(1.05);
}



.custom-gallery-section .overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.custom-gallery-section .image-wrapper:hover .overlay {
  opacity: 1;
}

.custom-gallery-section .overlay i {
  color: #fff;
  font-size: 24px;
}

.custom-gallery-section .image-title {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  padding: 0 10px;
}

/* Responsive fallback for small screens */
@media (max-width: 767px) {
  .custom-gallery-section .image-title {
    white-space: normal;
  }
}
.image-wrapper[data-title] {
  position: relative;
  cursor: pointer;
}
/* Tooltip styles */
.image-wrapper[data-title]::after {
  content: attr(data-title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 10;
}


.image-wrapper[data-title]::before {
  content: '';
  position: absolute;
  bottom: 104%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 9;
}

.image-wrapper:hover::after,
.image-wrapper:hover::before {
  opacity: 1;
}
