/* TAMSIC — gallery.css  (extracted from base.css; tokens defined in base.css) */
/* ---------- GALLERY (v2 grid) ---------- */
/* True masonry via CSS multi-column — consistent column widths, natural
   image heights, no row-span gaps or broken columns at any breakpoint. */
.gallery-grid {
  column-count: 3;
  column-gap: 14px;
}
@media (min-width: 1400px) {
  .gallery-grid {
    column-count: 4;
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  cursor: pointer;
  display: block;
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: grayscale(0.3);
  transition:
    transform 0.8s var(--ease),
    filter 0.5s var(--ease);
  border-radius: inherit;
}
.gallery-item:hover img {
  transform: scale(1.05);
  filter: grayscale(0);
}
.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 5, 0.95));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sm);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.gallery-item:hover .overlay {
  opacity: 1;
}
.gallery-item .overlay h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.gallery-item .overlay span {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--crimson-text);
}

/* Legacy span classes are no-ops under column masonry — sizing now comes
   from each image's natural aspect ratio, keeping a uniform visual rhythm. */
.g-wide,
.g-tall,
.g-sq,
.g-md,
.g-sm {
  grid-column: auto;
  grid-row: auto;
}
@media (max-width: 992px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    column-count: 1;
  }
}


/* ---------- GALLERY (extended) ---------- */
.gallery-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  justify-content: center;
}
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}
.gallery-item-overlay span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.gallery-item.hidden {
  display: none;
}
.gallery-load-more-wrap {
  text-align: center;
  margin-top: 40px;
}
@media (max-width: 768px) {
  .gallery-filter-bar {
    gap: 8px;
  }
}
