/* ============================================================
   LOCATION PAGE STICKY SIDEBAR FIXES
   Moved from inline styles in location.php for clean SEO
   ============================================================ */

/* Align search bar (sidebar) top with first property listing item */
@media (min-width: 992px) {
    /* Override akkus.css .main padding-top for location pages */
    .location-page .main {
        padding-top: 25px !important;  /* More spacing between menu and title */
    }
    
    /* Override ALL akkus.css conflicting rules (lines 1110-1126) */
    /* Make sidebar sticky - moves with scroll until page end */
    /* Align search bar with top of listing cards (title + sorting + first card) */
    .location-page .sidebar.right-sidebar,
    .location-page .right-sidebar {
        position: sticky !important;
        top: 67px !important;
        margin-top: 0 !important;  /* Aligned with listing cards - no offset */
        padding-top: 0 !important;
        align-self: flex-start !important;
        z-index: 100 !important;
    }
    
    /* Ensure search form has no extra margin */
    .location-page .sidebar.right-sidebar form#rfn {
        margin-top: 0 !important;
        margin-bottom: 24px !important;
    }
    
    /* Make sure the row container allows sticky positioning */
    .location-page .container .row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
    }
    
    /* Ensure parent containers don't break sticky */
    .location-page .main,
    .location-page #content,
    .location-page .content.full,
    .location-page .container {
        overflow: visible !important;
        height: auto !important;
    }
    
    /* Ensure col-md-9 doesn't break sticky */
    .location-page .col-md-9 {
        overflow: visible !important;
    }
    
    /* Remove float to allow sticky positioning */
    .location-page .sidebar.right-sidebar,
    .location-page .right-sidebar {
        float: none !important;
        clear: none !important;
    }
    
    /* Ensure col-md-3 wrapper allows sticky */
    .location-page .col-md-3 {
        overflow: visible !important;
    }
}
