/* Property Gallery Styles */
.property-gallery {
  display: block !important;
  grid-template-columns: none !important;
  grid-gap: 0 !important;
  max-width: 100% !important;
  margin: 0 0 30px 0 !important;
}

.enhanced-property-gallery-container {
  margin: 0 0 30px 0;
  max-width: 100%;
  width: 100%;
}

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

.gallery-main-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f1f1f1; /* Lighter background instead of black */
}

.gallery-main {
  position: relative;
  width: 100%;
  height: 600px;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide.active {
  opacity: 1;
  z-index: 1;
}

.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover; /* Changed from contain to cover */
  width: 100%; /* Make image fill the container width */
  height: 100%; /* Make image fill the container height */
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.9);
}

.gallery-nav.prev {
  left: 15px;
}

.gallery-nav.next {
  right: 15px;
}

.gallery-thumbnails {
  display: flex;
  flex-wrap: wrap;
  margin-top: 15px;
  gap: 10px;
  justify-content: center;
}

.gallery-thumb {
  width: 100px;
  height: 75px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  border-radius: 4px;
  overflow: hidden;
}

.gallery-thumb.active {
  opacity: 1;
  border: 2px solid #0073aa;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-counter {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 16px;
  z-index: 2;
}

@media (max-width: 768px) {
  .gallery-main {
      height: 400px;
  }
  
  .gallery-thumb {
      width: 80px;
      height: 60px;
  }
  
  .gallery-nav {
      width: 40px;
      height: 40px;
  }
}

@media (max-width: 480px) {
  .gallery-main {
      height: 300px;
  }
}