/* ============================================
   FIX 1: Agent photos — force perfect circles
   Problem: agent photos are different shapes/sizes as uploaded
   (Rafael's is square, Vanessa's is portrait, etc.), so the circular
   mask was stretching them into ovals instead of true circles.
   This crops every agent photo into a perfect square before the
   circle applies, regardless of the original photo's shape.
   ============================================ */
.agent-grid-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
}
.agent-grid-image img.img-circled {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   FIX 2: Featured Listings carousel — equal card heights
   Problem: the middle listing card sits shorter/taller than the
   other two because the carousel lets each card size itself based
   on its own text length (address/price length varies per listing).
   This forces all three cards to stretch to match the tallest one,
   so they line up evenly no matter how long each listing's text is.
   ============================================ */
.property-carousel-module-v1-3cols .swiper-wrapper {
    align-items: stretch;
}
.item-listing-wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ============================================
   FIX 3: Header logo — cap size sitewide (strengthened)
   Problem: the new high-resolution logo file was still rendering
   too large, especially on mobile, because the original rule
   wasn't winning against the theme's own mobile styles.
   Added !important and an explicit mobile-breakpoint rule as a
   safety net so it's capped no matter what screen size loads it.
   ============================================ */
.logo.logo-desktop img,
.logo.logo-mobile img {
    max-height: 65px !important;
    max-width: 220px !important;
    width: auto !important;
    height: auto !important;
}

@media (max-width: 768px) {
    .logo.logo-desktop img,
    .logo.logo-mobile img {
        max-height: 40px !important;
        max-width: 160px !important;
    }
}

/* ============================================
   FIX 4: Property-type cards — close the gap below shorter cards
   Problem: when cards are different natural heights (e.g. "Single
   Family Homes" wraps to two lines, others don't), the container
   stretches to match the tallest card, but the visible card itself
   doesn't grow with it — leaving empty space below the shorter ones.
   This makes the actual visible card fill its full stretched height.
   ============================================ */
.elementor-widget-Houzez_elementor_grid_builder,
.elementor-widget-Houzez_elementor_grid_builder .elementor-widget-container,
.elementor-widget-Houzez_elementor_grid_builder .grid-item-v3 {
    height: 100%;
}

/* ============================================
   FIX 5: Featured Listings — uniform image height
   Problem: each listing photo has a different natural aspect ratio,
   so cards with a "wider" source photo render shorter than cards
   with a "taller" one, misaligning the row even with earlier attempts.
   Added !important since the theme's own styles were overriding the
   plain version of this rule.
   ============================================ */
.listing-image-wrap,
.listing-thumb,
.listing-featured-thumb {
    height: 320px !important;
    overflow: hidden !important;
}
.listing-featured-thumb img.img-fluid {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}