/* Custom styles for Property Website */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero section overlay gradient */
.hero-gradient {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
}

/* Card hover effects */
.property-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Image hover zoom effect */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
  transform: scale(1.05);
}

/* Button hover animation */
.btn-animate {
  position: relative;
  overflow: hidden;
}

.btn-animate:after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.7s ease;
}

.btn-animate:hover:after {
  left: 100%;
}

/* Custom carousel styles */
.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-item {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fix for hero and about carousel on mobile */
@media (max-width: 768px) {
  /* Hero section fixes for mobile */
  #home .absolute {
    z-index: 10 !important;
  }
  
  #hero-title, #hero-subtitle {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7) !important;
    display: block !important;
  }
  
  .carousel-item.active {
    z-index: 5;
  }
  
  /* About us image fixes for mobile */
  
  #developer-image-container {
    height: auto !important;
    min-height: 250px !important;
  }
}

.carousel-item.active {
  opacity: 1;
  z-index: 1;
  visibility: visible;
}

/* About carousel dots */
.carousel-dot {
  transition: background-color 0.3s ease;
  cursor: pointer;
}

/* Testimonial card styles */
.testimonial-card {
  position: relative;
}

.testimonial-card:before {
  content: "\201C";
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 80px;
  color: rgba(59, 130, 246, 0.1);
  font-family: serif;
}

/* Gallery image hover effects */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.gallery-item img {
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

/* Site plan hover effect */
#siteplan .rounded-lg {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#siteplan .rounded-lg:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

#siteplan .rounded-lg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#siteplan .rounded-lg:hover::after {
  opacity: 1;
}

/* Property card styles */
#properties .property-card {
  max-width: 100%;
  margin: 0 auto;
}

#properties .property-card .flex.flex-wrap {
  justify-content: center;
}

/* Agent card styles */
#agents-container .property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#agent-selector {
  appearance: none;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  width: 100%;
  color: #1F2937;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#agent-selector:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

#agent-selector-container {
  margin-bottom: 1rem;
}

/* Form input focus effects */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  outline: none;
}

/* Custom bullet points for lists */
.custom-list li {
  position: relative;
  padding-left: 1.5rem;
}

.custom-list li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #3B82F6;
}

/* Section transitions */
section {
  transition: background-color 0.5s ease;
}

/* Mobile menu animation */
.mobile-menu-enter {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu-enter-active {
  max-height: 500px;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3B82F6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility classes */
.text-shadow {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.transition-all {
  transition: all 0.3s ease;
}

/* Full-screen image viewer */
#fullscreen-image-viewer {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#fullscreen-image-viewer.active {
  opacity: 1;
  pointer-events: auto;
}

#viewer-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  user-select: none;
}

/* For cursor styles during image dragging */
.grabbing {
  cursor: grabbing !important;
}

/* Google Maps marker styles */
.map-marker {
  background-color: #ffffff;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-education {
  color: #3B82F6; /* Blue */
}

.marker-health {
  color: #EF4444; /* Red */
}

.marker-shopping {
  color: #10B981; /* Green */
}

.marker-transportation {
  color: #F59E0B; /* Yellow */
}

.marker-property {
  color: #8B5CF6; /* Purple */
  font-size: 1.5rem;
}
