/*!
 * legacy.css: old property cards in custom pages and home custom sections.
 *
 * Loaded only by Page.cshtml (pages older than version 5) and the home page
 * (Default.cshtml). Covers the card markup the old assets/js/property_search_script.js
 * writes for each skin, and the old section wrappers saved in custom HTML:
 *   theme 1  .property-listing-three(-post), .featured-properties-three, .featured-property-post
 *   theme 2  .feat_property (.thumb, .thmb_cntnt, .details, .fp_footer)
 *   theme 3  .homelengo-box (.archive-top, .archive-bottom, .meta-list, .flag-tag)
 *   shared   .treb-mask, .openhouse-tag, .property-status, .property-sold-status, .custom-col-xs-12
 * Colours come from the theme tokens (--prime-color, --secondary-color).
 * No framework, typography or page rules. Resaving a page in the BS5 builder
 * replaces all of this with the BS5 cards.
 */

/* ---------- Shared (scoped to the old cards: the BS5 cards reuse some names) ---------- */
.prop-item:has(> .property-listing-three-post, > .featured-property-post, > .feat_property, > .homelengo-box) { margin-bottom: 1.5rem; }
.custom-col-xs-12 { width: 100%; }
@media (min-width: 576px) { .custom-col-xs-12.col-sm-6 { width: 50%; } }
@media (min-width: 768px) {
    .custom-col-xs-12.col-md-4 { width: 33.33333333%; }
    .custom-col-xs-12.col-md-6 { width: 50%; }
}

.property-listing-three-post .property-thumbnail,
.featured-property-post .property-thumbnail,
.feat_property .thumb,
.homelengo-box .images-style { position: relative; overflow: hidden; }

.property-listing-three-post .property-thumbnail img,
.featured-property-post .property-thumbnail img,
.feat_property .thumb img,
.homelengo-box .images-style img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }

.property-listing-three-post:hover .property-thumbnail img,
.featured-property-post:hover .property-thumbnail img,
.feat_property:hover .thumb img,
.homelengo-box:hover .images-style img { transform: scale(1.05); }

:is(.property-listing-three-post, .featured-property-post, .feat_property, .homelengo-box) .treb-mask { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 700; }

