.about-section {
    padding-top: 40px;
    padding-bottom: 50px;
}

.gallery-section {
    padding-top: 0;
    padding-bottom: 45px;
}

.video-section {
    background-color: var(--bg-second);
    padding-top: 32px;
    padding-bottom: 30px;
}

.video-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.video-slider-frame {
    flex: 1 1 auto;
    max-width: 860px;
}

.video-slider-player {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 14px;
}

.video-slider-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    background-color: transparent;
    color: var(--primary);
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.video-slider-btn:hover {
    background-color: var(--primary);
    color: var(--text-main);
}

.video-slider-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.video-slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.video-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(52, 170, 223, 0.35);
    transition: all 0.2s ease;
}

.video-slider-dot.is-active {
    width: 24px;
    border-radius: 999px;
    background-color: var(--primary);
}

.contact-container {
    padding-top: 40px;
    padding-bottom: 52px;
}

.contact-img {
    margin-top: 12px;
    border-radius: 18px;
}

.contact-container .contact-input::placeholder,
.contact-container .contact-input-textarea::placeholder {
    color: #7a7a7a;
    opacity: 1;
}

.contact-container .contact-input:invalid::placeholder {
    color: #7a7a7a;
}

.housing-about-row {
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

.housing-about-text .about-text-4 {
    margin-bottom: 0;
}

.housing-about-text .about-title-text-1 {
    margin-bottom: 14px !important;
}

.housing-about-text .about-text-2 {
    margin-bottom: 22px;
}

.housing-about-text .about-btn,
.housing-about-links-block .about-btn {
    margin-bottom: 0;
}

.housing-about-text .btn-div {
    margin-bottom: 12px;
}

.housing-about-links-block .btn-div {
    margin-bottom: 18px;
}

.housing-about-img-wrap {
    flex: 0 0 400px;
    position: relative;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.housing-about-img-wrap .about-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin-top: 0;
    object-fit: cover;
    object-position: center 40%;
}

.housing-about-links-block {
    width: 509px;
}

.housing-about-links-block .about-title-text-1 {
    margin-bottom: 10px !important;
}

.housing-links-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
    margin-top: 60px;
    margin-bottom: 25px;
}

.housing-about-links-block .btn-div:last-of-type {
    margin-bottom: 0;
}

.housing-links-img-wrap {
    flex: 0 0 400px;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.housing-links-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

@media (min-width: 1367px) {
    .contact-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 480px;
        align-items: stretch;
        column-gap: 24px;
    }

    .contact-left-div {
        width: auto;
        min-width: 0;
    }

    .contact-container > div:not(.contact-left-div) {
        width: 100%;
        min-width: 0;
        align-self: stretch;
        display: flex;
        overflow: hidden;
        border-radius: 18px;
    }

    .contact-img {
        margin-top: 0;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }
}

