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

/* H1 bold styling for location pages AND advantage pages */
.location-page h1,
.advantage-page h1 {
    font-weight: 700 !important;
}

/* Location intro section */
.location-h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 14px 0 8px;
}

.location-intro {
    max-width: 820px;
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    padding-left: 14px;
    border-left: 3px solid #e5e7eb; /* very light */
}

.location-trust {
    font-size: 14px;
    color: #6b7280;
    margin-top: 6px;
}

.location-intro--minimal {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.listing-count-meta {
    font-size: 14px;
    color: #000000;
    margin: 10px 0 22px;
    font-weight: 700;
}

/* City → Advantage auto-link block */
.city-advantage-links {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin: 16px 0 20px 0;
    padding: 0;
}

.city-advantage-links a {
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.city-advantage-links a:hover {
    color: #0077ed;
    text-decoration: underline;
}

/* Featured section styling */
.featured-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-top: 32px;
}

.featured-section-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    max-width: 680px;
    margin-bottom: 16px;
}

/* Sorting wrapper - enhanced visibility */
.sorting-wrapper {
    margin-top: 0;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sort-label {
    font-weight: 700;
    color: #1f2d3d;
    margin-right: 12px;
    font-size: 14px;
}

.sort-dropdown {
    font-weight: 600;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sort-dropdown:hover {
    border-color: #9ca3af;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sort-dropdown:focus {
    outline: none;
    border-color: #1f2d3d;
    box-shadow: 0 0 0 3px rgba(31, 45, 61, 0.1);
}

/* ============================================================
   FEATURED PROPERTIES SECTION
   ============================================================ */

/* Featured properties section wrapper */
.featured-properties {
    margin-bottom: 48px;
    padding-bottom: 24px;
}

.featured-title {
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

/* Featured list card spacing - same for all listings (override akkus.css) */
.location-page .featured-list .listing-card,
.location-page .featured-list li.listing-card,
.location-page .property-list--standard .listing-card,
.location-page .property-list--standard li.listing-card,
.location-page .property-list.property-list--standard .listing-card,
.location-page .property-list.property-list--standard li.listing-card,
.advantage-page .featured-list .listing-card,
.advantage-page .featured-list li.listing-card,
.advantage-page .property-list--standard .listing-card,
.advantage-page .property-list--standard li.listing-card,
.advantage-page .property-list.property-list--standard .listing-card,
.advantage-page .property-list.property-list--standard li.listing-card {
    margin-bottom: 24px !important;
}

/* Page 2+ context block (pagination pages) */
.page-context--pagination {
    margin: 12px 0 24px;
    color: #555;
}

.page-context-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.page-context-sub {
    font-size: 13px;
    margin: 4px 0 0;
    opacity: 0.75;
}

/* ============================================================
   LISTING SECTION TITLE
   ============================================================ */

/* Strong visual anchor for main listings section */
.listing-section-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #1f2d3d;
    margin-top: 56px;
    margin-bottom: 28px;
    padding-top: 28px;
    border-top: 2px solid #e5e7eb;
    position: relative;
}

/* Subtle accent line (premium, not noisy) */
.listing-section-title::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, #1f2d3d, transparent);
}

.listing-subtitle {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    margin-top: 4px;
}

/* Align search bar (sidebar) top with first property listing item */
@media (min-width: 992px) {
    /* Override akkus.css .main padding-top for location pages AND advantage pages */
    .location-page .main,
    .advantage-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,
    .advantage-page .sidebar.right-sidebar,
    .advantage-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,
    .advantage-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,
    .advantage-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,
    .advantage-page .main,
    .advantage-page #content,
    .advantage-page .content.full,
    .advantage-page .container {
        overflow: visible !important;
        height: auto !important;
    }
    
    /* Ensure col-md-9 doesn't break sticky */
    .location-page .col-md-9,
    .advantage-page .col-md-9 {
        overflow: visible !important;
    }
    
    /* Remove float to allow sticky positioning */
    .location-page .sidebar.right-sidebar,
    .location-page .right-sidebar,
    .advantage-page .sidebar.right-sidebar,
    .advantage-page .right-sidebar {
        float: none !important;
        clear: none !important;
    }
    
    /* Ensure col-md-3 wrapper allows sticky */
    .location-page .col-md-3,
    .advantage-page .col-md-3 {
        overflow: visible !important;
    }
}
/* Mobile refinement for listing section title */
@media (max-width: 767px) {
    .listing-section-title {
        font-size: 20px;
        margin-top: 40px;
        margin-bottom: 20px;
        padding-top: 20px;
    }
}

