<section class="contact-area contact-bg" @if ($bgImage = $shortcode->background_image) data-background="{{ RvMedia::getImageUrl($bgImage) }}" @endif>
    <div class="container">
        <div class="row align-items-center">
            <div class="col-lg-5">
                <div class="contact-content">
                    <div class="section-title mb-30 tg-heading-subheading animation-style2">
                        @if ($subtitle = $shortcode->subtitle)
                            <span class="sub-title tg-element-title">{{ $subtitle }}</span>
                        @endif

                        @if ($title = $shortcode->title)
                            <h2 class="title tg-element-title">{!! BaseHelper::clean($title) !!}</h2>
                        @endif
                    </div>
                    @if ($description = $shortcode->description)
                        <p>{!! BaseHelper::clean(nl2br($description)) !!}</p>
                    @endif
                </div>
            </div>
            <div class="col-lg-7">
                <div class="contact-form">
                    {!! Form::open(['route' => 'public.send.contact', 'class' => 'contact-form cons-contact-form']) !!}
                    {!! apply_filters('pre_contact_form', null) !!}
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-grp">
                                <input type="text" name="name" placeholder="{{ __('Name') }}*" required>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-grp">
                                <input type="email" name="email" placeholder="{{ __('Email') }}*" required>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-grp">
                                <input type="tel" name="phone" placeholder="{{ __('Phone') }}">
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="form-grp">
                                <input type="text" name="subject" placeholder="{{ __('Subject') }}">
                            </div>
                        </div>

                        <div class="col-md-12">
                            <div class="form-grp">
                                <textarea name="content" placeholder="{{ __('Write comments') }}"></textarea>
                            </div>
                            @if (is_plugin_active('captcha'))
                                @if (setting('enable_captcha'))
                                    <div class="col-12">
                                        <div class="mb-3">
                                            {!! Captcha::display() !!}
                                        </div>
                                    </div>
                                @endif

                                @if (setting('enable_math_captcha_for_contact_form', 0))
                                    <div class="col-12 contact-form mx-0">
                                        <div class="mb-3 form-grp">
                                            {!! app('math-captcha')->input(['class' => 'form-control', 'id' => 'math-group', 'placeholder' => app('math-captcha')->label()]) !!}
                                        </div>
                                    </div>
                                @endif
                            @endif
                        </div>
                    </div>

                    <button type="submit">{{ $shortcode->button_label ?: __('SUBMIT NOW') }}</button>

                    {!! apply_filters('after_contact_form', null) !!}

                    <div class="col-span-12">
                        <div class="contact-mb-3 mt-4 text-start">
                            <div class="contact-message contact-success-message" style="display: none"></div>
                            <div class="contact-message contact-error-message" style="display: none"></div>
                        </div>
                    </div>
                    {!! Form::close() !!}
                </div>
            </div>
        </div>
    </div>

    @if ($backgroundImage1 = $shortcode->background_image_1)
        <div class="contact-shape">
            <img src="{{ RvMedia::getImageUrl($backgroundImage1) }}" alt="shape">
        </div>
    @endif
</section>
