/*
Theme Name: REIGN Child
Theme URI: https://wbcomdesigns.com/downloads/reign-buddypress-theme/
Author: Wbcom Designs
Author URI: https://wbcomdesigns.com/
Description: Premium BuddyPress Theme with Elementor Page Builder support.
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: reign-child
Template: reign-theme
Domain Path: /languages/
Tags: one-column, two-columns, right-sidebar, custom-background, custom-menu, featured-images, post-formats, full-width-template, translation-ready, theme-options, threaded-comments, footer-widgets, custom-logo
*/

/* STICKY MAP STYLES - ONLY FOR ARCHIVE AND SEARCH PAGES */
/* Apply sticky map positioning ONLY on archive, search, and events pages */
/* EXCLUDE add-event and add-listing pages */
body.archive:not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.search:not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body[class*="tax-"]:not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.post-type-archive-event:not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.post-type-archive-events:not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.page-events:not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body[class*="events"]:not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    z-index: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Target any column that contains a map - archive, search, and events pages */
/* EXCLUDE add-event and add-listing pages */
body.archive:not([class*="add-event"]):not([class*="add-listing"]) .col:has(.geodir_map_container),
body.archive:not([class*="add-event"]):not([class*="add-listing"]) .col-lg-6:has(.geodir_map_container),
body.archive:not([class*="add-event"]):not([class*="add-listing"]) .col-md-6:has(.geodir_map_container),
body.archive:not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.search:not([class*="add-event"]):not([class*="add-listing"]) .col:has(.geodir_map_container),
body.search:not([class*="add-event"]):not([class*="add-listing"]) .col-lg-6:has(.geodir_map_container),
body.search:not([class*="add-event"]):not([class*="add-listing"]) .col-md-6:has(.geodir_map_container),
body.search:not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body[class*="tax-"]:not([class*="add-event"]):not([class*="add-listing"]) .col:has(.geodir_map_container),
body[class*="tax-"]:not([class*="add-event"]):not([class*="add-listing"]) .col-lg-6:has(.geodir_map_container),
body[class*="tax-"]:not([class*="add-event"]):not([class*="add-listing"]) .col-md-6:has(.geodir_map_container),
body[class*="tax-"]:not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.post-type-archive-event:not([class*="add-event"]):not([class*="add-listing"]) .col:has(.geodir_map_container),
body.post-type-archive-event:not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.post-type-archive-events:not([class*="add-event"]):not([class*="add-listing"]) .col:has(.geodir_map_container),
body.post-type-archive-events:not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.page-events:not([class*="add-event"]):not([class*="add-listing"]) .col:has(.geodir_map_container),
body.page-events:not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body[class*="events"]:not([class*="add-event"]):not([class*="add-listing"]) .col:has(.geodir_map_container),
body[class*="events"]:not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container) {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    overflow: hidden !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Fallback for browsers that don't support :has() - target map container directly */
/* EXCLUDE add-event and add-listing pages */
body.archive:not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.search:not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body[class*="tax-"]:not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.post-type-archive-event:not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.post-type-archive-events:not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.page-events:not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body[class*="events"]:not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    z-index: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Universal sticky map rule - archive, search, and events pages */
/* EXCLUDE add-event and add-listing pages */
body.archive:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.archive:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.archive:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.search:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.search:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.search:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body[class*="tax-"]:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body[class*="tax-"]:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body[class*="tax-"]:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.post-type-archive-event:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.post-type-archive-event:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.post-type-archive-event:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.post-type-archive-events:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.post-type-archive-events:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.post-type-archive-events:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body.page-events:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body.page-events:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body.page-events:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container),
body[class*="events"]:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .geodir_map_container,
body[class*="events"]:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) .gd-sa-map,
body[class*="events"]:not(.wp-admin):not([class*="add-event"]):not([class*="add-listing"]) [class*="col-"]:has(.geodir_map_container) {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    overflow: hidden !important;
    z-index: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure archive/search/events pages get proper sticky map behavior with full viewport height */
body.archive .geodir_map_container .map_background,
body.archive .geodir_map_container .main_map_wrapper,
body.search .geodir_map_container .map_background,
body.search .geodir_map_container .main_map_wrapper,
body[class*="tax-"] .geodir_map_container .map_background,
body[class*="tax-"] .geodir_map_container .main_map_wrapper,
body.post-type-archive-event .geodir_map_container .map_background,
body.post-type-archive-event .geodir_map_container .main_map_wrapper,
body.post-type-archive-events .geodir_map_container .map_background,
body.post-type-archive-events .geodir_map_container .main_map_wrapper,
body.page-events .geodir_map_container .map_background,
body.page-events .geodir_map_container .main_map_wrapper,
body[class*="events"] .geodir_map_container .map_background,
body[class*="events"] .geodir_map_container .main_map_wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

body.archive .geodir_map_container .geodir-map-canvas,
body.search .geodir_map_container .geodir-map-canvas,
body[class*="tax-"] .geodir_map_container .geodir-map-canvas,
body.post-type-archive-event .geodir_map_container .geodir-map-canvas,
body.post-type-archive-events .geodir_map_container .geodir-map-canvas,
body.page-events .geodir_map_container .geodir-map-canvas,
body[class*="events"] .geodir_map_container .geodir-map-canvas {
    position: relative !important;
    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
}

/* Map archive container */
.map-archive-container {
    position: relative;
}

/* Sticky sidebar for archive/search/events pages */
body.archive .sd-sidebar:has(.geodir_map_container),
body.archive .sidebar:has(.geodir_map_container),
body.archive .sd-sidebar-right,
body.archive .sd-sidebar-left,
body.search .sd-sidebar:has(.geodir_map_container),
body.search .sidebar:has(.geodir_map_container),
body.search .sd-sidebar-right,
body.search .sd-sidebar-left,
body[class*="tax-"] .sd-sidebar:has(.geodir_map_container),
body[class*="tax-"] .sidebar:has(.geodir_map_container),
body[class*="tax-"] .sd-sidebar-right,
body[class*="tax-"] .sd-sidebar-left,
body.post-type-archive-event .sd-sidebar:has(.geodir_map_container),
body.post-type-archive-event .sidebar:has(.geodir_map_container),
body.post-type-archive-event .sd-sidebar-right,
body.post-type-archive-event .sd-sidebar-left,
body.post-type-archive-events .sd-sidebar:has(.geodir_map_container),
body.post-type-archive-events .sidebar:has(.geodir_map_container),
body.post-type-archive-events .sd-sidebar-right,
body.post-type-archive-events .sd-sidebar-left,
body.page-events .sd-sidebar:has(.geodir_map_container),
body.page-events .sidebar:has(.geodir_map_container),
body.page-events .sd-sidebar-right,
body.page-events .sd-sidebar-left,
body[class*="events"] .sd-sidebar:has(.geodir_map_container),
body[class*="events"] .sidebar:has(.geodir_map_container),
body[class*="events"] .sd-sidebar-right,
body[class*="events"] .sd-sidebar-left {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 20px !important;
    height: calc(100vh - 40px) !important;
    overflow: hidden !important;
    z-index: 999 !important;
}

body.archive .sd-sidebar.sd-sidebar-right.sticky-sidebar,
body.search .sd-sidebar.sd-sidebar-right.sticky-sidebar,
body[class*="tax-"] .sd-sidebar.sd-sidebar-right.sticky-sidebar {
    position: sticky !important;
    top: 20px !important;
    height: calc(100vh - 40px) !important;
    overflow: hidden;
    z-index: 10;
}

body.archive .sd-sidebar.sd-sidebar-right.sticky-sidebar .sidebar,
body.search .sd-sidebar.sd-sidebar-right.sticky-sidebar .sidebar,
body[class*="tax-"] .sd-sidebar.sd-sidebar-right.sticky-sidebar .sidebar {
    height: 100% !important;
    position: sticky !important;
    top: 0 !important;
}

body.archive .sd-sidebar.sd-sidebar-right.sticky-sidebar .geodir_map_container,
body.search .sd-sidebar.sd-sidebar-right.sticky-sidebar .geodir_map_container,
body[class*="tax-"] .sd-sidebar.sd-sidebar-right.sticky-sidebar .geodir_map_container {
    height: 100% !important;
    position: relative !important;
}

body.archive .map-archive-container .sd-sidebar.sd-sidebar-right.sticky-sidebar,
body.search .map-archive-container .sd-sidebar.sd-sidebar-right.sticky-sidebar,
body[class*="tax-"] .map-archive-container .sd-sidebar.sd-sidebar-right.sticky-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    overflow: visible !important;
    z-index: 10 !important;
}

