/* =========================================================================
   Pearl Island — Filterable Gallery + Social Feed
   Shared stylesheet: category-chip filter + masonry grid + lightbox, and
   the "@handle / Tag Your Photos" social band. Classes prefixed .pgf- /
   .psoc- and scoped under .pi-widget; colors reuse the brand tokens.
   ========================================================================= */
.pi-widget {
  --pgf-muted: var(--hx-body, #5a6372);
  --pgf-sm: 0 4px 14px rgba(30, 36, 48, .06);
}

/* ============================== CHIPS =============================== */
.pgf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 34px;
}
.pgf-chip {
  font-family: var(--hx-sans, 'Nunito', sans-serif);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .03em;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(59, 95, 95, .2);
  background: #fff;
  color: var(--smaragd, #3B5F5F);
  cursor: pointer;
  transition: .2s;
}
.pgf-chip:hover { border-color: var(--petrol, #609AAD); }
.pgf-chip.active {
  background: var(--smaragd, #3B5F5F);
  color: #fff;
  border-color: var(--smaragd, #3B5F5F);
}

/* ============================== MASONRY ============================ */
.pgf-masonry { columns: 4; column-gap: 14px; }
@media (max-width: 1000px) { .pgf-masonry { columns: 3; } }
@media (max-width: 700px) { .pgf-masonry { columns: 2; } }

.pgf-item {
  break-inside: avoid;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  cursor: pointer;
}
.pgf-item.hide { display: none; }
.pgf-item img, .pgf-item .pgf-ph { display: block; width: 100%; }
.pgf-item .pgf-ph { background-size: cover; background-position: center; }

.pgf-item .pgf-ov {
  position: absolute;
  inset: 0;
  background: rgba(59, 95, 95, 0);
  transition: .25s;
}
.pgf-item:hover .pgf-ov { background: rgba(59, 95, 95, .14); }

.pgf-item .pgf-cap {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  font-size: .56rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .92);
  background: rgba(30, 36, 48, .5);
  padding: 3px 7px;
  border-radius: 5px;
  opacity: 0;
  transition: .2s;
  max-width: 86%;
}
.pgf-item:hover .pgf-cap { opacity: 1; }

/* ============================== LIGHTBOX =========================== */
.pgf-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(20, 26, 34, .93);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pgf-lb.open { display: flex; }
.pgf-lb-img {
  width: min(920px, 92vw);
  height: min(600px, 74vh);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  background-size: cover;
  background-position: center;
}
.pgf-lb-cap {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .85);
  font-weight: 700;
  font-size: .86rem;
  padding: 0 24px;
}
.pgf-lb-x { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 2rem; line-height: 1; background: none; border: none; cursor: pointer; }
.pgf-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 2.6rem; background: none; border: none; cursor: pointer; padding: 8px 14px; opacity: .8; }
.pgf-lb-nav:hover { opacity: 1; }
.pgf-lb-prev { left: 8px; }
.pgf-lb-next { right: 8px; }

/* ============================ SOCIAL BAND ========================= */
.pi-widget .psoc {
  background: linear-gradient(180deg, #f2f6f7, #e9f1f1);
  padding: 84px 0;
  border-radius: 24px;
  text-align: center;
}
@media (max-width: 700px) { .pi-widget .psoc { padding: 56px 0; } }

.pi-widget .psoc-embed { max-width: 1080px; margin: 0 auto; }
.pi-widget .psoc-placeholder {
  border: 1.5px dashed rgba(59, 95, 95, .28);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
  color: var(--pgf-muted);
  background: rgba(119, 195, 219, .06);
  max-width: 720px;
  margin: 0 auto;
}
.pi-widget .psoc-placeholder b { color: var(--smaragd, #3B5F5F); }
.pi-widget .psoc-follow { margin-top: 24px; }