:is(.property-listing-three-post, .featured-property-post) .openhouse-tag { position: absolute; top: .75rem; inset-inline-start: .75rem; z-index: 2; }
:is(.property-listing-three-post, .featured-property-post) :is(.openhouse-tag span, .property-status, .property-sold-status) { display: inline-block; padding: .25rem .625rem; font-size: .75rem; font-weight: 700; line-height: 1.4; text-transform: uppercase; color: #fff; background: var(--prime-color); }
:is(.property-listing-three-post, .featured-property-post) .property-sold-status { background: #c0392b; }

:is(.feat_property, .homelengo-box) :is(.prop_details, .fp_meta, .tag, .tag2, .meta-list) { margin: 0; padding: 0; list-style: none; }

/* ---------- Theme 1: property-listing-three-post / featured-property-post ---------- */
.property-listing-three-post,
.featured-property-post { height: 100%; background: #fff; border: 1px solid #dde3e7; }

.property-listing-three-post .property-status,
.property-listing-three-post .property-sold-status,
.featured-property-post .property-status,
.featured-property-post .property-sold-status { position: absolute; inset-inline-end: 0; bottom: 0; z-index: 2; }

.property-listing-three-post .property-description,
.featured-property-post .property-description { padding: 1rem 1.25rem 0; }

.property-listing-three-post .entry-header,
.featured-property-post .entry-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; margin-bottom: .5rem; }

.property-listing-three-post .entry-title,
.featured-property-post .entry-title { margin: 0; font-size: 1rem; }

.property-listing-three-post .entry-title a,
.featured-property-post .entry-title a { color: inherit; text-decoration: none; }

.property-listing-three-post .price,
.featured-property-post .price { font-weight: 700; color: var(--prime-color); }

.property-listing-three-post p,
.featured-property-post p { margin-bottom: .75rem; font-size: .875rem; color: #6c757d; }

.property-listing-three-post .property-meta,
.featured-property-post .property-meta { display: flex; margin: 0 -1.25rem; border-top: 1px solid #dde3e7; }

.property-listing-three-post .meta-wrapper,
.featured-property-post .meta-wrapper { flex: 1 1 0; padding: .625rem .5rem; font-size: .8125rem; text-align: center; }

.property-listing-three-post .meta-wrapper + .meta-wrapper,
.featured-property-post .meta-wrapper + .meta-wrapper { border-inline-start: 1px solid #dde3e7; }

.property-listing-three-post .meta-value,
.featured-property-post .meta-value { font-weight: 700; }

.property-listing-three-post .meta-unit,
.featured-property-post .meta-unit { display: block; bottom: 0; }

.property-listing-three-post h5,
.property-listing-three-post h6,
.featured-property-post h5,
.featured-property-post h6 { margin: 0 0 .5rem; font-size: .75rem; color: #6c757d; }

/* featured-property-post (grid2): image beside text from md up */
@media (min-width: 768px) {
    .featured-property-post { display: flex; }
    .featured-property-post .property-thumbnail { flex: 0 0 45%; }
    .featured-property-post .property-thumbnail img { height: 100%; aspect-ratio: auto; }
    .featured-property-post .property-description { flex: 1 1 auto; }
}

/* ---------- Theme 2: feat_property ---------- */
.feat_property { height: 100%; overflow: hidden; background: #fff; border-radius: 8px; box-shadow: 0 0 30px rgba(13, 38, 59, .07); }
.feat_property a { color: inherit; text-decoration: none; }

.feat_property .thmb_cntnt { position: absolute; inset: .75rem .75rem auto; z-index: 2; display: flex; justify-content: space-between; }
.feat_property .tag li,
.feat_property .tag2 li { display: inline-block; padding: .25rem .625rem; font-size: .75rem; font-weight: 600; color: #fff; background: var(--prime-color); border-radius: 4px; }
.feat_property .tag2 li { background: rgba(13, 38, 59, .7); }
.feat_property .tag2 li.property-sold-status { background: #c0392b; }

.feat_property .details { padding: 1rem 1.25rem 0; }
.feat_property .tc_content h4 { margin-bottom: .5rem; font-size: 1rem; font-weight: 600; }
.feat_property .prop_details { display: flex; gap: 1rem; font-size: .8125rem; color: #6c757d; }
.feat_property .prop_details li { text-align: center; }
.feat_property .prop_details br { display: none; }
.feat_property .prop_details b { margin-inline-start: .25rem; }
/* the old flaticon font is gone: show words instead of icons */
.feat_property .flaticon-bed::before { content: "Beds "; }
.feat_property .flaticon-bath::before { content: "Baths "; }
.feat_property .flaticon-car::before { content: "Parking "; }
.homelengo-box i.icon:empty { display: none; }

.feat_property .fp_footer { display: flex; justify-content: space-between; align-items: center; margin: 1rem -1.25rem 0; padding: .75rem 1.25rem; border-top: 1px solid #e6e9ec; }
.feat_property .fp_footer .fw600 { font-weight: 600; color: var(--secondary-color, var(--prime-color)); }

/* carousel card (all_listing_style5): text over the image */
.feat_property .thumb-gradient { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .7)); }
.feat_property .fp_footer.all_listing_style5 { position: absolute; inset: auto 0 0; z-index: 2; display: block; margin: 0; border: 0; }
.feat_property .fp_footer.all_listing_style5 h4 { margin: .25rem 0 0; font-size: 1rem; }

/* ---------- Theme 3: homelengo-box ---------- */
.homelengo-box { height: 100%; overflow: hidden; background: #fff; border: 1px solid #e4e4e4; border-radius: 16px; }
.homelengo-box a { color: inherit; text-decoration: none; }
.homelengo-box .archive-top { position: relative; }
.homelengo-box .images-group { display: block; }

.homelengo-box .top { position: absolute; top: 1rem; inset-inline-start: 1rem; z-index: 2; }
.homelengo-box .top ul { margin: 0; padding: 0; list-style: none; gap: .375rem; }
.homelengo-box .flag-tag { padding: .25rem .75rem; font-size: .75rem; font-weight: 600; color: #fff; background: rgba(22, 30, 45, .6); border-radius: 999px; }
.homelengo-box .flag-tag.primary { background: var(--prime-color); }

.homelengo-box .bottom { position: absolute; inset: auto 1rem 1rem; z-index: 2; font-size: .75rem; color: #fff; }
.homelengo-box .bottom:empty { display: none; }

.homelengo-box .archive-bottom { padding: 1.25rem; }
.homelengo-box .content-top h6 { margin-bottom: .75rem; font-size: 1.125rem; font-weight: 700; }
.homelengo-box .meta-list { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .875rem; }
.homelengo-box .meta-list .item { display: flex; gap: .25rem; }
.homelengo-box .text-variant-1 { color: #5c6368; }
.homelengo-box .fw-6 { font-weight: 600; }
.homelengo-box .location { margin-top: .5rem; font-size: .8125rem; color: #5c6368; }
.homelengo-box .text-line-clamp-1 { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }

.homelengo-box .content-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e4e4e4; font-size: .8125rem; }
.homelengo-box .content-bottom .price { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--prime-color); }

/* list-style-1 (grid2): image beside text from md up */
@media (min-width: 768px) {
    .homelengo-box.list-style-1 { display: flex; }
    .homelengo-box.list-style-1 .archive-top { flex: 0 0 45%; }
    .homelengo-box.list-style-1 .images-style img { height: 100%; aspect-ratio: auto; }
    .homelengo-box.list-style-1 .archive-bottom { flex: 1 1 auto; }
}

/* ---------- Old section wrappers in saved custom HTML ---------- */
.property-listing-three,
.featured-properties-three { padding: 3rem 0; }
.featured-properties-three .section-title { margin-bottom: 2rem; text-align: center; }