/* Fallback for browsers that don't support :has() */
.sd-sidebar .geodir_map_container,
.sidebar .geodir_map_container {
    position: relative !important;
}

/* Ensure all map elements are edge-to-edge - but exclude search bar */
.gd-sa-map *,
.geodir_map_container *:not(.geodir-map-directions-wrap),
.gd-sa-map .geodir_map_container,
.geodir_map_container .main_map_wrapper,
.geodir_map_container .geodir-map-canvas {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Ensure search bar has proper spacing and positioning */
.geodir_map_container .geodir-map-directions-wrap {
    padding: 15px 0 !important;
    margin: 15px 0 !important;
    border: none !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Ensure the map canvas itself is full size */
.geodir_map_container .geodir-map-canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Ensure map canvas can render properly - archive/search only */
body.archive .geodir_map_container .geodir-map-canvas,
body.archive .gd-sa-map .geodir-map-canvas,
body.search .geodir_map_container .geodir-map-canvas,
body.search .gd-sa-map .geodir-map-canvas,
body[class*="tax-"] .geodir_map_container .geodir-map-canvas,
body[class*="tax-"] .gd-sa-map .geodir-map-canvas {
    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    position: relative !important;
}

body.archive .sd-sidebar .geodir_map_container,
body.archive .sidebar .geodir_map_container,
body.search .sd-sidebar .geodir_map_container,
body.search .sidebar .geodir_map_container,
body[class*="tax-"] .sd-sidebar .geodir_map_container,
body[class*="tax-"] .sidebar .geodir_map_container {
    height: 100% !important;
}

/* Ensure the listings container has proper scrolling */
#sd-archive-map {
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}

/* Mobile responsiveness - hide sticky behavior on mobile */
@media (max-width: 767.98px) {
    body.archive .sd-sidebar.sd-sidebar-right.sticky-sidebar,
    body.search .sd-sidebar.sd-sidebar-right.sticky-sidebar,
    body[class*="tax-"] .sd-sidebar.sd-sidebar-right.sticky-sidebar {
        position: relative !important;
        height: auto !important;
    }
    
    #sd-archive-map {
        max-height: none;
        overflow-y: visible;
    }
    
    /* On mobile, don't force viewport height */
    body.archive .geodir_map_container .map_background,
    body.archive .geodir_map_container .main_map_wrapper,
    body.archive .geodir_map_container .geodir-map-canvas,
    body.search .geodir_map_container .map_background,
    body.search .geodir_map_container .main_map_wrapper,
    body.search .geodir_map_container .geodir-map-canvas,
    body[class*="tax-"] .geodir_map_container .map_background,
    body[class*="tax-"] .geodir_map_container .main_map_wrapper,
    body[class*="tax-"] .geodir_map_container .geodir-map-canvas {
        height: auto !important;
        min-height: 325px !important;
        max-height: none !important;
    }
}

