/* Property Image Rectangular Format Styles */

/* Main property card image container - 3:2 aspect ratio (rectangular) */
.property-image-container {
  position: relative;
  width: 100%;
  padding-bottom: 66.67%;
  /* 3:2 aspect ratio */
  overflow: hidden;
  background: #f8f9fa;
  border-radius: 0.375rem;
}

/* Alternative 16:9 aspect ratio (more cinematic) */
.property-image-container.ratio-16-9 {
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
}

/* Alternative 4:3 aspect ratio (classic) */
.property-image-container.ratio-4-3 {
  padding-bottom: 75%;
  /* 4:3 aspect ratio */
}

/* Image styling */
.property-image-rectangular {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

/* Hover effect */
.hover-change-image.property-image-container:hover .property-image-rectangular {
  transform: scale(1.1);
}

/* Ensure card images maintain rectangular format */
.card-img-top.property-image-container {
  border-radius: 0.375rem 0.375rem 0 0;
}

/* For featured properties in sliders */
.slick-slider .property-image-container {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .property-image-container {
    padding-bottom: 60%;
    /* Slightly less rectangular on mobile */
  }
}

@media (max-width: 576px) {
  .property-image-container {
    padding-bottom: 65%;
    /* Even more rectangular on small screens */
  }
}

/* Image overlay compatibility */
.property-image-container .card-img-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1rem;
  border-radius: inherit;
}

/* Ensure proper stacking */
.property-image-container .hover-image {
  position: relative;
  z-index: 1;
}

/* Loading placeholder */
.property-image-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.property-image-container.loading::before {
  opacity: 1;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Fix for existing card-img classes */
.card .property-image-rectangular.card-img,
.card .property-image-rectangular.card-img-top {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* YouTube Button Styling */
.btn-youtube {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  color: white;
  border: none;
  padding: 20px 35px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.btn-youtube:hover {
  background: linear-gradient(135deg, #CC0000 0%, #990000 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
  color: white;
  text-decoration: none;
}

.btn-youtube:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-youtube i {
  color: white;
  transition: transform 0.3s ease;
}

.btn-youtube:hover i {
  transform: scale(1.1);
}

.btn-youtube .opacity-75 {
  opacity: 0.85;
}

.btn-youtube:hover .opacity-75 {
  opacity: 1;
}