/* Properties Hero Section */
.properties-hero {
    position: relative;
    padding: 160px 0 80px;
    margin-top: 80px;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/listing3a.jpeg') no-repeat center center/cover;
}

.properties-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay */
    z-index: 1;
}

.properties-hero-content {
    position: relative;
    z-index: 2;
}

.properties-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.properties-hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 3rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}


.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}


/* Properties Filter Section */
.properties-filter {
    background: var(--light);
    padding: 60px 0;
}

.filter-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-header h2 {
    color: var(--primary);
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-toggle {
    background: var(--light);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.filter-toggle:hover {
    background: var(--primary);
    color: white;
}

.filter-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

.view-options {
    display: flex;
    background: var(--light);
    border-radius: 5px;
    overflow: hidden;
}

.view-btn {
    padding: 10px 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.filter-content {
    display: none;
    margin-bottom: 2rem;
}

.filter-content.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Search Container */
.search-container {
    display: flex;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}

.search-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-btn {
    padding: 15px 25px;
    background: var(--secondary);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark);
    font-size: 1.2rem;
}

.search-btn:hover {
    background: #b8941f;
}

/* Properties Grid Section */
.properties-grid-section {
    padding: 80px 0;
}

.properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.properties-count {
    color: var(--gray);
    font-size: 1.1rem;
}

.properties-container {
    margin-bottom: 3rem;
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.list-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.list-view .property-card {
    display: block;
}

.list-view .property-image {
    width: 100%;
    height: 300px;
}

.property-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.property-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    color: white;
}

.property-badge.just-listed {
    background: var(--secondary);
    color: var(--dark);
}

.property-badge.featured {
    background: #e74c3c;
}

.property-badge.hot-deal {
    background: #ff6b6b;
}

.property-badge.off-plan {
    background: #3498db;
}

.property-badge.sold {
    background: #95a5a6;
}

.property-image {
    height: 250px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.property-card:hover .property-actions {
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.action-btn.favorite.active {
    background: #e74c3c;
    color: white;
}

.property-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.property-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.property-location {
    color: var(--gray);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-features {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.feature {
    background: var(--light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

.property-description {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.property-description p {
    color: var(--gray);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-price {
    margin-bottom: 1.5rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.price-note {
    font-size: 0.9rem;
    color: var(--gray);
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.property-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.property-status.available {
    background: #d4edda;
    color: #155724;
}

.property-status.construction {
    background: #fff3cd;
    color: #856404;
}

.property-status.off-plan {
    background: #cce7ff;
    color: #004085;
}

.property-status.sold {
    background: #e2e3e5;
    color: #383d41;
}

.property-cta {
    display: flex;
    gap: 0.75rem;
}

.property-cta .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.property-cta .btn-primary {
    background: var(--primary);
    border: 2px solid var(--primary);
}

.property-cta .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.property-cta .btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.property-cta .btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.no-results-content p {
    color: var(--gray);
    margin-bottom: 2rem;
}

/* CTA Section */
.properties-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
}

.tour-form .form-group {
    margin-bottom: 1.5rem;
}

.tour-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.tour-form input,
.tour-form select,
.tour-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.tour-form input:focus,
.tour-form select:focus,
.tour-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* View Details Modal */
.details-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.property-details h4 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.property-details .property-location {
    margin-bottom: 1rem;
}

.property-details .property-features {
    margin-bottom: 1rem;
}

.property-details .property-price {
    margin-bottom: 1rem;
}

.details-cta {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.details-cta .btn {
    padding: 10px 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-stats {
        gap: 2rem;
    }
    .properties-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .grid-view {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .properties-hero {
        padding: 120px 0 60px;
    }
    .properties-hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    .filter-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .list-view .property-image {
        height: 250px;
    }
    .property-cta {
        flex-direction: column;
    }
    .property-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .cta-content h2 {
        font-size: 2rem;
    }
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    .property-info {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .property-cta {
        width: 100%;
    }
    .property-cta .btn {
        width: 100%;
        text-align: center;
    }
    .property-features {
        justify-content: center;
    }
    .filter-actions {
        flex-direction: column;
    }
    .properties-hero-content h1 {
        font-size: 2rem;
    }
}

/* Property Card Animations */
.property-card.hidden {
    display: none;
}

.property-card.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}