/* =========================================================
   OSTPRO REALTY – MULTI-STEP SUBSCRIPTION FORM
   ========================================================= */

.ostpro-multistep-form {
    --ostpro-gold: #b39a52;
    --ostpro-gold-dark: #8f7838;
    --ostpro-gold-light: #f4eddc;
    --ostpro-cream: #fbf5eb;
    --ostpro-dark: #1c1c1c;
    --ostpro-text: #545454;
    --ostpro-border: #ddd5c7;
    --ostpro-error: #b42318;
}

.ostpro-multistep-form .elementor-form-fields-wrapper {
    position: relative;
}

.ostpro-multistep-form .ostpro-form-step {
    display: none;
    width: 100%;
    animation: ostproStepFade 0.35s ease;
}

.ostpro-multistep-form .ostpro-form-step.is-active {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

@keyframes ostproStepFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress */

.ostpro-progress {
    width: 100%;
    margin: 0 0 28px;
}

.ostpro-progress-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 100px;
    background: #e7dfd0;
}

.ostpro-progress-bar {
    display: block;
    width: 25%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--ostpro-gold-dark),
        var(--ostpro-gold)
    );
    transition: width 0.35s ease;
}

.ostpro-progress-label {
    margin-top: 8px;
    color: #777;
    font-size: 13px;
    text-align: right;
}

/* Step headings */

.ostpro-step-heading {
    width: 100%;
    margin-bottom: 4px;
    text-align: center;
}

