.gallery-page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6rem 0 4rem;
}

.gallery-heading {
  margin-bottom: 1.8rem;
}

.gallery-heading h1 {
  margin-bottom: 0.45rem;
  color: var(--text-color);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
}

.gallery-heading p,
.gallery-intro {
  max-width: 720px;
  color: var(--text-secondary-color);
  font-size: 1rem;
  line-height: 1.7;
}

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

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(127, 127, 127, 0.1);
  aspect-ratio: 4 / 3;
}

.gallery-item img,
.viewer-enabled-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.viewer-enabled-image {
  cursor: zoom-in;
}

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

@media (max-width: 580px) {
  .gallery-page {
    width: min(100% - 1.1rem, 1120px);
    padding-top: 5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}
