/**
 * GlamStudio Portfolio Gallery — filters + masonry + lightbox
 */

.gs-port-gallery {
  width: 100%;
}

.gs-port-gallery__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.gs-port-gallery__filter {
  appearance: none;
  cursor: pointer;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--nude, #e8d9c8);
  background: var(--ivory, #faf7f2);
  color: var(--charcoal, #2c2c2c);
  font-family: inherit;
  line-height: 1.4;
}

.gs-port-gallery__filter:hover {
  border-color: var(--rose-gold, #b76e79);
  color: var(--rose-gold, #b76e79);
}

.gs-port-gallery__filter.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--rose-gold, #b76e79), var(--gold, #c9a227));
  color: var(--ivory, #faf7f2);
  box-shadow: var(--shadow-luxe, 0 30px 60px -20px rgba(183, 110, 121, 0.25));
}

.gs-port-gallery__masonry {
  columns: 2;
  column-gap: 1rem;
  column-fill: balance;
}

@media (min-width: 768px) {
  .gs-port-gallery__masonry {
    columns: 3;
  }
}

@media (min-width: 1024px) {
  .gs-port-gallery__masonry {
    columns: 4;
  }
}

.gs-port-gallery__item {
  break-inside: avoid;
  margin-bottom: 1rem;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.gs-port-gallery__item.is-hidden {
  display: none;
}

.gs-port-gallery__item.is-revealing {
  animation: gsPortReveal 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--gs-delay, 0ms);
}

@keyframes gsPortReveal {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gs-port-gallery__card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  border-radius: 1rem;
  font: inherit;
  color: inherit;
}

.gs-port-gallery__img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 1.4s ease;
}

.gs-port-gallery__card:hover .gs-port-gallery__img {
  transform: scale(1.1);
}

.gs-port-gallery__shade {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background-color 0.5s ease;
  pointer-events: none;
}

.gs-port-gallery__card:hover .gs-port-gallery__shade {
  background: rgba(44, 44, 44, 0.5);
}

.gs-port-gallery__zoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.gs-port-gallery__card:hover .gs-port-gallery__zoom {
  opacity: 1;
}

.gs-port-gallery__zoom-btn {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(250, 247, 242, 0.95);
  color: var(--rose-gold, #b76e79);
  box-shadow: var(--shadow-luxe, 0 30px 60px -20px rgba(183, 110, 121, 0.25));
}

.gs-port-gallery__zoom-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.gs-port-gallery__badge {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  border-radius: 9999px;
  background: rgba(250, 247, 242, 0.9);
  padding: 0.15rem 0.65rem;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose-gold, #b76e79);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gs-port-gallery__card:hover .gs-port-gallery__badge {
  opacity: 1;
}

.gs-port-gallery__empty {
  column-span: all;
  text-align: center;
  color: var(--muted-foreground, #6b5e55);
  padding: 2rem;
}

/* Lightbox */
.gs-port-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(44, 44, 44, 0.88);
  padding: 1.5rem;
}

.gs-port-lb.is-open {
  display: flex;
}

.gs-port-lb[hidden] {
  display: none !important;
}

.gs-port-lb.is-open[hidden] {
  display: flex !important;
}

.gs-port-lb__img {
  max-width: min(92vw, 960px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: var(--shadow-luxe, 0 30px 60px -20px rgba(183, 110, 121, 0.25));
}

.gs-port-lb__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.95);
  color: var(--charcoal, #2c2c2c);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
