/* The penguin gallery: one plain window holding the grid, a picture or an artist's pictures */
.gallery-page {
  max-width: 1000px;
  margin: auto;
  padding: 30px 16px 50px;
}

.gallery-title {
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  margin: 10px 0 20px;
  text-align: center;
}

.gallery-divider {
  border-top: 3px solid #5468E6;
  width: 40%;
  margin: 0 auto 40px;
}

/* The window */
.gw {
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.gw-bar {
  padding: 8px 16px;
  background: #f4f4f4;
  border-bottom: 1px solid #d4d4d4;
  font-size: 14px;
  color: #555;
}

.gw-body {
  padding: 24px;
}

.gw-back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 15px;
  color: #3D51D5;
  text-decoration: none;
}

.gw-back:hover {
  text-decoration: underline;
}

/* Grid of thumbnails */
.gw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.gw-tile {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.gw-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #e4e4e4;
}

.gw-tile:hover img {
  border-color: #999;
}

.gw-tile-title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.gw-tile-by {
  font-size: 13px;
  color: #7A7A7A;
  line-height: 1.4;
}

/* One picture, with its title and artist beside it */
.gw-piece {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.gw-piece > a {
  flex: 0 1 auto;
  min-width: 0;
}

.gw-piece img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
}

.gw-info {
  flex: 1 0 200px;
}

.gw-info h3,
.gw-artist-head h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.gw-artist a,
.gw-artist-head a {
  color: #3D51D5;
  text-decoration: none;
}

.gw-artist a:hover,
.gw-artist-head a:hover {
  text-decoration: underline;
}

/* An artist's pictures */
.gw-artist-head {
  margin-bottom: 20px;
}

/* Artist list under the window */
.gallery-credits {
  margin-top: 40px;
}

.gallery-credits h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.gallery-credits ul {
  list-style: none;
}

.gallery-credits li {
  font-size: 16px;
  line-height: 1.8;
}

.gallery-credits a {
  color: #3D51D5;
  text-decoration: none;
}

.gallery-credits a:hover {
  text-decoration: underline;
}

.gallery-credits span {
  font-size: 14px;
  color: #7A7A7A;
  margin-left: 6px;
}

@media screen and (max-width: 767px) {
  .gallery-title {
    font-size: 34px;
  }

  .gw-body {
    padding: 16px;
  }

  .gw-piece {
    flex-direction: column;
    gap: 16px;
  }

  .gw-info {
    flex: none;
  }

  .gw-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
