<?php $_shouldextend[1]=1; ?>

<?php $this->startSection('content'); ?>
	
	<?php $this->startPush("metadata"); ?>
 <?php echo $metadata; ?>

	<?php $this->stopPush(); ?>

	<div class="container-fluid first-tip position-relative" style="margin-top: 75px;" id="begin" >
 <div id="img-container" class="carousel slide mt-0 mb-0" data-ride="carousel" data-interval="false">

 <!-- Indicators -->


 <!-- The slideshow -->
 <div class="carousel-inner">
 <div class="carousel-item active" >
 <div class="w-100 img" style="
 height:45vh;
 background: #000;
 background-size: cover;
 background-attachment: fixed;
 ">

 </div>
 </div>
 </div>
 </div>
 <div class="w-100 h-100 position-absolute on-top-0" style="
 background: linear-gradient(to bottom, rgba(0,0,0,.3),rgba(0,0,0,.5));
 ">
 <div class="container h-100">
 <div class="row align-items-center justify-content-center h-100 pt-3">

 <div class="col-12 col-lg-7">
 <div class="grid-container">

 <h5 class="text-light text-from-top text-center font-weight-normal text-justify text-uppercase big-font">
 PROJECTOS
 </h5>
 <h5 class="text-uppercase text-center text-palid font-weight-normal text-justify text-std-1 py-4 big-font-2">
 Construa a sua ideia connosco
 </h5>
 <div class="d-flex justify-content-center">
 <a class="btn px-5 border-x-light btn-outline-light rounded-0 py-2 d-flex align-items-center text-std-2"
    href="<?php echo static::e(URL("/")); ?>#ask-budget"
 >
 Solicitar orçamento
 <i class="fa fa-long-arrow-right ml-2
 				"></i>
 </a>
 </div>
 </div>
 </div>


 </div>
 </div>


 </div>

	</div>

	<div class="">
 <section class="container-fluid pt-5 pb-5  position-relative " id="projects" >
 <div class="container">

 <div class="row justify-content-center align-items-center ">
 <?php $__currentLoopData = $projects; $this->addLoop($__currentLoopData); foreach($__currentLoopData as $project): $this->incrementLoopIndices(); $loop = $this->getFirstLoop(); ?>
 <div class="col-12 col-lg-4 pb-3">
 <div class=" scale-item pb-3">
 <img src="assets/img/<?php echo static::e($project->base_img); ?>" class="w-100">
 </div>
 <div class="py-3">
 <h6 class="text-std-1 pb-3 text-center font-weight-bold"><?php echo static::e($project->name); ?></h6>
 <a class="btn btn-outline-dark rounded-0 d-block mx-auto" href="<?php echo static::e(URL("projecto/".$project->id_project)); ?>">
 Ver Projecto
 <i class="fa fa-long-arrow-right ml-2"></i>
 </a>
 </div>
 </div>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </div>

 </div>
 </section>
	</div>
	<?php $this->startPush("scripts"); ?>

 <script type="text/javascript">

 /*document.getElementById("video1").addEventListener("loadedmetadata", function() {
 this.currentTime = 2.5;
 }, false);*/

 $('#btn-sign-up-project').on('click', function(e){


 console.log("Entrou em condição");

 });

 const carouselItemTo = carouselItem => {
 // $("#form-steps-holder").carousel(carouselItem);
 $(`[data-target='#form-slider'][data-slide-to=${carouselItem}]`).click();
 $(".btn-next-slide").click();
 };

 $('.img-card').mouseenter( function () {
 $('.img-card').find('.img-card-holder').fadeOut();
 $(this).find('.img-card-holder').fadeToggle('fast');
 });

 $('.img-card-holder').on('click', function(){

 $('#img-holder').attr("src",$(this).data('src'));
 });
 $('.app-selection').on('click', function(){

 if($(this).hasClass("active")){

 //  console.log("Imgame: "+$(this).find("img").attr("src") + "Tamanho: " +$(this).find("img").attr("src").indexOf("c"));
 if($(this).find("img").attr("src").indexOf("c") > 0){
 $(this).find("img").attr("src",$(this).find("img").attr("src").split("_")[0]+".svg");
 console.log("Imgame2: "+$(this).find("img").attr("src") );


 }

 $(this).find("input").click();

 $(this).css('background-color','#fff');
 $(this).removeClass('active');
 $(this).find("h6").css("color","#000");

 }else{


 if($(this).find("img").attr("src").indexOf("_") == -1){
 $(this).find("img").attr("src",$(this).find("img").attr("src").split(".")[0]+"_branco.svg");

 // console.log("Imgame2323: "+$(this).find("img").attr("src") + "Tamanho: " +$(this).find("img").attr("src").indexOf("c"));
 }

 $(this).find("input").click();
 $(this).css('background-color','rgba(2,119,189 ,1)');
 $(this).addClass('active');
 $(this).find("h6").css("color","#fff");



 }


 });

 $('.btn-move-to-slide').on('click', function(){

 $("#form-slider").find(".carousel-item").removeClass("active");
 $($("#form-slider").find(".carousel-item").eq(0)).addClass("active");

 });

 $("a.scroll-link").click(function (event) {
 event.preventDefault();

 if($($(this).attr('href')).hasClass('is-new'))
 $("html, body").animate({scrollTop: $($(this).attr("href")).offset().top + 70}, 600);
 else
 $("html, body").animate({scrollTop: $($(this).attr("href")).offset().top}, 600);

 });


 $('.btn-show-enterprise').on('click', function(){

 if(!$(this).hasClass('shown')){
 $(this).parent().parent().parent().parent().find('.carousel').show('fast');
 $(this).addClass('shown');
 $(this).text("Esconder empresas");
 }
 else{
 $(this).parent().parent().parent().parent().find('.carousel').hide('fast');
 $(this).removeClass('shown');
 $(this).text("Ver empresas");
 }
 });

 $('.btn-see-img').on('click', function(e){

 $('#img-displayer').attr('src',  $(this).parents('.img-advertising').find('img').attr('src'));

 });



 </script>

	<?php $this->stopPush(); ?>
	<?php  $this->startComponent("components/solicitateBudget"); ?><?php  echo $this->renderComponent(); ?>
<?php $this->stopSection(); ?>

<?php if (@$_shouldextend[1]) { echo $this->runChild('guest.layouts.guestApp', ["title" => "".$project->name]); } ?>