.house-related {
    padding-block: 60px;
    color: #1e1e1e;
    background: #fff;
    font: 400 16px/1.45 "Montserrat", sans-serif;
}

.house-related *,
.house-related *::before,
.house-related *::after {
    box-sizing: border-box;
}

.house-related h2,
.house-related h3,
.house-related p,
.house-related dl,
.house-related dd {
    margin: 0;
}

.house-related__container,
.house-related__other,
.house-related__built {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-inline-size: 0;
}

.house-related__built {
    padding-block: 60px 0;
}

.house-related__container {
    padding-inline: 0;
}

.house-related__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-inline-size: 0;
}

.house-related .house-related__title {
    font: 600 36px/1.45 "Montserrat", sans-serif;
}

.house-related__all,
.house-related__built-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-block-size: 38px;
    max-inline-size: 100%;
    padding: 8px 26px;
    border: 1px solid #b6b6b6;
    border-radius: 58px;
    color: #1e1e1e;
    background: transparent;
    font: 600 14px/17px "Montserrat", sans-serif;
    text-align: center;
    text-decoration: none;
    transition: border-color .3s ease, background-color .3s ease;
}

.house-related__all:hover,
.house-related__built-link:hover {
    border-color: #1e1e1e;
    color: #1e1e1e;
    background: #eaeaea;
    text-decoration: none;
}

.page-house-detail .house-related .house-related__all,
.page-house-detail .house-related .house-related__all:hover,
.page-house-detail .house-related .house-related__all:focus,
.page-house-detail .house-related .house-related__all:visited,
.page-house-detail .house-related .house-related__built-link,
.page-house-detail .house-related .house-related__built-link:hover,
.page-house-detail .house-related .house-related__built-link:focus,
.page-house-detail .house-related .house-related__built-link:visited,
.page-house-detail .house-related .house-related__project-link,
.page-house-detail .house-related .house-related__project-link:hover,
.page-house-detail .house-related .house-related__project-link:focus,
.page-house-detail .house-related .house-related__project-link:visited {
    color: #1e1e1e;
}

.house-related__projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.house-related__project {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-inline-size: 0;
    padding: 19px 19px 29px;
    border: 1px solid #d9d9d9;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 4px 10px #0000001a;
    transition: box-shadow .3s ease;
}

.house-related__project:has(.house-related__project-link:hover) {
    box-shadow: 0 4px 15px #00000030;
}

.house-related__media {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-inline-size: 0;
}

.house-related__image {
    display: block;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 428 / 240;
    border-radius: 20px;
    background: #fff;
    object-fit: cover;
}

.house-related__image.is-plan {
    object-fit: contain;
}

.house-related__size {
    position: absolute;
    inset-block-start: 20px;
    inset-inline-start: 20px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #1e1e1e;
    background: #f4b918;
    font: 600 16px/20px "Montserrat", sans-serif;
}

.house-related__views {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.house-related__view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-block-size: 28px;
    padding: 6px 20px;
    border: 0;
    border-radius: 15px;
    color: #1e1e1e;
    background: #e8e8e8;
    font: 500 13px/15.6px "Montserrat", sans-serif;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color .3s ease;
}

.house-related__view img {
    display: block;
    flex: 0 0 auto;
}

.house-related__view:hover {
    background: #d9d9d9;
}

.house-related__view[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid #b6b6b6;
    border-radius: inherit;
    pointer-events: none;
}

.house-related__project-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-inline-size: 0;
}

.page-house-detail .house-related .house-related__project-heading,
.page-house-detail .house-related .house-related__project-title,
.page-house-detail .house-related .house-related__project-link {
    position: static;
}

.page-house-detail .house-related .house-related__project-heading {
    z-index: auto;
}

.house-related .house-related__project-title {
    font: 600 20px/24px "Montserrat", sans-serif;
}

.house-related__project-link {
    color: inherit;
    text-decoration: none;
}

.house-related__project-link:hover {
    color: inherit;
    text-decoration: none;
}

.house-related__project-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 30px;
}

.house-related__project a:not(.house-related__project-link),
.house-related__project button,
.house-related__project input {
    position: relative;
    z-index: 1;
}

.house-related__project:has(.house-related__project-link:focus-visible) {
    outline: 2px solid #1e1e1e;
    outline-offset: 3px;
}

.house-related__project-link:focus-visible {
    outline: none;
}

.house-related__price {
    font-size: 28px;
    font-weight: 600;
    line-height: 33.6px;
}

.house-related__builds {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.house-related__build {
    container: house-build / inline-size;
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    align-items: start;
    gap: 50px;
    min-block-size: 330px;
    min-inline-size: 0;
    padding: 49px;
    border: 1px solid #d9d9d9;
    border-radius: 16px;
    background: #fafafa;
}

.house-related__built-image {
    display: block;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 380 / 228;
    border-radius: 10px;
    object-fit: cover;
}

.house-related__built-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-inline-size: 0;
}

.house-related__build:not(:has(> img)) > .house-related__built-content {
    grid-column: 1 / -1;
}

.house-related__built-description {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-inline-size: 0;
}

.house-related .house-related__built-title {
    font: 600 22px/31.9px "Montserrat", sans-serif;
}

.house-related__built-facts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.house-related__built-facts > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
    font-size: 16px;
    line-height: 23.2px;
}

.house-related__built-facts dt {
    font-weight: 400;
}

.house-related__built-facts dd {
    font-weight: 600;
}

.house-related__built-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: clip;
    color: #6a6a6a;
    font-size: 16px;
    line-height: 23.2px;
}

.house-related__built-link {
    align-self: start;
}

.house-related__all:focus-visible,
.house-related__built-link:focus-visible,
.house-related__view:focus-visible {
    outline: 2px solid #1e1e1e;
    outline-offset: 3px;
}

@container house-build (inline-size < 700px) {
    .house-related__built-image,
    .house-related__built-content {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1199px) {
    .house-related__projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .house-related__build {
        gap: 30px;
        padding: 29px;
    }
}

@media (max-width: 767px) {
    .house-related {
        padding-block: 40px;
    }

    .house-related__container,
    .house-related__other,
    .house-related__built {
        gap: 24px;
    }

    .house-related__built {
        padding-block: 40px 0;
    }

    .house-related__heading {
        flex-wrap: wrap;
        gap: 16px;
    }

    .house-related .house-related__title {
        font-size: 30px;
    }

    .house-related__projects {
        grid-template-columns: minmax(0, 1fr);
    }

    .house-related__build {
        gap: 24px;
        min-block-size: 0;
        padding: 23px;
    }

    .house-related .house-related__built-title {
        font-size: 20px;
        line-height: 1.45;
    }
}

@media (max-width: 479px) {
    .house-related .house-related__title {
        font-size: 26px;
    }

    .house-related__project {
        padding: 15px 15px 23px;
    }

    .house-related__size {
        inset-block-start: 16px;
        inset-inline-start: 16px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .house-related__view {
        padding-inline: 16px;
    }

    .house-related__build {
        padding: 19px;
    }

    .house-related__built-link {
        padding-inline: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .house-related__project,
    .house-related__all,
    .house-related__built-link,
    .house-related__view {
        transition: none;
    }
}
