/**
 * Property Gallery Elementor Widget Styles
 */

.lgap-property-gallery {
  position: relative;
  width: 100%;
}

/* Gallery Container */
.lgap-gallery-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* Grid Layout Styles */
.lgap-gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  height: 100%;
  min-height: 400px;
}

.lgap-gallery-grid-small {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 100%;
}

.lgap-gallery-item {
  position: relative;
  overflow: hidden;
  /* border-radius: 8px; */
  cursor: pointer;
  height: 100%;
}

.lgap-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.lgap-main-image {
  height: 100%;
}

.lgap-small-image {
  height: 100%;
  position: relative;
}

.lgap-small-image:nth-child(n + 5) {
  display: none;
}

/* Hover Effects */
.lgap-hover-zoom .lgap-gallery-item:hover img {
  transform: scale(1.05);
}

.lgap-hover-fade .lgap-gallery-item:hover img {
  opacity: 0.8;
}

.lgap-hover-overlay .lgap-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.lgap-hover-overlay .lgap-gallery-item:hover .lgap-image-overlay {
  background-color: rgba(0, 0, 0, 0.3);
}

/* View All Button */
.lgap-view-all-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 2;
  transition: opacity 0.3s ease;
}

.lgap-view-all-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #000 !important;
  text-decoration: none;
  font-family: "Josefin Sans", sans-serif;
  font-weight: 600;
  text-align: center;
  transition: transform 0.2s ease;
  padding: 8px 12px;
  /* border-radius: 4px; */
  background-color: var(--lgap-primary-color);
}

.lgap-view-all-btn:hover {
  transform: scale(1.05);
  color: #fff !important;
  text-decoration: none;
  background-color: var(--lgap-secondary-color);
}

.lgap-view-all-btn span {
  font-size: 14px;
  display: block;
}

.lgap-view-all-btn small {
  font-size: 18px;
  opacity: 0.9;
  font-weight: bold;
}

/* Placeholder for editor */
.lgap-gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background-color: #f7f7f7;
  border: 2px dashed #ddd;
  border-radius: 8px;
  color: #666;
  font-family: "Josefin Sans", sans-serif;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .lgap-gallery-grid {
    grid-template-columns: 1fr;
    min-height: 300px;
  }

  .lgap-gallery-grid-small {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
  }

  .lgap-main-image {
    order: -1;
  }

  .lgap-gallery-masonry {
    columns: 2;
  }
}

@media (max-width: 767px) {
  .lgap-gallery-grid {
    gap: 4px;
    min-height: 250px;
  }

  .lgap-gallery-grid-small {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

   .lgap-small-image:nth-child(-n + 2) {
     display: none;
   }

  .lgap-gallery-masonry {
    columns: 1;
  }

  .lgap-view-all-btn span {
    font-size: 12px;
  }

  .lgap-view-all-btn small {
    font-size: 14px;
  }
}

/* UIKit Lightbox Customization */
.uk-lightbox {
  background: rgba(0, 0, 0, 0.9);
}

.uk-lightbox-toolbar {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.uk-lightbox-button {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.uk-lightbox-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.uk-lightbox-caption {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  color: white;
  font-family: "Josefin Sans", sans-serif;
  padding: 20px;
}

/* Loading States */
.lgap-gallery-item img {
  background-color: #f7f7f7;
  background-image: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.5) 35%,
    rgba(255, 255, 255, 0.5) 65%,
    transparent 65%
  );
  background-size: 20px 20px;
  animation: loading 1s linear infinite;
}

.lgap-gallery-item img[src] {
  background-image: none;
  animation: none;
}

@keyframes loading {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 20px;
  }
}

/* Dark Mode Support */
