.gallery-showcase {
  width: 100%;
  
}

.gallery-collection {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem 1rem;
  padding: 1rem;
  justify-content: center;
}
  
.gallery-card {
  position: relative;
  flex: 1 1 350px;
  max-width: 350px;
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  background: #FFF;
  align-items: center;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;

}

.gallery-card span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 4rem 0 .5rem 0;

  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.85) 0%,  /* strong at bottom */
    rgba(255, 255, 255, 0.5) 50%,  /* fade */
    rgba(255, 255, 255, 0) 100%    /* transparent at top */
  );
}

.gallery-card:hover {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.35), 0 3px 10px 0 rgba(0, 0, 0, 0.3);
  transform: translate3d(0, 2px, 0);
}

.gallery-card:focus {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.35), 0 3px 10px 0 rgba(0, 0, 0, 0.3);
}

/* Responsive breakpoints for 1 → 2 → 3 → 4 cards per row */
@media (max-width: 1200px) {
  .gallery-card {
    flex: 1 1 300px;
  }
}

@media (max-width: 992px) {
  .gallery-card {
    flex: 1 1 250px;
  }
}

@media (max-width: 768px) {
  .gallery-card {
    flex: 1 1 200px;
  }
}

@media (max-width: 480px) {
  .gallery-collection {
    padding: 0.5rem; /* reduce container padding */
  }

  .gallery-card {
    flex: 0 0 100%; /* force single card per row */
    max-width: 100%;
  }
}

/* 

MODAL STYLES 

*/

#card-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#card-modal.hidden {
  display: none;
}

.card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.card-modal-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

#card-modal-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.card-modal-close,
.card-modal-prev,
.card-modal-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 3;
}

.card-modal-close { top: 1rem; right: 1rem; }
.card-modal-prev { left: 1rem; }
.card-modal-next { right: 1rem; }

.card-modal-close:hover,
.card-modal-prev:hover,
.card-modal-next:hover {
  background: rgba(255, 255, 255, 0.8);
}

  