/* Shared project-detail gallery grid — identical 4:3 frames across all project pages */
#section-gallery .project-gallery-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:1.25rem;
  margin:0;
  padding:0;
  list-style:none;
}
@media (max-width:991.98px){
  #section-gallery .project-gallery-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:1rem;
  }
}
@media (max-width:479.98px){
  #section-gallery .project-gallery-grid{
    grid-template-columns:minmax(0, 1fr);
    gap:.875rem;
  }
}

#section-gallery .project-gallery-card{
  display:block;
  text-decoration:none !important;
  color:inherit;
  height:100%;
}
#section-gallery .project-gallery-frame{
  position:relative;
  width:100%;
  aspect-ratio:4 / 3;
  overflow:hidden;
  border-radius:10px;
  background:#111;
  box-shadow:0 12px 28px rgba(23,37,30,.1);
  transition:transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease;
}
#section-gallery .project-gallery-card:hover .project-gallery-frame{
  transform:translateY(-4px);
  box-shadow:0 18px 36px rgba(23,37,30,.16);
}
#section-gallery .project-gallery-img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  transition:transform .55s cubic-bezier(.22,1,.36,1);
}
#section-gallery .project-gallery-card:hover .project-gallery-img{
  transform:scale(1.06);
}
#section-gallery .project-gallery-shade{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  transition:opacity .35s ease;
  pointer-events:none;
  z-index:2;
}
#section-gallery .project-gallery-card:hover .project-gallery-shade{
  opacity:1;
}
#section-gallery .project-gallery-view{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:600;
  letter-spacing:.04em;
  opacity:0;
  transition:opacity .35s ease;
  z-index:3;
  pointer-events:none;
}
#section-gallery .project-gallery-card:hover .project-gallery-view{
  opacity:1;
}
#section-gallery .project-gallery-caption{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:3;
  padding:0 14px 14px;
  text-align:center;
  transition:opacity .35s ease;
}
#section-gallery .project-gallery-caption h4{
  margin:0;
  color:#fff !important;
  font-size:clamp(.95rem, 1.4vw, 1.15rem);
  text-shadow:0 1px 10px rgba(0,0,0,.45);
}
#section-gallery .project-gallery-card:hover .project-gallery-caption{
  opacity:0;
}
#section-gallery .project-gallery-grad{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:45%;
  background:linear-gradient(180deg, transparent, rgba(0,0,0,.55));
  z-index:1;
  pointer-events:none;
}
@media (prefers-reduced-motion:reduce){
  #section-gallery .project-gallery-frame,
  #section-gallery .project-gallery-img,
  #section-gallery .project-gallery-shade,
  #section-gallery .project-gallery-view,
  #section-gallery .project-gallery-caption{
    transition:none !important;
  }
  #section-gallery .project-gallery-card:hover .project-gallery-frame,
  #section-gallery .project-gallery-card:hover .project-gallery-img{
    transform:none !important;
  }
}
