/* Clay Warren | WDV101 assignments 11-2 and 12-1 | November 11, 2026 */
/* Flex items wrap into as many columns as the available width permits. */
.koala-gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
}
.koala-gallery figure {
  flex: 0 1 250px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.koala-gallery img {
  display: block;
  width: 250px;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0.3rem;
  background-color: white;
  border: 1px solid #9caf96;
}
.koala-gallery figcaption {
  margin: 0.5rem 0 0;
  padding: 0 0.25rem;
  color: #305b46;
  font-weight: bold;
  text-align: center;
  overflow-wrap: anywhere;
}
/* Assignment 12-1: responsive images throughout the gallery page. */
img { max-width: 100%; height: auto; }

/* At 768px and below, use one photo column and the entire viewport width. */
@media (max-width: 768px) {
  body { background-color: #dce8d3; }
  .site-container { width: 100%; max-width: none; margin: 0; }
  .koala-gallery {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
    background-color: #e0ead6;
  }
  /* Reset the desktop flex basis because the main axis is now vertical. */
  .koala-gallery figure { flex: 0 1 auto; width: 100%; max-width: 250px; }
}
