/* Стили для модального окна */
#orderModal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #000;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.question {
    margin-bottom: 20px;
}

.question h3 {
    margin-bottom: 12px;
    color: #073b4c;
}

/* Стиль иконок связи */
.contact-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.contact-option {
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    background: #f0f7ff;
    cursor: pointer;
    transition: all 0.25s;
    flex: 1;
}

.contact-option.selected {
    background: #e0f7fa;
    border: 2px solid #06d6a0;
    box-shadow: 0 4px 8px rgba(6, 214, 160, 0.2);
}

.contact-option img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}
#orderModal .modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
    transition: max-width 0.4s ease, padding 0.4s ease;
}

/* === РАСШИРЕННОЕ СОСТОЯНИЕ (ШАГ 3) === */
#orderModal.expanded .modal-content {
    max-width: 900px;
    padding: 36px 40px;
}

/* === ШАГ 3: КОНТЕНТ С ИЛЛЮСТРАЦИЕЙ === */
.direction-description-wrapper {
    display: flex;
    gap: 32px;
    align-items: stretch;
    margin-bottom: 24px;
}

.direction-description-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.direction-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    #orderModal.expanded .modal-content {
        max-width: 600px;
        padding: 30px;
    }
    .direction-description-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .direction-illustration {
        flex: 0 0 auto;
        height: 180px;
        max-width: 240px;
        margin: 0 auto;
    }
}
/* Общие поля */
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 6px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #06d6a0;
}

/* Кнопки */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-prev {
    background: #e9ecef;
    color: #495057;
}

.btn-prev:hover {
    background: #dee2e6;
}

.btn-next {
    background: #06d6a0;
    color: white;
}

.btn-next:hover, .btn-submit:hover {
    background: #05b38a;
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(135deg, #06d6a0, #00a896, #06d6a0);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(6, 214, 160, 0.4),
        0 0 0 0 rgba(6, 214, 160, 0.5);
    animation: pulseSubmit 2.2s infinite;
}

/* Пульсация ожидания */
@keyframes pulseSubmit {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(6, 214, 160, 0.4), 0 0 0 rgba(6, 214, 160, 0); }
    50% { transform: scale(1.03); box-shadow: 0 4px 16px rgba(6, 214, 160, 0.4), 0 0 20px rgba(6, 214, 160, 0.6); }
}

.btn-submit:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow:
        0 8px 24px rgba(6, 214, 160, 0.6),
        0 0 24px rgba(6, 214, 160, 0.7);
    animation: none;
}

.btn-submit:active {
    transform: translateY(0) scale(1);
    box-shadow:
        0 4px 12px rgba(6, 214, 160, 0.4),
        0 0 12px rgba(6, 214, 160, 0.5);
}

/* Иконка: анимация при наведении */
.btn-submit .fa-paper-plane {
    transition: transform 0.3s ease, color 0.2s;
}

.btn-submit:hover .fa-paper-plane {
    transform: rotate(10deg) translateX(4px);
}

/* Эффект "волны" при нажатии */
.btn-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.8s, height 0.8s;
    pointer-events: none;
}

.btn-submit:active::after {
    width: 400px;
    height: 400px;
}

