/* =============================================================================
   gallery.css — Photo Gallery page
   ============================================================================= */

.gallery-section { padding: 64px 48px 100px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 6px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: var(--sombra);
}

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

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

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

.gallery-item figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 20px 16px;
  background: linear-gradient(transparent, rgba(20,10,10,0.82));
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}

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

.gallery-cap-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 3px;
}

.gallery-cap-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.65);
}

@media (max-width: 900px) {
  .gallery-section { padding: 40px 16px 64px; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    gap: 4px;
  }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-item figcaption { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }
  .gallery-item--tall { grid-row: span 1; }
}
