/* Real Estate Page Styles */

.real-estate-main {
    margin-top: 150px;
    min-height: calc(100vh - 80px);
    background-color: var(--background-color);
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 60px 0;
    color: white;
    text-align: center;
    margin: 80px 100px;
}

.search-container h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.search-container p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.search-input-group i {
    color: var(--text-light);
    margin-right: 15px;
    font-size: 1.2rem;
}

.search-input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 15px 0;
    background: transparent;
}

.search-btn {
    padding: 15px 30px;
    border-radius: 0 50px 50px 0;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.quick-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quick-filter {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-filter:hover,
.quick-filter.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 40px 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Filter Sidebar */
.filter-sidebar {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.filter-header h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.filter-header h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.clear-filters-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.clear-filters-btn:hover {
    color: var(--accent-color);
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group h4 {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label i {
    margin-right: 8px;
    width: 16px;
    color: var(--text-light);
}

/* Price and Size Range Filters */
.price-range,
.size-range {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-inputs,
.size-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-inputs input,
.size-inputs input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--background-color);
    color: var(--text-color);
}

/* Remove the span styling since we're using vertical layout */
.price-inputs input::placeholder,
.size-inputs input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.price-slider input,
.size-slider input {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.price-slider input::-webkit-slider-thumb,
.size-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Location Filter */
.location-filter select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Results Section */
.results-section {
    background: var(--background-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.results-info h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.results-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.sort-controls select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover,
.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.results-grid.list-view {
    grid-template-columns: 1fr;
}

/* Property Card */
.property-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.property-image {
    height: 200px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.property-image-wrapper {
    width: 91.5%;
    margin-bottom: 20px;
}

.property-image .property-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badges {
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.booking-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.property-badge {
    position: absolute;
    top: 15px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.property-content {
    padding: 20px;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.property-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.property-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.property-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.property-location i {
    margin-right: 5px;
}

.property-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.property-detail {
    text-align: center;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    display: block;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.amenity-tag {
    background: var(--background-color);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.property-actions {
    display: flex;
    gap: 10px;
}

.property-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
}

/* List View Styles */
.property-card.list-view {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 20px;
}

.property-card.list-view .property-image {
    height: 150px;
    border-radius: 10px;
}

.property-card.list-view .property-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-card.list-view .property-actions {
    flex-direction: column;
    justify-content: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.page-number:hover,
.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-dots {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

/* Mobile Filter Toggle */
.filter-toggle-btn {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    width: 100%;
    transition: all 0.3s ease;
}

.filter-toggle-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.filter-toggle-btn i {
    margin-right: 8px;
}

.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
}

/* Responsive Design - Complete Redo */

/* Large Tablets and Small Laptops */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 280px 1fr;
        gap: 20px;
        padding: 40px 20px;
    }

    .property-image-wrapper {
        width: 91.5%;
        margin-bottom: 20px;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .real-estate-main {
        margin-top: 80px;
    }

    .search-section {
        padding: 40px 20px;
        margin-top: 0;
    }

    .search-bar {
        flex-direction: column;
        border-radius: 15px;
        max-width: 100%;
    }

    .search-input-group {
        padding: 15px 20px;
    }

    .search-btn {
        border-radius: 0 0 15px 15px;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }

    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 20px;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 1002;
        overflow-y: auto;
        transition: left 0.3s ease;
        -webkit-overflow-scrolling: touch;
    }

    .filter-sidebar.active {
        left: 0;
    }

    .filter-sidebar .filter-header {
        position: sticky;
        top: 0;
        background: var(--card-bg);
        z-index: 10;
        padding: 20px 25px 15px;
        margin: 0 -25px 25px -25px;
        border-bottom: 2px solid var(--border-color);
    }

    .filter-close-btn {
        display: block;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.5rem;
        cursor: pointer;
    }

    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .results-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .real-estate-main {
        margin-top: 60px;
    }

    .search-section {
        padding: 30px 15px;
        margin-top: 80px;
    }

    .search-bar {
        border-radius: 12px;
    }

    .content-wrapper {
        padding: 20px 15px;
    }

    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .property-card.list-view .property-image {
        height: auto;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-sidebar {
        max-width: 300px;
    }

    .results-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .sort-controls {
        justify-content: space-between;
    }
}

/* Mobile Medium */
@media (max-width: 576px) {
    .real-estate-main {
        margin-top: 50px;
    }

    .search-section {
        padding: 25px 12px;
    }

    .search-bar {
        border-radius: 10px;
    }

    .content-wrapper {
        padding: 15px 12px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .property-content {
        padding: 15px;
    }

    .property-actions {
        flex-direction: column;
    }

    .property-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .sort-controls {
        flex-direction: column;
        align-items: stretch;
    }

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

/* Mobile Small */
@media (max-width: 480px) {
    .search-section {
        padding: 20px 10px;
        margin: 100px 10px;
        border-bottom: 15px;
        display: none;
    }

    .search-bar {
        border-radius: 8px;
    }

    .content-wrapper {
        padding: 12px 10px;
        margin-top: 100px;
    }

    .results-grid {
        gap: 12px;
    }

    .property-image {
        height: 180px;
    }

    .property-content {
        padding: 12px;
    }

    .property-title {
        font-size: 1.1rem;
    }

    .property-price {
        font-size: 1.1rem;
    }

    .property-actions .btn {
        min-height: 40px;
    }

    .pagination {
        margin-top: 20px;
    }

    .results-header {
        margin-bottom: 15px;
    }
}

@media (max-width: 360px) {
    .search-section {
        padding: 15px 8px;
    }

    .search-bar {
        border-radius: 6px;
    }

    .content-wrapper {
        padding: 10px 8px;
    }

    .results-grid {
        gap: 10px;
    }

    .property-image {
        height: 160px;
    }

    .property-content {
        padding: 10px;
    }

    .property-header {
        flex-direction: column;
        gap: 8px;
    }

    .property-price {
        align-self: flex-start;
    }

    .property-actions .btn {
        min-height: 36px;
    }

    .pagination {
        margin-top: 15px;
    }
}
