.chart-container {
    width: 80%;
    max-width: 900px;
    margin: 40px auto;
    height: 500px;
}

.house-card {
    width: 80%;
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    background-color: #fff;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.house-card .image {
    flex: 0 0 150px;
}

.house-card .image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.house-card .info {
    flex: 1;
}

.house-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.house-card p {
    margin: 5px 0;
}

.details-header {
    position: relative;
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #2d7db3, #3498db);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 12px;
}

.details-header .back-link {
    position: absolute;
    left: 20px;
    top: 30px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-header .header-content h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.details-header .header-content .subtext {
    margin: 6px 0 0 0;
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
}

.details-header .header-content .price-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    font-size: 1.5rem;
    background-color: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-weight: 600;
}

.filter-buttons a.btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 2px;
    background-color: #eee;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-weight: bold;
    transition: background 0.2s;
}

.filter-buttons a.btn:hover {
    background-color: #ddd;
}

.filter-buttons a.btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Filter Buttons */
.filter-buttons {
    text-align: center;
    margin-bottom: 30px;
}

.filter-buttons button {
    padding: 12px 25px;
    margin: 0 10px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #e0e0e0;
    color: #333;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.house-card {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto 40px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.house-card .image {
    flex: 0 0 250px; /* fixed width */
    display: flex;
}

.house-card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.house-card .info {
    flex: 1;
    padding: 20px;
}

.house-card h2 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    color: #34495e;
}

.house-card p {
    margin: 6px 0;
    font-size: 1rem;
}

.house-card p strong {
    color: #2c3e50;
}

/* Scatter Plot */
.chart-container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto 60px auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}