/* Form Container */
.wpcf7-form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
    position: relative;
}

.progress-bar {
    height: 8px;
    background: #ae905a;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 10px;
}

.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    position: relative;
    transition: all 0.3s ease;
}

.progress-step::before {
    content: attr(data-step);
}

.progress-step.active {
    background: #ae905a;
    transform: scale(1.1);
}

.progress-step.completed {
    background: #ae905a;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Form Fields */
.column-full {
    margin-bottom: 25px;
}

.form-step h4 {
    color: #2b2a28;
    font-size: 1.5em;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ae905a;
}

/* Radio Buttons */
.wpcf7-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
}

.wpcf7-radio .wpcf7-list-item {
    margin: 0;
    position: relative;
    flex: 1 1 calc(50% - 15px); /* Ridotto il gap per uniformità */
}

.wpcf7-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wpcf7-radio .wpcf7-list-item-label {
    display: block;
    padding: 12px 15px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
}

.wpcf7-radio input:checked + .wpcf7-list-item-label {
    background: #ae905a;
    color: white;
    border-color: #ae905a;
}

.wpcf7-radio input:hover:not(:checked) + .wpcf7-list-item-label {
    background: #c4a676;
    border-color: #c4a676;
}

/* Checkbox */
.wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
}

.wpcf7-checkbox .wpcf7-list-item {
    margin: 0;
    position: relative;
    flex: 1 1 calc(33% - 15px);
}

.wpcf7-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wpcf7-checkbox .wpcf7-list-item-label {
    display: block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ae905a;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
}

.wpcf7-checkbox input:checked + .wpcf7-list-item-label {
    background: #ae905a;
    color: white;
    border-color: #967c4d;
}

.wpcf7-checkbox input:hover:not(:checked) + .wpcf7-list-item-label {
    background: #c4a676;
    border-color: #c4a676;
}

/* Conditional Fields */
.conditional-field {
    display: none;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #ae905a;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
}

.conditional-field.active {
    display: block;
    opacity: 1;
}

/* Text Inputs and Textareas */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    border-color: #ae905a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(174, 144, 90, 0.1);
}

/* Navigation Buttons */
.next-btn,
.prev-btn {
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button.next-btn {
    background: #ae905a;
    color: white;
    font-weight: bolder !important;
}

.prev-btn {
    background: #f5f5f5;
    color: #666;
}

.next-btn:hover {
    background: #967c4d;
    transform: translateY(-2px);
}

.prev-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* Action Buttons (es. Submit) */
.action-btn {
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
    color: #666;
}

.action-btn:hover {
    background: #c4a676;
    color: white;
    transform: translateY(-2px);
}

.action-btn:active,
.action-btn:focus {
    background: #967c4d;
    color: white;
}

/* Error States */
.error {
    border-color: #ff4444 !important;
}

.field-error {
    color: #ff4444;
    font-size: 14px;
    margin-top: 5px;
    padding: 5px 10px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 4px;
    animation: fadeIn 0.3s ease;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .wpcf7-form {
        padding: 15px;
        margin: 0 auto;
        max-width: 100%; /* Adatta al 100% dello schermo */
    }

    .wpcf7-radio .wpcf7-list-item,
    .wpcf7-checkbox .wpcf7-list-item {
        flex: 1 1 100%; /* Ogni elemento occupa la larghezza completa */
        margin-bottom: 10px; /* Spazio tra gli elementi */
    }

    .wpcf7-radio .wpcf7-list-item-label,
    .wpcf7-checkbox .wpcf7-list-item-label {
        width: 100%; /* Occupa tutta la larghezza disponibile */
        padding: 12px 15px; /* Padding uniforme */
        box-sizing: border-box;
    }

    .next-btn,
    .prev-btn,
    .action-btn {
        width: 100%;
        padding: 12px 15px; /* Uniforme con radio/checkbox */
        margin: 10px 0; /* Spazio tra pulsanti */
        box-sizing: border-box;
    }

    .progress-step {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .form-step h4 {
        font-size: 1.2em;
    }

    .conditional-field {
        padding: 15px;
        margin: 15px 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
