.ratio-box {
  width: 100%;
  aspect-ratio: 4/3;
  background: #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s cubic-bezier(.4,2,.6,.2), box-shadow 0.4s;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.gallery-img:hover {
  transform: scale(1.07) rotate(-2deg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 2;
}
#lightbox-overlay {
  position: fixed;
  z-index: 1050;
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background 0.3s;
}
#lightbox-overlay.active {
  display: flex;
  background: rgba(0,0,0,0.85);
}
#lightbox-bg {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  cursor: pointer;
}
#lightbox-img {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 8px 64px rgba(0,0,0,0.6);
  background: #fff;
  cursor: pointer;
  z-index: 1;
  transition: transform 0.3s;
}
#lightbox-overlay:not(.active) #lightbox-img {
  transform: scale(0.8);
  opacity: 0;
}
#lightbox-overlay.active #lightbox-img {
  transform: scale(1);
  opacity: 1;
}
