/* ─── GALLERY PAGE ─── */

footer { border-top: 1px solid var(--border-light); }

/* ─── HEADER ─── */
.header {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 44px 20px 32px;
  opacity: 0; animation: fadeUp 0.55s ease forwards 0.05s;
}
.header-top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.header-title {
  font-family: 'Lora', serif;
  font-size: 30px; font-weight: 400;
  color: var(--text-primary); line-height: 1.2;
}
.header-title em { font-style: italic; color: var(--accent); }
.header-sub { font-size: 13px; color: var(--text-hint); margin-top: 6px; letter-spacing: 0.01em; }
.header-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  background: var(--text-primary); color: var(--bg);
  border: none; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  font-family: 'Inter', sans-serif; cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap; flex-shrink: 0;
}
.header-cta:hover { background: #3d3632; transform: translateY(-1px); }

/* ─── MASONRY GRID ─── */
.gallery-wrap {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 0 20px 80px;
}
.masonry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.masonry-item { opacity: 0; animation: fadeIn 0.5s ease forwards; }
.masonry-item:nth-child(1)  { animation-delay: 0.08s; }
.masonry-item:nth-child(2)  { animation-delay: 0.13s; }
.masonry-item:nth-child(3)  { animation-delay: 0.18s; }
.masonry-item:nth-child(4)  { animation-delay: 0.23s; }
.masonry-item:nth-child(5)  { animation-delay: 0.28s; }
.masonry-item:nth-child(6)  { animation-delay: 0.33s; }
.masonry-item:nth-child(7)  { animation-delay: 0.38s; }
.masonry-item:nth-child(8)  { animation-delay: 0.43s; }
.masonry-item:nth-child(9)  { animation-delay: 0.48s; }
.masonry-item:nth-child(10) { animation-delay: 0.53s; }
.masonry-item:nth-child(11) { animation-delay: 0.58s; }
.masonry-item:nth-child(12) { animation-delay: 0.63s; }
.masonry-item:nth-child(n+13) { animation-delay: 0.1s; }

.card {
  background: var(--bg-card); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(44,40,37,0.05);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: block; text-decoration: none; color: inherit;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(44,40,37,0.11); }
.card:hover .card-overlay { opacity: 1; }
.card-art { width: 100%; display: block; position: relative; overflow: hidden; }
.card-art svg { width: 100%; height: auto; display: block; }
.card-art img { width: 100%; height: auto; display: block; }
.card-overlay {
  position: absolute; inset: 0;
  background: rgba(44,40,37,0.03);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.card-body { padding: 11px 13px 13px; }
.card-caption {
  font-family: 'Lora', serif; font-style: italic;
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.card-time { font-size: 11px; color: var(--text-hint); }
.card-dot { width: 2px; height: 2px; border-radius: 50%; background: var(--accent-light); }
.card-tag {
  font-size: 10.5px; color: var(--accent);
  background: var(--accent-lighter); border: 1px solid var(--accent-light);
  border-radius: 10px; padding: 1px 7px;
}

/* ─── LOAD MORE ─── */
.load-more-wrap {
  position: relative; z-index: 1;
  text-align: center; padding: 0 20px 64px;
  opacity: 0; animation: fadeUp 0.5s ease forwards 0.7s;
}
.load-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 28px; background: transparent;
  border: 1.5px solid var(--border); border-radius: 24px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.1s;
}
.load-more-btn:hover {
  border-color: var(--accent-light); color: var(--accent);
  background: var(--accent-lighter); transform: translateY(-1px);
}
.load-more-btn.loading { opacity: 0.5; pointer-events: none; }
.load-more-sub { font-size: 11px; color: var(--text-hint); margin-top: 10px; }

/* ─── LIGHTBOX ─── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(28,24,22,0.88); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 20px;
  animation: fadeInFast 0.2s ease;
}
.lightbox.active { display: flex; }
@keyframes fadeInFast { from { opacity: 0; } to { opacity: 1; } }
.lightbox-inner {
  display: flex; gap: 24px; align-items: flex-start;
  max-width: 820px; width: 100%;
  animation: scaleIn 0.25s cubic-bezier(0.22,1,0.36,1);
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-art {
  flex-shrink: 0; width: 340px;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.lightbox-art svg { width: 100%; height: auto; display: block; }
.lightbox-info { flex: 1; padding-top: 8px; }
.lightbox-caption {
  font-family: 'Lora', serif; font-style: italic;
  font-size: 19px; color: rgba(250,248,245,0.92); line-height: 1.45; margin-bottom: 14px;
}
.lightbox-peek {
  font-size: 13.5px; color: rgba(176,166,154,0.85); line-height: 1.75;
  margin-bottom: 24px; position: relative; overflow: hidden; max-height: 120px;
}
.lightbox-peek::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(28,24,22,0.88));
}
.lightbox-actions { display: flex; flex-direction: column; gap: 10px; }
.lightbox-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; background: var(--bg); color: var(--text-primary);
  border: none; border-radius: 20px;
  font-size: 13.5px; font-weight: 500; font-family: 'Inter', sans-serif;
  cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.lightbox-btn-primary:hover { background: #f0ebe5; }
.lightbox-btn-secondary {
  display: flex; align-items: center; justify-content: center;
  padding: 11px 24px; background: transparent;
  color: rgba(176,166,154,0.8);
  border: 1px solid rgba(176,166,154,0.25);
  border-radius: 20px; font-size: 13px;
  font-family: 'Inter', sans-serif; cursor: pointer; text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.lightbox-btn-secondary:hover { border-color: rgba(176,166,154,0.5); color: rgba(250,248,245,0.7); }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08); border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
  color: rgba(250,248,245,0.7);
}
.lightbox-close:hover { background: rgba(255,255,255,0.15); }
.lightbox-close svg { width: 16px; height: 16px; }

/* ─── MOBILE ─── */
@media (max-width: 700px) {
  .header { padding: 32px 16px 24px; }
  .header-top { flex-direction: column; align-items: flex-start; }
  .gallery-wrap { padding: 0 16px 60px; }
  .masonry { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lightbox-inner { flex-direction: column; gap: 16px; }
  .lightbox-art { width: 100%; max-width: 320px; margin: 0 auto; }
  footer { flex-direction: column; gap: 12px; align-items: flex-start; }
  .nav-link { display: none; }
}
