.remove-section {
    display: none;
}

.alert {
    margin-top: 10px;
    border-radius: 4rem;
}
.close:hover{
    color: black;
}
.show-section{
    display: block;
}
.entrustBtn{
    color: #74AEA1 !important;
    cursor:pointer;
}
.entrustBtn:hover{
    color: #0a58ca !important;
}

.error-list {
    color: #e1192c;
    margin-top: 4px;
    display: block;
}

.required-icon{
    color:#dc2626
}

#purpose-error{
    color: red;
    display: none;
}

#contact-map{
    height: 500px;
    width: 100%;
    position: relative;
    z-index: 0;
}

#property-map{
    height: 500px;
    width: 100%;
    position: relative;
    z-index: -1;
}

li.dropdown {
    position: relative;
}

li.dropdown ul.dropdown-menu-lang {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    padding: 0;
    margin: 0;
    list-style: none;
    min-width: 120px;
    z-index: 1000;
}

li.dropdown:hover ul.dropdown-menu-lang {
    display: block;
}

li.dropdown ul.dropdown-menu-lang li {
    padding: 5px 10px;
    cursor: pointer;
}

li.dropdown ul.dropdown-menu-lang li:hover {
    background-color: #f0f0f0;
}

.language-dropdown {
    position: relative;
}

.language-dropdown-toggle {
    display: flex;
    align-items: center;
}

.language-flag-main {
    margin-right: 8px;
}

.language-dropdown-menu {
    margin-left: 14px !important;
    position: absolute;
    top: 80%;
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    padding: 0;
    margin: 0;
    list-style: none;
    min-width: 160px;
}

.language-dropdown-item {
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    width:140px;
    align-items: center;
}

.language-dropdown-item:hover {
    background-color: #f0f0f0;
}

.language-flag-item {
    vertical-align: middle;
    margin-right: 8px;
}

/* === Property cards: uniform dimensions ===
   SIMPLE APPROACH: fixed pixel height on .property-image, img fills container.
   Same proven pattern as sidebar/footer thumbnails — no flex children, no padding-bottom tricks.
*/

/* ---------- 1) .property-image as a fixed-height box ---------- */
/* Property results + Similar properties — fixed pixel heights (these were working fine) */
.property-results .property-image,
.similar-properties .property-image {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 250px !important;
    overflow: hidden !important;
    background: #f7f7f7 !important;
}

@media (min-width: 1200px) {
    .property-results .property-image,
    .similar-properties .property-image {
        height: 280px !important;
    }
}

@media (max-width: 575px) {
    .property-results .property-image,
    .similar-properties .property-image {
        height: 200px !important;
    }
}

/* Newly listed (homepage) — keep inside the same container width as the other homepage sections. */

/* The cards row: three equal wide cards, constrained by the homepage container. */
.newly-listed .newly-listed-cards {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 24px;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.newly-listed .newly-listed-card {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.newly-listed .newly-listed-all-listings {
    grid-column: 1 / -1;
    width: auto !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.newly-listed .property-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 767px) {
    .newly-listed .newly-listed-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .newly-listed .newly-listed-cards {
        grid-template-columns: 1fr;
    }
}

/* Newly listed (homepage) — proportional image based on column width,
   not a fixed pixel height. Aspect ratio 3:2 = landscape look that scales. */
.newly-listed .property-image {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    aspect-ratio: 3 / 2 !important;
    overflow: hidden !important;
    background: #f7f7f7 !important;
}

/* Aspect-ratio fallback for older browsers */
@supports not (aspect-ratio: 3 / 2) {
    .newly-listed .property-image {
        height: 0 !important;
        padding-bottom: 66.667% !important; /* 2/3 */
    }
}

.property-results .property-image img,
.property-results .property-image img.img-fluid,
.similar-properties .property-image img,
.similar-properties .property-image img.img-fluid,
.newly-listed .property-image img,
.newly-listed .property-image img.img-fluid {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* ---------- 2) Title clamped to 2 lines for consistent heights ---------- */
.property-results .property-title,
.property-results .property-details h5,
.property-results .property-details h6,
.similar-properties .property-title,
.similar-properties .property-details h5,
.similar-properties .property-details h6 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
    line-height: 1.3em;
    margin-bottom: 0.4rem;
}

/* === NEWLY LISTED (homepage) — scoped overrides ===
   Higher specificity needed to beat `.property-details .property-details-inner .property-title`
   from _listing.scss (which forces white-space: nowrap).
*/
.newly-listed .property-details .property-details-inner .property-title,
.newly-listed .property-details .property-details-inner h5,
.newly-listed .property-details .property-details-inner h6 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    min-height: 2.6em !important;
    line-height: 1.3em !important;
    margin-bottom: 0.4rem !important;
}

/* ---------- 3) Equal-height cards in a row + button pinned bottom ---------- */
/* GRID view (property-results), similar-properties, newly-listed: same column-flex pattern */
.property-results > .row > .col-sm-6,
.similar-properties .row > [class*="col-"],
.newly-listed .row > [class*="col-"] {
    display: flex;
    margin-bottom: 30px;
}

