<?php $head_title="Breathe Events | Relax In The Moment | Contact"; ?>

<?php require_once('parts/header/header5.php'); ?>

<?php
$page_title = "Contact Us";
$page_sub_title = "Contact";
require_once('parts/page-title.php');

$recaptchaSiteKey = '';
$mailConfigPath = dirname(__DIR__) . '/breathe-mail-config.php';

if (file_exists($mailConfigPath)) {
	$mailConfig = require $mailConfigPath;
	$recaptchaSiteKey = isset($mailConfig['recaptcha_site_key']) ? trim($mailConfig['recaptcha_site_key']) : '';
}
?>

<style>
/* Email Us form only: soft gray placeholders, faint field edges */
.contact-details .contact-email-us-form .form-control::-webkit-input-placeholder {
  color: #a0a5af;
  opacity: 1;
}
.contact-details .contact-email-us-form .form-control::-moz-placeholder {
  color: #a0a5af;
  opacity: 1;
}
.contact-details .contact-email-us-form .form-control:-ms-input-placeholder {
  color: #a0a5af;
}
.contact-details .contact-email-us-form .form-control::-ms-input-placeholder {
  color: #a0a5af;
}
.contact-details .contact-email-us-form .form-control::placeholder {
  color: #a0a5af;
  opacity: 1;
}
.contact-details .contact-email-us-form .form-control {
  border: 1px solid #e3e5e9;
  background-color: #f4f5f8;
}
.contact-details .contact-email-us-form .form-control:focus {
  border-color: #d5d8de;
}
.contact-details .contact-form-status {
  display: none;
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.55;
}
.contact-details .contact-form-status.is-success {
  display: block;
  color: #235a3b;
  background-color: #e9f7ef;
  border: 1px solid #bfe7ce;
}
.contact-details .contact-form-status.is-error {
  display: block;
  color: #7a302d;
  background-color: #fbeeee;
  border: 1px solid #f0c8c5;
}
</style>

<!--Contact Details Start-->
<section class="contact-details">
<div class="container pb-80">
	<div class="row">
	<div class="col-xl-7 col-lg-6">
		<div class="sec-title mb-50">
		<!-- <span class="sub-title">Send us email</span> -->
		<h3>Email Us</h3>
		</div>
		<!-- Contact Form -->
		<form id="contact_form" name="contact_form" class="contact-email-us-form" action="includes/sendmail.php" method="post" data-inline-submit="true">
		<div class="row">
			<div class="col-sm-6">
			<div class="mb-3">
				<input name="form_name" class="form-control" type="text" placeholder="Enter Name">
			</div>
			</div>
			<div class="col-sm-6">
			<div class="mb-3">
				<input name="form_email" class="form-control required email" type="email" placeholder="Enter Email">
			</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-6">
			<div class="mb-3">
				<input name="form_subject" class="form-control required" type="text" placeholder="Enter Subject">
			</div>
			</div>
			<div class="col-sm-6">
			<div class="mb-3">
				<input name="form_phone" class="form-control" type="text" placeholder="Enter Phone">
			</div>
			</div>
		</div>
		<div class="mb-3">
			<textarea name="form_message" class="form-control required" rows="7" placeholder="Enter Message"></textarea>
		</div>
		<?php if ($recaptchaSiteKey !== ''): ?>
		<div class="mb-4">
			<div class="g-recaptcha" data-sitekey="<?php echo htmlspecialchars($recaptchaSiteKey, ENT_QUOTES, 'UTF-8'); ?>"></div>
		</div>
		<?php endif; ?>
		<div class="contact-form-status" role="status" aria-live="polite"></div>
		<div class="mb-5">
			<input name="form_botcheck" class="form-control" type="hidden" value="" />
			<button type="submit" class="theme-btn btn-style-one mb-2 mb-sm-0" data-loading-text="Please wait..."><span class="btn-title">Send message</span></button>
			<button type="reset" class="theme-btn btn-style-one"><span class="btn-title">Reset</span></button>
		</div>
		</form>
		<!-- Contact Form Validation-->
	</div>
	<div class="col-xl-5 col-lg-6">
		<div class="contact-details__right">
		<div class="sec-title mb-40">
			<!-- <span class="sub-title">Need help?</span> -->
			<h3 class="mb-30">Get in touch</h3>
			<div class="text">Interested in any of the services that we have to offer? Please do not hesitate to drop us an email, someone will get back to you shortly. You can also contact us via our phone number listed on this page.</div>
		</div>
		<ul class="list-unstyled contact-details__info">
			<li class="d-block d-sm-flex align-items-center mt-xs-30">
			<div class="icon flex-shrink-0 mb-3 mb-sm-0"> <span class="lnr-icon-phone-plus"></span> </div>
			<div class="text ml-xs--0">
				<h6>Call Us</h6>
				<a href="tel:+4734159805"></span> +(473) 414-9451</a> </div>
			</li>
			<li class="d-block d-sm-flex align-items-center mt-xs-30">
			<div class="icon flex-shrink-0 mb-3 mb-sm-0"> <span class="lnr-icon-envelope1"></span> </div>
			<div class="text ml-xs--0">
				<h6>Email</h6>
				<a href="mailto:breathe1w@gmail.com">breathe1w@gmail.com</a> </div>
			</li>
			<li class="d-block d-sm-flex align-items-center mt-xs-30">
			<div class="icon flex-shrink-0 mb-3 mb-sm-0"> <span class="lnr-icon-location"></span> </div>
			<div class="text ml-xs--0">
				<h6>Location</h6>
				<a href="#">Birchgrove, St. Andrews<br /> Grenada W.I.</a> </div>
			</li>
		</ul>
		</div>
	</div>
	</div>
