/* Bento Mosaic Grid Styles (Avada-based) */

/* Mobile: single column */
.masonry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
  }
}

/* Desktop: 4 columns - Bento Layout */
@media (min-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
  }
}

/* Image container with size classes */
.masonry-grid .gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

/* Bento size classes (desktop only) */
@media (min-width: 1024px) {
  .masonry-grid .size-1x1 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .masonry-grid .size-2x1 {
    grid-column: span 2;
    grid-row: span 1;
  }

  .masonry-grid .size-1x2 {
    grid-column: span 1;
    grid-row: span 2;
  }

  .masonry-grid .size-2x2 {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.masonry-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}

.masonry-grid img:hover {
  opacity: 0.8;
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: -70px;
}

.lightbox-next {
  right: -70px;
}

@media (max-width: 768px) {
  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
