:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --light-text: #64748b;
    --border-color: #e2e8f0;
    --success-color: #0d6efd;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.section-header p {
    color: var(--light-text);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Section */
.listings-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.filter-button {
    padding: 0.75rem 1.5rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--light-text);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: white;
}

/* Search Bar */
.search-container {
    max-width: 500px;
    margin: 0 auto 2.5rem;
    position: relative;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid var(--success-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Property Cards */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.property-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-card:hover .property-image-container img {
    transform: scale(1.05);
}

.property-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.badge-open-house {
    background-color: var(--success-color);
}

.badge-new-listing {
    background-color: var(--accent-color);
}

.badge-rental {
    background-color: #8b5cf6;
}

.badge-standard {
    background-color: var(--secondary-color);
}

.property-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.listing-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.listing-details {
    color: var(--light-text);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.listing-address {
    color: var(--light-text);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.listing-address i {
    margin-top: 0.125rem;
}

.listing-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-secondary {
    background-color: white;
    color: var(--success-color);
    border: 1px solid var(--success-color);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: var(--success-color);
    color: white;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.btn-load-more {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn-load-more:hover {
    background-color: #0bc36a;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background-color: var(--light-bg);
    color: var(--dark-text);
}

.modal-header h3 {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--success-color);
    padding-right: 2rem;
}

.modal-address {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding-right: 2rem;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem 2rem;
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.thumbnail {
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.75rem;
}

.listing-details-summary {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.property-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.highlight-item i {
    color: var(--success-color);
    width: 20px;
    text-align: center;
}

.modal-features {
    margin-top: 1.5rem;
}

.modal-features strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--dark-text);
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    background-color: var(--light-bg);
    color: var(--dark-text);
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
}

.property-description {
    color: var(--light-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.modal-footer strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0px 0px 20px 10px;
}

.btn-call,
.btn-whatsapp {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.btn-call {
    background-color: var(--success-color);
    color: white;
}

.btn-call:hover {
    background-color: #0da271;
    color: white;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1da851;
    color: white;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.no-results h4 {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--light-text);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .property-highlights {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons a {
        text-align: center;
        justify-content: center;
    }

    .modal-header h3,
    .modal-address {
        padding-right: 0;
    }
}

@media (max-width: 576px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }

    .filter-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
    }

    .btn-call,
    .btn-whatsapp {
        min-width: 120px;
    }
}
