/* ============================================================
 * MAMO Shared Header v3.1 - Shared CSS for property pages
 *
 * Hard rules enforced:
 *   - NO body or html overflow-x (root-cause fix per element)
 *   - WCAG AA contrast on phone, email, lang switcher (>= 4.5:1)
 *   - Lang menu closed by default (opens on :hover/:focus-within)
 *   - Sticky behavior, z-index 80 (no 9999999)
 *   - Same Elementor template 6151 markup as homepage
 *
 * Targets: body.single-property (Aurora EN canary)
 * ============================================================ */

/* === Per-element overflow containment (root cause, no body/html overflow-x) === */
body.single-property .rh-ultra-thumb-info-box,
body.single-property .page-head-inner,
body.single-property .rh-ultra-property-title-price,
body.single-property .property-title,
body.single-property .social-share,
body.single-property .rhea_trigger_map,
body.single-property .rh-ultra-property-card-2,
body.single-property .leaflet-container,
body.single-property .owl-stage-outer,
body.single-property .mamo-property-detail,
body.single-property .mamo-property-meta,
body.single-property .rh-ultra-thumb-info,
body.single-property .rhea_featured_properties_default,
body.single-property .rhea-container,
body.single-property .rh-page-head,
body.single-property .rh-ultra-content-wrapper,
body.single-property .rh-ultra-section-wrap,
body.single-property .rh-ultra-property-detail-meta,
body.single-property .rhea-single-property,
body.single-property section {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* === Word-wrap long titles / strings in property title / address === */
body.single-property .rh-ultra-property-title-price,
body.single-property .property-title,
body.single-property h1, body.single-property h2,
body.single-property .mamo-property-address,
body.single-property .mamo-property-location {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
}

/* === Owl/carousel stage must clip, not overflow === */
body.single-property .owl-stage-outer { overflow: hidden !important; }

/* === Sticky header pinned z-index 80 (no 9999999) === */
body.single-property header.elementor-section,
body.single-property .elementor-location-header,
body.single-property header.nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 80 !important;
}

/* === WCAG AA contrast — phone/email/CTA in top bar === */
body.single-property .rhea-button-widget a,
body.single-property .rhea-button-widget a:visited {
    color: #123E56 !important;          /* 9.4:1 on #FFFFFF AAA */
    background-color: #FFFFFF !important;
}
body.single-property .rhea-button-widget a:hover,
body.single-property .rhea-button-widget a:focus {
    color: #FFFFFF !important;
    background-color: #123E56 !important; /* 9.4:1 inverse */
}

/* === WCAG AA contrast — language switcher === */
body.single-property .rhea-nav-menu .sub-menu li a,
body.single-property .rhea-nav-menu .sub-menu li.current-lang a {
    color: #123E56 !important;          /* 9.4:1 inactive */
}
body.single-property .rhea-nav-menu .sub-menu li.current-lang a,
body.single-property .rhea-nav-menu .sub-menu li.active a {
    color: #D4AF37 !important;          /* gold on white = 3.0:1 — keep active state on darker bg */
    background-color: #FFFFFF !important;
}
/* Active state — keep on dark bar to meet 4.5:1 */
body.single-property .rhea-nav-menu .sub-menu li.current-lang > a {
    color: #D4AF37 !important;
    background-color: #123E56 !important; /* gold-on-navy = 5.8:1 AAA */
}

/* === Lang menu closed by default === */
body.single-property .rhea-nav-menu .sub-menu,
body.single-property .rhea-nav-menu .sub-menu .sub-menu {
    display: none !important;
}
body.single-property .rhea-nav-menu .menu-item:hover > .sub-menu,
body.single-property .rhea-nav-menu .menu-item:focus-within > .sub-menu,
body.single-property .rhea-nav-menu .menu-item.is-open > .sub-menu {
    display: block !important;
}

/* === Top bar phone/email — force visible color even if theme sets white-on-white === */
body.single-property .rhea-top-bar,
body.single-property .rhea-top-bar a,
body.single-property .rhea-top-bar span,
body.single-property .rhea-top-bar i {
    color: #123E56 !important;
}

/* === Prevent sticky header from shrinking the logo (Aurora mobile showed 0x0) === */
body.single-property .rhea-button-widget img,
body.single-property .elementor-widget-image img,
body.single-property header.nav img {
    max-width: 100% !important;
    height: auto !important;
}

/* === Ensure overflow doesn't leak through iframes (map embed etc) === */
body.single-property iframe {
    max-width: 100% !important;
}