/* ===== GALLERY PAGE ===== */

body { background: var(--bg); color: var(--text); font-family: var(--font); }

/* HERO */
.gal-page-hero {
  padding: 120px 20px 40px;
  text-align: center;
}
.gal-page-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.gal-page-hero p {
  color: var(--text2);
  font-size: 1.05rem;
}

/* FILTERS */
.gal-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 0 20px 28px;
  flex-wrap: wrap;
}
.gal-filter-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 8px 22px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.gal-filter-btn:hover,
.gal-filter-btn.active {
  background: var(--gold);
  color: #0a0905;
  border-color: var(--gold);
}

/* WRAPPER */
.gal-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* MASONRY GRID */
.gal-masonry {
  columns: 4 260px;
  column-gap: 14px;
}

@media (max-width: 900px) { .gal-masonry { columns: 3 200px; } }
@media (max-width: 600px) { .gal-masonry { columns: 2 150px; } }

/* PHOTO CARD */
.gal-card {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--bg2);
  border: 1px solid var(--border);
}
.gal-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gal-card:hover img { transform: scale(1.03); }

/* OVERLAY */
.gal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}
.gal-card:hover .gal-overlay { opacity: 1; }

.gal-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.gal-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}
.gal-user-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #0a0905;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}
.gal-user-name {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gal-caption {
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gal-like-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
}
.gal-like-btn:hover { background: rgba(255,255,255,0.3); }
.gal-like-btn.liked { background: rgba(229,62,62,0.5); border-color: rgba(229,62,62,0.6); }

.gal-source-tag {
  margin-left: auto;
  background: rgba(0,0,0,0.4);
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* EMPTY STATE */
.gal-empty {
  text-align: center;
  padding: 80px 20px;
}
.gal-empty .ge-icon { font-size: 3.5rem; margin-bottom: 16px; }
.gal-empty p { color: var(--text2); font-size: 1.05rem; }
.gal-empty a { color: var(--gold); text-decoration: none; }
.gal-empty a:hover { text-decoration: underline; }

/* LIGHTBOX */
.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-lightbox.hidden { display: none; }

.gl-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.gl-close:hover { background: rgba(255,255,255,0.25); }

.gl-prev, .gl-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.gl-prev:hover, .gl-next:hover { background: rgba(255,255,255,0.25); }
.gl-prev { left: 16px; }
.gl-next { right: 16px; }

.gl-img-wrap {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gl-img-wrap img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.gl-info {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 100px;
  color: #fff;
  font-size: 0.88rem;
  white-space: nowrap;
}
.gl-info .gl-like-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 100px;
  padding: 4px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.gl-info .gl-like-btn:hover { background: rgba(255,255,255,0.3); }
.gl-info .gl-like-btn.liked { background: rgba(229,62,62,0.5); }
