/* --- Базовые стили таблиц веб-форм --- */
table.form-table {
    width: 100%;
    background-color: white;
    border-collapse: collapse;
    font-size: 100%;
    font-weight: normal;
    line-height: 160%;
}

table.form-table th, table.form-table td {
    border: 1px solid #ADC3D5;
    padding: 5px 5px;
    vertical-align: top;
}

table.form-table th {
    background-image: url(images/table_head.gif);
    background-repeat: repeat-x;
    text-align: left;
    color: #25639A;
}

table.form-table td {
    padding: 15px 5px;
}

.form-required {
    color: red;
}

.error-fld {
    display: block;
    float: left;
    height: 13px;
    width: 15px;
    background-repeat: no-repeat;
    background-image: url(images/icon_warn.gif);
}


/* --- Секция формы "Остались вопросы" --- */
.form-question {
    margin: 50px 0px 60px 0px;
}

/* Двухколоночная сетка */
.form-question-row {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 30px;
}

/* Колонка с декоративным изображением */
.form-question-column .img-block {
    background-image: url(/local/templates/design2026/images/form-question-img.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100%;
    border-radius: 20px;
}


/* --- Контейнер формы --- */
.form-service {
    border: none !important;
    border-radius: 20px !important;
    padding: 50px 40px 40px 40px !important;
    background-color: #FAF6F2 !important; /* Легкий теплый подтон под цвет формы */
    background-image: url(/local/templates/design2026/images/form-question-bg.svg) !important;
    background-repeat: no-repeat !important;
    background-position: right 40px top 20px !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.form-service__title {
    color: #ED5338 !important;
    font-size: 36px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
}

.form-service__text {
    font-size: 18px !important;
    line-height: 1.4 !important;
    color: #231C1A !important;
    margin-bottom: 25px !important;
}


/* --- Инпуты и кнопки --- */
.form-service__cols-fullwidth {
    margin-bottom: 16px;
    width: 100%;
}

.form-input.height-44 input {
    width: 100%;
    height: 48px; /* Увеличенная высота для более удобного нажатия */
    border: 1.5px solid #D8B89A;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 16px;
    color: #231C1A;
    background-color: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Десктоп-анимация при фокусе на инпут */
.form-input.height-44 input:focus {
    border-color: #ED5338;
    box-shadow: 0 0 0 4px rgba(237, 83, 56, 0.12);
}

.form-input.height-44 input::placeholder {
    color: #D8B89A;
    transition: opacity 0.25s ease;
}

.form-input.height-44 input:focus::placeholder {
    opacity: 0.5;
}


/* --- Строка с политикой и соцсетями --- */
.form-service__cols {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 25px;
}

.form-service__left-col {
    flex: 1;
}

.form-service__right-col {
    flex-shrink: 0;
}

/* Кастомный современный чекбокс */
.custom-checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    color: #231C1A;
    user-select: none;
}

.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0 0;
    accent-color: #ED5338;
    cursor: pointer;
}

.custom-checkbox a {
    color: #ED5338;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
}

.custom-checkbox a:hover {
    color: #d63d22;
    text-decoration: underline;
}

/* Соцсети и десктоп анимация */
.form-soc {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-soc a {
    display: inline-flex;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-soc a img {
    width: 28px;
    height: 28px;
    display: block;
}

@media (hover: hover) {
    .form-soc a:hover {
        transform: translateY(-3px) scale(1.1);
    }
}


/* --- Кнопка отправки --- */
.form-service__cols-fullwidth.btn-block {
    margin-top: 20px;
    width: 200px;
}

button.red-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: #ED5338 !important;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    box-sizing: border-box;
}

@media (hover: hover) {
    button.red-btn:hover {
        background-color: #d63d22 !important;
        box-shadow: 0 6px 16px rgba(237, 83, 56, 0.25);
    }
}

button.red-btn:active {
    transform: scale(0.97);
}


/* --- АДАПТИВНАЯ ВЕРСТКА (Медиазапросы) --- */

/* Планшетные экраны (до 1024px) */
@media (max-width: 1024px) {
    .form-question-row {
        grid-template-columns: 1fr; /* Перевод в одну колонку */
        gap: 30px;
    }

    .form-question-column .img-block {
        height: 280px; /* Уменьшенная высота декоративной картинки */
    }
    
    .form-service {
        background-position: right 30px top 20px !important;
    }
}

/* Мобильные экраны средней ширины (до 768px) */
@media (max-width: 768px) {
    .form-question {
        margin: 30px 0px 40px 0px;
    }

    /* Скрываем декоративную фоновую картинку на мобильных во избежание перегрузки экрана */
    .form-question-column:last-child {
        display: none;
    }

    /* Ограничиваем размер фонового паттерна формы, чтобы он не перекрывал поля ввода */
    .form-service {
        padding: 30px 20px 30px 20px !important;
        background-size: 80px !important;
        background-position: right 15px top 15px !important;
    }

    .form-service__title {
        font-size: 28px !important;
        padding-right: 80px !important; /* Отводим место, чтобы заголовок не наезжал на фоновую иконку */
    }

    .form-service__text {
        font-size: 16px !important;
        margin-bottom: 20px !important;
    }
}

/* Узкие мобильные экраны (до 576px) */
@media (max-width: 576px) {
    .form-service__cols {
        flex-direction: column; /* Чекбокс и соцсети выстраиваются вертикально */
        align-items: flex-start;
        gap: 15px;
    }

    .form-soc {
        text-align: left;
        width: 100%;
        justify-content: flex-start;
    }

    .form-service__cols-fullwidth.btn-block {
        width: 100%; /* Растягиваем кнопку "Оставить заявку" на всю ширину экрана */
    }
    
    button.red-btn {
        width: 100%;
    }
}