.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.gallery-item {
  padding: 6px;
  opacity: 0;
}

/* Fly-in animation */
@keyframes flyIn {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.fly-in {
  animation: flyIn 0.6s ease-out forwards;
}

.frame-wrapper {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.frame-wrapper:hover {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.frame-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-content img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.3s ease;
}

.frame-wrapper:hover img {
  transform: scale(1.05);
}

.frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/bingkai-artalex.png') no-repeat center center;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }

  .background-frame {
    padding: 120px 10px 30px;
    background-size: cover;
  }

  .title {
    font-size: 2em;
    margin-top: 20px;
    margin-bottom: 10px;
  }
}
