/* אופטימיזציות ביצועים לגלריה */

/* שיפור GPU rendering */
.gallery-card {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  contain: content;
}

/* שיפור טעינת תמונות */
.gallery-card img {
  opacity: 1; /* Changed from 0 to 1 to show images immediately */
  transition: opacity 0.3s ease-out;
  transform: translateZ(0);
  will-change: opacity;
  contain: strict;
}

.gallery-card img.loaded {
  opacity: 1;
}

/* Placeholder עם אנימציה חלקה */
.image-placeholder {
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

.placeholder {
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  position: absolute;
  top: 0;
  left: 0;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* אופטימיזציית גריד */
.projects-grid {
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}

/* אנימציות חלקות */
.gallery-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* מניעת קפיצות בעת טעינה */
.gallery-grid {
  min-height: 100vh;
  grid-template-rows: auto;
  gap: 1rem;
  contain: layout style;
}