.ostpro-step-number {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--ostpro-gold-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ostpro-step-heading h3 {
    margin: 0 0 8px;
    color: var(--ostpro-dark);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.2;
}

.ostpro-step-heading p {
    max-width: 620px;
    margin: 0 auto;
    color: #747474;
    font-size: 15px;
    line-height: 1.6;
}

/* Contact fields */

.ostpro-multistep-form .elementor-field-type-text,
.ostpro-multistep-form .elementor-field-type-email,
.ostpro-multistep-form .elementor-field-type-tel,
.ostpro-multistep-form .elementor-field-type-textarea {
    width: 100%;
}

.ostpro-multistep-form input.elementor-field,
.ostpro-multistep-form textarea.elementor-field {
    min-height: 58px;
    padding: 15px 18px;
    border: 1px solid var(--ostpro-border);
    border-radius: 12px;
    background: #fff;
    color: var(--ostpro-dark);
    font-size: 16px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.ostpro-multistep-form textarea.elementor-field {
    min-height: 140px;
    resize: vertical;
}

.ostpro-multistep-form input.elementor-field:focus,
.ostpro-multistep-form textarea.elementor-field:focus {
    border-color: var(--ostpro-gold);
    outline: none;
    box-shadow: 0 0 0 4px rgba(179, 154, 82, 0.14);
}

/* Checkbox sections */

.ostpro-multistep-form .elementor-field-type-checkbox {
    width: 100%;
    padding: 20px !important;
    border: 1px solid #e6ddcf;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
}

.ostpro-multistep-form
.elementor-field-type-checkbox
.elementor-field-label {
    display: block;
    margin-bottom: 13px;
    color: var(--ostpro-dark);
    font-size: 17px;
    font-weight: 700;
}

.ostpro-multistep-form
.elementor-field-type-checkbox
.elementor-field-subgroup {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ostpro-multistep-form
.elementor-field-type-checkbox
.elementor-field-option {
    position: relative;
    width: 100%;
    margin: 0;
}

.ostpro-multistep-form
.elementor-field-type-checkbox
.elementor-field-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ostpro-multistep-form .elementor-field-type-checkbox .elementor-field-option label {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 72px !important;
    width: 100%;
    padding: 3px 25px;
    border: 1px solid #d8cebe;
    border-radius: 11px;
    background: #fff;
    color: #4f4f4f;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.35 !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Better layout for long Area labels */
.ostpro-multistep-form
.elementor-field-group-area
.elementor-field-subgroup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ostpro-multistep-form
.elementor-field-group-area
.elementor-field-option label {
    min-height: 84px;
    font-size: 15px;
}

/* Budget can stay compact */
.ostpro-multistep-form
.elementor-field-group-budget
.elementor-field-subgroup {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ostpro-multistep-form
.elementor-field-group-budget
.elementor-field-option label {
    min-height: 58px;
}

/* Tablet and mobile */
@media (max-width: 767px) {
    .ostpro-multistep-form
    .elementor-field-group-budget
    .elementor-field-subgroup,
    .ostpro-multistep-form
    .elementor-field-group-area
    .elementor-field-subgroup {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .ostpro-multistep-form
    .elementor-field-group-area
    .elementor-field-subgroup {
        grid-template-columns: 1fr;
    }
}

.ostpro-multistep-form
.elementor-field-type-checkbox
.elementor-field-option label:hover {
    border-color: var(--ostpro-gold);
    background: var(--ostpro-gold-light);
    transform: translateY(-1px);
}

.ostpro-multistep-form
.elementor-field-type-checkbox
.elementor-field-option input:checked + label {
    border-color: var(--ostpro-gold-dark);
    background: var(--ostpro-gold);
    color: #fff;
    box-shadow: 0 7px 18px rgba(143, 120, 56, 0.2);
}

.ostpro-multistep-form
.elementor-field-type-checkbox
.elementor-field-option input:focus-visible + label {
    outline: 3px solid rgba(179, 154, 82, 0.3);
    outline-offset: 2px;
}

/* Navigation */

.ostpro-step-navigation {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 24px;
    gap: 14px;
}

.ostpro-step-navigation button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 52px;
    padding: 12px 24px;
    border-radius: 11px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.ostpro-back-button {
    border: 1px solid #d7cebf;
    background: #fff;
    color: #484848;
}

.ostpro-next-button{
    justify-content: space-between !important;
}
.ostpro-back-button{
    justify-content: space-evenly !important;
}

.ostpro-next-button {
    margin-left: auto;
    border: 1px solid var(--ostpro-gold-dark);
    background: var(--ostpro-gold);
    color: #fff;
}

.ostpro-step-navigation button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Elementor submit button */

.ostpro-multistep-form .elementor-field-type-submit {
    width: 100%;
    margin-top: 4px;
}

.ostpro-multistep-form
.elementor-field-type-submit
.elementor-button {
    width: 100%;
    min-height: 58px;
    border: 2px solid #1c1c1c;
    border-radius: 12px;
    background: var(--ostpro-gold);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.ostpro-multistep-form
.elementor-field-type-submit
.elementor-button:hover {
    background: var(--ostpro-gold-dark);
}

/* Validation */

.ostpro-invalid input.elementor-field,
.ostpro-invalid textarea.elementor-field,
.ostpro-invalid.elementor-field-type-checkbox {
    border-color: var(--ostpro-error) !important;
}

.ostpro-field-error {
    width: 100%;
    margin-top: 7px;
    color: var(--ostpro-error);
    font-size: 13px;
    font-weight: 600;
}

/* Popup improvement */

.elementor-popup-modal .ostpro-multistep-form {
    max-width: 900px;
    margin: 0 auto;
}

/* Tablet */

@media (max-width: 767px) {
    .ostpro-multistep-form
    .elementor-field-type-checkbox
    .elementor-field-subgroup {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ostpro-multistep-form .elementor-field-type-checkbox {
        padding: 15px;
    }

    .ostpro-step-navigation button {
        min-width: 125px;
        padding: 11px 18px;
    }
}

/* Small phones */

@media (max-width: 480px) {
    .ostpro-multistep-form
    .elementor-field-type-checkbox
    .elementor-field-subgroup {
        grid-template-columns: 1fr;
    }

    .ostpro-step-navigation {
        gap: 10px;
    }

    .ostpro-step-navigation button {
        width: 50%;
        min-width: 0;
        padding: 11px 10px;
        font-size: 14px;
    }

    .ostpro-step-heading h3 {
        font-size: 23px;
    }
}