/* Стили для pop-up на главной странице */
.home-popup {
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s, visibility 0.3s !important;
}

.home-popup.modal_active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.home-popup .modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.home-popup .modal__bg {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-popup .modal__box {
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 2;
}

.home-popup.modal_active .modal__box {
    transform: scale(1) !important;
}

.home-popup .modal__box_home-popup {
    position: relative;
    max-width: 800px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
    z-index: 3;
    /* Соотношение сторон из макета: 1235x635 ≈ 1.94:1 */
    height: 410px;
}

.home-popup__content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

/* Левая часть - изображение интерьера */
.home-popup__image-side {
    position: relative;
    width: 48.6%; /* 600/1235 * 100 ≈ 48.58% */
    height: 100%;
    overflow: hidden;
    background: white;
}

.home-popup__image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.home-popup__interior-image {
    height: 100%;
    object-fit: cover;
}

/* Правая часть - форма */
.home-popup__form-side {
    position: relative;
    width: 51.4%; /* 635/1235 * 100 */
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-popup__form-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 95px 60px 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.home-popup__title {
    font-family: Apparat, system-ui, -apple-system, sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #2D3640;
    line-height: 1.2;
    margin-bottom: 12px;
    width: 100%;
    position: relative;
}

.home-popup__title-line {
    width: 60px;
    height: 3px;
    background: #F53139;
    margin-top: 12px;
}

.home-popup__subtitle {
    font-family: Apparat, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    color: #2D3640;
    opacity: 0.6;
    margin-bottom: 32px;
    width: 100%;
}

.home-popup .form__group {
    margin-bottom: 20px;
    width: 100%;
}

.home-popup .form__group:last-of-type {
    margin-bottom: 24px;
}

.home-popup__button {
    width: 100%;
    max-width: 100%;
}

.home-popup .form__input {
    width: 100%;
    max-width: 100%;
}

.home-popup .form {
    width: 100%;
    max-width: 100%;
}

/* Стили для кнопки закрытия */
.home-popup .modal__box-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.home-popup .modal__box-close:hover {
    background: rgba(255, 255, 255, 1);
}

/* Адаптивность */
@media (max-width: 900px) {
    .home-popup.modal_active .modal__box {
        width: 484px;
    }
    .home-popup .modal__box_home-popup{
        height: 100%;
    }
    .home-popup__content {
        flex-direction: column;
    }
    .home-popup__form-wrapper {
        padding: 30px 20px;
    }
    .home-popup__image-side {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: white;
    }

    .home-popup__image-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .home-popup__interior-image {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    /* Правая часть - форма */
    .home-popup__form-side {
        position: relative;
        width: 100%;
        height: 100%;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
@media (max-width: 768px) {
    .popup-message .popup__content .popup__close{
        right: -50px;
    }
    .popup-message .popup__content{
        width: 60%;
    }
    .home-popup .modal__box-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
}

