/* ===========================
   gallery.css - Fully Integrated
   =========================== */

/* ---------- Body & Layout ---------- */
body {
  margin: 0;
  background: #fff;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main takes all available space but grows with content */
main {
  flex: 1 0 auto;
  padding: 2px; /* small padding around gallery */
}

/* ---------- Gallery Masonry ---------- */
#gallery {
  column-count: 4;
  column-gap: 4px;
}

.gallery-item {
  width: 100%;
  display: block;
  margin-bottom: 4px;
  break-inside: avoid;

  /* Fade-in effect */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer (matches homepage) ---------- */
.site-footer {
  flex-shrink: 0;        /* prevents footer from disappearing */
  width: 100%;
  text-align: center;
  font-size: 0.4rem;
  padding: 16px 10px;
  opacity: 0.7;
  background: #fff;       /* matches gallery background */
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}

.site-footer a:hover {
  opacity: 1;
}

/* ---------- Mobile Responsiveness ---------- */
@media (max-width: 1024px) {
  #gallery { column-count: 3; }
}

@media (max-width: 768px) {
  #gallery { column-count: 2; }
}

@media (max-width: 480px) {
  #gallery { column-count: 1; }
  .site-footer {
    font-size: 0.35rem;
    padding: 12px 8px;
  }
}