#gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  max-width: 100%;
  padding: 0;
}
  
.gallery-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 Aspect Ratio */
  overflow: hidden;
  cursor: pointer;
  background: #eee;
}
  
.gallery-item img, .gallery-item video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
  
.gallery-item:hover img, .gallery-item:hover video {
  transform: scale(1.05);
}
  
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  padding: 2rem;
}
  
#lightbox .content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
  
#lightbox img, #lightbox video {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
  
#lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* Instagram-like adjustments */
@media (max-width: 768px) {
  #gallery-grid {
    gap: 1px; /* Smaller gap on mobile */
  }
  
  .section {
    padding: 0.5rem !important; /* Override section padding on mobile */
  }
  
  #gallery-section {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    width: calc(100% + 1rem);
  }
  
  #gallery-section h2 {
    padding-left: 0.5rem;
    margin-bottom: 0.5rem;
  }
}