/* SINGLE DETAIL PAGES - Ensure natural content flow */
body.geodir-page-single .geodir_map_container,
body.geodir-page-single .gd-sa-map,
body.geodir-page-single [class*="col-"]:has(.geodir_map_container),
body.geodir-page-single .sd-sidebar,
body.geodir-page-single .sidebar {
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.geodir-page-single .geodir_map_container .map_background,
body.geodir-page-single .geodir_map_container .main_map_wrapper,
body.geodir-page-single .geodir_map_container .geodir-map-canvas {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 325px !important;
    max-height: none !important;
    overflow: visible !important;
}

/* ADD/EDIT PAGES - Prevent positioning issues and override sticky map styles */
body:not(.wp-admin)[class*="add-listing"] .fl-row,
body:not(.wp-admin)[class*="add-listing"] .fl-row-content-wrap,
body:not(.wp-admin)[class*="add-listing"] .fl-col,
body:not(.wp-admin)[class*="add-listing"] .fl-col-content,
body:not(.wp-admin)[class*="add-listing"] .fl-col-group,
body:not(.wp-admin)[class*="add-event"] .fl-row,
body:not(.wp-admin)[class*="add-event"] .fl-row-content-wrap,
body:not(.wp-admin)[class*="add-event"] .fl-col,
body:not(.wp-admin)[class*="add-event"] .fl-col-content,
body:not(.wp-admin)[class*="add-event"] .fl-col-group {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    transform: none !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Force override sticky map styles on add-event and add-listing pages */
body[class*="add-event"] .geodir_map_container,
body[class*="add-event"] .gd-sa-map,
body[class*="add-event"] [class*="col-"]:has(.geodir_map_container),
body[class*="add-event"] .sd-sidebar,
body[class*="add-event"] .sidebar,
body[class*="add-listing"] .geodir_map_container,
body[class*="add-listing"] .gd-sa-map,
body[class*="add-listing"] [class*="col-"]:has(.geodir_map_container),
body[class*="add-listing"] .sd-sidebar,
body[class*="add-listing"] .sidebar {
    position: static !important;
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    z-index: auto !important;
}

/* Force map containers to be static on add/edit pages - but ensure map has visible height */
body:not(.wp-admin)[class*="add-listing"] .geodir_map_container,
body:not(.wp-admin)[class*="add-listing"] .gd-sa-map,
body:not(.wp-admin)[class*="add-listing"] [class*="col-"]:has(.geodir_map_container),
body:not(.wp-admin)[class*="add-event"] .geodir_map_container,
body:not(.wp-admin)[class*="add-event"] .gd-sa-map,
body:not(.wp-admin)[class*="add-event"] [class*="col-"]:has(.geodir_map_container),
body:not(.wp-admin) .geodir-add_listing-map-wrap .geodir_map_container,
body:not(.wp-admin) .geodir-add_listing-map-wrap {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    transform: none !important;
    height: auto !important;
    min-height: 350px !important;
    max-height: none !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* Ensure map canvas and wrapper have proper explicit height on add/edit pages */
body:not(.wp-admin)[class*="add-listing"] .geodir_map_container .map_background,
body:not(.wp-admin)[class*="add-listing"] .geodir_map_container .main_map_wrapper,
body:not(.wp-admin)[class*="add-event"] .geodir_map_container .map_background,
body:not(.wp-admin)[class*="add-event"] .geodir_map_container .main_map_wrapper,
body:not(.wp-admin) .geodir-add_listing-map-wrap .geodir_map_container .map_background,
body:not(.wp-admin) .geodir-add_listing-map-wrap .geodir_map_container .main_map_wrapper,
body:not(.wp-admin) #address_map_wrapper {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 350px !important;
    max-height: none !important;
    overflow: hidden !important;
    display: block !important;
}

/* Map canvas itself needs to be contained */
body:not(.wp-admin)[class*="add-listing"] .geodir_map_container .geodir-map-canvas,
body:not(.wp-admin)[class*="add-event"] .geodir_map_container .geodir-map-canvas,
body:not(.wp-admin) .geodir-add_listing-map-wrap .geodir_map_container .geodir-map-canvas,
body:not(.wp-admin) #address_map {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 350px !important;
    max-height: none !important;
    overflow: hidden !important;
    display: block !important;
}

/* Ensure loading overlay doesn't hide map permanently on add-listing pages */
body:not(.wp-admin)[class*="add-listing"] .geodir_map_container .loading_div,
body:not(.wp-admin)[class*="add-event"] .geodir_map_container .loading_div,
body:not(.wp-admin) #address_map_loading_div {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Force specific problematic elements to be normal on add/edit pages */
body:not(.wp-admin)[class*="add-listing"] .fl-row[data-node="g0w9ravo583f"],
body:not(.wp-admin)[class*="add-listing"] .fl-row[data-node="zpo567crbvnf"],
body:not(.wp-admin)[class*="add-event"] .fl-row[data-node="g0w9ravo583f"],
body:not(.wp-admin)[class*="add-event"] .fl-row[data-node="zpo567crbvnf"] {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    transform: none !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Help center Beaver Builder row content when row has fixed width */
.fl-row {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.fl-row .fl-row-content-wrap,
.fl-row-content-wrap {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Ensure fixed-width rows are centered - target by Beaver Builder class */
.fl-row.fl-row-fixed-width {
    margin: 0 auto !important;
    display: block !important;
    width: 100% !important;
}

/* Ensure fixed-width rows content wrap is centered - use explicit margins */
.fl-row.fl-row-fixed-width .fl-row-content-wrap {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: auto !important;
}

/* Also target by data attribute if it exists */
.fl-row[data-width="fixed"] {
    margin: 0 auto !important;
    display: block !important;
    width: 100% !important;
}

.fl-row[data-width="fixed"] .fl-row-content-wrap {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: auto !important;
}

/* Target content wraps with specific max-width values (not 100%) */
.fl-row-content-wrap[style*="max-width"]:not([style*="max-width: 100%"]):not([style*="max-width:100%"]) {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: auto !important;
}

/* Center columns within fixed-width rows */
.fl-row.fl-row-fixed-width .fl-col-group {
    margin: 0 auto !important;
}

/* Ensure parent containers allow centering */
.fl-builder-content {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.fl-builder-content[data-post-id] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure all parents of fixed-width rows allow centering */
.fl-builder-content .fl-row.fl-row-fixed-width {
    position: relative !important;
}

.fl-builder-content .fl-row.fl-row-fixed-width .fl-row-content-wrap {
    position: relative !important;
}

/* Navigation Bar - Sticky applied via JavaScript after scroll */
.rg-hdr-v4-row-2 {
    position: relative !important;
    z-index: 99998 !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
}

/* User Account Dropdown Menu - Ensure it appears above navigation */
header .dropdown-menu,
#masthead .dropdown-menu,
.site-header .dropdown-menu,
header [class*="dropdown-menu"],
#masthead [class*="dropdown-menu"],
.site-header [class*="dropdown-menu"],
[class*="user-dropdown"] .dropdown-menu,
[class*="account-dropdown"] .dropdown-menu {
    z-index: 99999 !important;
}

/* Ensure parent containers don't prevent sticky positioning */
body .rg-hdr-v4-row-2,
.site .rg-hdr-v4-row-2,
#page .rg-hdr-v4-row-2,
header .rg-hdr-v4-row-2,
#masthead .rg-hdr-v4-row-2,
.site-header .rg-hdr-v4-row-2 {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
}

/* Fix parent containers that might prevent sticky - but only for navigation, not all sidebars */
header:has(.rg-hdr-v4-row-2),
#masthead:has(.rg-hdr-v4-row-2),
.site-header:has(.rg-hdr-v4-row-2),
.rg-hdr-v4-row-2 {
    max-height: none !important;
}

/* Ensure parent containers allow sticky by fixing overflow - navigation only */
header:has(.rg-hdr-v4-row-2),
#masthead:has(.rg-hdr-v4-row-2),
.site-header:has(.rg-hdr-v4-row-2),
.rg-hdr-v4-row-2 {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

.rg-hdr-v4-row-2 .container {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* Desktop: Horizontal scrolling navigation menu - only on larger screens */
@media (min-width: 992px) {
    /* Navigation menu with horizontal scrolling - centered */
    .rg-hdr-v4-row-2 .wb-grid,
    .rg-hdr-v4-row-2 .header-right {
        display: flex !important;
        justify-content: center !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        /* Hide scrollbar for Firefox */
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    /* Hide scrollbar for webkit browsers (Chrome, Safari, Edge) */
    .rg-hdr-v4-row-2 .wb-grid::-webkit-scrollbar,
    .rg-hdr-v4-row-2 .header-right::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }
    
    /* Navigation menu items - centered, single row, no wrap */
    #primary-menu,
    .primary-menu {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
        margin: 0 auto !important;
        padding: 0 30px !important;
        list-style: none !important;
        width: 100% !important;
        min-width: max-content !important;
    }
    
    /* Navigation menu items */
    #primary-menu li,
    .primary-menu li {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }
    
    /* Navigation menu links - increased size */
    #primary-menu a,
    .primary-menu a {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 18px 28px !important;
        color: inherit !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Navigation menu link hover */
    #primary-menu a:hover,
    .primary-menu a:hover {
        opacity: 0.8 !important;
    }
    
    /* Navigation menu icons - increased size */
    #primary-menu i,
    .primary-menu i {
        font-size: 24px !important;
    }
    
    /* Active/current menu item */
    #primary-menu .current-menu-item a,
    .primary-menu .current-menu-item a,
    #primary-menu a[aria-current="page"],
    .primary-menu a[aria-current="page"] {
        opacity: 0.9 !important;
        font-weight: 700 !important;
    }
}

/* Mobile: Allow hamburger menu and display vertically when opened */
@media (max-width: 991.98px) {
    /* Hide desktop horizontal menu on mobile */
    .rg-hdr-v4-row-2 #primary-menu,
    .rg-hdr-v4-row-2 .primary-menu {
        display: none !important;
    }
    
    /* When mobile menu is toggled open, display it vertically */
    .rg-hdr-v4-row-2.toggled #primary-menu,
    .rg-hdr-v4-row-2.toggled .primary-menu,
    .rg-hdr-v4-row-2[aria-expanded="true"] #primary-menu,
    .rg-hdr-v4-row-2[aria-expanded="true"] .primary-menu,
    #primary-menu.toggled,
    .primary-menu.toggled,
    #primary-menu.menu-open,
    .primary-menu.menu-open {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99999 !important;
    }
    
    /* Mobile menu items - vertical layout */
    #primary-menu.toggled li,
    .primary-menu.toggled li,
    #primary-menu.menu-open li,
    .primary-menu.menu-open li {
        width: 100% !important;
        flex: 1 1 auto !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Mobile menu links - full width, vertical */
    #primary-menu.toggled a,
    .primary-menu.toggled a,
    #primary-menu.menu-open a,
    .primary-menu.menu-open a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 16px 20px !important;
        font-size: 16px !important;
        gap: 12px !important;
        color: inherit !important;
    }
    
    /* Mobile menu icons */
    #primary-menu.toggled i,
    .primary-menu.toggled i,
    #primary-menu.menu-open i,
    .primary-menu.menu-open i {
        font-size: 20px !important;
    }
}

/* Beaver Builder Custom Styles */
.card > .card:hover {
    box-shadow: rgba(7, 10, 25, 0.25) 0px 15px 45px -5px !important;
    box-sizing: border-box;
    transform: matrix(1, 0, 0, 1, 0, -2);
    transition-delay: 0s;
    transition-duration: 0.3s;
    transition-property: all;
    transition-timing-function: ease;
}

.carousel-inner {
    overflow: visible !important;
}

/* Blog posts hover effect - target all blog post elements */
.uabb-post-wrapper,
.uabb-post-wrapper .uabb-blog-post-inner-wrap,
.uabb-post-wrapper .uabb-blog-posts-shadow {
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    border-radius: 15px !important;
}

/* Round top corners of blog post thumbnails/images */
.uabb-post-thumbnail,
.uabb-post-thumbnail img,
.uabb-post-thumbnail a {
    border-top-left-radius: 15px !important;
    border-top-right-radius: 15px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    overflow: hidden !important;
}

/* Apply hover effect when hovering anywhere on the post wrapper */
.uabb-post-wrapper:hover .uabb-blog-post-inner-wrap,
.uabb-post-wrapper:hover .uabb-blog-posts-shadow {
    box-shadow: rgba(7, 10, 25, 0.25) 0px 15px 45px -5px !important;
    box-sizing: border-box !important;
    transform: matrix(1, 0, 0, 1, 0, -2) !important;
    border-radius: 15px !important;
}

/* Also apply when hovering the link element (using :has() for modern browsers) */
.uabb-post-wrapper:has(.uabb-blog-post-element-link:hover) .uabb-blog-post-inner-wrap,
.uabb-post-wrapper:has(.uabb-blog-post-element-link:hover) .uabb-blog-posts-shadow {
    box-shadow: rgba(7, 10, 25, 0.25) 0px 15px 45px -5px !important;
    box-sizing: border-box !important;
    transform: matrix(1, 0, 0, 1, 0, -2) !important;
    border-radius: 15px !important;
}

/* Fallback: apply when hovering directly on the inner elements */
.uabb-blog-post-inner-wrap:hover,
.uabb-blog-posts-shadow:hover {
    box-shadow: rgba(7, 10, 25, 0.25) 0px 15px 45px -5px !important;
    box-sizing: border-box !important;
    transform: matrix(1, 0, 0, 1, 0, -2) !important;
    border-radius: 15px !important;
}

.uabb-module-content {
    overflow: visible !important;
}

article.wb-grid-view:hover {
    box-shadow: rgba(7, 10, 25, 0.25) 0px 15px 45px -5px !important;
    box-sizing: border-box;
    transform: matrix(1, 0, 0, 1, 0, -2);
    transition-delay: 0s;
    transition-duration: 0.3s;
    transition-property: all;
    transition-timing-function: ease;
}

.rg-member {
    background-color: #ffffff !important;;
}

.rg-member:hover {
    box-shadow: rgba(7, 10, 25, 0.25) 0px 15px 45px -5px !important;
    box-sizing: border-box;
    transform: matrix(1, 0, 0, 1, 0, -2);
    transition-delay: 0s;
    transition-duration: 0.3s;
    transition-property: all;
    transition-timing-function: ease;
}

.rg-member .slick-list {
    overflow: visible !important;
}

/* Badge links on all cards - white text, 14px font size */
.badge,
.badge a,
.badge a:link,
.badge a:visited,
.badge a:hover,
.badge a:active,
.badge a:focus,
.geodir-tags-pills .badge,
.geodir-tags-pills .badge a,
.geodir-tags-pills .badge a:link,
.geodir-tags-pills .badge a:visited,
.geodir-tags-pills .badge a:hover,
.geodir-tags-pills .badge a:active,
.geodir-tags-pills .badge a:focus,
.card .badge,
.card .badge a,
.card .badge a:link,
.card .badge a:visited,
.card .badge a:hover,
.card .badge a:active,
.card .badge a:focus,
article .badge,
article .badge a,
article .badge a:link,
article .badge a:visited,
article .badge a:hover,
article .badge a:active,
article .badge a:focus,
.wb-grid-view .badge,
.wb-grid-view .badge a,
.wb-grid-view .badge a:link,
.wb-grid-view .badge a:visited,
.wb-grid-view .badge a:hover,
.wb-grid-view .badge a:active,
.wb-grid-view .badge a:focus,
body.archive .badge,
body.archive .badge a,
body.archive .card .badge,
body.archive .card .badge a,
body.archive article .badge,
body.archive article .badge a,
body.archive .wb-grid-view .badge,
body.archive .wb-grid-view .badge a,
body.archive .geodir-tags-pills .badge,
body.archive .geodir-tags-pills .badge a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px !important;
    padding: 4px 8px !important;
    line-height: 1.2 !important;
}

/* Remove top and bottom padding from card headings */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card .card-title,
.card .card-header,
.card .card-heading,
.card [class*="title"],
.card [class*="heading"],
article h1,
article h2,
article h3,
article h4,
article h5,
article h6,
article .card-title,
article .card-header,
article .card-heading,
article [class*="title"],
article [class*="heading"],
.wb-grid-view h1,
.wb-grid-view h2,
.wb-grid-view h3,
.wb-grid-view h4,
.wb-grid-view h5,
.wb-grid-view h6,
.wb-grid-view .card-title,
.wb-grid-view .card-header,
.wb-grid-view .card-heading,
.wb-grid-view [class*="title"],
.wb-grid-view [class*="heading"],
[class*="card"] h1,
[class*="card"] h2,
[class*="card"] h3,
[class*="card"] h4,
[class*="card"] h5,
[class*="card"] h6,
[class*="card"] .card-title,
[class*="card"] .card-header,
[class*="card"] .card-heading,
[class*="card"] [class*="title"],
[class*="card"] [class*="heading"],
.geodir-entry-title,
.geodir-post-title h1,
.geodir-post-title h2,
.geodir-post-title h3,
.geodir-post-title h4,
.geodir-post-title h5,
.geodir-post-title h6,
.geodir-post-title .geodir-entry-title,
.card-body .geodir-entry-title,
.card-body .geodir-post-title,
.geodir-post .geodir-entry-title,
.geodir-post .geodir-post-title {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Make .bsui .bg-light background transparent */
.bsui .bg-light,
.bg-light.bsui,
.bsui.bg-light {
    background-color: transparent !important;
}

/* Make background of child containers in .fl-module-fl-author-bio .fl-module-content transparent */
.fl-module-fl-author-bio .fl-module-content > *,
.fl-module-fl-author-bio .fl-module-content .fl-module-content,
.fl-module-fl-author-bio .fl-module-content [class*="container"],
.fl-module-fl-author-bio .fl-module-content [class*="wrap"],
.fl-module-fl-author-bio .fl-module-content [class*="inner"] {
    background-color: transparent !important;
}
