/*
 Theme Name:   WpResidence child theme
 Theme URI:    https://themeforest.net/item/wp-residence-real-estate-wordpress-theme/7896392
 Description:  WpResidence child theme
 Author:       WpEstate
 Author URI:   http://wpestate.org
 Template:     wpresidence
 Version:      5.0.7
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
*/

.backtop {
    position: fixed !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    background-color: #cccccc !important;
}

.contact-box {
    position: fixed !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    background-color: #cccccc !important;
}

.subfooter_menu {
    padding-right: 50px !important;
}

/* Hide featured properties on phones (< 768px) */
@media (max-width: 767px) {
    .elementor-element-2202fe {
        display: none !important;
    }
}

/* Remove the huge blank gap on phones/tablets before the footer across all pages (Restored slightly to allow footer visibility) */
@media (max-width: 991px) {
    /* margin-bottom to be handled by theme JS for sticky footer */
    .content_wrapper {
        padding-bottom: 30px !important; /* Slightly more space for breather before footer */
    }
}

/* Specific overrides for Blog Listing and Blog Post pages on mobile */
@media (max-width: 767px) {
    /* Target the container of the blog cards specifically */
    .page-template-blog_list .mb-4:last-child {
        margin-bottom: 15px !important;
    }

    /* Reduce gap before the "Back to All Articles" button on Post page */
    .single-post main .text-center:last-of-type {
        margin-top: 30px !important; /* Reduced from 60px */
    }
    
    /* Restore margin to allow sticky footer gap to work */
    /* colophon margin-top to be handled by theme defaults */
}


/* Remove excessive gap before footer on property detail, blog listing, and single post pages */
.single-estate_property .content_wrapper,
.single-post .content_wrapper,
.page-template-blog_list .content_wrapper {
    padding-bottom: 0px !important;
}

.single-estate_property .wpresidence-content-container-wrapper,
.single-post .wpresidence-content-container-wrapper,
.page-template-blog_list .wpresidence-content-container-wrapper {
    margin-bottom: 0px !important;
}

.single-estate_property .wpresidence_main_wrapper_class,
.single-post .wpresidence_main_wrapper_class,
.page-template-blog_list .wpresidence_main_wrapper_class {
    margin-bottom: 0px !important;
}


/* Limit testimonials to 3 on phones */
@media (max-width: 767px) {
    .elementor-element-eb44f45 {
        display: none !important;
    }
}

/* Limit properties under "Our Latest Properties" to 3 on phones */
@media (max-width: 767px) {
    .elementor-element-3bfc3c8 .listing_wrapper:nth-child(n+4) {
        display: none !important;
    }
}
