/* ══════════════════════════════════════════════════
   Photo gallery page (photo.php)
   .page-hero / .sec-wrap / .sec-inner / .sec-head / .sec-tag-pill /
   .sec-rule / .sec-title / .sec-sub live in the sitewide
   assets/css/style.css. This file only has what's unique to the photo
   grid, filters, and lightbox.
   ══════════════════════════════════════════════════ */

/* FILTER BUTTONS */
.photo-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-btn {
  padding: 9px 20px;
  border-radius: 100px;
  border: 1.5px solid oklch(88% 0.01 90);
  background: white;
  color: var(--text-600);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--green-600); color: var(--green-700); }
.filter-btn.active { background: var(--green-700); border-color: var(--green-700); color: white; }

/* MASONRY-ISH GRID */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  grid-auto-flow: dense;
  gap: 16px;
}
.photo-item.wide { grid-column: span 2; }
.photo-item.tall { grid-row: span 2; }

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  background: var(--warm-gray);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.photo-item:hover img { transform: scale(1.08); }

.photo-overlay {
  position: absolute;
  inset: 0;
  background: oklch(20% 0.05 155 / 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-overlay svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(10% 0.01 0 / 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  background: oklch(100% 0 0 / 0.12);
  border: 1.5px solid oklch(100% 0 0 / 0.25);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover { background: var(--gold-500); border-color: var(--gold-500); }

.lb-close { top: 24px; right: 24px; width: 44px; height: 44px; font-size: 18px; }
.lb-prev,
.lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 28px; }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .photo-item.wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 10px; }
  .photo-item.wide { grid-column: span 2; }
  .photo-item.tall { grid-row: span 1; }
  .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 22px; }
  .lb-close { width: 36px; height: 36px; font-size: 15px; top: 14px; right: 14px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}
