
/* ---- Filter bar ---- */
.gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.gallery-filter-chip {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 10px 22px;
  border-radius: 50px;
  border: 1px solid var(--at-neutral-100, #dfdfdf);
  background: transparent;
  color: var(--at-neutral-900, #1d1d1d);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.gallery-filter-chip:hover {
  border-color: var(--at-theme-primary, #f0460e);
  transform: translateY(-1px);
}
.gallery-filter-chip:focus-visible {
  outline: 2px solid var(--at-theme-primary, #f0460e);
  outline-offset: 2px;
}
.gallery-filter-chip.is-active {
  background: var(--at-theme-primary, #f0460e);
  border-color: var(--at-theme-primary, #f0460e);
  color: #fefefe;
}

/* ---- Isotope-positioned grid — each .gallery-tile is absolutely placed
   by Isotope (assets/js/gallery-masonry.js), which animates the left/top
   move whenever a filter change reshuffles the layout. That reposition
   animation, not just a fade, is what reads as "smooth" on filter. Gutter
   is inner padding on the tile itself (box-sizing: border-box) since
   Isotope percentPosition needs each item's own width to be the full
   column percentage. ---- */
.gallery-masonry {
  position: relative;
}
.gallery-tile {
  position: absolute;
  display: block;
  width: 25%;
  padding: 12px;
  box-sizing: border-box;
}
@media (max-width: 1199.98px) {
  .gallery-tile {
    width: 33.3333%;
  }
}
@media (max-width: 767.98px) {
  .gallery-tile {
    width: 50%;
    padding: 8px;
  }
}
@media (max-width: 479.98px) {
  .gallery-tile {
    width: 100%;
  }
}

.gallery-tile__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--at-neutral-100, #dfdfdf);
  background: var(--at-neutral-50, #f2f2f2);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.gallery-tile:hover .gallery-tile__frame,
.gallery-tile:focus-visible .gallery-tile__frame {
  box-shadow: 0 0 0 1px rgba(240, 70, 14, 0.4), 0 20px 40px -20px rgba(15, 15, 15, 0.35);
  border-color: rgba(240, 70, 14, 0.4);
}
.gallery-tile:focus-visible {
  outline: 2px solid var(--at-theme-primary, #f0460e);
  outline-offset: 3px;
}
.gallery-tile__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-tile:hover .gallery-tile__frame img {
  transform: scale(1.1);
}
.gallery-tile__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  background: linear-gradient(to top, rgba(15, 15, 15, 0.85) 0%, rgba(15, 15, 15, 0) 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.gallery-tile:hover .gallery-tile__overlay,
.gallery-tile:focus-visible .gallery-tile__overlay {
  opacity: 1;
}
.gallery-tile__caption {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fefefe;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-tile__frame,
  .gallery-tile__frame img,
  .gallery-tile__overlay {
    transition: none;
  }
}
