/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.gallery-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 3px;
  background: #f0f0f0;
}

.gallery-grid a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.gallery-grid a:hover img {
  transform: scale(1.03);
}

/* Responsive grid */
@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  cursor: default;
}

.lightbox-img-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 2px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 56px;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.15s;
  padding: 20px 12px;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-prev {
  left: 8px;
}

.lightbox-next {
  right: 8px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 24px;
  color: #aaa;
  font-size: 14px;
  z-index: 10001;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #ccc;
  font-size: 14px;
  text-align: center;
  max-width: 80%;
  z-index: 10001;
  user-select: none;
  -webkit-user-select: none;
}
