section#litbanner {
    display: block;
    width: 100%;
}

.litbanner_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    padding: 20px;
}

.litbanner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    margin: 0 auto;
    z-index: 2;
}

.litbanner_wrapper {
    position: relative;
    overflow: hidden;
}

/* Затемнение (работает только для фоновой картинки) */
.litbanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* Фикс, чтобы overlay не мешал кликам */
}

#litbanner .display-4 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2;
}

.litbanner_image {
    flex: 0 0 40%;
    max-width: 40%;
    height: auto;
}

.litbanner_image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Если изображение справа (по умолчанию) */
.litbanner_image.right {
    order: 1;
}

.litbanner_content {
    flex: 0 0 60%;
    max-width: 60%;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Выравнивание контента влево */
}

/* Если нет изображения, контент центрируется */
.litbanner.no-image {
    justify-content: center;
    text-align: center;
}

.litbanner.no-image .litbanner_content {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: center;
    align-items: center;
}

/* Заголовки и текст */
.litbanner-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.2;
}

.litbanner-subtitle {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 15px;
    line-height: 1.4;
}

.litbanner-description {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Кнопки */
.litbanner-form-button,
.litbanner-custom-button {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    text-align: center;
}


/* Мобильная версия */
@media screen and (max-width: 767px) {
    .litbanner {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .litbanner_image {
        width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
        text-align: center;
    }

    .litbanner_image img {
        width: 100%;
        max-height: 250px;
    }
    .litbanner_image.right {
    order: 1;
    }
    .litbanner_content {
        width: 100%;
        max-width: 100%;
        text-align: center;
        align-items: center; /* Центрирование текста */
        order: 2;
    }

    .litbanner-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .litbanner-subtitle {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .litbanner-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .litbanner-form-button,
    .litbanner-custom-button {
        width: 100%;
        padding: 15px;
        margin-top: 10px;
    }

    .litbanner_modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px;
    }

    .litbanner_open-modal-btn {
        width: 100%;
    }

    .litbanner_close-modal {
        font-size: 22px;
    }
}

/* По умолчанию модальное окно скрыто */
.litbanner_modal {
    display: none; /* Убираем показ при загрузке */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Когда окно открыто */
.litbanner_modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Контейнер модального окна */
.litbanner_modal-content {
    background-color: #fff;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Кнопка закрытия */
.litbanner_close-modal {
    position: absolute;
    top: 0px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    transition: 0.3s;
}

.litbanner_close-modal:hover {
    color: red;
}

/* Кнопка открытия */
.litbanner_open-modal-btn, .litbanner-custom-button {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    border: none;
}


/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптация для мобильных */
@media screen and (max-width: 767px) {
    .litbanner_modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px;
    }

    .litbanner_open-modal-btn {
        width: 100%;
    }

    .litbanner_close-modal {
        font-size: 22px;
    }
}

