/* Lazy loading styles */
.b-lazy {
    opacity: 0;
    transition: opacity 500ms ease-in-out;
}

.b-lazy.b-loaded {
    opacity: 1;
}

/* Ensure all carousel slides are visible immediately */
.carousel-inner .item img,
.carousel-inner .item .b-lazy {
    opacity: 1 !important;
}

/* Prevent carousel images from having lazy loading transition delays */
.carousel-inner .item img.b-lazy {
    transition: none !important;
}

/* Loading placeholder styles */
.property-wrapper {
    position: relative;
}

.property-wrapper.is-loading:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    z-index: 1;
}

.property-wrapper.is-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
    z-index: 2;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* WebP fallback styles */
.no-webp .webp-bg {
    background-image: url('../img/fallback.jpg');
}

.webp .webp-bg {
    background-image: url('../img/fallback.webp');
}

/* Responsive image container */
.responsive-img-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.responsive-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}