/* Fix for header display issues on details page */
.master_header {
    background-color: #fff;
    z-index: 1003;
    position: relative;
    border-style: solid;
    width: 100%;
    display: block;
    clear: both;
}

/* Ensure proper height for header wrapper */
.header_wrapper {
    width: 100%;
    margin: 0px auto;
    height: auto !important;
    min-height: 70px;
    -webkit-transition: height 0.3s ease;
    -moz-transition: height 0.3s ease;
    -o-transition: height 0.3s ease;
    transition: height 0.3s ease;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Fix for top bar in details page */
.top_bar_wrapper {
    width: 100%;
    background-color: #e8ebf1;
    display: block;
}

.top_bar {
    height: 40px;
    width: 100% !important;
    max-width: none !important;
    margin: 0px auto;
    vertical-align: middle;
    padding: 9px 25px 0px 25px;
    font-size: 13px;
    color: #9DA5B9;
}

/* Fix for header wrapper inside */
.header_wrapper_inside {
    width: 100% !important;
    max-width: none !important; /* Allow full width like homepage */
    margin: 0px auto;
    position: relative;
    height: 100%;
    min-height: 69px;
}

/* Ensure logo and menu are properly displayed */
.logo {
    display: block;
    float: left;
    padding-left: 25px;
}

#access {
    display: block;
    height: 100%;
    float: right;
    margin-right: 25px;
}

/* Fixes for details page centering */

/* Remove negative margins only within details page layout to avoid affecting global areas like footer */
.content_wrapper.listing_wrapper.row .row,
.row.content-fixed-listing,
.header_wrapper .row,
.header_top_bar .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Force full-width wrappers for the header on details page (match homepage) */
.page-wrap > .container.main_wrapper.wide,
.master_header.master_.wide.master_header_wide_no,
.header_wrapper.header_type1.header_align_center.header_wide_no,
.header_top_bar .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Center the main wrapper and make it wider to reduce blank spaces */
.content_wrapper.listing_wrapper.row {
    margin: 0 auto !important;
    float: none !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
    display: block !important;
    max-width: 1600px !important; /* Increased from 1500px to 1600px for more space */
    width: 95% !important; /* Increased from 90% to 95% for more space */
    padding-left: 15px !important;
    padding-right: 15px !important;
    /* Add clearfix to prevent layout breaks */
    overflow: hidden !important;
}

/* Gallery section should take full width and not be constrained */
.content_wrapper.listing_wrapper.row > .row.content-fixed-listing#closeButton {
    width: 100% !important;
    margin: 0 -15px !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
    display: block !important;
    clear: both !important;
}

.content_wrapper.listing_wrapper.row > .row.content-fixed-listing#closeButton .gallery_container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0px !important;
}

/* Content section layout wrapper - Fixed to use Bootstrap grid properly */
.content_wrapper.listing_wrapper.row > .row.content-fixed-listing#middleContent {
    width: 100% !important; /* Full width container */
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
    min-height: 1px !important;
    display: block !important;
    clear: both !important;
}

/* Main content area - Uses Bootstrap col-md-8 properly */
.content_wrapper.listing_wrapper.row .col-md-8 {
    float: left !important;
    width: 66.66666667% !important; /* Standard Bootstrap 8/12 columns */
    padding-left: 15px !important;
    padding-right: 15px !important;
    position: relative !important;
    min-height: 1px !important;
    box-sizing: border-box !important;
}

