.properties-list{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

    @media (max-width: 1200px) {
        grid-template-columns: repeat(3, 1fr);
    }

    @media (max-width: 900px) {
        grid-template-columns: repeat(2, 1fr);
    }

    @media (max-width: 600px) {
        grid-template-columns: 1fr;
    }
}

/* Infinite scroll styles */
.infinite-scroll-container {
    text-align: center;
    margin-top: 30px;
}

.load-more-trigger {
    height: 1px;
    width: 100%;
}

.loading-more {
    padding: 20px;
    font-size: 16px;
    color: var(--e-global-color-641a9e4, #666);
}

.loading-more i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

.no-more-results {
    padding: 20px;
    font-size: 16px;
    color: #999;
    font-style: italic;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.properties-list a.property{
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 9px -4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    &:hover{
        border-color: var(--e-global-color-641a9e4);
    }
    .property__image{
        aspect-ratio: 2 / 1;
        position: relative;
        img{
            height: 100%;
            width: 100%;
            object-fit: cover;
            display: block;
        }

    }
    .property__info{
        display: flex;
        gap: 30px;
        i{
            margin-right: 2px;
        }
    }
    .property__details{
        padding: 20px;
        display: grid;
        gap: 20px;
    }
    .property__title{
        margin: 0;
        min-height: 72px;
    }

    .elementor-button{
        padding: 8px 15px;
    }
    .property__footer{
        padding-top: 5px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .elementor-button{
            border-radius: 30px;
            background-color: white;
            color: var(--e-global-color-641a9e4);
            &:hover{
                background-color: var(--e-global-color-50ac483);
                color: white;
            }
        }

        .just-list-badge{
            border: 1px solid #cdd9ff;
            background-color: #edf4f9;
            color: #5484c5;
            border-radius: 4px;

            font-size: 12px;
            font-weight: 500;
            padding: 3px 7px;
            letter-spacing: 0.1px;
        }
    }

    .property__badge{
        position: absolute;
        top: 0;
        right: 0;
        color: white;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 1px;
        line-height: 1;
        border-radius: 0 0 0 10px;
        display: flex;
        overflow: hidden;
        & > div{
            padding: 4px 10px;
            text-transform: uppercase;
        }
        .property__badge__type{
            background: #252D57;
        }
        .property__badge__featured{
            background: #E51A2F;
        }
    }
}

.property-search-form {
    font-weight: 400;
    font-size: 15px;
    line-height: 20px;
    --input-height: 45px;


    select{
        appearance: none; /* Remove default arrow (modern browsers) */
        -webkit-appearance: none; /* Safari/Chrome */
        -moz-appearance: none; /* Firefox */

        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d=""/><path d="M331.3 475.3C325.1 481.5 314.9 481.5 308.7 475.3L100.7 267.3C94.5 261.1 94.5 250.9 100.7 244.7C106.9 238.5 117.1 238.5 123.3 244.7L320 441.4L516.7 244.7C522.9 238.5 533.1 238.5 539.3 244.7C545.5 250.9 545.5 261.1 539.3 267.3L331.3 475.3z"/></svg>') no-repeat right 5px center/20px auto;
        padding-right: 30px !important;
    }

    .search-form__group{
        display: flex;
        border-radius: 4px;
        min-height: var(--input-height);
        .elementor-button{
            border-radius: 0;
            font-size: 18px;
            i{
                margin-right: 5px;
            }
        }
    }



    .search-form__toggle-btn {
        padding: 0 15px;
        cursor: pointer;
        transition: all 0.3s ease;
        height: 100%;
        display: flex;
        align-items: center;
        white-space: nowrap;
        background-color: white;
        input[type="radio"] {
            display: none;
        }
        i{
            font-size: 19px;
            margin-right: 5px;
        }
        &:has(input[type="radio"]:checked){
            background-color: var(--e-global-color-641a9e4);
            color: white;
            font-weight: 600;
            i:before{
                font-weight: 900;
                content: "\f058";
            }
        }
    }
/*
    .search-form__field--small{
        width: 120px;
    }

    .search-form__field--medium{
        width: 145px;
    }*/

    .search-form__field:has(i){
        position : relative;
        padding-left: 30px;
        i{
            position: absolute;
            top: 50%;
            left: 15px;
            transform: translateY(-50%);
            color: #1D1D1D;
            font-size: 18px;
        }
    }

    input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea{
        border-radius: 0;
        background-color: transparent;
    }

    select,
    input[type="text"],
    input[type="number"] {
        border: none;
        height: var(--input-height);
        color: #1D1D1D;
        padding-inline: 15px 5px;
        &:focus {
            outline: none;
        }
        &::placeholder {
            color: #1D1D1D;
        }
    }

    .border-left{
        border-left: 1px solid #EFEFEF;
    }

    .reset-link{
        color: white;
        display: inline-grid;
        align-items: center;
        height: var(--input-height);
        i{
            margin-right: 5px;
        }
    }

    div.multiple-select{
        height: var(--input-height);
        .ms-choice{
            height: 100%;
            background-color: transparent;
            border: none;
            color: #1D1D1D;
            font-size: 1rem;
            line-height: 1.5;
            font-weight: 400;
            & > span{
                height: 100%;
                display: flex;
                align-items: center;
            }
            & > div.icon-caret{
                border: none;
                position: absolute;
                width: auto;
                height: auto;
                top: 50%;
                right: 8px;
                transform: translateY(-50%);
                margin-top: 1px;
                &:after{
                    font-family: "Font Awesome 6 Pro";
                    font-weight: 300;
                    content: "\f078";
                    font-size: 18px;
                }
            }
        }
        .ms-drop{
            ul > li{
                label{
                    line-height: 1.5em;
                }
            }
        }
    }

    .search-form__row{
        display: grid;
        grid-template-columns: 1fr 2fr 1fr 1fr;
        gap: 20px 15px;
        .search-form__group--address{
            .search-form__field--search{
                width: 100%;
            }
            .search-form__field--property-type{
                min-width: 180px;
            }
        }

        .search-form__group{
            display: flex;
            & > div, & > label{
                flex: 1;
                &:last-child{
                    border-top-right-radius: 4px;
                    border-bottom-right-radius: 4px;
                }
                &:first-child{
                    border-top-left-radius: 4px;
                    border-bottom-left-radius: 4px;
                }
            }
            & > div{
                background-color: white;
            }
            .search-form__field--property-type{
                flex: 0.5;
            }
            &.search-form__group--address{
                & > div{
                    @media (max-width: 600px) {
                        border-radius: 4px;
                    }
                }
            }
        }

   /*     @media (max-width: 1600px) {
            grid-template-columns: 1fr 2fr 1fr 1fr;
        }*/

        @media (max-width: 1080px) {
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            .search-form__group--address{
                grid-column: span 2;
                order: 3;
            }
            .search-form__group--action{
                order: 4;
            }
        }

        @media (max-width: 600px) {
            grid-template-columns: 1fr;
            .search-form__group--address{
                grid-column: span 1;
                order: initial;

                display: grid;
                gap: 20px;
            }

            .search-form__group--type{
                max-width: 300px;
            }
        }
    }

    &.property-search-form--full{
        .search-form__row{
            grid-template-columns: 1fr 2fr 1fr 1fr .6fr;

            @media (max-width: 1600px) {
                grid-template-columns: 1fr 1fr 1fr 1fr .5fr .5fr;
                .search-form__group--address{
                    grid-column: span 2;
                }
            }

            @media (max-width: 1080px) {
                grid-template-columns: 1fr 1fr 1fr;
                .search-form__group--address{
                    grid-column: span 2;
                }
            }

            @media (max-width: 600px) {
                grid-template-columns: 1fr;
                .search-form__group--address{
                    grid-column: span 1;
                    order: initial;

                    display: grid;
                    gap: 20px;
                }

                .search-form__group--type{
                    max-width: 300px;
                }
            }
        }
    }

    &.property-search-form--short{
        .search-form__row{
            gap: 20px 15px;
            .search-form__group:not(.search-form__group--action){
                box-shadow: 0 4px 9px -4px rgba(0, 0, 0, 0.1);
            }
            button[type=submit]{
                border-radius: 4px;
                font-size: 18px;
                font-weight: 600;
                min-height: var(--input-height);
            }
        }
    }
}



.loading{
    padding-block: 200px;
    display: flex;
    justify-content: center;
    .fa-spin{
        font-size: 50px;
    }
}

.property-container-short-output, .property-container-recent-output{
    .loading{
        padding-block: 50px;
        justify-content: start;
    }
    .properties-pagination, .properties-header{
        display: none;
    }
}

.property-container{
    max-width: 1320px;
    padding: 30px 20px 100px;
    margin-inline: auto;
    display: grid;
    gap: 60px;

    position: relative;
    z-index: 2;

    @media (min-width: 1200px) {
        grid-template-columns: 1fr 475px;
    }

    .property-detail{
        display: grid;
        gap: 20px;
    }


    h1{
        margin: 0;
    }


    .sub-title{
        font-size: 14px;
        line-height: 1.5em;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--e-global-color-641a9e4);
    }

    address{
        font-size: 20px;
        line-height: 24px;
        font-weight: 500;
        font-style: normal;
    }

    .property-detail__info{
        display: flex;
        gap: 30px;
        margin-top: 30px;
        margin-bottom: 10px;
        font-size: 16px;
        font-weight: 400;
        i{
            margin-right: 4px;
        }
    }

    .property-agents{
        position: sticky;
        top: 50px;
    }
    .property-agents-list{
        background-color: white;
        padding: 30px;
        border-radius: 4px;
        box-shadow: 0 4px 9px -4px rgba(0, 0, 0, 0.1);

        display: grid;
        gap: 40px;

        max-width: 500px;
        margin-inline: auto;

        .property-agent{
            display: grid;
            grid-template-columns: 120px 1fr;
            gap: 30px;
            & > img{
                width: 100%;
                aspect-ratio: 1 / 1;
                border-radius: 4px;
                object-fit: cover;
            }

            &.agent-popup-trigger {
                cursor: pointer;
                transition: background-color 0.2s ease;
                padding: 15px;
                margin: -15px;
                border-radius: 8px;

                &:hover {
                    background-color: rgba(0, 0, 0, 0.02);
                }
            }

            .property-agent__info{
                display: grid;
                gap: 5px;

                h4{
                    margin: 0
                }
                .agent-cta{
                    text-align: left;
                }
            }
        }
    }

    .property-agents__cta{
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 30px;
        a{
            border-radius: 30px;
            font-size: 18px;
            line-height: 23px;
            font-weight: 600;
            &.elementor-button--link{
                background-color: transparent;
                border: none;
                color: #E51A2F;

                font-weight: 900;
                letter-spacing: 1.5px;
            }
        }
    }

    .html-output{
        a{
            color: #E51A2F;
        }
        p{
            margin-bottom: 0.9em;
        }
        *:last-child{
            margin-bottom: 0;
        }
        h4{
            margin-block: 0 10px;
        }
        ul{
            list-style: disc;
            padding-left: 15px;
            li{
                padding-left: 0;
            }
            li:not(:last-child){
                margin-bottom: 0.2em;
            }
        }
    }

    .breadcrumb{
        margin-bottom: 20px;
        span, a{
            font-size: 16px;
            line-height: 20px;
            color: #9D9C9B;
        }
        @media (max-width: 1200px) {
            display: none;
        }
    }

}

.property-completed-badge{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(8deg);
    background-color: #252D57;
    color: white;
    padding: 5px 20px;
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}


.property-image-swiper{
    margin-top: 10px;
    position: relative;

    .swiper-slide{
        aspect-ratio: 900/560;
        position: relative;
        cursor: pointer;

        /*&:hover .image-overlay {*/
        /*    opacity: 1;*/
        /*}*/
    }

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

    .property-completed-badge{
        transform: translate(-50%, -50%) rotate(8deg) scale(2);
    }

    /* Image overlay and expand button */
/*    .image-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        opacity: 0;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }*/

    .image-expand-btn {
        background: rgba(255, 255, 255, 0.9);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #333;
        transition: all 0.3s ease;

        &:hover {
            background: white;
            transform: scale(1.1);
        }
    }

    /* Swiper pagination */
    .swiper-pagination {
        position: absolute;
        bottom: 20px !important;
        left: 50%;
        transform: translateX(-50%);
        width: auto !important;
        z-index: 10;
    }

    .swiper-pagination-bullet {
        background: rgba(255, 255, 255, 0.5);
        opacity: 1;
        width: 12px;
        height: 12px;
        margin: 0 4px !important;
        transition: all 0.3s ease;

        &.swiper-pagination-bullet-active {
            background: white;
            transform: scale(1.2);
        }
    }

    /* Swiper navigation with Font Awesome icons */
    .swiper-button-prev,
    .swiper-button-next {
        color: white !important;
        background: rgba(0, 0, 0, 0.5);
        width: 44px !important;
        height: 44px !important;
        border-radius: 50%;
        margin-top: -22px !important;
        transition: all 0.3s ease;
        transform: translateY(50%);

        &:hover {
            background: rgba(0, 0, 0, 0.7);
        }

        /* Hide default Swiper arrows */
        &::after {
            display: none;
        }

        /* Font Awesome icons */
        &::before {
            font-family: "Font Awesome 6 Pro";
            font-weight: 300;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
        }
    }

    .swiper-button-prev {
        left: 15px !important;

        &::before {
            content: "\f104"; /* fa-angle-left */
        }
    }

    .swiper-button-next {
        right: 15px !important;

        &::before {
            content: "\f105"; /* fa-angle-right */
        }
    }

    /* Image counter */
    .image-counter {
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 6px 12px;
        border-radius: 15px;
        font-size: 14px;
        font-weight: 500;
        z-index: 10;
    }
}

/* Lightbox styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 0px;
    right: -50px;
    color: white;
    cursor: pointer;
    font-size: 24px;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;

    &:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }
}

.lightbox-content {
    position: relative;
    width: min(1200px, 90vw);
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-nav button {
    background-color: var(--e-global-color-641a9e4);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    pointer-events: all;
    display: grid;
    place-items: center;
    padding: 0;
    &:hover {
        transform: scale(1.1);
    }
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    font-weight: 500;
}

/* Prevent scrolling when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .property-image-swiper {
        .swiper-button-prev,
        .swiper-button-next {
            display: none;
        }

        .image-counter {
            top: 10px;
            right: 10px;
            font-size: 12px;
            padding: 4px 8px;
        }

        .image-expand-btn {
            width: 40px;
            height: 40px;
            font-size: 16px;
        }
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 20px;
        width: 35px;
        height: 35px;
    }

    .lightbox-nav {
        padding: 0 10px;
    }

    .lightbox-nav button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-counter {
        bottom: -30px;
        font-size: 14px;
    }
}

.properties-pagination {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pagination-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.pagination-links {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;

    &.active {
        background: var(--e-global-color-641a9e4, #007cba);
        color: white;
        border-color: var(--e-global-color-641a9e4, #007cba);
        cursor: default;
    }

    &.disabled {
        background: #f9f9f9;
        color: #ccc;
        border-color: #eee;
        cursor: not-allowed;
    }
}

.page-dots {
    padding: 8px 4px;
    color: #666;
}

.properties-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
    gap: 20px 50px;
}

.properties-header__title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.properties-header__meta {
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-link {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
}


.property-detail__map{
    width: 100%;
    height: 350px;
}

.no-property-container{
    padding: 50px 20px;
    min-height: 50vh;
    text-align: center;
    a{
        color: var(--e-global-color-641a9e4);
        text-decoration: underline;
    }
}


.sort-by-trigger{
    height: var(--input-height);
    color: #1D1D1D;
    padding-inline: 15px 30px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d=""/><path d="M331.3 475.3C325.1 481.5 314.9 481.5 308.7 475.3L100.7 267.3C94.5 261.1 94.5 250.9 100.7 244.7C106.9 238.5 117.1 238.5 123.3 244.7L320 441.4L516.7 244.7C522.9 238.5 533.1 238.5 539.3 244.7C545.5 250.9 545.5 261.1 539.3 267.3L331.3 475.3z"/></svg>') no-repeat right 5px center/20px auto;
    border-radius: 4px;

}


.filter-control{
    color: white;
    text-align: center;
    padding: 20px 20px 0;
    cursor: pointer;
    display: none;
    @media (max-width: 600px) {
        display: block;
    }
    &.filter-control--show{
        padding-top: 0px;
    }
}

@media (max-width: 600px) {
    .property-search-form--full{
        display: grid;
        grid-template-rows: 0fr;
        transition: all 0.3s ease;
        & > div{
            overflow: hidden;
        }
        &.expanded{
            grid-template-rows: 1fr;
        }
    }
}


.filter-control--show{
    display: none;
}
