.gallery-collections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-group {
  margin-top: 1.75rem;
}

.gallery-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #3f3f3f;
  padding-bottom: 0.45rem;
  margin-bottom: 0.6rem;
}

.gallery-group-header h2 {
  margin: 0;
}

.gallery-group-header p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
}

.gallery-group-divider {
  border: 0;
  border-top: 1px solid #3f3f3f;
  margin: 2.2rem 0 0.8rem;
}

.collection-card {
  display: block;
  overflow: hidden;
  border: 1px solid #3f3f3f;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.collection-card:hover,
.collection-card:focus {
  border-color: #00ec00;
  transform: translateY(-2px);
}

.collection-card-thumb {
  height: 180px;
  overflow: hidden;
}

.collection-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collection-card-meta {
  padding: 0.6rem 0.25rem 0;
}

.collection-card-meta h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.collection-card-meta p {
  margin: 0.2rem 0 0;
  opacity: 0.75;
  font-size: 0.9rem;
}

.gallery-collection {
  margin-top: 2rem;
}

.gallery-collection-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.gallery-collection-header h2 {
  margin: 0;
}

.gallery-collection-header p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border: 1px solid #3f3f3f;
  border-radius: 8px;
  background: #1f1f1f;
}

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

.gallery-item:hover img,
.gallery-item:focus img {
  transform: scale(1.03);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.gallery-lightbox.is-open {
  display: block;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 13, 0.92);
  border: 0;
  padding: 0;
  margin: 0;
}

.gallery-lightbox__frame {
  position: relative;
  z-index: 1;
  width: min(96vw, 1500px);
  height: min(92vh, 980px);
  margin: 4vh auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3.2rem;
}

.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-lightbox__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 18, 24, 0.6);
  color: #fff;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.gallery-lightbox__nav--prev {
  left: 0.5rem;
}

.gallery-lightbox__nav--next {
  right: 0.5rem;
}

.gallery-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gallery-lightbox-open {
  overflow: hidden;
}

@media (max-width: 684px) {
  .gallery-lightbox__frame {
    padding: 0 2.6rem;
  }

  .gallery-lightbox__close {
    top: 0.2rem;
    right: 0.35rem;
  }

  .gallery-lightbox__nav {
    width: 2.1rem;
    height: 2.1rem;
  }
}
