/* Site-Wide CSS Overrides and Fixes */
/* This file contains all custom CSS overrides and fixes for the entire website */
/* It is loaded after app.css to ensure proper override priority */

/* ========================================
   MOBILE NAVIGATION FIXES
   ======================================== */

/* Fix mobile nav to be on top with solid background */
#site-navigation.mobile-nav {
    z-index: 99999 !important;
    background-color: #C5A95E !important;
    width: 100% !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
}

/* Hide page content when mobile menu is active (using the actual class from custom.js) */
body.mob-menu-active .search-container,
body.mob-menu-active .filter-container,
body.mob-menu-active .pagination,
body.mob-menu-active .filter-flex,
body.mob-menu-active .search-results-heading,
body.mob-menu-active .flex-image,
body.mob-menu-active .section-spacing-bottom,
body.mob-menu-active .sticky-mobile-search-container,
body.mob-menu-active main,
body.mob-menu-active section:not(:has(#site-navigation)) {
    display: none !important;
    visibility: hidden !important;
}

/* Alternative approach: When mobile-nav class is present */
body:has(#site-navigation.mobile-nav) .search-container,
body:has(#site-navigation.mobile-nav) .pagination,
body:has(#site-navigation.mobile-nav) .filter-flex,
body:has(#site-navigation.mobile-nav) .search-results-heading,
body:has(#site-navigation.mobile-nav) .flex-image,
body:has(#site-navigation.mobile-nav) main,
body:has(#site-navigation.mobile-nav) section:not(:has(#site-navigation)) {
    display: none !important;
}

/* Keep mobile nav header visible */
#site-navigation.mobile-nav .main-header,
body.mob-menu-active .main-header {
    display: block !important;
    position: relative !important;
    z-index: 100000 !important;
}

/* Ensure mobile nav content is visible */
#site-navigation.mobile-nav ul.navbar,
body.mob-menu-active #site-navigation ul.navbar {
    display: block !important;
    position: relative !important;
    z-index: 100000 !important;
}

/* Additional mobile nav fixes can be added below */

/* ========================================
   STICKY CTA PHONE NUMBER
   ======================================== */

/* Hide CTA number completely on home page */
.home .cta-number,
.page-template-page_home .cta-number,
body.home .cta-number,
.home-page .cta-number {
    display: none !important;
}

/* Only apply sticky styles when sticky class is added */
.cta-number.sticky {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    z-index: 50000 !important; /* Very high z-index to ensure it's above cards but still below mobile nav (99999) */
    background-color: transparent !important;
    box-shadow: none !important;
    animation: slideDown 0.3s ease;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    max-height: 60px !important;
    overflow: visible !important;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
    }
    to {
        transform: translateX(-50%) translateY(0);
    }
}

/* Ensure the phone link styling is maintained when sticky */
.cta-number.sticky a {
    display: inline-block !important;
    text-align: center !important;
    padding: 10px 20px !important;
    color: white !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    background-color: #C5A95E !important;
    height: auto !important;
    line-height: normal !important;
    border-radius: 30px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    white-space: nowrap !important;
}

.cta-number.sticky a:hover {
    background-color: #b89b52 !important;
    transform: scale(1.05) !important;
    transition: all 0.2s ease !important;
}

/* Hide sticky CTA when mobile menu is active */
.mob-menu-active .cta-number.sticky {
    display: none !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .cta-number.sticky {
        max-height: 50px !important;
        top: 8px !important;
    }
    
    .cta-number.sticky a {
        font-size: 13px !important;
        padding: 8px 15px !important;
        border-radius: 25px !important;
    }
}

/* ========================================
   TYPOGRAPHY & READABILITY IMPROVEMENTS
   ======================================== */

/* Base Typography Reset & Improvements */
* {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

html {
    font-size: 16px !important; /* Base font size for better readability */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 14px !important; /* 14px base */
    line-height: 1.6 !important; /* Adjusted line height for smaller font */
    /* Removed forced color - let original styles work */
    letter-spacing: 0.01em !important;
}

/* Heading Improvements */
h1, h2, h3, h4, h5, h6 {
    /* Removed forced colors - let original styles work */
    line-height: 1.3 !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.75em !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important; /* Reduced from 4px for better readability */
}

h1 {
    font-size: 2.25rem !important; /* 36px */
}

h2 {
    font-size: 1.875rem !important; /* 30px */
}

h3 {
    font-size: 1.5rem !important; /* 24px */
}

h4 {
    font-size: 1.25rem !important; /* 20px */
}

h5 {
    font-size: 1.125rem !important; /* 18px */
}

h6 {
    font-size: 1rem !important; /* 16px */
}

/* Paragraph and Text Content */
p {
    margin-bottom: 1rem !important;
    line-height: 1.6 !important;
    font-size: 14px !important;
    /* Removed forced color - let original styles work */
}

/* Links - Remove underlines only */
a {
    text-decoration: none !important; /* Remove underlines */
    /* Let original colors work */
}

a:focus {
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

/* Property Listing Specific Improvements */
.property-description,
.listing-description,
.property-details {
    font-size: 14px !important; /* 14px */
    line-height: 1.6 !important;
}

.property-price,
.listing-price {
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}

.property-features li,
.listing-features li {
    padding: 0.5rem 0 !important;
    line-height: 1.6 !important;
}

/* Lists */
ul, ol {
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
    font-size: 14px !important;
}

li {
    margin-bottom: 0.4rem !important;
    font-size: 14px !important;
}

/* Tables - Better readability */
table {
    border-collapse: collapse !important;
    width: 100% !important;
}

th, td {
    padding: 0.75rem !important;
    text-align: left !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

th {
    font-weight: 600 !important;
    background-color: #f8f8f8 !important;
}

/* Form Elements - but not in modals */
input:not(.modal-inquiry input), 
textarea:not(.modal-inquiry textarea), 
select:not(.modal-inquiry select) {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding: 0.625rem !important;
    border: 1px solid #999 !important; /* Higher contrast border */
}

input::placeholder,
textarea::placeholder {
    color: #666666 !important; /* WCAG AA compliant */
}

label {
    font-weight: 500 !important;
    margin-bottom: 0.375rem !important;
    display: inline-block !important;
}

/* Buttons - Better accessibility */
button,
.button,
.btn {
    font-size: 1rem !important;
    font-weight: 500 !important;
    padding: 0.75rem 1.5rem !important;
    line-height: 1.5 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

button:focus,
.button:focus,
.btn:focus {
    outline: 2px solid #0066cc !important;
    outline-offset: 2px !important;
}

/* Search Results & Cards */
.search-result-item,
.property-card,
.listing-card {
    padding: 1rem !important;
}

.search-result-title,
.property-title,
.listing-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

.search-result-description,
.property-summary,
.listing-summary {
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Meta Information (dates, author, etc.) */
.meta,
.date,
.author,
.property-meta {
    font-size: 12px !important;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 13px !important;
}

/* Footer Text */
footer p {
    line-height: 1.5 !important;
    font-size: 13px !important;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid #0066cc !important;
    outline-offset: 2px !important;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute !important;
    left: -9999px !important;
    z-index: 999999 !important;
    padding: 1rem !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.skip-to-content:focus {
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 10px !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        color: #000000 !important;
        background-color: #ffffff !important;
    }
    
    a {
        color: #0000ee !important;
        text-decoration: underline !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Keep light mode for now, but this is where dark mode would go */
}

/* ========================================
   RESPONSIVE TYPOGRAPHY
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    html {
        font-size: 15px !important;
    }
    
    h1 {
        font-size: 2rem !important; /* 32px */
    }
    
    h2 {
        font-size: 1.625rem !important; /* 26px */
    }
    
    h3 {
        font-size: 1.375rem !important; /* 22px */
    }
}

/* Mobile */
@media (max-width: 480px) {
    html {
        font-size: 14px !important;
    }
    
    body {
        line-height: 1.6 !important;
    }
    
    h1 {
        font-size: 1.75rem !important; /* 28px */
    }
    
    h2 {
        font-size: 1.5rem !important; /* 24px */
    }
    
    h3 {
        font-size: 1.25rem !important; /* 20px */
    }
    
    p {
        margin-bottom: 1rem !important;
    }
}

/* ========================================
   SPECIFIC OVERRIDES FOR EXISTING ISSUES
   ======================================== */

/* Property details specific fixes */
.property-info-item,
.listing-detail-item {
    font-size: 1rem !important;
    padding: 0.5rem 0 !important;
}

/* Badge and label improvements */
.badge,
.label,
.tag {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding: 0.375rem 0.75rem !important;
}

/* Improve readability of price displays */
.price-display,
.amount {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace !important;
    font-variant-numeric: tabular-nums !important;
}

/* ========================================
   PROPERTY CARDS & LISTINGS SPECIFIC
   ======================================== */

/* Ensure property cards don't overlap sticky elements */
.flex-image,
.flex-listings {
    position: relative !important;
    z-index: 1 !important; /* Low z-index for property cards */
}

/* Property Cards on Search Results */
.flex-image .details,
.property-item .details,
.listing-item .details {
    padding: 1rem !important;
}

.flex-image h3,
.property-item h3,
.listing-item h3 {
    font-size: 1.125rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem !important;
}

.flex-image .price,
.property-item .price,
.listing-item .price {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
}

.flex-image .location,
.property-item .location,
.listing-item .location {
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
}

/* Property specs (beds, baths, sqft) */
.property-specs,
.listing-specs,
.flex-image .specs {
    font-size: 0.9375rem !important;
}

.property-specs span,
.listing-specs span,
.flex-image .specs span {
    margin-right: 1rem !important;
}

/* Individual Property Page */
.property-page h1,
.listing-page h1 {
    font-size: 2rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
}

.property-description h3,
.listing-description h3 {
    font-size: 1.375rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
}

.property-description p,
.listing-description p {
    line-height: 1.75 !important;
    margin-bottom: 1rem !important;
}

/* Property Features List */
.property-features,
.listing-features {
    margin-top: 1.5rem !important;
}

.property-features h4,
.listing-features h4 {
    font-size: 1.125rem !important;
    margin-bottom: 0.75rem !important;
}

.property-features ul,
.listing-features ul {
    list-style: none !important;
    padding-left: 0 !important;
}

.property-features li,
.listing-features li {
    padding: 0.375rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* Agent Contact Section */
.agent-contact,
.contact-agent {
    background-color: #f8f8f8 !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
}

.agent-contact h3,
.contact-agent h3 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
}

.agent-contact p,
.contact-agent p {
    line-height: 1.6 !important;
}

/* Search Filters */
.filter-section label {
    font-weight: 500 !important;
    margin-bottom: 0.375rem !important;
}

.filter-section select,
.filter-section input {
    border-color: #999 !important;
}

/* Pagination */
.pagination a,
.pagination span {
    font-weight: 500 !important;
}

.pagination .current,
.pagination .active {
    font-weight: 600 !important;
}

/* ========================================
   FINAL TOUCH-UPS
   ======================================== */

/* Fix specific elements that might have been missed */
.navbar-brand {
    font-weight: 600 !important;
}

.hero-text,
.banner-text {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important; /* Add shadow for readability on hero images */
}

/* Ensure form labels are readable */
.form-label,
.control-label {
    font-weight: 500 !important;
}

/* ========================================
   SPECIFIC TEXT IMPROVEMENTS
   ======================================== */

/* Highlights List - Make text black and improve spacing */
.highlights-list {
    color: #000000 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.6 !important;
}

.highlights-list li {
    color: #000000 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.5 !important;
    margin-bottom: 0.75rem !important;
    font-size: 14px !important; /* 14px for consistency */
}

.highlights-list .highlight-check {
    color: #C5A95E !important; /* Keep gold for the checkmarks */
    margin-right: 0.5rem !important;
}

/* Property Details List - Tighten spacing */
.general-wrap .flex-wrap-details ul {
    margin: 0 !important;
    padding: 0 !important;
}

.general-wrap .list-details {
    margin-bottom: 0.5rem !important; /* Reduced from default */
    padding-bottom: 0.5rem !important; /* Reduced padding */
    border-bottom: none !important; /* Remove border to avoid double borders */
}

.general-wrap .list-details:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.general-wrap .list-details p {
    margin: 0 !important; /* Remove all margins from p tags */
    padding: 0.25rem 0 !important; /* Minimal padding */
    line-height: 1.4 !important;
}

.general-wrap .list-details p:first-child {
    font-weight: 600 !important;
}

.general-wrap .list-details p span {
    display: inline-block !important;
}

/* Caption Box - Tighten up spacing */
.caption-box {
    padding: 1.5rem !important; /* Reduce padding */
}

.caption-box h1.headline {
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important; /* Reduce bottom margin */
    font-size: 1.875rem !important; /* Slightly smaller */
    line-height: 1.2 !important;
}

.caption-box p {
    margin-bottom: 0.5rem !important; /* Reduce paragraph spacing */
    line-height: 1.5 !important;
}

.caption-box p.h3 {
    margin-bottom: 0.25rem !important; /* Even less space for phone number */
    font-size: 1.25rem !important;
}

.caption-box .button {
    padding: 0.625rem 1.25rem !important; /* Smaller button padding */
    font-size: 0.875rem !important; /* Smaller font */
    margin: 0.25rem !important; /* Less margin between buttons */
}

.caption-box .button.dark {
    padding: 0.625rem 1.25rem !important; /* Match the other button */
    font-size: 0.875rem !important;
}

/* ========================================
   SEARCH FORM BUTTON FIXES
   ======================================== */

/* Shrink price preset buttons everywhere (not just mobile) */
.price-preset-buttons {
    gap: 0.25rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

.price-preset {
    padding: 0.375rem 0.625rem !important; /* Very compact padding */
    font-size: 11px !important; /* Small font */
    margin: 0.125rem !important; /* Tiny margins */
    line-height: 1.2 !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    min-width: auto !important; /* Don't force minimum width */
    height: auto !important; /* Auto height */
}

/* Even smaller on mobile */
@media (max-width: 768px) {
    .price-preset {
        padding: 0.25rem 0.5rem !important;
        font-size: 10px !important;
    }
}

/* ========================================
   FOOTER FORMATTING IMPROVEMENTS
   ======================================== */

/* Footer wrapper and layout */
.footer-wrap {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
    padding: 3rem 0 1rem 0 !important;
}

.footer-wrap .footer-flex {
    display: flex !important;
    justify-content: space-between !important;
    gap: 3rem !important;
    flex-wrap: wrap !important;
}

/* Logo side styling */
.footer-wrap .logo-side {
    flex: 1 !important;
    min-width: 300px !important;
}

.footer-wrap .logo-side .logo {
    display: inline-block !important;
    margin-bottom: 1.5rem !important;
}

/* Footer navigation */
.footer-wrap nav {
    display: flex !important;
    gap: 2rem !important;
    margin-bottom: 1.5rem !important;
}

.footer-wrap nav ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-wrap nav ul li {
    margin-bottom: 0.75rem !important;
    line-height: 1.4 !important;
}

.footer-wrap nav ul li a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.9375rem !important;
    transition: color 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
}

.footer-wrap nav ul li a:hover {
    color: #C5A95E !important;
}

.footer-wrap nav ul li a i {
    color: #C5A95E !important;
    margin-right: 0.5rem !important;
    font-size: 0.75rem !important;
}

/* Social media icons */
.footer-wrap .social {
    margin-top: 1rem !important;
}

.footer-wrap .social a {
    display: inline-block !important;
    margin-right: 1rem !important;
    font-size: 1.5rem !important;
    color: #ffffff !important;
    transition: color 0.2s ease !important;
}

.footer-wrap .social a:hover {
    color: #C5A95E !important;
}

/* Address section */
.footer-wrap .address {
    flex: 0 0 auto !important;
    min-width: 280px !important;
}

.footer-wrap .address-flex {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 1rem !important;
}

.footer-wrap .address-flex i {
    color: #C5A95E !important;
    font-size: 1.125rem !important;
    margin-top: 0.25rem !important;
}

.footer-wrap .address p {
    margin: 0 0 0.75rem 0 !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
    font-size: 0.9375rem !important;
}

.footer-wrap .address a {
    color: #C5A95E !important;
    text-decoration: none !important;
}

.footer-wrap .address a:hover {
    color: #ffffff !important;
}

/* Privacy policy section */
.footer-wrap .privacy {
    text-align: center !important;
    padding-top: 1.5rem !important;
    margin-top: 2rem !important;
    border-top: 1px solid #444 !important;
    color: #cccccc !important;
    font-size: 0.875rem !important;
}

.footer-wrap .privacy a {
    color: #C5A95E !important;
    text-decoration: none !important;
}

.footer-wrap .privacy a:hover {
    text-decoration: underline !important;
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    .footer-wrap .footer-flex {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .footer-wrap nav {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .footer-wrap .logo-side,
    .footer-wrap .address {
        min-width: 100% !important;
    }
}

/* ========================================
   MOBILE FILTER OVERLAY FIX
   ======================================== */

/* Mobile filter overlay - default hidden state */
.mobile-filter-overlay {
    display: none !important; /* Always hidden by default */
}

/* Only show on mobile when .show class is added */
@media (max-width: 768px) {
    .mobile-filter-overlay.show {
        display: flex !important; /* Show only when class is added */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamic viewport height for mobile */
        overflow: hidden !important;
        z-index: 99999 !important;
        background: white !important;
        flex-direction: column !important;
    }

    .mobile-filter-header {
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        background: white !important;
        border-bottom: 1px solid #e0e0e0 !important;
        padding: 1rem !important;
    }
    
    /* Ensure close button is clickable */
    .mobile-close-button {
        cursor: pointer !important;
        z-index: 11 !important;
        position: relative !important;
    }

    .mobile-filter-content {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 1rem !important;
        padding-bottom: 80px !important; /* Space for apply button */
    }

    .mobile-apply-button {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        border-top: 1px solid #e0e0e0 !important;
        padding: 1rem !important;
        z-index: 10 !important;
    }

    .mobile-apply-button button {
        width: 100% !important;
        padding: 1rem !important;
        background-color: #C5A95E !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
    }

    /* Ensure filter sections fit properly */
    .mobile-filter-section {
        margin-bottom: 1.5rem !important;
    }

    .mobile-filter-section h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.75rem !important;
        letter-spacing: normal !important;
    }

    /* Fix slider containers */
    .price-slider-container,
    .sqft-slider-container {
        width: 100% !important;
        overflow: hidden !important;
    }

    .range-slider {
        width: 100% !important;
        position: relative !important;
    }
    
    /* Shrink price preset buttons - applies to main search form */
    .price-preset-buttons {
        gap: 0.25rem !important; /* Smaller gap between buttons */
    }
    
    .price-preset {
        padding: 0.25rem 0.5rem !important; /* Much smaller padding (was likely ~10px 16px) */
        font-size: 10px !important; /* 10px font size as requested */
        margin: 0.125rem !important; /* Tiny margins */
        line-height: 1.2 !important; /* Tighter line height */
        border-radius: 4px !important; /* Smaller border radius */
    }
}

/* On desktop, hide the mobile filter overlay completely */
@media (min-width: 769px) {
    .mobile-filter-overlay {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Mobile filter specific styles - won't affect main search form */
.mobile-filter-overlay .price-preset-buttons {
    gap: 0.5rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
}

.mobile-filter-overlay .price-preset {
    flex: 0 0 calc(50% - 0.25rem) !important; /* 2 per row with gap */
    padding: 0.625rem 0.5rem !important; /* Bigger padding for mobile filter */
    font-size: 13px !important; /* Bigger font for mobile filter */
    margin: 0 !important; /* Use gap instead of margins */
    line-height: 1.3 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    text-align: center !important;
    min-height: 40px !important; /* Consistent height */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Option buttons in mobile filter only */
.mobile-filter-overlay .option-buttons {
    gap: 0.25rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

.mobile-filter-overlay .option-button {
    padding: 0.375rem 0.75rem !important; /* Compact padding */
    font-size: 0.875rem !important; /* 14px font */
    margin: 0 !important; /* Remove margins, use gap instead */
    line-height: 1.3 !important;
    border-radius: 4px !important;
    min-width: auto !important; /* Don't force minimum width */
    height: auto !important; /* Auto height */
}

/* Even more compact on mobile for mobile filter */
@media (max-width: 768px) {
    .mobile-filter-overlay .option-button {
        padding: 0.375rem 0.625rem !important; /* Even more compact on mobile */
        font-size: 0.8125rem !important; /* 13px on mobile */
    }
}

/* Checkbox group - force vertical layout */
.checkbox-group {
    display: block !important; /* Not flex */
    width: 100% !important;
}

.checkbox-group .toggle-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 0.75rem !important;
    padding: 0.5rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.checkbox-group .toggle-item:last-child {
    border-bottom: none !important;
}

.checkbox-group .toggle-label {
    flex: 1 !important;
    margin-right: 1rem !important;
}

/* ========================================
   PROPERTY INQUIRY MODAL FIXES
   ======================================== */

/* Ensure modal inputs are full width and properly styled */
.modal-inquiry .input-group {
    margin-bottom: 10px !important;
}

.modal-inquiry .input-group label {
    display: block !important;
    width: 100% !important;
}

.modal-inquiry .input-group input,
.modal-inquiry .input-group textarea {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    display: block !important;
}

.modal-inquiry .input-group textarea {
    min-height: 70px !important;
    resize: vertical !important;
}

/* Make TCPA disclaimer text much smaller */
.modal-inquiry .tcpa-text {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e0e0e0 !important;
}

.modal-inquiry .tcpa-text p {
    font-size: 9px !important; /* Much smaller text */
    color: #888 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

.modal-inquiry .tcpa-text a {
    color: #C5A95E !important;
    font-size: 9px !important;
    text-decoration: none !important;
}

.modal-inquiry .tcpa-text a:hover {
    text-decoration: underline !important;
}

/* Fix submit button */
.modal-inquiry .submit-btn {
    width: 100% !important;
    padding: 12px !important;
    background-color: #C5A95E !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-top: 10px !important;
}

/* Fix modal header */
.modal-inquiry .modal-header h3 {
    font-size: 15px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    letter-spacing: normal !important;
}

/* Fix phone link in header */
.modal-inquiry .phone-link {
    font-size: 13px !important;
}

/* Mobile modal sizing - 80% of viewport */
@media (max-width: 768px) {
    .modal-inquiry .modal-content {
        width: 80% !important;
        max-width: 80% !important;
        height: 80vh !important;
        max-height: 80vh !important;
        margin: 10vh auto !important; /* Center vertically */
        display: flex !important;
        flex-direction: column !important;
    }
    
    .modal-inquiry .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Smaller photo on mobile to save space */
    .modal-inquiry .photo-wrap {
        height: 120px !important;
    }
    
    /* Smaller font sizes on mobile */
    .modal-inquiry .modal-header h3 {
        font-size: 14px !important;
    }
    
    .modal-inquiry .phone-link {
        font-size: 12px !important;
    }
    
    .modal-inquiry .input-group input,
    .modal-inquiry .input-group textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 8px 10px !important;
    }
    
    .modal-inquiry .input-group textarea {
        min-height: 50px !important;
    }
    
    .modal-inquiry .tcpa-text p,
    .modal-inquiry .tcpa-text a {
        font-size: 8px !important; /* Even smaller on mobile */
    }
}

/* ========================================
   DESKTOP SIDEBAR TOGGLE BUTTON FIX
   ======================================== */

/* Remove padding from sidebar toggle button */
.sidebar-toggle {
    padding: 0 !important; /* Remove all padding */
}

/* ========================================
   MOBILE STICKY CONTACT BUTTON FIXES
   ======================================== */

/* Make mobile sticky contact buttons more compact */
.mobile-sticky-contact {
    padding: 8px 10px !important; /* Reduce container padding */
}

.mobile-sticky-contact .mobile-sticky-button-container {
    gap: 8px !important; /* Smaller gap between buttons */
}

.mobile-sticky-contact .button {
    padding: 6px 16px !important; /* Much smaller padding (was 8px 24px) */
    font-size: 13px !important; /* Slightly smaller font */
    min-height: 42px !important; /* Reduce minimum height (was 52px) */
}

.mobile-sticky-contact .button.tour-btn {
    font-size: 12px !important; /* Even smaller for tour button */
    line-height: 1.15 !important;
    padding: 5px 14px !important; /* Even more compact for two-line button */
}

.mobile-sticky-contact .button .time-text {
    font-size: 10px !important; /* Smaller time text */
    opacity: 0.85 !important;
    line-height: 1.1 !important;
}

/* ========================================
   MOBILE PAGINATION FIXES
   ======================================== */

/* Fix pagination on mobile to prevent overflow */
@media (max-width: 768px) {
    .pagination {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 10px 5px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .pagination .search-pagination {
        display: flex !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 3px !important;
        flex-wrap: nowrap !important;
    }
    
    .pagination .search-pagination li {
        display: inline-block !important;
        margin: 0 !important;
    }
    
    /* Hide most page numbers on mobile, show only important ones */
    .pagination .search-pagination li {
        display: none !important;
    }
    
    /* Show first, last, current, and adjacent pages */
    .pagination .search-pagination li:first-child,
    .pagination .search-pagination li:last-child,
    .pagination .search-pagination li.current-page,
    .pagination .search-pagination li.current-page + li,
    .pagination .search-pagination li.current-page + li + li,
    .pagination .search-pagination li:has(+ li.current-page),
    .pagination .search-pagination li:has(+ li + li.current-page) {
        display: inline-block !important;
    }
    
    /* Show text nodes (ellipsis) between list items */
    .pagination .search-pagination {
        font-size: 13px !important;
        color: #666 !important;
    }
    
    .pagination .search-pagination li a {
        padding: 8px 12px !important;
        font-size: 13px !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        background: white !important;
        color: #333 !important;
        text-decoration: none !important;
        display: block !important;
        min-width: 36px !important;
        text-align: center !important;
    }
    
    .pagination .search-pagination li.current-page a {
        background-color: #C5A95E !important;
        color: white !important;
        border-color: #C5A95E !important;
    }
    
    .pagination .prev-page,
    .pagination .next-page {
        padding: 8px 12px !important;
        font-size: 16px !important;
        background: white !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        color: #333 !important;
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }
    
    .pagination .prev-page:hover,
    .pagination .next-page:hover {
        background-color: #f5f5f5 !important;
    }
}

/* Alternative approach using CSS to limit visible items */
@media (max-width: 480px) {
    /* On very small screens, show even fewer pages */
    .pagination .search-pagination li {
        display: none !important;
    }
    
    /* Show only first, current, and last */
    .pagination .search-pagination li:first-child,
    .pagination .search-pagination li:last-child,
    .pagination .search-pagination li.current-page {
        display: inline-block !important;
    }
    
    .pagination .search-pagination li a {
        padding: 6px 10px !important;
        font-size: 12px !important;
        min-width: 32px !important;
    }
    
    .pagination .prev-page,
    .pagination .next-page {
        padding: 6px 10px !important;
        min-width: 36px !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    body {
        color: #000000 !important;
        background: #ffffff !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }
    
    a {
        color: #000000 !important;
        text-decoration: underline !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000000 !important;
        page-break-after: avoid !important;
    }
    
    p {
        orphans: 3 !important;
        widows: 3 !important;
    }
}