/* Advanced Search Form Styling */
.adv-search-1.advanced_search_form_wrapper {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.adv-search-1 select.form-control {
    height: 42px;
    margin-bottom: 19px;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

/* Sidebar - Uses Bootstrap col-md-4 properly */
.content_wrapper.listing_wrapper.row .col-md-4 {
    float: right !important;
    width: 33.33333333% !important; /* Standard Bootstrap 4/12 columns */
    padding-left: 15px !important;
    padding-right: 15px !important;
    position: relative !important;
    min-height: 1px !important;
    box-sizing: border-box !important;
}

/* Force the sidebar to appear beside the main content */
.content_wrapper.listing_wrapper.row > .col-md-4.widget-area-sidebar {
    float: right !important;
    width: 33.33333333% !important; /* Standard Bootstrap 4/12 columns */
    margin: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    position: relative !important;
    min-height: 1px !important;
    box-sizing: border-box !important;
}

/* Fix sidebar container to not break the grid - CRITICAL FIX */
.widget-area-sidebar.listingsidebar.listing_type_3 {
    float: none !important; /* Don't float the inner sidebar */
    display: block !important;
    width: 100% !important; /* 100% of its parent col-md-4 */
    margin-top: 0px !important;
    margin-left: 0px !important;
    clear: none !important; /* Don't clear - this was breaking the layout */
    position: relative !important;
    box-sizing: border-box !important;
}

/* Override the listing_type_3 sidebar positioning */
.listing_type_3 .listingsidebar {
    margin-top: 0px !important;
    margin-left: 0px !important;
    clear: none !important; /* Don't clear - this was breaking the layout */
}

/* Fix widget containers inside sidebar */
.widget-area-sidebar .widget-container {
    float: none !important;
    width: 100% !important;
    margin-bottom: 30px !important;
    box-sizing: border-box !important;
}

/* Ensure main content doesn't overflow and break the grid */
.single-content.listing-content {
    width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    /* Prevent content from expanding beyond container */
    max-width: 100% !important;
}

/* Prevent long words or content from breaking the layout */
.single-content.listing-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Fix for complex HTML content in descriptions */
.single-content.listing-content .panel-body,
.single-content.listing-content .listing_detail,
.single-content.listing-content .amenitieslistclass {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Ensure tables and other elements don't break layout */
.single-content.listing-content table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    word-wrap: break-word !important;
}

/* Center the content section and prevent shifting */
.row.content-fixed-listing.listing_type_3 {
    margin: 0 auto !important;
    float: none !important;
    position: relative !important;
    width: 100% !important;
    clear: both !important;
}

/* Ensure the main content area stays centered */
#middleContent {
    margin: 0 auto !important;
    float: none !important;
    left: 0 !important;
    right: 0 !important;
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    clear: both !important;
}

/* Ensure gallery section takes full width */
#closeButton {
    width: 100% !important;
    float: none !important;
    display: block !important;
    clear: both !important;
}

/* Fix gallery container to use full width */
.gallery_container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Prevent horizontal scrolling that might affect centering */
body, html {
    overflow-x: hidden;
    max-width: 100%;
}

/* FOOTER FULL WIDTH FIX - AGGRESSIVE APPROACH */
/* First, reset any constraints on the footer */
footer#colophon,
#colophon,
#colophon.footer_back_repeat_no {
    /* Reset all positioning */
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    
    /* Force full viewport width */
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: none !important;
    
    /* Visual styling */
    background-color: #3a3a3a !important;
    color: #ffffff !important;
    display: block !important;
    clear: both !important;
    float: none !important;
    z-index: 999 !important;
}

/* Move footer to the left edge of viewport */
footer#colophon {
    margin-left: calc(-50vw + 50%) !important;
}

/* Alternative approach for nested containers */
.website-wrapper footer#colophon,
.page-wrap footer#colophon,
.container footer#colophon,
.main_wrapper footer#colophon,
body footer#colophon {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
}

/* Prevent parent containers from constraining footer */
.website-wrapper,
.page-wrap,
.container.main_wrapper,
.content_wrapper,
#all_wrapper {
    overflow: visible !important;
}

/* Fix body overflow to show full width footer */
body {
    overflow-x: hidden !important;
    position: relative !important;
}

/* ULTIMATE FOOTER FULL WIDTH FIX */
/* Remove any max-width constraints from all parent elements */
html body .website-wrapper,
html body .page-wrap,
html body .container.main_wrapper,
html body .content_wrapper,
html body #all_wrapper {
    max-width: none !important;
    overflow: visible !important;
}

