/* Shared project-photo formatting for the home page and full gallery. */
.recent-photo-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recent-photo {
  background: #fff;
  border: 1px solid #dbe2e5;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(6, 28, 45, .14);
  height: auto;
  overflow: hidden;
}

.recent-photo img {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.recent-photo figcaption {
  background: rgba(6, 28, 45, .94);
  min-height: 44px;
}

.gallery-grid {
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid figure {
  background: #fff;
  border: 1px solid #dbe2e5;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(6, 28, 45, .11);
  min-height: 0;
  position: static;
}

.gallery-grid img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.gallery-grid figcaption {
  background: #0b2740;
  min-height: 50px;
  padding: 14px 16px;
  position: static;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .recent-photo-grid,
  .gallery-grid {
    gap: 18px;
    grid-template-columns: 1fr;
  }

  .recent-photo,
  .gallery-grid figure,
  .gallery-grid img {
    height: auto;
  }

  .gallery-grid img {
    aspect-ratio: 4 / 3;
  }
}
