/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('../img/bg.webp') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    height: auto; /* Меняем с 100vh на auto */
    width: 100%;
    position: relative;
    background-attachment: fixed;
}

/* Текст с фоном */
.text-image {
    position: absolute;
    left: 90px;
    top: 54%;
    transform: translateY(-50%);
    width: 74vw;
    max-width: 1445px;
}

/* Контейнер с формой */
.form-container {
    position: absolute;
    right: 72px;
    top: 15%;
    width: auto;
    height: auto;
    padding: 20px;
    z-index: 1;
}


/* Футер */
.footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.footer img {
    width: 513px;
    height: auto;
}

@media (max-width: 1620px) {
.text-image {
    position: absolute;
    left: 50px;
    top: 54%;
    transform: translateY(-50%);
    width: 70vw;
    max-width: 1445px;
}
}

@media (max-width: 1420px) {

    .text-image {
    position: absolute;
    left: 30px;
    top: 54%;
    transform: translateY(-50%);
    width: 70vw;
    max-width: 1445px;
    }

    .form-container {
    position: absolute;
    right: 30px;
    top: 15%;
    width: auto;
    height: auto;
    padding: 20px;
    z-index: 1;
}
}

@media (max-width: 1120px) {
    .text-image {
        position: absolute;
        left: 20px;
        top: 54%;
        transform: translateY(-50%);
        width: 66vw;
        max-width: 1445px;
    }
        .form-container {
        position: absolute;
        right: 15px;
        top: 15%;
        width: auto;
        height: auto;
        padding: 20px;
        z-index: 1;
    }
}

@media screen and (orientation: landscape) {
    .main-container {
        min-height: 700px;
        height: 100%;
        width: 100%;
    }
}

@media (max-width: 1024px) {
     body, html {
        overflow-y: auto;
    }
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('../img/bg.webp') no-repeat center center;
    background-size: cover;
    min-height: 650px;
    height: 100%;
    width: 100%;
    position: relative;
}
.text-image {
    content: url('../img/text2.webp');
    position: absolute;
    left: 30px;
    top: 50px;
    transform: translateY(0%);
    width: 70vw;
    max-width: 740px;
}
.footer {
    position: absolute;
    bottom: 20px;
    left: 30px;
    transform: translateX(0%);
}
.footer img {
    width: 402px;
    height: auto;
}

.form-container {
        position: absolute;
        right: 15px;
        top: 60px;
        width: auto;
        height: auto;
        padding: 20px;
        z-index: 1;
 }
}

@media (max-width: 900px) {
    .text-image {
        content: url('../img/text2.webp');
        position: absolute;
        left: 30px;
        top: 50px;
        transform: translateY(0%);
        width: 60vw;
        max-width: 740px;
    }
}

@media (max-width: 768px) {
    .main-container {
        background: url('../img/mobbg.webp') no-repeat top center;
        background-size: cover;
        min-height: 885px;
        height: 100%;
        justify-content: flex-start;
        flex-direction: column;
    }

    .text-image {
        display: none;
    }

    .footer {
        position: relative;
        margin-top: 380px;
        left: 0px;
        display: flex;
        justify-content: center;
    }

    .footer img {
        width: 320px;
        height: auto;
    }

    .form-container {
        position: relative;
        margin: 0 auto;
        top: 350px; /* Фиксированный отступ сверху */
        right: 0;
        left: 0;
        width: auto;
        max-width: 400px;
        height: auto;
        padding: 20px;
        z-index: 1;
    }

    body, html {
        width: 100%;
        height: auto;
        overflow-y: auto;
    }
}

