.estate-listings {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.estate-item {
    box-sizing: border-box;
    width: 100%;
    border-bottom: 2px solid #f6f5f7;
    padding-bottom: 20px;
}
.estate-item a {
    text-decoration: none;
    color: inherit;
    grid-template-columns: 290px auto;
    display: grid;
    align-items: stretch;
    gap: 15px;
}
.estate-item a:hover {
    text-decoration: none;
    color: inherit;
}
.estate-item .estate-item-title {
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    margin-bottom: 0;
    color: #000;
    font-weight: 600;
}
.estate-item .price-per-m2 {
    font-size: 14px;
    font-weight: 500;
}
.estate-item .image-wrapper {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
}
.estate-item .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.estate-item .price-wrapper {
    margin-left: auto;
    flex-shrink: 0;
    width: 140px;
    text-align: right;
}
.estate-item .price-wrapper .price {
    font-size: 25px;
    font-weight: 900;
    display: block;
}
.estate-item .details-wrapper {
    display: flex;
    flex-direction: row;
}
.estate-item .details-wrapper div {
    font-size: 16px;
    font-weight: 600;
    color: rgb(118, 112, 125);
}
.estate-item .details-wrapper div:not(:last-child) {
    border-right: 1px solid #c7c5c9;
    padding-right: 8px;
    margin-right: 8px;
}
.estate-item .details-wrapper div .energy-class {
    border: 1px solid #76707d;
    padding: 0 .5rem;
    border-radius: 8px;
}
.estate-item .details-wrapper .detail-with-image {
    display: flex;
    align-items: center;
}
.estate-item .details-wrapper .detail-with-image img {
    height: 16px;
    margin-right: 4px;
}
@media (max-width: 996px) {
    .title-wrapper .details-wrapper,
    .title-wrapper-address{
        display: none;
    }
    .details-wrapper {
        display: flex;
    }
    .estate-item a {
        display: flex;
        flex-direction: column;
    }
    .estate-item-content {
        padding: 0 !important;
        flex-direction: column !important;
    }
    .estate-item .price-wrapper {
        width: inherit;
        text-align: inherit;
        flex-shrink: unset;
        margin-left: initial;
        display: flex;
    }
    .estate-item .price-wrapper .price {
        margin-right: 8px;
    }
}

.estate-listings-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.estate-listings-pagination a,
.estate-listings-pagination span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 18px;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #3f51b5;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: white;
}

.estate-listings-pagination a:hover {
    border-color: #333;
    background-color: #f0f0f0;
}

.estate-listings-pagination .current {
    background-color: #3f51b5;
    color: white;
    border-color: #3f51b5;
    font-weight: bold;
}

/* Only make actual page numbers look like circles */
.estate-listings-pagination a,
.estate-listings-pagination span {
    border-radius: 18px;
}

.estate-listings-pagination a:hover {
    color: #3f51b5;
    text-decoration: none;
}

/* If it's a number, make it a circle */
.estate-listings-pagination a:not(:contains("järgmine")):not(:contains("eelmine")),
.estate-listings-pagination span:not(:contains("järgmine")):not(:contains("eelmine")) {
    width: 36px;
    padding: 0;
}

.title-wrapper-address {
    font-size: 16px;
    color: #76707d;
}
.estate-item-content {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 0 10px 10px 10px;
    max-width: 100%;
}
.estate-item-content-body {
    gap: 6px;
    display: flex;
    flex-direction: column;
}

.estate-item-content-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-size: 13px;
    line-height: 16px;
}