.property-results > .row > .col-sm-6 > a,
.similar-properties .row > [class*="col-"] > a,
.newly-listed .row > [class*="col-"] > a {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.newly-listed .newly-listed-card .property-item {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

.newly-listed .newly-listed-card .property-image,
.newly-listed .newly-listed-card .property-details {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

.property-results > .row > .col-sm-6 .property-item,
.similar-properties .property-item,
.newly-listed .property-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1 1 auto;
    margin-bottom: 0;
}

.property-results > .row > .col-sm-6 .property-details,
.similar-properties .property-details,
.newly-listed .property-details {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.property-results > .row > .col-sm-6 .property-details-inner,
.similar-properties .property-details-inner,
.newly-listed .property-details-inner {
    flex: 1 1 auto;
}

.property-results > .row > .col-sm-6 .property-btn,
.similar-properties .property-btn,
.newly-listed .property-btn {
    margin-top: auto;
}

/* ---------- 4) LIST VIEW (default ?flag=list) ----------
   Structure: .property-results > .property-item.property-col-list > .row.g-0
              .row.g-0 > .col-lg-4|col-md-5 > a > .property-image
              .row.g-0 > .col-lg-8|col-md-7 > .property-details
*/
.property-results .property-col-list .row > [class*="col-"] {
    display: flex;
}

.property-results .property-col-list .col-lg-4 > a,
.property-results .property-col-list .col-md-5 > a {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

/* In list view the image col stretches vertically; keep same fixed height as grid */
.property-results .property-col-list .property-image {
    height: 220px !important;
}

@media (min-width: 992px) {
    .property-results .property-col-list .property-image {
        height: 260px !important;
    }
}

.property-results .property-col-list .col-lg-8 .property-details,
.property-results .property-col-list .col-md-7 .property-details {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 18px 20px;
}

.property-results .property-col-list .property-details-inner {
    flex: 1 1 auto;
}

.property-results .property-col-list .property-btn {
    margin-top: auto;
}

/* Mobile (<768px): list view cols stack vertically, keep 4:3 image */
@media (max-width: 767px) {
    .property-results .property-col-list .row > [class*="col-"] {
        display: block;
    }
}

/* ================= Sidebar "Recently listed" thumbnails ================= */
.sidebar .widget .recent-list-item {
    align-items: flex-start;
}

.sidebar .widget .recent-list-item img,
.sidebar .widget .recent-list-item img.img-fluid {
    width: 100px !important;
    height: 80px !important;
    max-width: 100px;
    min-width: 100px;
    object-fit: cover;
    object-position: center center;
    border-radius: 4px;
    flex: 0 0 100px;
}

.sidebar .widget .recent-list-item .recent-list-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.sidebar .widget .recent-list-item .recent-list-item-info a.address {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================= Footer "Recently listed" thumbnails ================= */
.footer .footer-recent-List ul li .footer-recent-list-item {
    align-items: flex-start;
}

.footer .footer-recent-List ul li .footer-recent-list-item img,
.footer .footer-recent-List ul li .footer-recent-list-item img.img-fluid {
    width: 100px !important;
    height: 80px !important;
    max-width: 100px;
    min-width: 100px;
    object-fit: cover;
    object-position: center center;
    border-radius: 4px;
    flex: 0 0 100px;
}

.footer .footer-recent-List ul li .footer-recent-list-item .footer-recent-list-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

/* ================= Property detail MAIN slideshow (letterbox 16:10) =================
   Standardize all photos (portrait + landscape) inside a fixed 16:10 dark box.
   Each photo is centered, object-fit:contain → no crop, full image visible.
*/
.property-detail-img.popup-gallery .property-main-slider,
.property-detail-img.popup-gallery .property-main-slider .owl-stage-outer,
.property-detail-img.popup-gallery .property-main-slider .owl-stage,
.property-detail-img.popup-gallery .property-main-slider .owl-item {
    background: #111 !important;
}

.property-detail-img.popup-gallery .property-main-slider {
    border-radius: 6px;
    overflow: hidden;
}

.property-detail-img.popup-gallery .property-main-slider .item {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #111;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.property-detail-img.popup-gallery .property-main-slider .item a.portfolio-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.property-detail-img.popup-gallery .property-main-slider .item img,
.property-detail-img.popup-gallery .property-main-slider .item img.img-fluid {
    display: block !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

/* Aspect-ratio fallback for older browsers (Safari <15) */
@supports not (aspect-ratio: 16 / 10) {
    .property-detail-img.popup-gallery .property-main-slider .item {
        aspect-ratio: auto;
        height: 0;
        padding-bottom: 62.5%; /* 10 / 16 = 62.5% */
    }
    .property-detail-img.popup-gallery .property-main-slider .item > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* ================= Property detail thumbnails strip ================= */
.property-thumb-slider {
    margin-top: 12px;
}

.property-thumb-slider .property-thumb-item {
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    background: #f7f7f7;
}

.property-thumb-slider .property-thumb-item:hover {
    opacity: 0.9;
}

.property-thumb-slider .property-thumb-item.active {
    opacity: 1;
    border-color: #26ae61;
}

.property-thumb-slider .property-thumb-item img {
    display: block;
    width: 100%;
    height: 70px;
    object-fit: cover;
    object-position: center center;
}

@media (min-width: 992px) {
    .property-thumb-slider .property-thumb-item img {
        height: 80px;
    }
}
