/* ========================================
   MODERN FILTER BAR STYLES
   ======================================== */

/* Modern Filter Wrapper */
.modern-filter-wrapper {
    background: #fff;
    padding: 0;
    margin-bottom: 1rem;
}

/* Modern Filter Bar */
.modern-filter-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
}

/* Filter Select Wrapper */
.filter-select-wrapper {
    position: relative;
}

/* Modern Select Dropdown */
.modern-select {
    appearance: none;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.65rem 2.5rem 0.65rem 1rem;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
}

.modern-select:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

/* Modern Input */
.modern-input {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.65rem 1rem;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    min-width: 200px;
}

.modern-input::placeholder {
    color: #999;
}

.modern-input:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

/* Modern Filter Button */
.modern-filter-btn {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.65rem 1.5rem;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.modern-filter-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.modern-filter-btn i {
    font-size: 16px;
}

/* ========================================
   BREADCRUMB NAVIGATION
   ======================================== */

.breadcrumb-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    font-size: 13px;
    color: #666;
}

.breadcrumb-link {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #004499;
    text-decoration: underline;
}

.breadcrumb-separator {
    font-size: 10px;
    color: #999;
}

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* ========================================
   RESULTS HEADER
   ======================================== */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.results-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #666;
}

.sort-wrapper i {
    color: #999;
}

.sort-select {
    appearance: none;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #0066cc;
    cursor: pointer;
    padding: 0 1.5rem 0 0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 1em;
}

.sort-select:focus {
    outline: none;
}

.save-search-btn {
    background: transparent;
    border: 1px solid #0066cc;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-weight: 500;
    color: #0066cc;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-search-btn:hover {
    background: #0066cc;
    color: #fff;
}

/* ========================================
   AREA FILTER TAGS
   ======================================== */

.area-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.area-tag {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    padding: 0.4rem 1rem;
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.area-tag:hover {
    background: #e8e8ff;
    border-color: #0066cc;
    color: #004499;
}

.area-tag.active {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

.area-tag.view-more-tag {
    background: transparent;
    border: 1px dashed #ccc;
    color: #666;
}

.area-tag.view-more-tag:hover {
    border-color: #0066cc;
    color: #0066cc;
    background: transparent;
}

/* ========================================
   RESPONSIVE - DESKTOP ONLY
   ======================================== */

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .modern-filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-select-wrapper,
    .modern-select,
    .modern-input {
        width: 100%;
    }

    .modern-filter-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
}

/* ========================================
   ADVANCED FILTERS PANEL
   ======================================== */

.advanced-filters-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    padding: 1.5rem;
    position: relative;
    z-index: 100;
}

.advanced-filters-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-tag:hover {
    border-color: #0066cc;
    color: #0066cc;
    background: #f0f7ff;
}

.filter-tag.active {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.area-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.area-range-inputs .modern-input {
    min-width: 80px;
    padding: 0.5rem;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 6px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.filter-checkbox-label input {
    cursor: pointer;
}

.filter-actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
}

.clear-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.clear-btn:hover {
    color: #333;
    text-decoration: underline;
}

.apply-btn {
    background: #0066cc;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 0.65rem 2rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.apply-btn:hover {
    background: #004499;
}

/* ========================================
   MOBILE FILTERS SIDEBAR ENHANCEMENTS
   ======================================== */

.filters-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: #fff;
    z-index: 1100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.filters-sidebar.active {
    right: 0;
}

.filters-sidebar .filters-header {
    background: #0066cc;
    color: #fff;
    padding: 1.25rem 1rem;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.filter-section.mobile-accordion {
    border-bottom: 1px solid #eee;
}

.filter-section-header {
    padding: 1.25rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-section-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.filter-section-content {
    padding: 0 1rem 1.25rem 1rem;
    display: none;
}

.filter-section.active .filter-section-content {
    display: block;
}

.filter-section.active .fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar-footer {
    padding: 1rem;
    background: #fff;
    border-top: 1px solid #eee;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
    backdrop-filter: blur(2px);
}

.filter-overlay.active {
    display: block;
}

/* Helper for URL parameter updates */

/* ========================================
   DEVELOPERS FILTER BAR
   ======================================== */

.developers-filters-section {
    padding: 0;
    margin-bottom: 3rem;
}

.developers-filter-bar-wrapper {
    background: #fff;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: -3.5rem;
    position: relative;
    z-index: 100;
}

.developers-horizontal-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.developers-horizontal-bar .filter-item {
    flex: 1;
}

.developers-horizontal-bar .search-item {
    flex: 2;
}

.developers-horizontal-bar .filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.developers-horizontal-bar .filter-input-wrapper i {
    position: absolute;
    left: 1rem;
    color: #3b82f6;
}

.developers-horizontal-bar .modern-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.developers-horizontal-bar .modern-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.developers-horizontal-bar .custom-select-trigger {
    padding-left: 2.75rem;
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.developers-horizontal-bar .custom-select-trigger:hover {
    border-color: #3b82f6;
    background: #fff;
}

.developers-horizontal-bar .filter-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.custom-options.show {
    display: block;
}

.custom-options .option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: #475569;
}

.custom-options .option:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.custom-options .option.active {
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 600;
}

.developers-horizontal-bar .custom-select-trigger i:first-child {
    position: absolute;
    left: 1rem;
    color: #3b82f6;
}

@media (max-width: 767px) {
    .developers-horizontal-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .developers-horizontal-bar .filter-item {
        width: 100%;
    }

    .developers-filter-bar-wrapper {
        margin-top: -2.5rem;
        padding: 1.25rem;
    }

    .custom-options {
        position: static;
        border: 1px solid #e2e8f0;
        border-top: none;
        border-radius: 0 0 8px 8px;
        box-shadow: none;
    }
}