:root{
    --bg:#f5f6fa;
    --card:#ffffffaa;
    --primary:#3498db;
    --primary-hover:#2980b9;
    --accent:#27ae60;
    --accent-hover:#1e8449;
    --muted:#7f8c8d;
}
*{
    box-sizing:border-box;
}
body{
    margin:0;
    padding:0;
    font-family:'Inter',sans-serif;
    background:linear-gradient(135deg,#f8f9fb,#edf1f5);
    color:#2c3e50;
}
a{
    text-decoration:none;
    transition:.25s;
}

.super-container{
    max-width:1240px;
    margin:0 auto;
}

.container{
    display:flex;
    align-items: flex-start;
    gap:24px;
}

.left-column {
    flex: 1 1 350px;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}
.right-column {
    flex: 1 1 350px;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.back-link{
    display:inline-block;
    padding:8px 14px;
    border-radius:999px;
    background:var(--primary);
    color:#fff;
    font-weight:600;
}
.back-link:hover{
    background:var(--primary-hover);
}
.house-card{
    background:var(--card);
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 10px 25px rgba(0,0,0,.12);
    transition:transform .25s,box-shadow .25s;
}
.house-card:hover{


}
.house-card img{
    width:100%;
    height:420px;
    object-fit:cover;
    display:block;
}

.card-content{
    padding:16px 16px 20px;
    display:flex;
    flex-direction:column;
    gap:12px;
}
.price{
    font-size:1.6rem;
    font-weight:800;
    color:#1f2d3a;
}

.meta{
    font-size:.95rem;
    color:var(--muted);
    line-height:1.45;
}
.view-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:8px;
    padding:10px 32px;
    background:var(--accent);
    color:#fff;
    border-radius:8px;
    font-weight:600;
    transition:background .25s;
}
.view-link:hover{
    background:var(--accent-hover);
}
.heatbar-container{
    position:relative;
    display:flex;
    align-items:center;
    gap:6px;
    margin:12px 4px;
}
.heatbar{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:3px;
    height:16px;
    width:100%;
}
.heatbar .cell{
    border-radius:4px;
    background:#e5e7eb;
    transition:all .3s;
}
.heatbar .cell.filled{
    transform:scaleY(1.1);
    box-shadow:inset 0 0 3px rgba(0,0,0,.18);
}
.tooltip-btn{
    background:transparent;
    border:none;
    cursor:pointer;
    font-size:16px;
    line-height:1;
}
.tooltip-box{
    position:absolute;
    bottom:calc(100% + 6px);
    left:50%;
    transform:translateX(-50%);
    background:rgba(0,0,0,.85);
    color:#fff;
    font-size:12px;
    line-height:1.4;
    padding:6px 8px;
    border-radius:6px;
    display:none;
    white-space:pre;
    z-index:200;
}
.tooltip-box::before{
    content:"";
    position:absolute;
    top:100%;
    left:50%;
    transform:translateX(-50%);
    border:6px solid transparent;
    border-top-color:rgba(0,0,0,.85);
}
table{
    width:100%;
    border-collapse:collapse;
    font-size:.92rem;
}
th,td{
    padding:10px 8px;
    border-bottom:1px solid #ddd;
}
th{
    background:#ecf0f1;
    font-weight:600;
}
td.value{
    text-align:right;
}
tbody tr:nth-child(odd){
    background:#f9f9f9;
}
@media(max-width:900px){
    .container{
        flex-direction:column;
    }
}

.back-link.bottom-back {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 16px;
    background: #3498db;
    color: #fff;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.back-link.bottom-back:hover {
    background: #2980b9;
}

@media(min-width: 900px) {
    .back-link.bottom-back {
        width: auto;
        margin-top: 10px;
        padding: 8px 12px;
    }
}

.buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.view-link, .map-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: #3498db;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
}

.view-link i, .map-link i {
    margin-right: 4px;
}

.timeline-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 0;
    max-width: 100%;
}

.table-wrapper {
    overflow-x: auto;
}

.timeline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.timeline-table th,
.timeline-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.timeline-table th.value,
.timeline-table td.value {
    text-align: right;
    white-space: nowrap;
}

.timeline-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.timeline-table tbody tr:hover {
    background: #f3f4f6;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    padding: 2rem 1rem;
}

.empty-state i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.house-wrapper{
    flex: 0 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    overflow: hidden;
    max-width: 100%
}

.timeline-card {
    flex: 0 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    overflow: hidden;
    padding: 20px;
}

.timeline {
    position: relative;
    margin-left: 1rem;
    padding-left: 2rem;
    border-left: 2px solid #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.timeline-dot {
    position: absolute;
    left: -1.2rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #3b82f6;
}

.timeline-content {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.timeline-action {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-value {
    font-size: 0.9rem;
    color: #1f2937;
    background: #e0f2fe;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    margin-top: 0.25rem;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    padding: 2rem 1rem;
}

.empty-state i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

@media (max-width: 768px) {
    .timeline-date {
        position: relative;
        left: 0;
        width: auto;
        text-align: left;
        margin-bottom: 0.25rem;
    }
    .timeline-item {
        margin-left: -1rem;
    }
}

.nearby {
    margin-top: 40px;
    padding-left: 48px;
    padding-right: 48px;
}

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 16px; /* spacing between cards */
    max-width: 600px; /* optional: keeps it neat */
    margin-top: 16px;
}

.nearby-card {
    flex: 1 1 200px;        
    max-width: 350px;
    background-color: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    gap: 8px;
    align-items: center;
}

.nearby-card-link {
    text-decoration: none;
    color: inherit;
}

.nearby-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nearby-info {
    font-size: 0.9rem;
    line-height: 1.2rem;
}

.nearby {
    margin-top: 3rem;
}

.nearby h2 {
    margin-bottom: 1rem;
}

.nearby-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.nearby-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.nearby-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 0.8rem;
    color: #333;
}

.meta-item i {
    color: #666;
    font-size: 0.9rem;
}

/* Salary Card */
.salary-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 20px;
    margin-top: 20px;
}

.salary-card h2 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

/* Salary Table */
.salary-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}

.salary-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.salary-table tr:last-child td {
    border-bottom: none;
}

.salary-table .highlight {
    font-weight: bold;
    color: #2E7D32; /* green accent */
    background-color: #f1f8f4;
}

.timeline-item.hidden {
    display: none;
}

.timeline-toggle {
    margin-top: 10px;
    background: none;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.timeline-toggle:hover {
    background: #f5f5f5;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 0;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: 10px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4CAF50;
    z-index: 2;
}

/* Vertical line */
.timeline-item::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 0;
    bottom: -20px;
    width: 2px;
    background: #e0e0e0;
    z-index: 1;
}

/* Remove line for last item */
.timeline-item:last-child::before {
    display: none;
}