</div>
</section>
<!--Contact Details End-->

<!-- Map Section-->
<section class="map-section">
<iframe  class="map w-100"  src="https://maps.google.com/maps?width=100%25&height=600&hl=en&q=12.11081185,-61.6680092&t=&z=14&ie=UTF8&iwloc=B&output=embed"></iframe>
</section>
<!--End Map Section-->

<script>
document.addEventListener('DOMContentLoaded', function() {
  var form = document.querySelector('.contact-email-us-form');

  if (!form) {
    return;
  }

  form.addEventListener('submit', function(event) {
    event.preventDefault();

    var statusBox = form.querySelector('.contact-form-status');
    var submitButton = form.querySelector('button[type="submit"]');
    var submitText = submitButton ? submitButton.querySelector('.btn-title') : null;
    var originalText = submitText ? submitText.textContent : '';

    if (statusBox) {
      statusBox.className = 'contact-form-status';
      statusBox.style.display = 'none';
      statusBox.textContent = '';
    }

    if (submitButton) {
      submitButton.disabled = true;
    }

    if (submitText) {
      submitText.textContent = submitButton.getAttribute('data-loading-text') || 'Please wait...';
    }

    fetch(form.getAttribute('action'), {
      method: form.getAttribute('method') || 'POST',
      body: new FormData(form),
      headers: {
        'Accept': 'application/json'
      }
    })
      .then(function(response) {
        return response.json();
      })
      .then(function(response) {
        if (!statusBox) {
          return;
        }

        if (response && response.status === 'true') {
          statusBox.className = 'contact-form-status is-success';
          statusBox.style.display = 'block';
          statusBox.textContent = 'We have successfully received your message and will get back to you as soon as possible.';
          form.reset();
          if (typeof grecaptcha !== 'undefined') {
            grecaptcha.reset();
          }
        } else {
          statusBox.className = 'contact-form-status is-error';
          statusBox.style.display = 'block';
          statusBox.textContent = response && response.message ? stripHtml(response.message) : 'Email could not be sent. Please try again later.';
          if (typeof grecaptcha !== 'undefined') {
            grecaptcha.reset();
          }
        }
      })
      .catch(function() {
        if (statusBox) {
          statusBox.className = 'contact-form-status is-error';
          statusBox.style.display = 'block';
          statusBox.textContent = 'Email could not be sent. Please try again later.';
        }
        if (typeof grecaptcha !== 'undefined') {
          grecaptcha.reset();
        }
      })
      .finally(function() {
        if (submitButton) {
          submitButton.disabled = false;
        }

        if (submitText) {
          submitText.textContent = originalText;
        }
      });
  });

  function stripHtml(html) {
    var div = document.createElement('div');
    div.innerHTML = html;
    return div.textContent || div.innerText || '';
  }
});
</script>

<?php if ($recaptchaSiteKey !== ''): ?>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<?php endif; ?>

<?php
$new_footer_logo_url = "images/logo-2.png";
?>
<?php require_once('parts/footer/footer.php'); ?>
