/*
 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.1.0.10
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * Property galleries — preserve the 3:2 ratio of the source photographs.
 *
 * WPResidence renders these items as background images. Matching the visual
 * frame to the generated 3:2 derivatives prevents an additional cover crop.
 */
.single-estate_property .gallery_wrapper .image_gallery {
    aspect-ratio: 3 / 2;
    height: auto !important;
    min-height: 0 !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.single-estate_property .property_header_gallery_wrapper .gallery-left-column {
    aspect-ratio: 3 / 2;
    align-content: flex-start;
}

/*
 * Global Elementor header — keep the logo dimensions inherited from the
 * former Elementor Pro widget. WPResidence otherwise caps .logo img at 160px.
 */
.elementor-19534 .elementor-element.elementor-element-2be08547 .wpresidence-site-logo .logo img {
    width: 330px;
    max-width: 330px;
    height: auto;
}

@media (max-width: 1024px) {
    .elementor-19534 .elementor-element.elementor-element-2be08547 .wpresidence-site-logo .logo img {
        width: 198px;
        max-width: 198px;
    }
}

@media (max-width: 767px) {
    .elementor-19534 .elementor-element.elementor-element-2be08547 .wpresidence-site-logo .logo img {
        width: 162px;
        max-width: 162px;
    }
}

/*
 * Home hero headline — lightweight replacement for Elementor Pro's animated
 * headline. The Elementor Free heading remains the editable fallback.
 */
.elementor-19364 .elementor-element.elementor-element-edf96e5 .elementor-heading-title {
    min-height: 1.2em;
    text-align: center;
}

.elementor-19364 .elementor-element.elementor-element-edf96e5 .fp-home-headline__text {
    display: inline-block;
    min-width: 11em;
    text-align: center;
    will-change: opacity, filter, transform;
}

.elementor-19364 .elementor-element.elementor-element-edf96e5 .fp-home-headline__text.is-leaving {
    animation: fp-home-headline-out 520ms ease-in forwards;
}

.elementor-19364 .elementor-element.elementor-element-edf96e5 .fp-home-headline__text.is-entering {
    animation: fp-home-headline-in 680ms ease-out both;
}

@keyframes fp-home-headline-out {
    from {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
    to {
        opacity: 0;
        filter: blur(3px);
        transform: translateY(3px);
    }
}

@keyframes fp-home-headline-in {
    from {
        opacity: 0;
        filter: blur(3px);
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .elementor-19364 .elementor-element.elementor-element-edf96e5 .fp-home-headline__text {
        animation: none !important;
        transform: none !important;
    }
}

/*
 * Front-end dashboard — preserve normal French sentence capitalization.
 * WPResidence applies title case in its dashboard stylesheet.
 */
.wpresidence_dashboard_body .dashboard_hello_section h2,
.wpresidence_dashboard_body .user_dashboard_links a,
.wpresidence_dashboard_body .wpresidence_button {
    text-transform: none !important;
}

/*
 * Header profile picture — WPResidence uses a background image with `cover`
 * but leaves its position at the browser default (top left).
 */
.menu_user_picture {
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

/*
 * Desktop main menu — keep dropdowns physically attached to their parent.
 *
 * The parent theme positions them with the global header-height variable.
 * On the two-row header this can leave a dead hover area below the navigation
 * row, while the animated `top` property makes the dropdown harder to catch.
 */
@media (min-width: 1024px) {
    .wpresidence-navigation-menu .menu-main-menu-container > ul > li.menu-item-has-children > ul,
    .wpresidence-navigation-menu .menu-mega-menu-updated-container > ul > li.menu-item-has-children:not(.with-megamenu) > ul {
        top: calc(100% - 1px) !important;
        transition: opacity 140ms ease, visibility 140ms ease !important;
    }

    .wpresidence-navigation-menu .menu-main-menu-container > ul > li.menu-item-has-children:focus-within > ul,
    .wpresidence-navigation-menu .menu-mega-menu-updated-container > ul > li.menu-item-has-children:not(.with-megamenu):focus-within > ul {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/*
 * Home search — keep the three field labels available to assistive
 * technologies without duplicating the visible placeholder text.
 */
body.home .elementor-19364 label.elementor-field-label[for="adv_actions"],
body.home .elementor-19364 label.elementor-field-label[for="adv_categ"],
body.home .elementor-19364 label.elementor-field-label[for="advanced_city"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Front-end CRM — keep the desktop dashboard navigation visible on scroll. */
@media (min-width: 1200px) {
    body.page-template-wpestate-crm-dashboard .row_user_dashboard,
    body.page-template-wpestate-crm-dashboard_leads .row_user_dashboard,
    body.page-template-wpestate-crm-dashboard_contacts .row_user_dashboard {
        overflow: visible;
    }

    body.page-template-wpestate-crm-dashboard_leads .row_user_dashboard {
        min-height: calc(100vh + 240px);
    }

    body.page-template-wpestate-crm-dashboard .row_user_dashboard > .user_menu_wrapper,
    body.page-template-wpestate-crm-dashboard_leads .row_user_dashboard > .user_menu_wrapper,
    body.page-template-wpestate-crm-dashboard_contacts .row_user_dashboard > .user_menu_wrapper {
        position: sticky;
        top: 16px;
        align-self: flex-start;
        height: auto;
    }

    body.admin-bar.page-template-wpestate-crm-dashboard .row_user_dashboard > .user_menu_wrapper,
    body.admin-bar.page-template-wpestate-crm-dashboard_leads .row_user_dashboard > .user_menu_wrapper,
    body.admin-bar.page-template-wpestate-crm-dashboard_contacts .row_user_dashboard > .user_menu_wrapper {
        top: 48px;
    }
}
