/* =========================
   Gallery Section
   ========================= */

.gallery-section {
  padding: 80px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

/* =========================
   Card
   ========================= */

.gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-white);
  background-color: var(--color-dark);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;

  /* GPU-safe animation */
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s ease;
  will-change: transform;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.25)
  );
  opacity: 0.9;
  transition: opacity 0.35s ease;
}

.gallery-card span {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 2;

  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-align: center;
  white-space: nowrap;
}


.gallery-card:hover img {
  transform: translate3d(0, -4px, 0) scale(1.03);
}

.gallery-card:hover::after {
  opacity: 1;
}

.gallery-card:hover span {
  color: var(--color-primary);
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