@media (min-width:751px) and (max-width:1366px),
       (min-device-width:751px) and (max-device-width:1366px) {
    .contact-container {
        display: flex;
        justify-content: space-between;
        align-items: stretch;
        gap: 20px;
    }

    .contact-left-div {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .contact-container > div:not(.contact-left-div) {
        flex: 0 0 clamp(280px, 40vw, 420px);
        width: clamp(280px, 40vw, 420px);
        min-width: 280px;
        height: auto;
        min-height: 0;
        align-self: stretch;
        display: flex;
        overflow: hidden;
        border-radius: 18px;
    }

    .contact-container .contact-img {
        margin-top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        flex: 1 1 auto;
    }

    .housing-about-row {
        flex-direction: row;
        align-items: stretch;
        gap: 24px;
    }

    .housing-about-text,
    .housing-about-links-block {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .housing-about-text .about-title-text-1,
    .housing-about-text .about-text-1,
    .housing-about-text .about-text-2,
    .housing-about-text .about-text-4,
    .housing-about-links-block .about-title-text-1,
    .housing-about-links-block .about-text-1 {
        width: 100%;
    }

    .housing-about-img-wrap,
    .housing-links-img-wrap {
        flex: 0 0 clamp(260px, 38vw, 360px);
        width: clamp(260px, 38vw, 360px);
        max-width: none;
        height: clamp(420px, 55vw, 560px);
        overflow: hidden;
        border-radius: 20px;
        position: relative;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    }

    .housing-about-img-wrap .about-img {
        position: absolute;
        inset: 0;
        width: 100%;
        max-width: none;
        height: 100%;
        margin-top: 0;
        border-radius: 0;
        box-shadow: none;
        object-fit: cover;
        object-position: center 40%;
    }

    .housing-links-row {
        flex-direction: row;
        align-items: stretch;
        gap: 24px;
        margin-top: 50px;
    }

    .housing-links-img {
        width: 100%;
        max-width: none;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Work block styles (for this page) */
.work-section {
    padding-top: 40px;
    padding-bottom: 0;
}

.work-head-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
}

.work-head-text {
    text-align: center;
}

.work-abs-div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.work-main-img {
    width: 525px;
    height: 700px;
    margin-left: 80px;
    display: block;
    object-fit: cover;
    border-radius: 20px;
}

.work-steps-div {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(84px, 8vw, 128px);
}

.work-step-div:nth-child(even) {
    margin-left: clamp(96px, 9vw, 170px);
}

.work-step-div {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
}

.work-step-img {
    width: auto;
    height: 52px;
    flex: 0 0 auto;
    margin-top: 0;
    display: block;
    justify-self: center;
}

.work-step-text-div {
    width: min(100%, 34ch);
}

.work-step-div::after {
    content: "";
    position: absolute;
    display: none;
    top: calc(100% + 10px);
    width: clamp(116px, 10.8vw, 152px);
    height: 1px;
    background-color: rgba(52, 170, 223, 0.92);
    transform-origin: left center;
    pointer-events: none;
}

.work-step-div:nth-of-type(1)::after,
.work-step-div:nth-of-type(2)::after,
.work-step-div:nth-of-type(3)::after {
    display: block;
}

.work-step-div:nth-of-type(1)::after {
    left: 45px;
    transform: rotate(50deg);
}

.work-step-div:nth-of-type(2)::after {
    left: -10px;
    transform: rotate(130deg);
}

.work-step-div:nth-of-type(3)::after {
    left: 40px;
    top: calc(100% + 20px);
    transform: rotate(50deg);
}

.work-step-title {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.08;
    margin-bottom: 8px;
}

.work-step-text {
    width: 100%;
    max-width: 34ch;
    line-height: 1.38;
}

.work-btn-div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-top: 140px;
}

.work-decor-line-1 {
    display: none;
}

.work-decor-line-2 {
    display: none;
}

.work-decor-line-3 {
    display: none;
}

@media (min-width:751px) and (max-width:1366px) {
    .work-abs-div {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }

    .work-steps-div {
        flex: 1 1 auto;
        min-width: 0;
        gap: 72px;
    }

    .work-step-div:nth-child(even) {
        margin-left: 0;
    }

    .work-step-div {
        gap: 16px;
    }

    .work-step-div:nth-of-type(1)::after,
    .work-step-div:nth-of-type(2)::after,
    .work-step-div:nth-of-type(3)::after {
        display: none;
    }

    .work-step-text {
        width: 100%;
    }

    .work-main-img {
        flex: 0 0 clamp(260px, 38vw, 360px);
        width: clamp(260px, 38vw, 360px);
        max-width: none;
        height: clamp(420px, 55vw, 560px);
        margin-left: 0;
    }

    .work-decor-line-1,
    .work-decor-line-2,
    .work-decor-line-3 {
        display: none;
    }
}

/* Narrow desktop windows in a medium-width range (e.g. half-screen around 67% zoom) */
@media (min-width:1367px) and (max-width:1600px) and (max-aspect-ratio: 4/3) {
    .work-step-div:nth-of-type(1)::after,
    .work-step-div:nth-of-type(2)::after,
    .work-step-div:nth-of-type(3)::after {
        display: none;
    }
}

@media (max-width:750px), (max-device-width:750px) {
    .about-decor-1,
    .about-decor-2 {
        width: clamp(250px, 64vw, 340px);
        max-width: 340px;
        opacity: 0.86;
    }

    .about-decor-1 {
        left: -18%;
        top: 10px;
    }

    .about-decor-2 {
        right: -18%;
        top: 10px;
    }

    .video-head-div {
        margin-bottom: 24px;
    }

    .housing-about-row {
        flex-direction: column;
        gap: 20px;
    }

    .housing-about-img-wrap {
        flex-basis: auto;
        width: 100%;
        max-width: 400px;
        height: auto;
        overflow: visible;
        border-radius: 0;
        position: static;
        box-shadow: none;
    }

    .housing-about-img-wrap .about-img {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 400px;
        height: auto;
        margin-top: 0;
        border-radius: 20px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    }

    .housing-about-links-block {
        width: 100%;
    }

    .housing-links-row {
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
    }

    .housing-links-img-wrap {
        flex-basis: auto;
        width: 100%;
        max-width: 400px;
        height: auto;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }

    .housing-links-img {
        width: 100%;
        max-width: 400px;
        height: auto;
        border-radius: 20px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    }

    .video-slider {
        gap: 10px;
    }

    .video-slider-btn {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 20px;
    }

    .video-slider-dots {
        margin-top: 12px;
    }

    .gallery-section .gallery-btn-div {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    .work-abs-div {
        flex-direction: column;
        gap: 50px;
    }

    .work-steps-div {
        gap: 32px;
    }

    .work-main-img {
        width: 100%;
        max-width: 525px;
        height: auto;
        margin-left: 0;
    }

    .work-decor-line-1,
    .work-decor-line-2,
    .work-decor-line-3 {
        display: none;
    }

    .work-step-div:nth-child(even) {
        margin-left: 0;
    }

    .work-step-div {
        gap: 12px;
        align-items: flex-start;
    }

    .work-step-div:nth-of-type(1)::after,
    .work-step-div:nth-of-type(2)::after,
    .work-step-div:nth-of-type(3)::after {
        display: none;
    }

    .work-step-img {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .work-step-text {
        width: 100%;
    }

    .work-btn-div {
        flex-direction: column;
        width: 100%;
    }

}
