.ts-gallery-v1 {
  padding: 5rem 0;
}

.ts-gallery-v1__header {
  text-align: center;
  margin-bottom: 3rem;
}

.ts-gallery-v1__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.ts-gallery-v1__desc {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0 auto;
  max-width: 600px;
  line-height: 1.7;
}

.ts-gallery-v1__masonry {
  columns: 1;
  column-gap: 1rem;
}

.ts-gallery-v1__item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.ts-gallery-v1__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.ts-gallery-v1__item:hover .ts-gallery-v1__img {
  transform: scale(1.05);
}

.ts-gallery-v1__item--tall .ts-gallery-v1__img {
  aspect-ratio: 3 / 4;
}

.ts-gallery-v1__item:not(.ts-gallery-v1__item--tall) .ts-gallery-v1__img {
  aspect-ratio: 4 / 3;
}

@media (min-width: 640px) {
  .ts-gallery-v1__masonry {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .ts-gallery-v1 {
    padding: 7rem 0;
  }

  .ts-gallery-v1__masonry {
    columns: 3;
    column-gap: 1.5rem;
  }

  .ts-gallery-v1__item {
    margin-bottom: 1.5rem;
  }
}
