#order-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4f8, #e0e7f0);
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
}

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 2px solid #e0e7f0;
    padding-bottom: 5px;
}

.step-item {
    padding: 8px 15px;
    font-weight: 600;
    color: #666;
    font-size: 14px;
    position: relative;
    transition: color 0.3s ease;
    cursor: default;
}

.step-item.active {
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
}

.step {
    padding: 25px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-in-out;
    max-width: 100%;
    transition: box-shadow 0.3s ease;
}

.step:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step h2 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1 1 250px;
    min-width: 200px;
}

label {
    margin-bottom: 8px;
    color: #34495e;
    font-size: 14px;
    font-weight: 500;
    display: block;
}

input, select, textarea {
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
}

input:focus, select:focus, textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    outline: none;
}

textarea {
    height: 120px;
    resize: vertical;
    min-height: 120px;
}

.next-btn, .submit-btn {
    background-color: #3498db;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 140px;
    align-self: flex-end;
}

.prev-btn {
    background-color: #7f8c8d;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 140px;
    margin-right: 10px;
    align-self: flex-end;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

#service_search {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#service_search:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    outline: none;
}

.category {
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    margin: 8px 0;
    padding: 14px 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category::after {
    content: '+';
    font-size: 20px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.category.expanded::after {
    content: '-';
    transform: rotate(180deg);
}

.category:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category.expanded {
    background-color: #e9ecef;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.subcategories {
    padding: 0 20px 20px;
    margin: 0;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
    display: none;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color 0.3s ease;
    font-size: 15px;
    color: #495057;
}

.services-list li:last-child {
    border-bottom: none;
}

.services-list li:hover {
    background-color: #f1f3f5;
}

.services-list li label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    margin: 0;
}

.services-list input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #adb5bd;
    border-radius: 50%;
    background-color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box; /* Добавлено для предотвращения искажений */
}

.services-list input[type="radio"]:checked {
    border-color: #3498db;
    background-color: #3498db;
}

.services-list input[type="radio"]:checked::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.services-list li.highlighted {
    background-color: #e0f7fa;
}

#success-message {
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    color: #2e7d32;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
    max-width: 100%;
}

#success-message h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

#success-message p {
    margin: 5px 0;
    font-size: 14px;
}

.important-note {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
    font-size: 14px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.important-note::before {
    content: "!";
    font-weight: bold;
    font-size: 18px;
    color: #fff;
    background-color: #ffc107;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -12px;
    left: 15px;
}

/* Медиа-запросы для адаптивности с дальнейшим уменьшением отступов */
@media (max-width: 768px) {
    #order-form-container {
        padding: 8px; /* Ещё уменьшил общий padding контейнера */
    }

    .stepper {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px; /* Ещё уменьшил gap */
    }

    .step-item {
        font-size: 12px;
        padding: 5px 8px; /* Уменьшил padding степпера */
    }

    .step {
        padding: 12px; /* Ещё уменьшил padding шага */
    }

    .step h2 {
        margin-bottom: 12px; /* Ещё уменьшил margin под заголовком */
        font-size: 18px; /* Уменьшил размер заголовка для компактности */
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px; /* Ещё уменьшил gap между полями */
    }

    .form-group {
        min-width: auto;
    }

    input, select, textarea {
        font-size: 15px; /* Слегка уменьшил шрифт для баланса */
        padding: 8px; /* Ещё уменьшил padding внутри полей */
        min-height: 38px; /* Ещё уменьшил минимальную высоту */
    }

    textarea {
        height: 80px; /* Ещё уменьшил высоту заметки */
        min-height: 80px;
    }

    .next-btn, .submit-btn, .prev-btn {
        width: 100%;
        margin-top: 6px; /* Ещё уменьшил отступ сверху */
        margin-right: 0;
        align-self: stretch;
        padding: 8px 16px; /* Ещё уменьшил padding кнопок */
    }

    .category {
        font-size: 14px; /* Уменьшил шрифт категорий */
        padding: 8px 12px; /* Ещё уменьшил padding категорий */
        margin: 4px 0; /* Ещё уменьшил margin */
    }

    .subcategories {
        padding: 0 12px 12px; /* Ещё уменьшил padding подкатегорий */
    }

    .services-list li {
        font-size: 13px; /* Уменьшил шрифт элементов списка */
        padding: 6px 4px; /* Ещё уменьшил padding элементов списка */
        gap: 10px; /* Уменьшил gap */
    }

    .services-list input[type="radio"] {
        width: 16px; /* Уменьшил размер кружка на мобильном */
        height: 16px;
        border: 2px solid #adb5bd;
        border-radius: 50%; /* Подтверждение круглой формы */
    }

    .services-list input[type="radio"]:checked::after {
        width: 6px; /* Соответствующее уменьшение внутреннего круга */
        height: 6px;
    }

    #success-message {
        font-size: 15px;
        padding: 12px; /* Уменьшил padding сообщения успеха */
    }

    .important-note {
        font-size: 12px;
        padding: 8px; /* Ещё уменьшил padding заметки */
        margin: 12px 0; /* Уменьшил margin заметки */
    }
}