/* Public Homeowner Project Gallery — LMS Home Improvements.
   Brand kit only: #111B45 #843333 #D3DCE7 #1A1919 #FFFFFF. No Agent Hub chrome. */
:root {
  --navy: #111B45;
  --bg: #0A1029;
  --elev: #0D1536;
  --card: #1A244C;
  --border: #3A4568;
  --ice: #D3DCE7;
  --white: #FFFFFF;
  --bur: #843333;
  --black: #1A1919;
  --glow-ice: 0 0 10px rgba(211, 220, 231, 0.32);
  --glow-bur: 0 0 12px rgba(175, 90, 90, 0.45);
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ice);
  font-family: Lato, system-ui, sans-serif;
  line-height: 1.45;
  color-scheme: dark;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--white); }
button { font: inherit; }

.pg-header {
  background: var(--elev);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 14px;
  padding-top: max(16px, env(safe-area-inset-top));
  text-align: center;
}
.pg-logo {
  display: inline-block;
  line-height: 0;
}
.pg-logo img {
  width: auto;
  height: 64px;
  object-fit: contain;
}
.pg-kicker {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ice);
}

.pg-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  text-align: center;
}
.pg-hero h1 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 900;
  line-height: 1.1;
}
.pg-hero p {
  margin: 0;
  font-size: 16px;
  color: var(--ice);
}

.pg-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 1100px;
  margin: 20px auto 8px;
  padding: 0 16px;
}
.pg-filters button {
  appearance: none;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--elev);
  color: var(--ice);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pg-filters button:hover,
.pg-filters button:focus-visible {
  border-color: var(--ice);
  color: var(--white);
  box-shadow: var(--glow-ice);
  outline: none;
}
.pg-filters button[aria-pressed="true"] {
  background: var(--bur);
  border-color: var(--bur);
  color: var(--white);
  box-shadow: var(--glow-bur);
}
.pg-count {
  max-width: 1100px;
  margin: 0 auto 12px;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ice);
}

.pg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
@media (min-width: 640px) {
  .pg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-logo img { height: 72px; }
}
@media (min-width: 960px) {
  .pg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pg-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  width: 100%;
}
.pg-card:hover,
.pg-card:focus-visible {
  border-color: var(--ice);
  box-shadow: var(--glow-ice);
  outline: none;
}
.pg-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--navy);
  overflow: hidden;
}
.pg-thumb img,
.pg-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(132, 51, 51, 0.92);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 22px;
  letter-spacing: 0;
  box-shadow: var(--glow-bur);
  pointer-events: none;
}
.pg-card-body { padding: 14px 16px 16px; }
.pg-tag {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ice);
}
.pg-card-body h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
  color: var(--white);
  line-height: 1.25;
}
.pg-card-body p {
  margin: 0;
  font-size: 14px;
  color: var(--ice);
}

.pg-loading, .pg-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 12px;
  color: var(--ice);
}

.pg-footer {
  background: var(--elev);
  border-top: 1px solid var(--border);
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ice);
  font-size: 14px;
}
.pg-footer strong {
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
}

/* Lightbox */
.pg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 16, 41, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 24px;
  padding-top: max(56px, env(safe-area-inset-top));
}
.pg-lightbox[hidden] { display: none; }
body.pg-lb-open { overflow: hidden; }
.pg-lb-stage {
  margin: 0;
  max-width: min(1100px, 100%);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pg-lb-media {
  background: var(--black);
  border-radius: 12px;
  overflow: hidden;
  max-height: min(72vh, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-lb-media img,
.pg-lb-media video {
  width: 100%;
  height: auto;
  max-height: min(72vh, 820px);
  object-fit: contain;
  background: #000;
}
.pg-lb-stage figcaption { text-align: center; padding: 0 8px 8px; }
.pg-lb-stage h2 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
}
.pg-lb-stage p { margin: 0; color: var(--ice); }
.pg-lb-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ice);
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}
.pg-lb-close:hover, .pg-lb-close:focus-visible {
  box-shadow: var(--glow-ice);
  outline: none;
}
.pg-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--ice);
  background: var(--navy);
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.pg-lb-nav.prev { left: 8px; }
.pg-lb-nav.next { right: 8px; }
.pg-lb-nav:hover, .pg-lb-nav:focus-visible {
  box-shadow: var(--glow-ice);
  outline: none;
}
@media (max-width: 639px) {
  .pg-lb-nav { top: auto; bottom: 16px; transform: none; }
  .pg-lightbox { padding-bottom: 76px; }
}
