/* Filter Section Desktop Styles (min-width: 769px) */
.filter-section {
    padding: 60px 0;
    background-color: var(--filter-bg-color);
    color: var(--filter-text-color);
    text-align: center;
}

.filter-section .section-title {
    font-size: 2.2rem;
    color: var(--filter-text-color);
    margin-bottom: 10px;
}

.filter-section .section-subtitle {
    font-size: 1.2rem;
    color: var(--filter-text-color);
    margin-bottom: 40px;
    font-weight: normal;
}

.property-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Adjusted min-width for wider inputs */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    align-items: flex-end;
    justify-content: center; /* Center the grid items horizontally */
    text-align: center; /* CRITICAL: Center text alignment for all groups */
}

.filter-group {
    text-align: center; /* CRITICAL: Center align content within each filter group */
    display: flex; /* Make groups a flex container to center child elements */
    flex-direction: column;
    align-items: center; /* CRITICAL: Center horizontally aligned items like labels/inputs */
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--filter-text-color);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    max-width: 220px; /* CRITICAL: Give form controls a max width so they don't stretch */
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    color: #495057;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-pair {
    display: flex;
    gap: 10px;
    width: 100%; /* Ensure input pair takes full width of its centered container */
    max-width: 220px; /* CRITICAL: Constrain input pair width */
}

.input-pair input {
    flex: 1;
    min-width: 0; /* Allow inputs to shrink correctly within flex */
}

.price-range-display {
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--filter-text-color);
}

.land-specific-group {
    grid-column: span 2; /* Still spans multiple columns */
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding-top: 10px;
    justify-content: center; /* Center checkboxes within their span */
}

.form-check-inline {
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.form-check-label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--filter-text-color);
}

.btn-search {
    grid-column: span all; /* Span across all columns for the button */
    width: 250px; /* Give the button a fixed width for better centering */
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    background-color: var(--filter-button-bg-color);
    color: var(--filter-button-text-color);
    justify-self: center; /* Center the button in its grid cell */
    margin-top: 20px;
}

.btn-search:hover {
    filter: brightness(90%);
    transform: translateY(-2px);
}