/* =========================================
   css/gallery.css — Image grid layouts
   ========================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 8px;
  margin-top: 30px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Caption overlay (used on professional works) */
.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 15px;
  font-size: 0.85em;
  line-height: 1.3;
}

/* Size modifiers */
.gallery-item.tall  { grid-row: span 2; }
.gallery-item.wide  { grid-column: span 2; }
.gallery-item.tall.wide { grid-column: span 2; grid-row: span 2; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 6px;
  }

  .gallery-item.wide       { grid-column: span 2; }
  .gallery-item.mobile-wide { grid-column: span 2; }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-auto-rows: 120px;
    gap: 4px;
  }

  .gallery-item .caption {
    font-size: 0.75em;
    padding: 8px 12px;
  }
}
