<div class="std-subs-img-box std-item-flex">

    <div class="std-subs-img-hold">
        <div class="std-overlay"></div>
        <div class="std-content-wrap">
            <?php
            // Heading Text
            if ($heading_show && !empty($heading_text)) {
            ?>
                <h2 class="std-heading-text"><?php echo $this->sanitize_html($heading_text); ?></h2>
            <?php
            }
            ?>
            <?php
            // Sub Heading Text
            if ($sub_heading_show && !empty($sub_heading_text)) {
            ?>
                <p class="std-heading-text std-heading-paragraph"><?php echo $this->sanitize_html($sub_heading_text); ?></p>
            <?php
            }
            ?>
        </div>
    </div>
    <?php
    if (!empty($form_details['layout']['template_14']['header_bg_image'])) {
        $header_bg_image = esc_url($form_details['layout']['template_14']['header_bg_image']);
        $background_image_css = ".$alias_class.std-form-wrap.std-template-14 .std-subs-img-hold{background-image:url('$header_bg_image');}";
        wp_add_inline_style('std-frontend-custom', $background_image_css);
    }
    ?>
    <div class="std-subs-form">

        <div class="both-fields-wrap">
            <?php
            // Name Field
            if ($name_show) {
            ?>
                <div class="std-field-wrap name-field">
                    <label for="std_name" class="sr-only std-hidden-item"><?php echo esc_attr($name_label); ?></label>
                    <input type="text" name="std_name" data-field-key="std-name" class="std-name std-rounded" placeholder="<?php echo esc_attr($name_label); ?>" />
                </div>
            <?php
            }
            ?>
            <!--Email Field-->
            <div class="std-field-wrap">
                <label for="std_email" class="sr-only std-hidden-item"><?php echo esc_attr($email_label); ?></label>
                <input type="email" name="std_email" data-field-key="std-email" class="std-email std-rounded" placeholder="<?php echo esc_attr($email_label); ?>" />
            </div>
            <!-- Email Field-->
        </div>
        <?php do_action('std_custom_fields', $form_row); ?>
        <?php
        // Terms and Agreement Text
        if ($terms_agreement_show && !empty($terms_agreement_text)) {
        ?>
            <div class="std-field-wrap std-terms-agreement-wrap std-check-box-text" data-field-key="std-terms-agreement">
                <label>
                    <input type="checkbox" name="std_terms_agreement" class="std-terms-agreement" />
                    <span class="std-term-text"><?php echo $this->sanitize_html($terms_agreement_text); ?></span>
                </label>
            </div>
        <?php
        }
        ?>
        <?php
        // Terms and Agreement Text
        if ($gdpr_agreement_show && !empty($gdpr_agreement_text)) {
        ?>
            <div class="std-field-wrap std-gdpr-agreement-wrap std-check-box-text" data-field-key="std-gdpr-agreement">
                <label>
                    <input type="checkbox" name="std_gdpr_agreement" class="std-gdpr-agreement" />
                    <span class="std-gdpr-text"><?php echo $this->sanitize_html($gdpr_agreement_text); ?></span>
                </label>
            </div>
        <?php
        }
        ?>
        <!-- Subscribe Button-->
        <div class="std-field-wrap">
            <input type="submit" name="std_form_submit" class="std-form-submit std-rounded" value="<?php echo esc_attr($subscribe_button_text); ?>" />

        </div>


        <?php
        // Footer Text
        if ($footer_show && !empty($footer_text)) {
        ?>
            <div class="std-footer-text"><?php echo $this->sanitize_html($footer_text); ?></div>
        <?php
        }
        ?>

        <span class="std-form-loader-wraper">
            <div class="std-form-loader std-form-loader-1"><?php esc_html_e('Loading...', 'subscribe-to-download'); ?></div>
        </span>
        <div class="std-form-message"></div>

    </div>

</div>