/* Gallery styles */

.gallery {
  --radius: 14px;
  --ring: 0 10px 28px rgba(0,0,0,.12);
  --badge-bg: rgba(0,0,0,.65);
  --badge-fg: #fff;
}

.gallery .tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--ring);
  transition: transform .25s ease, box-shadow .25s ease;
  background: #fff;
}

.gallery .tile a {
  display: block;
  position: relative;
  aspect-ratio: 1/1;
}

.gallery .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .35s ease;
}

/* Readability gradient (bottom) */

.gallery .tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 45%);
  opacity: .75;
  pointer-events: none;
}

/* Name badge (top-left) */

.gallery .badge-name {
  position: absolute;
  top: .6rem;
  left: .6rem;
  z-index: 2;
  background: var(--badge-bg);
  color: var(--badge-fg);
  padding: .38rem .65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .02em;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  backdrop-filter: saturate(120%) blur(2px);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
}

/* Hover polish */

.gallery .tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,.16);
}

.gallery .tile:hover img {
  transform: scale(1.03);
  filter: contrast(1.05) saturate(1.05);
}

/* Optional: subtle “View” hint on hover (bottom-right) */

.gallery .cta {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  z-index: 2;
  background: rgba(255,255,255,.92);
  color: #111;
  font-weight: 600;
  font-size: .85rem;
  padding: .35rem .6rem;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}

.gallery .tile:hover .cta {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */

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

@media (prefers-reduced-motion: reduce) {
  .gallery .tile:hover img {
    transform: none;
  }
}