/* Состояние "Отправляется..." (управляем через JS) */
.btn-submit.loading {
    pointer-events: none;
    background: linear-gradient(90deg, #a3d5ff, #06d6a0);
    animation: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-submit.loading .btn-text::after {
    content: "";
    animation: ellipsis 1.2s infinite;
}

@keyframes ellipsis {
    0% { content: ""; }
    33% { content: "."; }
    66% { content: ".."; }
    100% { content: "..."; }
}

.btn-submit.loading .fa-paper-plane {
    animation: spinPlane 1.5s infinite linear;
}

@keyframes spinPlane {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(360deg) scale(1.2); }
}

/* Файлы */
.file-upload {
    border: 2px dashed #a3d5ff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-top: 10px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #06d6a0;
}

.file-upload input {
    display: none;
}

/* Ошибки */
.error {
    color: #e63946;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

/* Типы заявок */
.request-types {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.request-type-card {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.request-type-card:hover {
    border-color: #a3d5ff;
}
.request-type-card.selected {
    border-color: #06d6a0;
    background: #f0f9ff;
}
.request-type-card h4 {
    margin: 0 0 8px;
    color: #073b4c;
}
.request-type-card p {
    color: #4a6572;
    font-size: 0.95rem;
    margin: 0;
}
.toast {
    background: white;
    color: #073b4c;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    max-width: 300px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    border-left: 4px solid #06d6a0;
}

.toast.error {
    border-left-color: #ef476f;
}

.toast.success {
    border-left-color: #06d6a0;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast i {
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}
.request-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.request-type-header h4 {
    margin: 0;
    color: #073b4c;
}

.free-tag {
    background: #e0f7fa;
    color: #06d6a0;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #a3d5ff;
    white-space: nowrap;
    letter-spacing: -0.02em;
    box-shadow: 0 2px 4px rgba(6, 214, 160, 0.1);
}

/* Обёртка: ровное выравнивание по высоте */
.task-selection-wrapper {
    display: flex;
    gap: 24px;
    align-items: stretch; /* ← ключевое свойство: растягивает оба блока по высоте */
    margin-top: 20px;
}

.task-illustration {
    flex: 0 0 160px; /* ширина изображения */
    border-radius: 12px;
    overflow: hidden;
}

.task-illustration img {
    width: 100%;
    height: 100%; /* ← растягиваем по высоте родителя */
    object-fit: cover; /* ← сохраняем пропорции, заполняя всю область */
    display: block;
}

.request-types {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Высота будет определяться контентом, а иллюстрация подстроится */
}
/* === УЛУЧШЕННАЯ КНОПКА "ДАЛЕЕ" === */
.btn-next {
    background: linear-gradient(135deg, #06d6a0, #05b38a);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(6, 214, 160, 0.3),
        0 0 0 0 rgba(6, 214, 160, 0.4);
}

.btn-next:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 16px rgba(6, 214, 160, 0.5),
        0 0 12px rgba(6, 214, 160, 0.6); /* мягкий неон */
}

.btn-next:active {
    transform: translateY(0);
    box-shadow:
        0 3px 8px rgba(6, 214, 160, 0.4),
        0 0 8px rgba(6, 214, 160, 0.5);
}

/* Эффект "волны" при нажатии (опционально) */
.btn-next::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-next:active::after {
    width: 300px;
    height: 300px;
}

.btn-prev {
    background: #f0f7ff;
    color: #118ab2;
    border: 1px solid #a3d5ff;
    border-radius: 50px;
    padding: 14px 28px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.btn-prev:hover {
    background: #e0f7fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(17, 138, 178, 0.15);
}

.contact-selection-wrapper {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-top: 20px;
}

.contact-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Высота определится контентом */
}

.contact-illustration {
    flex: 0 0 285px; /* ширина изображения */
    border-radius: 12px;
    overflow: hidden;
}

.contact-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* заполняет область без искажений */
    display: block;
}
.time-contact-wrapper {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-top: 20px;
}

.time-illustration {
    flex: 0 0 220px; /* ширина изображения */
    border-radius: 12px;
    overflow: hidden;
}

.time-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.time-and-contact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.time-and-contact input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.time-and-contact input:focus {
    outline: none;
    border-color: #06d6a0;
}
.time-section-header {
    margin-bottom: 16px;
}

.time-section-header h3 {
    font-size: 1.4rem;
    color: #073b4c;
    margin: 0;
}
.direction-description-wrapper {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.direction-description-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.direction-illustration {
    flex: 0 0 390px;
    border-radius: 12px;
    overflow: hidden;
}
.extra-content-wrapper {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.extra-illustration {
    flex: 0 0 260px;
    border-radius: 12px;
    overflow: hidden;
}

.extra-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.extra-fields-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Адаптивность */
@media (max-width: 600px) {
    .extra-content-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .extra-illustration {
        flex: 0 0 auto;
        height: 160px;
        max-width: 200px;
        margin: 0 auto;
    }
    .extra-illustration img {
        height: 100%;
        object-fit: cover;
    }
}
.direction-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Мобильные устройства */
@media (max-width: 600px) {
    .direction-description-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .direction-illustration {
        flex: 0 0 auto;
        height: 160px;
        max-width: 200px;
        margin: 0 auto;
    }
    .direction-illustration img {
        height: 100%;
        object-fit: cover;
    }
}
/* === МОБИЛЬНЫЕ УСТРОЙСТВА === */
@media (max-width: 600px) {
    .time-contact-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .time-illustration {
        flex: 0 0 auto;
        height: 160px;
        max-width: 200px;
        margin: 0 auto;
    }
    .time-illustration img {
        height: 100%;
        object-fit: cover;
    }
}
/* Мобильные устройства */
@media (max-width: 600px) {
    .contact-selection-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .contact-illustration {
        flex: 0 0 auto;
        height: 160px;
        max-width: 200px;
        margin: 0 auto;
    }
    .contact-illustration img {
        height: 100%;
        object-fit: cover;
    }
}

/* Мобильные устройства */
@media (max-width: 600px) {
    .task-selection-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .task-illustration {
        flex: 0 0 auto;
        height: 180px;
        max-width: 220px;
        margin: 0 auto;
    }
    .task-illustration img {
        height: 100%;
        object-fit: cover;
    }
}
