.gallery-filter {
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: 0.35s;
  font-weight: 600;
  color: var(--primary);
  background: white;
  flex-shrink: 0;
}

.gallery-filter:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.active-filter {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  box-shadow: 0 15px 35px rgba(177, 50, 122, 0.25);
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  transition: 0.45s;
  background: white;
     height:320px;
}


.gallery-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    z-index: 2;
    pointer-events: none;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.6),
        transparent
    );

    animation: shine 1.5s linear infinite;
}

.gallery-card:hover::before {
    animation-play-state: paused;
    opacity: 0; /* Hide the shine on the hovered card */
}

@keyframes shine {
    from {
        left: -150%;
    }
    to {
        left: 180%;
    }
}.gallery-card:hover {
  transform: translateY(-8px);
  /* box-shadow: 0 25px 55px rgba(0, 0, 0, .18); */
  box-shadow: 0 20px 50px rgba(177, 50, 122, 0.25);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: 0.7s ease;
}



.gallery-card:hover .gallery-image {
  transform: scale(1.08);
}

@media (max-width: 1024px) {
  .gallery-image {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .gallery-image {
    height: 240px;
  }
}

@media (max-width: 480px) {
  .gallery-image {
    height: 220px;
  }
}

.gallery-item.show {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    180deg,
    rgba(177, 50, 122, 0.05),
    rgba(109, 27, 71, 0.75)
  );
  opacity: 0;
  transition: 0.45s;
  backdrop-filter: blur(3px);
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-open {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  transition: 0.35s;
}

.gallery-open:hover {
  transform: scale(1.12) rotate(12deg);
}

.gallery-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-top: 18px;
  color: var(--primary);
  transition: 0.35s;
}

.gallery-card:hover + .gallery-title {
  color: var(--primary);
  transform: translateY(-3px);
}

.gallery-item {
  opacity: 0;
  /*transform: translateY(60px);*/
  /*transition:*/
  /*  opacity 0.45s ease,*/
  /*  transform 0.45s ease,*/
  /*  filter 0.45s ease;*/
  transform:none;
}

.gallery-item.show {
  opacity: 1;
  transform: none;
}

body.lightbox-open {
  overflow: hidden;
}

#lightbox.show {
  display: block;
}

#lightboxImage {
  transition:
    opacity 0.35s,
    transform 0.45s;
}

#lightboxImage.show {
  opacity: 1;
  transform: scale(1);
}

#lightboxImage {
  opacity: 0;
  transform: scale(0.92);
}

#lightboxBackdrop.show {
  opacity: 1;
}

#thumbnailContainer {
  scroll-behavior: smooth;
}

.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.45;
  transition: 0.35s;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  opacity: 1;
  border-color: white;
  transform: translateY(-4px);
}

.gallery-thumb:hover {
  opacity: 1;
}

/* Skeleton Loading */
.gallery-card.loading {
  position: relative;
  min-height: 320px;
  background: #f5f5f5;
  overflow: hidden;
}

.gallery-card.loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  animation: skeleton 1.2s infinite;
}

@keyframes skeleton {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

/* image zoom in and zoom out effect */
.zoomed {
  transform: scale(1.8) !important;
  cursor: zoom-out;
}

#imageCounter {
  transition: 0.3s;
}

.counter-animation {
  transform: scale(1.15);
}

@media (max-width: 768px) {
  #prevImage,
  #nextImage {
    bottom: 130px;
    top: auto;
    transform: none;
  }

  #prevImage {
    left: 25%;
  }

  #nextImage {
    right: 25%;
  }
}

.lightbox-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: white;
  font-size: 32px;

  background: linear-gradient(135deg, var(--primary), var(--primary-light));

  box-shadow: 0 12px 30px rgba(177, 50, 122, 0.35);

  transition: all 0.3s ease;
}

.lightbox-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 18px 40px rgba(177, 50, 122, 0.5);
}
