@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Playfair+Display:wght@700&display=swap');

/* ── reset ─────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  background: #ffffff;
  color: #2a2a2a;
  font-family: 'DM Sans', sans-serif;
}

/* ── page layout ───────────────────────────────────── */
.page {
  width: 100%;
  min-height: 100vh;
  padding: 0 15px 80px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 576px) {
  .page { max-width: 540px; }
}
@media (min-width: 768px) {
  .page { max-width: 720px; }
}
@media (min-width: 992px) {
  .page { max-width: 960px; }
}
@media (min-width: 1250px) {
  .page { max-width: 1250px; }
}

.subtitle {
  font-size: 0.95rem;
  color: #888888;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* ── grid ──────────────────────────────────────────── */
.grid-container {
  width: 100%;
}

.grid-row {
  display: flex;
}

.photo-cell {
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.grid-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.25s ease, transform 0.25s ease, opacity 0.4s ease;
  display: block;
  opacity: 0;
}

.grid-photo.loaded {
  opacity: 1;
}

.grid-photo:hover {
  filter: brightness(1.12);
  transform: scale(1.008);
  z-index: 2;
  position: relative;
}

/* ── placeholder shimmer ───────────────────────────── */
.photo-placeholder {
  position: absolute;
  inset: 0;
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.55; }
}

/* ── load more button ───────────────────────────────── */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 36px 0 12px;
}

.load-more-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
  background: transparent;
  border: 1.5px solid #d0d0d0;
  border-radius: 24px;
  padding: 10px 32px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.load-more-btn:hover {
  color: #1a1a1a;
  border-color: #999;
  background: #f5f5f5;
}

/* ── lightbox ──────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayIn 0.25s ease;
  backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: fadeIn 0.3s ease;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #fff;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ddd;
  font-size: 2.2rem;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 8px;
  line-height: 1;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox-nav--prev {
  left: 16px;
}

.lightbox-nav--next {
  right: 16px;
}

/* ── keyframes ─────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