/* Force footer to escape all containers */
html body footer#colophon,
html body #colophon,
html body .footer_back_repeat_no {
    /* Reset everything */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    
    /* Ensure it's above everything */
    z-index: 9999 !important;
    
    /* Dark background */
    background-color: #3a3a3a !important;
}

/* Add margin to body to prevent content overlap with fixed footer */
body {
    margin-bottom: 400px !important; /* Adjust based on footer height */
}

/* Alternative: If fixed doesn't work, use absolute positioning */
@supports not (position: fixed) {
    html body footer#colophon {
        position: absolute !important;
        width: 100vw !important;
        left: 0 !important;
    }
}

/* Fix footer widget area - wider content area */
#footer-widget-area.row {
    width: 100% !important;
    max-width: 1600px !important; /* Wider container as shown in your code */
    margin: 0 auto !important;
    padding: 40px 0 !important;
    display: block !important;
    float: none !important;
}

/* Override any inherited row margins */
#footer-widget-area.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure footer columns use Bootstrap classes properly */
#colophon .widget-area {
    padding-left: 15px !important;
    padding-right: 15px !important;
    float: left !important; /* Ensure horizontal layout */
}

/* Ensure proper column widths - let Bootstrap handle it */
#colophon .widget-area.col-md-4,
#colophon .widget-area.col-md-3,
#colophon .widget-area.col-md-2 {
    position: relative !important;
    min-height: 1px !important;
}

/* Footer bottom section */
#colophon .footer_bottom {
    clear: both !important;
}

/* Ensure footer links have proper color for dark background */
#colophon a,
#colophon li a {
    color: #ffffff !important; /* White links */
}

#colophon a:hover,
#colophon li a:hover {
    color: #b881fc !important; /* Purple hover */
    text-decoration: none !important;
}

/* Widget titles */
#colophon .widget-title-footer {
    color: #ffffff !important; /* White titles */
    font-weight: 600 !important;
}

/* Footer text color */
#colophon,
#colophon p,
#colophon li {
    color: #ffffff !important;
}

/* Social media icons */
#colophon .social_sidebar_internal a {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid #ffffff !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 28px !important;
    text-align: center !important;
    display: inline-block !important;
    margin-right: 5px !important;
    border-radius: 50% !important;
}

#colophon .social_sidebar_internal a:hover {
    background: #ffffff !important;
    color: #3a3a3a !important;
}

/* Copyright section at the bottom */
#colophon .sub_footer,
#colophon .footer_bottom {
    color: #ffffff !important;
}

/* Clearfix for footer widget area */
#footer-widget-area:after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Remove bullets from footer lists */
#colophon ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#colophon li {
    list-style: none !important;
    margin: 0 !important;
    padding: 2px 0 !important;
}

/* Footer widget container styling */
#colophon .widget-container {
    margin-bottom: 20px !important;
}

/* Ensure footer background extends full width */
#colophon.footer_back_repeat_no {
    background-size: cover !important;
    background-position: center !important;
}

/* Let Bootstrap handle the responsive behavior */
@media (max-width: 767px) {
    #colophon .widget-area {
        width: 100% !important;
        float: none !important;
        margin-bottom: 30px !important;
    }
}

/* Clearfix for the main container to prevent layout collapse */
.content_wrapper.listing_wrapper.row:before,
.content_wrapper.listing_wrapper.row:after {
    content: " ";
    display: table;
}

.content_wrapper.listing_wrapper.row:after {
    clear: both;
}

/* Clearfix for the middle content section */
#middleContent:before,
#middleContent:after {
    content: " ";
    display: table;
}

#middleContent:after {
    clear: both;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1399px) {
    .content_wrapper.listing_wrapper.row {
        width: 98% !important; /* Even wider on smaller screens */
        max-width: 1400px !important;
    }
}

