/* ==========================================
   ENHANCED LISTINGS PAGE - MODERN & SMOOTH
   ========================================== */

/* Smooth Page Transitions & Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced Listing Grid Section */
#listing_grid {
    padding: 40px 0px 50px 0px;
    background: #f8f9fa;
}

#listing_grid .container {
    max-width: 1200px;
    padding: 0 20px;
}

/* Hero Search - Full Width */
.hero-search {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.hero-search:focus-within {
    box-shadow: 0 4px 16px rgba(32, 70, 218, 0.12);
}

.hero-search i {
    color: #6b7280;
    font-size: 20px;
}

.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 17px;
    color: #111827;
    font-weight: 400;
}

.hero-search input::placeholder {
    color: #9ca3af;
}

/* Filters & Sort Controls */
.filters-controls {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.filters-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* Category Pills - Multi Select */
.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-checkbox {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pill-checkbox input {
    display: none;
}

.pill-checkbox:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.pill-checkbox.active {
    background: #2046DA;
    border-color: #2046DA;
    color: #ffffff;
}

/* Amenities Select */
.amenities-select {
    min-width: 180px;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
}

/* Sort Section */
.filters-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.sort-options select {
    padding: 8px 36px 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-options select:focus {
    outline: none;
    border-color: #2046DA;
    box-shadow: 0 0 0 3px rgba(32, 70, 218, 0.1);
}

/* Active Filters / Clear */
.active-filters {
    text-align: center;
    margin-bottom: 24px;
}

.clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.clear-filters:hover {
    color: #991b1b;
}

.clear-filters i {
    font-size: 12px;
}

/* Modern Sidebar with Smooth Effects */
.listing_grid_sidbar {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    transition: all 0.3s ease;
    position: sticky;
    top: 100px;
}

.listing_grid_sidbar:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Enhanced Search Input */
.sidebar_line input {
    width: 100%;
    border: 1px solid #e0e6ed;
    padding: 12px 45px 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f8f9fb;
}

.sidebar_line input:focus {
    border-color: #2046DA;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(32, 70, 218, 0.1);
    outline: none;
}

.sidebar_line button {
    background: #2046DA;
    border: none;
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar_line button:hover {
    background: #1a3bb8;
}

/* Enhanced Select Dropdowns */
.sidebar_line_select {
    margin-bottom: 16px;
}

.sidebar_line_select .select_2 {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 11px 16px;
    background: #f8f9fb;
    transition: all 0.2s ease;
    font-size: 14px;
}

.sidebar_line_select .select_2:focus {
    border-color: #2046DA;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(32, 70, 218, 0.1);
}

/* Modern Checkboxes */
.wsus__pro_check {
    margin-top: 16px;
}

.wsus__pro_check .form-check {
    margin: 8px 0;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.wsus__pro_check .form-check:hover {
    background: #f8f9fb;
}

.wsus__pro_check .form-check-input {
    width: 18px;
    height: 18px;
    border: 1.5px solid #d0d5dd;
    border-radius: 4px;
    margin-right: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wsus__pro_check .form-check-input:checked {
    background: #2046DA;
    border-color: #2046DA;
}

.wsus__pro_check .form-check-label {
    font-size: 14px;
    font-weight: 400;
    color: #475467;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wsus__pro_check .form-check-input:checked + .form-check-label {
    color: #101828;
    font-weight: 500;
}

/* Enhanced Filter Button */
.listing_grid_sidbar .read_btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    background: #2046DA;
    border: none;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.listing_grid_sidbar .read_btn:hover {
    background: #1a3bb8;
}

/* Modern Property Topbar - Hide view toggle, only show sorting */
.wsus__property_topbar {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Hide the view toggle buttons */
.wsus__property_topbar_left {
    display: none;
}

/* Enhanced Sorting Dropdown */
.wsus__property_topbar_right .select_2 {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 10px 35px 10px 16px;
    background: #f8f9fb;
    font-size: 14px;
    font-weight: 500;
    min-width: 200px;
    transition: all 0.2s ease;
}

.wsus__property_topbar_right .select_2:focus {
    border-color: #2046DA;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(32, 70, 218, 0.1);
}

/* ==========================================
   MODERN LISTING CARDS - ALWAYS LIST VIEW
   ========================================== */

/* Force list view for all listings */
#listing_grid.list_view .wsus__featured_single,
#listing_grid.grid_view .wsus__featured_single,
.wsus__featured_single.list_view {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    display: flex;
}

.wsus__featured_single:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* List view image container */
.wsus__featured_single .list_images,
.list_view .wsus__featured_single .list_images {
    width: 280px;
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.wsus__featured_single .list_images img,
.list_view .wsus__featured_single .list_images img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.wsus__featured_single:hover .list_images img {
    transform: scale(1.05);
}

/* Modern Category Badge */
.small_text {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.small_text.green {
    background: #2046DA;
}

.small_text.red {
    background: #10B981;
}

.small_text.purple {
    background: #8B5CF6;
}

.small_text.green2 {
    background: #06B6D4;
}

.list_view .small_text {
    top: 12px;
    right: 12px;
}

/* Enhanced Love & Map Icons */
.wsus__featured_single .love,
.wsus__featured_single .map {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.wsus__featured_single .love {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.wsus__featured_single .map {
    position: absolute;
    top: 56px;
    left: 12px;
    z-index: 2;
}

.wsus__featured_single .love:hover,
.wsus__featured_single .map:hover {
    background: #2046DA;
    transform: scale(1.05);
}

.wsus__featured_single .love:hover a,
.wsus__featured_single .map:hover {
    color: #ffffff;
}

/* Enhanced Card Text for List View */
.wsus__featured_single_text {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wsus__featured_single_text h6 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #101828;
    line-height: 1.4;
}

.wsus__featured_single_text h6 a {
    color: #101828;
    transition: all 0.2s ease;
}

.wsus__featured_single:hover .wsus__featured_single_text h6 a {
    color: #2046DA;
}

.wsus__featured_single_text p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wsus__featured_single_text p i {
    color: #2046DA;
    font-size: 14px;
}

.wsus__featured_single_text .list_details {
    font-size: 14px;
    line-height: 1.6;
    color: #475467;
    margin: 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Status badges - Open/Closed */
.open,
.close {
    position: absolute;
    top: 12px;
    left: 60px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #10B981;
    color: #ffffff;
    z-index: 2;
}

.close {
    background: #EF4444;
}

/* Featured/Verified Badges */
.wsus__featured_single_text .future_verify {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 8px;
    margin-top: 8px;
    background: #2046DA;
    color: #ffffff;
    transition: all 0.2s ease;
}

.wsus__featured_single_text .future_verify:hover {
    background: #1a3bb8;
}

.wsus__featured_single_text .future_verify.red {
    background: #10B981;
}

.wsus__featured_single_text .future_verify.red:hover {
    background: #059669;
}

.wsus__featured_single_text .future_verify i {
    margin-right: 4px;
}

/* ==========================================
   ENHANCED PAGINATION
   ========================================== */

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 30px;
}

.pagination .page-item {
    transition: all 0.2s ease;
}

.pagination .page-link {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 8px 14px;
    color: #475467;
    background: #ffffff;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #2046DA;
    color: #ffffff;
    border-color: #2046DA;
}

.pagination .page-item.active .page-link {
    background: #2046DA;
    border-color: #2046DA;
    color: #ffffff;
}

/* ==========================================
   ENHANCED MODAL POPUP
   ========================================== */

#wsus__map_popup .modal-content {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#wsus__map_popup .popup_close {
    width: 36px;
    height: 36px;
    background: #EF4444;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wsus__map_popup .popup_close:hover {
    background: #DC2626;
    transform: rotate(90deg);
}

.map_popup_content {
    border-radius: 12px;
    overflow: hidden;
}

.map_popup_content img {
    transition: all 0.3s ease;
}

.map_popup_content:hover img {
    transform: scale(1.03);
}

.map_popup_text {
    padding: 20px;
}

.map_popup_text h5 {
    font-size: 20px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 12px;
}

.map_popup_text .read_btn {
    background: #2046DA;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.map_popup_text .read_btn:hover {
    background: #1a3bb8;
}

/* ==========================================
   RESPONSIVE ENHANCEMENTS
   ========================================== */

@media (max-width: 991px) {
    .wsus__featured_single {
        flex-direction: column;
    }

    .wsus__featured_single .list_images {
        width: 100% !important;
        min-width: 100% !important;
        height: 220px;
    }

    .wsus__featured_single_text {
        width: 100%;
    }
}

@media (max-width: 767px) {
    #listing_grid {
        padding: 40px 0px 40px 0px;
    }

    .listing_grid_sidbar {
        margin-bottom: 24px;
    }

    .wsus__property_topbar {
        flex-direction: column;
        gap: 12px;
    }

    .wsus__featured_single {
        margin: 10px 0;
    }

    .wsus__featured_single_text h6 {
        font-size: 17px;
    }
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.listing_grid_sidbar input:focus,
.listing_grid_sidbar select:focus,
.listing_grid_sidbar button:focus {
    outline: none;
}

/* Additional refinements */
.list_padding {
    padding: 0 !important;
}

/* Ensure proper width distribution */
#listing_grid .col-12 {
    padding-left: 12px;
    padding-right: 12px;
}

#listing_grid .row {
    margin: 0 -12px;
}

/* Responsive Design */
@media (max-width: 991px) {
    .filters-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-left,
    .filters-right {
        width: 100%;
    }

    .filters-right {
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid #e5e7eb;
    }

    .category-pills {
        width: 100%;
    }

    .amenities-select {
        width: 100%;
    }
}

@media (max-width: 767px) {
    #listing_grid {
        padding: 30px 0;
    }

    .hero-search {
        padding: 16px 20px;
    }

    .filters-controls {
        padding: 16px;
    }

    .filter-label,
    .sort-label {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }

    .filters-left {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-right {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-options select {
        width: 100%;
    }

    .wsus__featured_single {
        flex-direction: column;
    }

    .wsus__featured_single .list_images {
        width: 100% !important;
        min-width: 100% !important;
        height: 200px;
    }
}
