/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Jan 13 2026 | 13:04:30 */
/* Base */
.project-gallery {
  --gap: 5px;
}

/* Common styles for images */
.project-gallery .gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Full mode: one image per row, original width constrained to container */
.project-gallery .gallery-container.mode-full {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--gap);
}

/* Masonry mode: CSS columns */
.project-gallery .gallery-container.mode-masonry {
  column-gap: var(--gap);
  column-count: 2;
}
@media (min-width: 300px) {
  .project-gallery .gallery-container.mode-masonry { column-count: 2; }
}
@media (min-width: 765px) {
  .project-gallery .gallery-container.mode-masonry { column-count: 3; }
}

/* Prevent breaking inside columns */
.project-gallery .gallery-container.mode-masonry .gallery-item {
  break-inside: avoid;
}

/* Optional: smooth fade-in for images */
.project-gallery .gallery-item img {
  opacity: 0;
  transition: opacity .2s ease-out;
}
.project-gallery .gallery-item img.loaded {
  opacity: 1;
}

/* Make gallery items clickable in masonry mode */
.project-gallery .gallery-container.mode-masonry .gallery-item {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.project-gallery .gallery-container.mode-masonry .gallery-item:hover img.loaded {
  opacity: 0.85;
}

/* ========== Gallery Popup Styles ========== */
.gallery-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-popup.active {
  opacity: 1;
  visibility: visible;
}

.gallery-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.gallery-popup-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}

.gallery-popup-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.gallery-popup.active .gallery-popup-image {
  transform: scale(1);
}

.gallery-popup-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.gallery-popup-close:hover {
  opacity: 1;
}