/* Properties Page Enhanced Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9)),
                url('https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?w=1920&h=600&fit=crop') center/cover;
    padding: 150px 0 100px;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Search and Filter Section */
.search-filter-section {
    padding: 3rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.search-box {
    flex: 1;
    max-width: 800px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-input {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.filter-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.view-btn:hover,
.view-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* Properties Section */
.properties-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info p {
    margin: 0;
    color: #666;
    font-weight: 500;
}

.sort-dropdown select {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

.properties-grid.list-view .property-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.properties-grid.list-view .property-image {
    height: 200px;
}

.property-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.property-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.property-badge.featured {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.property-badge.new {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
}

.property-badge.luxury {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
}

.property-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 2;
}

.favorite-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.favorite-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.favorite-icon.favorited {
    background: #ff6b6b;
    color: white;
}

.property-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-card:hover .property-overlay {
    opacity: 1;
}

.property-info {
    padding: 25px;
}

.property-info h3 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: 600;
}

.property-location {
    color: var(--text-light);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-features {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.property-features i {
    color: var(--primary-color);
}

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

.amenity-tag {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.amenity-more {
    background: var(--text-light);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

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

.property-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.no-results h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 1000px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.property-detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-light);
}

.tab-btn.active {
    background: var(--bg-light);
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* Overview Tab */
.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.property-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumbnail-gallery img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.thumbnail-gallery img:hover {
    opacity: 1;
}

.price-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.price-section h3 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.price-per-sqft {
    color: var(--text-light);
    font-size: 1rem;
}

.property-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
}

.stat i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.description h4 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.description p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 25px;
}

.agent-info h4 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.agent-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 15px;
}

.agent-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-details h5 {
    margin-bottom: 8px;
    color: var(--text-color);
}

.agent-details p {
    margin: 4px 0;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Features Tab */
.features-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-section {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 15px;
}

.feature-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-section h4 i {
    color: var(--primary-color);
}

.feature-section p {
    color: var(--text-light);
    margin: 0;
}

.amenities-section h4 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.amenities-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.amenity-item i {
    color: #28a745;
    font-size: 1.1rem;
}

/* Location Tab */
.location-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.location-info h4 {
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-placeholder {
    height: 300px;
    background: var(--bg-light);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.nearby-amenities h4 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.amenity-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.nearby-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
}

.nearby-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Mortgage Tab */
.mortgage-content {
    max-width: 600px;
    margin: 0 auto;
}

.mortgage-calculator h4 {
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-color);
}

.calculator-form {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mortgage-results {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
}

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

.result-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-item h5 {
    margin-bottom: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

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

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

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

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

.pagination-numbers {
    display: flex;
    gap: 10px;
}

.pagination-number {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.pagination-dots {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: var(--text-light);
}

/* Newsletter Section */
.newsletter-section {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.newsletter-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 15px 30px;
    border-radius: 50px;
    background: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .search-filter-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .view-controls {
        align-self: center;
    }
    
    .overview-content {
        grid-template-columns: 1fr;
    }
    
    .properties-grid.list-view .property-card {
        flex-direction: column;
    }
    
    .properties-grid.list-view .property-image {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .search-row,
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .amenities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .properties-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .property-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .newsletter-form {
        flex-direction: column;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .property-features {
        flex-direction: column;
        gap: 10px;
    }
    
    .property-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .pagination-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .view-toggle {
        flex-direction: row;
    }
    
    .agent-card {
        flex-direction: column;
        text-align: center;
    }
}
