.text-image {
    display: grid;
    grid-auto-flow: column;
}

.text-image img {
    width: auto;
}

@media (max-width: 768px) {
    .text-image {
        grid-auto-flow: row;
    }
}

.form-section__form {
    form {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        padding: 20px;
    }
    .form-group,
    .form-group-columns .form-group {
        display: flex;
        flex-direction: column;
    }
    .form-group-columns {
        display: flex;
        gap: 1.25rem;
        flex-wrap: wrap;
        .form-group {
            flex: 1;
            min-width: 220px;
        }
    }
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        width: 100%;
        padding: 0.75rem 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        font-size: 0.9375rem;
        font-family: inherit;
        background: #fff;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        &::placeholder {
            color: #94a3b8;
        }
        &:focus {
            outline: none;
            border-color: #4f46e5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }
    }
    textarea {
        min-height: 120px;
        resize: vertical;
    }
    .form-checkbox {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 0.875rem;
        color: #475569;
        line-height: 1.5;
        input[type="checkbox"] {
            margin-top: 0.2rem;
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            accent-color: #4f46e5;
        }
        a {
            color: #4f46e5;
            text-decoration: underline;
            &:hover {
                color: #4338ca;
            }
        }
    }
    .submit {
        margin-top: 0.5rem;
    }
    input[type="submit"] {
        background: #4f46e5;
        color: #fff;
        border: none;
        padding: 0.875rem 2rem;
        border-radius: 0.5rem;
        font-weight: 600;
        font-size: 0.9375rem;
        cursor: pointer;
        transition: background 0.2s ease;
        &:hover {
            background: #4338ca;
        }
    }
    // Contact Form 7 validation/response styling
    .wpcf7-not-valid-tip {
        color: #dc2626;
        font-size: 0.8125rem;
        margin-top: 0.25rem;
    }
    .wpcf7-response-output {
        margin-top: 1rem;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        font-size: 0.875rem;
    }
    &.sent .wpcf7-response-output {
        background: #dcfce7;
        color: #166534;
        border: 1px solid #86efac;
    }
    &.invalid .wpcf7-response-output,
    &.failed .wpcf7-response-output {
        background: #fee2e2;
        color: #991b1b;
        border: 1px solid #fca5a5;
    }
}


/* Hide default Contact Form 7 field validation messages */

.wpcf7 form .wpcf7-not-valid-tip {
    display: none !important;
}


/* Custom validation messages */

.wpcf7 form .custom-error {
    display: block;
    color: #e53935;
    font-size: 13px;
    margin-top: 4px;
}


/* Highlight invalid fields */

.wpcf7 form .custom-invalid {
    border-color: #e53935 !important;
}