@media (max-width: 1199px) {
    .content_wrapper.listing_wrapper.row {
        width: 100% !important; /* Full width on tablets */
        max-width: 1200px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 991px) {
    .content_wrapper.listing_wrapper.row {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Stack columns on mobile */
    .content_wrapper.listing_wrapper.row .col-md-8,
    .content_wrapper.listing_wrapper.row .col-md-4,
    .content_wrapper.listing_wrapper.row > .row.content-fixed-listing#middleContent,
    .content_wrapper.listing_wrapper.row > .col-md-4.widget-area-sidebar {
        float: none !important;
        width: 100% !important;
        margin-bottom: 30px !important;
    }
    
    .widget-area-sidebar.listingsidebar.listing_type_3 {
        margin-top: 30px !important;
    }
    
    /* Gallery should still be full width on mobile */
    .content_wrapper.listing_wrapper.row > .row.content-fixed-listing#closeButton {
        width: 100% !important;
        margin: 0 10px !important;
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #3f90e0;
    color: white;
    border-radius: 4px;
    opacity: 0.7;
    z-index: 999;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease-in-out;
}

.back-to-top:hover {
    opacity: 1;
}

.back-to-top i {
    font-size: 20px;
    line-height: 40px;
}

/* Additional safeguards for complex HTML content */

/* Ensure any embedded iframes, videos, or other elements don't break the layout */
.single-content.listing-content iframe,
.single-content.listing-content video,
.single-content.listing-content object,
.single-content.listing-content embed {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Fix for any floated elements inside content that might break layout */
.single-content.listing-content .pull-left,
.single-content.listing-content .pull-right,
.single-content.listing-content .float-left,
.single-content.listing-content .float-right {
    max-width: 48% !important; /* Prevent full-width floated elements */
}

/* Ensure any custom divs or containers inside content respect boundaries */
.single-content.listing-content div,
.single-content.listing-content section,
.single-content.listing-content article {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Fix for pre-formatted text and code blocks */
.single-content.listing-content pre,
.single-content.listing-content code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* Fix for any absolute positioned elements inside content */
.single-content.listing-content .position-absolute,
.single-content.listing-content .absolute {
    position: relative !important; /* Convert to relative to prevent layout breaks */
}

/* Ensure images within content don't break layout */
.single-content.listing-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 10px auto !important;
}

/* Fix for any flex or grid containers inside content */
.single-content.listing-content .d-flex,
.single-content.listing-content .flex,
.single-content.listing-content .grid {
    flex-wrap: wrap !important;
    max-width: 100% !important;
}

/* Ensure booking engine and complex widgets don't break layout */
.booking-engine-container,
.room-availability-container,
.booking-search-form {
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}

/* Calendar placement for inquiry fields */
#ui-datepicker-div {
    position: absolute !important;
    z-index: 10000 !important;
}

/* Fix calendar positioning to stay near input field */
.ui-datepicker {
    position: absolute !important;
    z-index: 10000 !important;
}

/* Ensure calendar doesn't jump to top of page */
body .ui-datepicker {
    margin-top: 0 !important;
}

/* Fix for flatpickr calendar positioning */
.flatpickr-calendar {
    position: absolute !important;
    z-index: 9999 !important;
}

/* Prevent flatpickr from being positioned too far from input */
.flatpickr-calendar.open {
    position: absolute !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* When flatpickr uses static mode, keep it in flow under the input */
.flatpickr-calendar.static {
    position: static !important;
}

/* Anchor jQuery UI datepicker to the input container */
.booking-engine-container .date-input-container {
    position: relative !important;
}

/* Improve spacing around selects and message in inquiry form */
#inquiry_children { /* bottom spacing to separate from message */
    margin-bottom: 10px;
}

/* Force native select arrows inside booking widgets */
.booking-widget select,
.booking-engine-container select,
select.booking-form-control {
    background-image: none !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    display: block !important;
    width: 100% !important;
    height: 44px !important;
    padding: 10px 12px !important;
    border: 1px solid #bdbdbd !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
}

/* Override legacy custom select wrapper inside booking widgets */
.booking-widget .select,
.booking-engine-container .select {
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
    margin-left: 0 !important;
}

.booking-widget .select::after,
.booking-engine-container .select::after {
    display: none !important; /* remove custom triangle arrow */
}

/* Preserve Flatpickr month/year controls sizing inside calendar */
.booking-widget .flatpickr-calendar select,
.booking-engine-container .flatpickr-calendar select {
    background-image: none !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    width: auto !important;
    height: auto !important;
    padding: 2px 18px 2px 6px !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
}

.booking-widget .flatpickr-calendar .numInput.cur-year,
.booking-engine-container .flatpickr-calendar .numInput.cur-year {
    display: inline-block !important;
    height: auto !important;
    padding: 2px 6px !important;
    border: none !important;
    box-shadow: none !important;
    width: 4.8em !important; /* ensure year is fully visible */
    min-width: 4em !important;
}

/* Ensure month + year row has room and stays visible */
.booking-widget .flatpickr-calendar .flatpickr-months,
.booking-engine-container .flatpickr-calendar .flatpickr-months {
    overflow: visible !important;
}

.booking-widget .flatpickr-calendar .flatpickr-current-month,
.booking-engine-container .flatpickr-calendar .flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Mobile: ensure calendar is anchored under the input and full width if needed */
@media (max-width: 767px) {
    #ui-datepicker-div {
        width: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100vw - 20px) !important;
    }
    
    .ui-datepicker {
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100vw - 20px) !important;
    }
}

/* Fix for the booking engine table specifically */
.room-availability-table {
    width: 100% !important;
    table-layout: fixed !important;
    word-wrap: break-word !important;
}

.room-availability-table th,
.room-availability-table td {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 0 !important; /* Forces table to respect container width */
}

/* Ensure amenities section doesn't break layout */
.amenitieslistclass,
.amenities-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Force contain any content that might try to escape its container */
.panel-wrapper,
.panel-body {
    contain: layout !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

/* Critical: Force the main content column to never exceed its allocated space */
.content_wrapper.listing_wrapper.row .col-md-8 > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Critical: Force the sidebar column to never exceed its allocated space */
.content_wrapper.listing_wrapper.row .col-md-4 > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Prevent any margin or padding from pushing elements outside their containers */
.content_wrapper.listing_wrapper.row .col-md-8 > *:first-child {
    margin-top: 0 !important;
}

.content_wrapper.listing_wrapper.row .col-md-8 > *:last-child {
    margin-bottom: 0 !important;
}

.content_wrapper.listing_wrapper.row .col-md-4 > *:first-child {
    margin-top: 0 !important;
}

.content_wrapper.listing_wrapper.row .col-md-4 > *:last-child {
    margin-bottom: 0 !important;
}

/* Ensure the row container properly contains floated children */
.content_wrapper.listing_wrapper.row {
    contain: layout !important;
}

.content_wrapper.listing_wrapper.row::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Force proper box-sizing on all elements within the grid */
.content_wrapper.listing_wrapper.row *,
.content_wrapper.listing_wrapper.row *:before,
.content_wrapper.listing_wrapper.row *:after {
    box-sizing: border-box !important;
}

/* Ensure minimum heights to prevent layout collapse */
.content_wrapper.listing_wrapper.row .col-md-8 {
    min-height: 300px !important;
}

.content_wrapper.listing_wrapper.row .col-md-4 {
    min-height: 300px !important;
}

/* Additional safety: Prevent any element from having width > 100% */
.content_wrapper.listing_wrapper.row * {
    max-width: 100% !important;
}

/* Fix for any CSS that might try to make elements full viewport width */
.content_wrapper.listing_wrapper.row .w-100,
.content_wrapper.listing_wrapper.row .width-100,
.content_wrapper.listing_wrapper.row .full-width {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure the sidebar stays in place even with heavy content in main area */
.content_wrapper.listing_wrapper.row .col-md-4.widget-area-sidebar {
    position: relative !important;
    top: 0 !important;
    z-index: 1 !important;
}

/* Force modern layout constraints */
@supports (display: grid) {
    .content_wrapper.listing_wrapper.row {
        display: block !important; /* Force block layout instead of grid to maintain Bootstrap compatibility */
    }
}

/* Emergency fallback for browsers that don't support contain */
@supports not (contain: layout) {
    .content_wrapper.listing_wrapper.row {
        overflow: hidden !important;
    }
}

/* Specific fix for widgets code that might contain complex HTML */
#collapseWidgets .panel-body {
    overflow: hidden !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
}

/* Fix for any external CSS that might interfere */
.content_wrapper.listing_wrapper.row .col-md-8,
.content_wrapper.listing_wrapper.row .col-md-4 {
    display: block !important; /* Prevent any external CSS from changing display mode */
}

/* Map section overrides: ensure map iframes have a proper fixed height */
.section-map iframe {
    height: 600px !important;
}

/* Also ensure map_link iframes wrapped in map-embed-container expand properly */
.section-map .map-embed-container iframe {
    width: 100% !important;
    height: 600px !important;
    display: block !important;
}

@media (max-width: 768px) {
    .section-map iframe {
        height: 300px !important;
    }
    .section-map .map-embed-container iframe {
        height: 300px !important;
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #3f90e0;
    color: white;
    border-radius: 4px;
    opacity: 0.7;
    z-index: 999;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease-in-out;
}

.back-to-top:hover {
    opacity: 1;
}

.back-to-top i {
    font-size: 20px;
    line-height: 40px;
}

/* Additional Room and Layout Protection CSS - Critical Fix */
/* Ensure rooms section and all content respects the grid layout */
#middleContent .col-md-8 {
    max-width: 66.66666667% !important;
    flex: 0 0 66.66666667% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#middleContent .col-md-4 {
    max-width: 33.33333333% !important;
    flex: 0 0 33.33333333% !important;
    box-sizing: border-box !important;
}

/* Force all content within main column to respect boundaries */
#middleContent .col-md-8 > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Specific room section protection */
.rooms-container,
.room-listings,
.horizontal-room-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure flexbox children don't overflow */
.horizontal-room-card > * {
    min-width: 0 !important;
    flex-shrink: 1 !important;
}

/* Text overflow protection */
.room-title,
.room-description,
.info-item {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* Prevent absolute positioned elements from breaking layout */
.room-type-badge,
.price-badge {
    max-width: calc(100% - 20px) !important;
    box-sizing: border-box !important;
}

/* Ensure sidebar remains sticky in proper position */
.widget-area-sidebar.listingsidebar {
    position: relative !important;
    top: auto !important;
    right: auto !important;
}

/* Force proper flex behavior for main content row */
#middleContent .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -15px !important;
    margin-left: -15px !important;
}

/* Critical: Prevent content from pushing sidebar down */
#middleContent .row > .col-md-8,
#middleContent .row > .col-md-4 {
    position: relative !important;
    width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    display: block !important;
}

/* ---------------------------------------------
   Footer reset for details page
   Restore global centered footer and undo
   earlier full-width/fixed overrides.
---------------------------------------------- */
footer#colophon,
#colophon,
#colophon.footer_back_repeat_no {
    position: static !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
}

#footer-widget-area.row {
    width: 100% !important;
    max-width: 1170px !important;
    margin: 0 auto !important;
    padding: 40px 0 !important;
}

.sub_footer_content {
    max-width: 1145px !important;
    margin: 0 auto !important;
}

/* Remove extra bottom margin introduced for fixed footer */
body { margin-bottom: 0 !important; }

/* Align Latest Listings and Latest Articles side-by-side on desktop */
@media (min-width: 768px) {
    #colophon .col-md-12 > .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    #colophon .col-md-12 > .row > .footer_bottom {
        clear: none !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Hide Availability collapsible section entirely on details page */
#section-beds24 { display: none !important; }
