<header class="banner-enterprise">	
  
<div class="modal fade" id="calculateModal" tabindex="-1" role="dialog" aria-labelledby="calculateModal" aria-hidden="true">
    <div class="modal-dialog">
	<div class="modal-content">
	  <div class="modal-body">
	      <div class="modal-close" data-dismiss="modal" aria-hidden="true">
          <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/modal-close.svg">
        </div>
	      
<section class="contact-footer">
  <div class="container-fluid calculator">
    <div class="row">
      <div class="col-md-1"></div>

      <div class="calculator-details col-md-12">
        <h2>Calculadora</h2>

        <form id="mortgageForm" class="space-y-4">
          <!-- Row 1 -->
          <div class="row">
            <div class="col-md-3">
              <label class="block mb-1">Preço de Compra ($)</label>
              <input type="number" name="purchase_price" value="555999" required class="w-full p-2 border rounded bg-white" />
            </div>
            <div class="col-md-3">
              <label class="block mb-1">Entrada (%)</label>
              <input type="number" step="0.1" name="down_payment_percent" value="20" required class="w-full p-2 border rounded bg-white" />
            </div>
            <div class="col-md-3">
              <label class="block mb-1">Prazo do Financiamento (anos)</label>
              <input type="number" name="mortgage_term" value="30" required class="w-full p-2 border rounded bg-white" />
            </div>
            <div class="col-md-3">
              <label class="block mb-1">Taxa de Juros (%)</label>
              <input type="number" step="0.01" name="interest_rate" value="4" required class="w-full p-2 border rounded bg-white" />
            </div>
          </div>

          <!-- Row 2 -->
          <div class="row">
            <div class="col-md-3">
              <label class="block mb-1">Imposto Predial ($/ano)</label>
              <input type="number" name="property_tax" value="1000" required class="w-full p-2 border rounded bg-white" />
            </div>
            <div class="col-md-3">
              <label class="block mb-1">Seguro Residencial ($/ano)</label>
              <input type="number" name="prop_insurance" value="300" required class="w-full p-2 border rounded bg-white" />
            </div>
            <div class="col-md-3">
              <label class="block mb-1">Taxas de Condomínio ($/mês)</label>
              <input type="number" name="hoa_fees" value="400" required class="w-full p-2 border rounded bg-white" />
            </div>
            <div class="col-md-3">
              <label class="block mb-1">PMI (%)</label>
              <input type="number" step="0.01" name="pmi" value="0.52" required class="w-full p-2 border rounded bg-white" />
            </div>
          </div>

<style>
.bg-gray-200 {
  background: #ccc;
}
.font-bold {
  font-weight: bold;
}
.bg-white {
  background: white !important;
}

table {
  width: 100%;
}

table tr td {
  border: #000 1px solid !important;
}

table td, table th {
 padding: 2px 5px;
}
</style>

          <!-- Row 3 -->
          <div class="row">
            <div class="col-md-3">
              <select name="start_month" class="w-full p-2 border rounded bg-white" style="width: calc(100% - 30px);">
                <option value="1">Jan</option>
                <option value="2">Feb</option>
                <option value="3" selected>Mar</option>
                <option value="4">Apr</option>
                <option value="5">May</option>
                <option value="6">Jun</option>
                <option value="7">Jul</option>
                <option value="8">Aug</option>
                <option value="9">Sep</option>
                <option value="10">Oct</option>
                <option value="11">Nov</option>
                <option value="12">Dec</option>
              </select>
            </div>
            <div class="col-md-3">
              <input type="number" name="start_year" value="2025" class="w-full p-2 border rounded bg-white" />
            </div>
          </div>

          <button type="submit" class="w-full bg-blue-600 text-white py-2 px-4 rounded hover:bg-blue-700">
            Calcular          </button>
        </form>

        <div id="results" class="hidden mt-8 space-y-6">
          <!-- Monthly Payment Details -->
          <div class="row">
            <div class="col-md-3">
              <h3>Pagamento Mensal: <span id="monthlyPayment"></span></h3>
              <p><strong>Principal & Juros:</strong> <span id="principalInterest"></span></p>
              <p><strong>Impostos:</strong> <span id="taxes"></span></p>
              <p><strong>Seguro:</strong> <span id="insurance"></span></p>
              <p><strong>Taxas de Condomínio:</strong> <span id="hoaFees"></span></p>
            </div>
            <div class="col-md-3">
              <h3>Pagamentos Totais</h3>
              <p><strong>Total:</strong> <span id="totalPayments"></span></p>
              <p><strong>Meses:</strong> <span id="totalMonths"></span></p>
            </div>
          </div>

          <!-- Total Payments -->
          <div class="row">
            <div class="col-md-3">
              <h3>Detalhes do Empréstimo</h3>
              <p><strong>Principal:</strong> <span id="totalPrincipal"></span></p>
              <p><strong>Juros:</strong> <span id="totalInterest"></span></p>
            </div>
            <div class="col-md-3">
              <h3>Outros Custos</h3>
              <p><strong>Impostos:</strong> <span id="totalTaxes"></span></p>
              <p><strong>Seguro:</strong> <span id="totalInsurance"></span></p>
              <p><strong>Taxas de Condomínio:</strong> <span id="totalHoaFees"></span></p>
            </div>
          </div>

          <h3 class="text-xl font-bold mb-4">Tabela de Amortização</h3>
          <div class="overflow-x-auto">
            <table class="min-w-full bg-white border-collapse border border-gray-300">
              <thead>
                <tr class="bg-gray-200">
                  <th class="p-2 border border-gray-300">Ano/Mês</th>
                  <th class="p-2 border border-gray-300">Principal</th>
                  <th class="p-2 border border-gray-300">Juros</th>
                  <th class="p-2 border border-gray-300">Impostos, Seguro & Condomínio</th>
                  <th class="p-2 border border-gray-300">Saldo</th>
                </tr>
              </thead>
              <tbody id="amortizationTable" class="text-sm">
              </tbody>
              <tfoot>
                <tr class="bg-gray-200 font-bold">
                  <td class="p-2 border border-gray-300">Totais</td>
                  <td class="p-2 border border-gray-300" id="totalPrincipalFooter"></td>
                  <td class="p-2 border border-gray-300" id="totalInterestFooter"></td>
                  <td class="p-2 border border-gray-300" id="totalTaxInsHoaFooter"></td>
                  <td class="p-2 border border-gray-300"></td>
                </tr>
              </tfoot>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

<script>
  document.getElementById('mortgageForm').addEventListener('submit', function(event) {
    event.preventDefault();

    // Coletar dados do formulário
    const purchasePrice = parseFloat(document.querySelector('input[name="purchase_price"]').value);
    const downPaymentPercent = parseFloat(document.querySelector('input[name="down_payment_percent"]').value);
    const mortgageTerm = parseInt(document.querySelector('input[name="mortgage_term"]').value);
    const interestRate = parseFloat(document.querySelector('input[name="interest_rate"]').value);
    const propertyTax = parseFloat(document.querySelector('input[name="property_tax"]').value);
    const propInsurance = parseFloat(document.querySelector('input[name="prop_insurance"]').value);
    const hoaFees = parseFloat(document.querySelector('input[name="hoa_fees"]').value);
    const pmiRate = parseFloat(document.querySelector('input[name="pmi"]').value);
    const startMonth = parseInt(document.querySelector('select[name="start_month"]').value);
    const startYear = parseInt(document.querySelector('input[name="start_year"]').value);

    // Calcular valores iniciais
    const downPayment = purchasePrice * (downPaymentPercent / 100);
    const loanAmount = purchasePrice - downPayment;
    const months = mortgageTerm * 12;

    // Calcular parcela mensal do empréstimo (P&I)
    const monthlyRate = (interestRate / 100) / 12;
    const monthlyPayment = loanAmount * 
      (monthlyRate * Math.pow(1 + monthlyRate, months)) / 
      (Math.pow(1 + monthlyRate, months) - 1);

    // Calcular PMI se entrada < 20%
    let monthlyPMI = 0;
    if (downPaymentPercent < 20) {
      monthlyPMI = (loanAmount * (pmiRate / 100)) / 12;
    }

    // Calcular custos mensais
    const monthlyTax = propertyTax / 12;
    const monthlyInsurance = propInsurance / 12;
    const taxInsHOA = monthlyTax + monthlyInsurance + hoaFees;

    // Configurar datas: iniciar no mês seguinte ao selecionado
    let currentDate = new Date(startYear, startMonth, 1);

    // Preparar amortização
    let balance = loanAmount;
    const schedule = [];
    let yearlyTotals = { principal: 0, interest: 0, tax: 0, insurance: 0, hoa: 0 };
    let currentYear = currentDate.getFullYear();

    // Loop mensal para construir a tabela de amortização
    for (let i = 0; i < months && balance > 0; i++) {
      const interest = balance * monthlyRate;
      const principal = Math.min(monthlyPayment - interest, balance);
      balance = Math.max(balance - principal, 0);

      yearlyTotals.principal += principal;
      yearlyTotals.interest += interest;
      yearlyTotals.tax += monthlyTax;
      yearlyTotals.insurance += monthlyInsurance;
      yearlyTotals.hoa += hoaFees;

      schedule.push({
        type: 'month',
        date: new Date(currentDate),
        principal: principal,
        interest: interest,
        tax_ins_hoa: monthlyTax + monthlyInsurance + hoaFees,
        balance: balance
      });

      // Se for o último mês do ano ou o último pagamento, adiciona o resumo anual
      if ((currentDate.getMonth() === 11 && balance > 0) || balance === 0) {
        schedule.push({
          type: 'year',
          year: currentYear,
          totals: { ...yearlyTotals },
          balance: balance
        });
        yearlyTotals = { principal: 0, interest: 0, tax: 0, insurance: 0, hoa: 0 };
        currentYear++;
      }

      // Avançar para o próximo mês
      currentDate.setMonth(currentDate.getMonth() + 1);
    }

    // Ajuste dos totais gerais (para coincidir com os valores esperados)
    const grandTotals = {
      principal: loanAmount, // O total de principal deve ser igual ao valor do empréstimo
      interest: (monthlyPayment * months) - loanAmount,
      tax: monthlyTax * months,
      insurance: monthlyInsurance * months,
      hoa: hoaFees * months
    };

    // Função de formatação com locale en-US para separador de milhar
    function format(value) {
      return '$' + Math.round(value).toLocaleString('en-US');
    }

    // Exibir resultados
    const totalMonthlyPayment = monthlyPayment + monthlyPMI + taxInsHOA;
    document.getElementById('monthlyPayment').textContent = format(totalMonthlyPayment);
    document.getElementById('principalInterest').textContent = format(monthlyPayment);
    document.getElementById('taxes').textContent = format(monthlyTax);
    document.getElementById('insurance').textContent = format(monthlyInsurance);
    document.getElementById('hoaFees').textContent = format(hoaFees);

    document.getElementById('totalPayments').textContent = format(totalMonthlyPayment * months);
    document.getElementById('totalMonths').textContent = months;

    document.getElementById('totalPrincipal').textContent = format(grandTotals.principal);
    document.getElementById('totalInterest').textContent = format(grandTotals.interest);
    document.getElementById('totalTaxes').textContent = format(grandTotals.tax);
    document.getElementById('totalInsurance').textContent = format(grandTotals.insurance);
    document.getElementById('totalHoaFees').textContent = format(grandTotals.hoa);

    const tableBody = document.getElementById('amortizationTable');
    tableBody.innerHTML = '';
    let currentDisplayedYear = null;

    schedule.forEach(entry => {
      if (entry.type === 'year') {
        if (entry.year !== currentDisplayedYear) {
          const row = `
            <tr class="bg-gray-100 font-semibold">
              <td class="p-2 border bg-gray-200 font-bold">${entry.year}</td>
              <td class="p-2 border bg-gray-200 font-bold">${format(entry.totals.principal)}</td>
              <td class="p-2 border bg-gray-200 font-bold">${format(entry.totals.interest)}</td>
              <td class="p-2 border bg-gray-200 font-bold">${format(entry.totals.tax + entry.totals.insurance + entry.totals.hoa)}</td>
              <td class="p-2 border bg-gray-200 font-bold">${format(entry.balance)}</td>
            </tr>
          `;
          tableBody.insertAdjacentHTML('beforeend', row);
          currentDisplayedYear = entry.year;
        }
      } else {
        const row = `
          <tr>
            <td class="p-2 border border-gray-300">${entry.date.toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}</td>
            <td class="p-2 border border-gray-300">${format(entry.principal)}</td>
            <td class="p-2 border border-gray-300">${format(entry.interest)}</td>
            <td class="p-2 border border-gray-300">${format(entry.tax_ins_hoa)}</td>
            <td class="p-2 border border-gray-300">${format(entry.balance)}</td>
          </tr>
        `;
        tableBody.insertAdjacentHTML('beforeend', row);
      }
    });

    // Exibir totais gerais no rodapé da tabela
    document.getElementById('totalPrincipalFooter').textContent = format(grandTotals.principal);
    document.getElementById('totalInterestFooter').textContent = format(grandTotals.interest);
    document.getElementById('totalTaxInsHoaFooter').textContent = format(grandTotals.tax + grandTotals.insurance + grandTotals.hoa);

    document.getElementById('results').classList.remove('hidden');
  });
</script>	  </div>
	</div>
    </div>
  </div>

<div style="overflow: hidden; height: 0; width: 0;">
  <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/world-yellow.svg">
  <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/icon-zoom.png">
  <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/play-youtube.png">
</div>

<div style="position: fixed; right: 20px; bottom: 150px; height: 50px; width: 50px; z-index: 999999; border-radius: 50%; background: rgba(0, 0, 255, 0.5);">
  <img class="calculator-start" data-toggle="modal" data-target="#calculateModal" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/calculator.svg" style="max-width: 50px; max-height: 50px; cursor: pointer;">
</div>

<div style="position: fixed; right: 20px; bottom: 70px; height: 50px; width: 50px; z-index: 999999; border-radius: 50%; background: rgba(0, 0, 255, 0.5);">
  <a href="https://api.whatsapp.com/send?phone=14075757332" target="_blank"><img class="calculator-start" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/whatsapp.png" style="max-width: 50px; max-height: 50px; cursor: pointer;"></a>
</div>

<script>
    $('.calculator-start').click(function() {
      $('.calculator').show();
      $('.calculator-iframe').hide();
    });
  </script>
  

<div class="modal fade" id="contactModal" tabindex="-1" role="dialog" aria-labelledby="contactModal" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content modal-contact">
      <div class="modal-body">
        <div class="modal-close" data-dismiss="modal" aria-hidden="true">
          <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/modal-close.svg">
        </div>
        
  <section class="contact-footer">
    <div class="container-fluid">
      <div class="row">
	<div class="col-md-1"></div>
		  
	  <div class="col-md-5">
	    <h2>Contato</h2>
		  
	    <p>
	      Insira as suas informações abaixo para que a nossa equipe entre em contato e disponha a você um leque de oportunidades.	    </p>
	
	    <div>
	      <strong>Nome</strong>
	      <br>
	      <input name="name" class="name" placeholder="Digite seu nome completo">
	    </div>
		  
	    <div>
	      <strong>Email</strong>
	      <br>
	      <input name="email" class="email" placeholder="Digite seu email">
	    </div>
		  
	    <div class="row">
	      <div class="col-md-12">
		<strong>Telefone</strong>
	      </div>
	      <div class="col-md-12">
		<input type="tel" class="mobile-number-contact" style="width: 100px;" readonly>
	        <input class="change-phone" style="float: left; width: calc(100% - 150px); margin-left: 20px;">
	      
	        <input class="phone" name="phone" type="hidden">
	        <div style="clear: both;"></div>

	        <script>
  		  $('.mobile-number-contact').intlTelInput();
	        </script>
	      </div>
	    </div>
		  
	    <div class="row">
	      <div class="col-md-12">
		<strong>Mensagem</strong>
	      </div>
	      <div class="col-md-12">
		<textarea name="subject" placeholder="Digite sua mensagem"></textarea>
	      </div>
	    </div>
			  
	    <div class="row">
	      <div class="col-md-6">
		<button class="send-contact">
		  Enviar mensagem		</button>
	      </div>
	    </div> 
	  </div>
	    
	    <div class="col-md-5">
			<div class="contact-footer-info ">
			  
			  <div class="contact-footer-item">
				<hgroup>
				  <h3>
					<img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-whatsapp.png">
					Whatsapp
				  </h3>
				  <h4>
					+1 (407) 575-7332
				  </h4>
				</hgroup>
				<img class="arrow" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-arrow.png">
			  </div>
			  
			  <div class="contact-footer-item">
				<hgroup>
				  <h3>
					<img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-skype.png">
					Skype
				  </h3>
				  <h4>
					gleyson.persio.silva
				  </h4>
				</hgroup>
				<img class="arrow" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-arrow.png">
			  </div>
			  
			  <div class="contact-footer-item">
				<hgroup>
				  <h3>
					<img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-phone.png">
					Telefone				  </h3>
				  <h4>
					+55 (11) 3181-7389
				  </h4>
				</hgroup>
				<img class="arrow" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-arrow.png">
			  </div>
			  
			  <div class="contact-footer-item">
				<hgroup>
				  <h3>
					<img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-location.png">
					Endereço				  </h3>
				  <h4>
					6965 Piazza Grande Ave, 212
					<br>
					Orlando, Florida - 32835
				  </h4>
				</hgroup>
				<img class="arrow" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/contact-footer-arrow.png">
			  </div>
			  
			  <div class="contact-footer-item"></div>
		  </div>
		<div class="col-md-3"></div>
	    
	  </div>
	</div>
  </section>

<script>
   $('.change-phone').on('keyup', function() {
     $('.phone').val($('.mobile-number-contact').val() + ' ' + $(this).val());
   });
   
  $('.send-contact').click(function() {
    var nome = $.trim($('.contact-footer input[name=name]').val());
    var email = $.trim($('.contact-footer input[name=email]').val());
    var telefone = $.trim($('.contact-footer input[name=phone]').val());
    var subject = $.trim($('.contact-footer textarea[name=subject]').val());   
    
        if (nome == '') {
      alert('Favor preencher o nome');
      $('.contact-footer input[name=name]').focus();
      return false;
    } 
    
    if (email == '') {
      alert('Favor preencher o email');
      $('.contact-footer input[name=email]').focus();
      return false;
    } 
    
    if (telefone == '') {
      alert('Favor preencher o telefone');
      $('.contact-footer input[name=phone]').focus();
      return false;
    }
    
    if (subject == '') {
      alert('Favor preencher a mensagem');
      $('.contact-footer textarea[name=subject]').focus();
      return false;
    }
        
    var parameters = 'name=' + nome + '&email=' + email + '&phone=' + telefone + '&subject=' + subject + '&form_type=full&sys_email=' + '';
    $('.iframe-email-contact').attr('src', 'https://seuimovelnaflorida.com/wp-content/themes/golden-key/views/sendmail.php' + '?' + parameters);
      });
</script>

<div style="height: 0; overflow: hidden;">
  <iframe class="iframe-email-contact"></iframe>
</div>      </div>
    </div>
  </div>
</div>
    
<div class="visible-xs" style="height: 70px;"></div>

<div style="height: 0; overflow: hidden;">
<img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/logo-golden-key-2.svg">
</div>

<div class="container-header">
  <div class="container-fluid container-top">
    <div class="row">
      <div class="logo col-md-2 col-xs-10">
        <a href="https://seuimovelnaflorida.com/en/">
          <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/logo-golden-key.svg">
        </a>
      </div>
        
      <div class="col-xs-2 visible-xs">
        <div class="menu-mobile col-xs-12 visible-xs">
        
                        <img class="menu-bars" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/mobile-menu-bars.png">
                  </div>
      </div>
      <div class="col-md-10 text-right hidden-xs">

      <div class="menus">
        <ul>
                      <li>
              <a href="https://seuimovelnaflorida.com/busca-mls/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Busca MLS                  </span>
		      
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/quem-somos/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Quem somos                  </span>
		      
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/imoveis/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Imóveis                  </span>
		      
                                    <div class="dropdown-content">
                    <div style="height: 5px;">
                      <div class="arrow-up"></div>
                    </div>
                    <ul class="submenu submenu-enterprise">
                                                <li>
                            <a href="https://seuimovelnaflorida.com/imoveis">
                              Todos                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/imoveis?property_type=vacation-properties">
                              Temporada                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/imoveis?property_type=luxury-homes">
                              Casas de Luxo                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/imoveis?property_type=property">
                              Moradia                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/imoveis?property_type=commercial-property">
                              Comercial                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/imoveis?property_type=featured-property">
                              Oportunidades                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/imoveis?property_type=rental-properties">
                              Aluguel                            </a>
                          </li>
                                          </ul>
                  </div>
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Construção                  </span>
		      
                      
                  <div class="dropdown-content">
                    <div style="height: 5px;">
                      <div class="arrow-up"></div>
                    </div>
                    <ul class="submenu submenu-builder">
                                              <li>
                          <a href="https://seuimovelnaflorida.com/construcao/?id=6526">
                            Ocala – Modelo 1876                          </a>
                        </li>
                                          </ul>
                  </div>
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/servicos/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Serviços                  </span>
		      
                      
                  <div class="dropdown-content">
                    <div style="height: 5px;">
                      <div class="arrow-up"></div>
                    </div>
                    <ul class="submenu">
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3987">
                              Administração de Imóveis                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3988">
                              Abertura de empresas                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3990">
                              Compra e venda de negócios                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3992">
                              Construção civil                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3994">
                              Decoração                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3993">
                              Contabilidade                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3991">
                              Câmbio                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3995">
                              Leilões de imóveis                            </a>
                          </li>
                                                <li>
                            <a href="https://seuimovelnaflorida.com/servico?id=3989">
                              Marketing digital                            </a>
                          </li>
                                          </ul>
                  </div>
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/duvidas/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Dúvidas                  </span>
		      
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/depoimentos/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Depoimentos                  </span>
		      
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/parceiros/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Parceiros                  </span>
		      
                                  </div>
              </a>
            </li>
                        <li>
              <a href="https://seuimovelnaflorida.com/en/corretores/"> 

                <div class="dropdown dropdown-menu-top">
                  <span>
                    Corretores                  </span>
		      
                                  </div>
              </a>
            </li>
                      
          <li class="highlight" data-toggle="modal" data-target="#contactModal">Contato</li>
            <li>
              <span style="margin: 0 0 0 25px;">
                                
                <li class="menu-item-language">
                  <a>
                    <div class="dropdown">
                      <div class="dropdown-world">
                        <span class="world">
                        </span>
                        <span class="dropdown-world-text">
                          PT                        </span>
                      </div>
                      
                      <div class="dropdown-content dropdown-content-language">
                        <div style="height: 5px;">
                          <div class="arrow-up"></div>
                        </div>
                        <ul class="submenu submenu-translate">
                                                    <li>
                            <a class="click-language" language="pt">
                              PT                            </a>
                          </li>
                                                    <li>
                            <a class="click-language" language="en">
                              EN                            </a>
                          </li>
                                                  </ul>
                      </div>
                    </div>
                  </a>
                </li>
              </span>
            </li>
          </ul>
        </div>
      </div>
    </div>
    </div>
    
    <div class="menu-mobile-open hide">
      <div class="menu-mobile-close">
        <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/mobile-modal-close.svg"></i>
      </div>
      <a href="https://seuimovelnaflorida.com/en/">
        <img class="menu-mobile-logo" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/logo-golden-key-mobile-menu.svg">
      </a>
      
      <div style="height: calc(100% - 240px); overflow: auto;">
      <ul>
              <li onclick="location.href='https://seuimovelnaflorida.com/busca-mls/'">
          Busca MLS        </li>
              <li onclick="location.href='https://seuimovelnaflorida.com/en/quem-somos/'">
          Quem somos        </li>
              <li onclick="location.href='https://seuimovelnaflorida.com/en/imoveis/'">
          Imóveis        </li>
              <li>
          <a href="https://seuimovelnaflorida.com/en/">Construção</a>
        </li>
                  <li style="margin-left: 10px;">
            <a href="https://seuimovelnaflorida.com/construcao/?id=6526">Ocala – Modelo 1876</a>
          </li>
                      <li onclick="location.href='https://seuimovelnaflorida.com/en/servicos/'">
          Serviços        </li>
              <li onclick="location.href='https://seuimovelnaflorida.com/en/duvidas/'">
          Dúvidas        </li>
              <li onclick="location.href='https://seuimovelnaflorida.com/en/depoimentos/'">
          Depoimentos        </li>
              <li onclick="location.href='https://seuimovelnaflorida.com/en/parceiros/'">
          Parceiros        </li>
              <li onclick="location.href='https://seuimovelnaflorida.com/en/corretores/'">
          Corretores        </li>
            
      </ul>
      </div>
      <div class="menu-mobile-end">
        <button class="menu-mobile-contact" data-toggle="modal" data-target="#contactModal">
          Contato        </button>
        <div class="menu-mobile-language">
          <img class="menu-mobile-language-image" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/world-blue.svg"> 
          <select class="change-language select-language">
                            <option value="pt" selected>Portuguese</option>
                            <option value="en" >English</option>
                      </select>
        </div>
      </div>
    </div>
  </div>

<script>
  $('.menu-mobile .menu-bars').click(function() {
     $('.menu-mobile-open').toggleClass('hide');
   });
   
  $('.menu-mobile-close img').click(function() {
     $('.menu-mobile-open').toggleClass('hide');
     $(window).scrollTop(0);
   });
</script>

<script>
  $('.click-language').click(function() {
    var option = $(this).attr('language');
     
    $.ajax({
      type: 'POST',
      cache: false,
      url: 'https://seuimovelnaflorida.com/wp-admin/admin-ajax.php',
      data: {
        action: 'change_language',
        language: option
      },
      success: function(data) {
        data = JSON.parse(data);
        location.reload();
      },
    });
 });
       
  $('.change-language').change(function() {
    var option = $(this).find('option:selected').val();
   
    $.ajax({
      type: 'POST',
      cache: false,
      url: 'https://seuimovelnaflorida.com/wp-admin/admin-ajax.php',
      data: {
        action: 'change_language',
        language: option
      },
      success: function(data) {
        data = JSON.parse(data);
        location.reload();
      },
    });
  });
</script>  
  <section class="container-fluid property-search-banner">
    <div class="banner-center">
      <h1 class="text-center">
        <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/topic.png">
        <br>
        Busca MLS      </h1>
    </div>
  </section>
</header>

<!-- Adicionar Font Awesome CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />

<section class="search-mls-container search-mls-page">
  <div class="container-fluid">
        
    <div class="row mls-search-bar">
      <div class="col-md-12">
        <div class="filter-bar">
          <div class="filter-left">
            <button class="filter-properties-btn">
              <i class="fas fa-filter"></i>
              Filtrar Propriedades            </button>
          </div>
          <div class="filter-right">
            <div class="sort-dropdown">
              <span>Ordenar por</span>
              <select class="mls-sort-select">
                <option value="price-asc">Preço (menor)</option>
                <option value="price-desc" selected>Preço (maior)</option>
                <option value="date-desc">Data (recente)</option>
                <option value="date-asc">Data (antiga)</option>
              </select>
            </div>
            <button class="open-filter-btn">
              ABRIR              <i class="fas fa-plus"></i>
            </button>
          </div>
        </div>
        
        <div class="search-filter-box" style="display: none;">
          <form id="mls-search-form">
            <div class="row filter-row">
              <div class="col-md-3">
                <label>Buscar ID MLS</label>
                <input type="text" class="form-control" name="query" placeholder="MLS...">
              </div>
              <div class="col-md-3">
                <label>Cidade</label>
                <input type="text" class="form-control" name="city" placeholder="Digite a cidade">
              </div>
              <div class="col-md-3">
                <label>CEP</label>
                <input type="text" class="form-control" name="zipcode" placeholder="Digite o CEP">
              </div>
              <div class="col-md-3">
                <label>Nome do Condomínio</label>
                <input type="text" class="form-control" name="subdivision" placeholder="Digite o nome do condomínio">
              </div>
            </div>
            
            <div class="row filter-row">
              <div class="col-md-3">
                <label>Quartos no Mínimo</label>
                <select class="form-control" name="beds">
                  <option value="">Todos</option>
                  <option value="1">1+</option>
                  <option value="2">2+</option>
                  <option value="3">3+</option>
                  <option value="4">4+</option>
                  <option value="5">5+</option>
                </select>
              </div>
              <div class="col-md-3">
                <label>Banheiros</label>
                <select class="form-control" name="baths">
                  <option value="">Todos</option>
                  <option value="1">1+</option>
                  <option value="2">2+</option>
                  <option value="3">3+</option>
                  <option value="4">4+</option>
                </select>
              </div>
              <div class="col-md-3">
                <label>Preço mín</label>
                <select class="form-control" name="price_min">
                  <option value="0">$0</option>
                  <option value="100000">$100,000</option>
                  <option value="200000">$200,000</option>
                  <option value="300000">$300,000</option>
                  <option value="500000">$500,000</option>
                  <option value="1000000">$1,000,000</option>
                </select>
              </div>
              <div class="col-md-3">
                <label>Preço max</label>
                <select class="form-control" name="price_max">
                  <option value="">Sem Limite</option>
                  <option value="200000">$200,000</option>
                  <option value="300000">$300,000</option>
                  <option value="500000">$500,000</option>
                  <option value="1000000">$1,000,000</option>
                  <option value="2000000">$2,000,000</option>
                  <option value="5000000">$5,000,000</option>
                  <option value="10000000">$10,000,000</option>
                  <option value="20000000">$20,000,000</option>
                  <option value="50000000">$50,000,000</option>
                </select>
              </div>
            </div>
            
            <div class="row filter-row">
              <div class="col-md-3">
                <label>Características</label>
                <select class="form-control" name="keyword">
                  <option value="">Selecione</option>
                  <option value="pool">Piscina</option>
                  <option value="gym">Academia</option>
                  <option value="waterfront">Frente para água</option>
                  <option value="garage">Garagem</option>
                  <option value="golf">Campo de golfe</option>
                  <option value="gated">Condomínio fechado</option>
                  <option value="new">Construção nova</option>
                  <option value="luxury">Luxo</option>
                </select>
              </div>
              <div class="col-md-9 text-right">
                <button type="submit" class="btn btn-primary search-mls-btn" style="display: inline-flex; align-items: center; justify-content: center; height: 38px; width: auto; padding: 0 20px;">
                  <i class="fa fa-search" style="margin-right: 5px;"></i> FILTRAR                </button>
                <a href="#" class="reset-btn" id="reset-form" style="display: inline-block; margin-left: 15px;">Limpar Filtros</a>
              </div>
            </div>
            
            <input type="hidden" name="action" value="search_properties">
            <input type="hidden" name="page" value="1" id="current-page">
            <input type="hidden" name="sort" value="price-desc" id="current-sort">
          </form>
        </div>
      </div>
    </div>
    
    <div class="results-counter">
      <div class="col-md-12">
        <div class="properties-found" id="properties-count-container">
          <span class="result-count-number">0</span> propriedades encontradas neste filtro        </div>
        <div class="pagination-summary" id="pagination-summary-container">
          <span>1</span> de <span class="total-pages">0</span>
        </div>
      </div>
    </div>
    
    <div class="row mls-properties" id="properties-container">
      <!-- Os resultados serão carregados dinamicamente aqui -->
      <div class="col-md-12 text-center loading-properties" style="display: none;">
        <div class="spinner-container">
          <i class="fas fa-spinner fa-spin fa-3x"></i>
        </div>
        <p>Carregando propriedades...</p>
      </div>
      
      <div class="col-md-12 text-center no-properties" style="display: none;">
        <p>Nenhuma propriedade encontrada com os filtros atuais.</p>
      </div>
    </div>
    
    <div class="row mls-pagination">
      <div class="col-md-12 text-center">
        <ul class="pagination" id="pagination-container">
          <!-- A paginação será gerada dinamicamente aqui -->
        </ul>
      </div>
    </div>
  </div>
</section>

<style>
/* Estilos para a seção de busca MLS - atualizado conforme screenshot */
.property-search-banner {
  background: transparent; /* Remover a cor de fundo sólida */
  color: white;
  text-align: center;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  z-index: 1;
}

.banner-center {
  width: 100%;
}

.property-search-banner h1 {
  font-size: 36px;
  font-weight: bold;
  text-transform: none;
  margin: 0;
}

.search-mls-container {
  padding-top: 0;
  padding-bottom: 30px;
  background-color: #f8f8f8;
  position: relative;
  z-index: 2;
}

.search-mls-home {
  margin-bottom: 30px;
}

/* Adicionar estilo específico para a home */
.search-mls-home .mls-search-bar {
  margin-top: -30px; /* Puxar para cima na home */
  position: relative;
  z-index: 10;
}

.mls-title {
  color: #333;
  font-weight: bold;
  margin-bottom: 30px;
  font-size: 24px;
  text-transform: uppercase;
}

.mls-search-bar {
  margin-bottom: 5px;
  text-align: center;
  margin-top: -25px; /* Move a barra para cima, invadindo o banner */
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  border-radius: 5px;
  padding: 15px 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.filter-left {
  display: flex;
  align-items: center;
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.filter-properties-btn {
  background: transparent;
  color: #333;
  border: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 0;
}

.filter-properties-btn i {
  background-color: #1a2456;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.open-filter-btn {
  background-color: #1a2456;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 5px 15px;
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sort-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.sort-dropdown select {
  border: none;
  background: transparent;
  font-weight: 500;
  color: #333;
  cursor: pointer;
}

.results-counter {
  margin-top: 5px;
  margin-bottom: 40px;
}

.properties-found {
  float: left;
  font-size: 16px;
  font-weight: 500;
}

.pagination-summary {
  float: right;
  font-size: 16px;
}

.result-count-number {
  font-weight: bold;
  color: #1F77FF;
}

.search-filter-box {
  margin-top: 20px;
  padding: 20px;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-row {
  margin-bottom: 15px;
}

.filter-row label {
  display: block;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
  font-size: 13px;
}

.reset-btn {
  display: inline-block;
  margin-top: 24px;
  color: #666;
  text-decoration: underline;
}

.filter-submit-area {
  padding-top: 24px;
}

.search-mls-btn {
  width: 100%;
  background-color: #ff9800;
  border: none;
  font-weight: bold;
  padding: 10px 0;
  font-size: 16px;
}

.search-mls-btn:hover {
  background-color: #e88a00;
}

.panel-title a {
  display: block;
  color: #333;
  font-weight: bold;
}

.panel-title a:hover,
.panel-title a:focus {
  text-decoration: none;
}

.panel-default > .panel-heading {
  background-color: #f9f9f9;
}

.advanced-filters {
  margin-top: 15px;
}

.mls-result-count {
  float: left;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.result-count-number,
.result-count-total {
  font-weight: bold;
}

.mls-sort-options {
  float: right;
  margin-bottom: 20px;
}

.mls-sort-options label {
  font-weight: normal;
  color: #666;
}

.mls-properties {
  margin-top: 5px;
  clear: both;
}

/* Estilos para garantir que os cards tenham altura igual */
.row.property-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.property-item {
  margin-bottom: 30px;
  display: flex;
  height: 100%;
  padding: 0 10px;
}

.property-card {
  margin-bottom: 0;
  background-color: white;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.property-card:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

.property-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(to bottom, #ddd 0%, #f5f5f5 100%);
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-price {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: rgba(0,0,0,0.7);
  color: white;
  padding: 7px 12px;
  font-weight: bold;
  font-size: 18px;
  z-index: 1;
}

.status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 1;
}

.status-badge.active {
  background-color: #28a745; /* Verde */
  color: white;
}

.status-badge.new {
  background-color: #1F77FF; /* Azul */
  color: white;
}

.property-info {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.property-address {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  height: 40px;
  overflow: hidden;
  margin-bottom: 5px;
}

.property-city {
  font-size: 13px;
  color: #666;
  margin-bottom: 5px;
  font-weight: 500;
}

.property-type {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  font-style: italic;
}

.property-subdivision {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  font-style: italic;
}

.property-details {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}

.property-details .detail {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #666;
  margin-right: 5px;
  margin-bottom: 5px;
  flex: 1 0 18%;
}

.property-details .detail i {
  color: #1F77FF;
  font-size: 14px;
  margin-right: 5px;
  width: 18px;
  text-align: center;
}

.property-mls {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 12px;
  color: #666;
  margin-top: auto;
}

.property-mls span:first-child {
  font-weight: bold;
  color: #333;
}

.property-actions {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background-color: #f9f9f9;
  margin-top: auto;
}

.details-link,
.virtual-tour-link {
  background-color: #1F77FF;
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  width: 48%;
  text-transform: uppercase;
}

.virtual-tour-link {
  background-color: #ff9800;
}

.virtual-tour-link.disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.details-link:hover,
.virtual-tour-link:hover {
  opacity: 0.9;
  color: white;
  text-decoration: none;
}

.loader-image {
  width: 50px;
  height: 50px;
  margin: 30px auto;
}

.spinner-container {
  margin: 30px auto;
  color: #1F77FF;
}

.fa-spin {
  animation-duration: 1s;
}

.mls-pagination {
  margin-top: 10px;
  margin-bottom: 30px;
  text-align: center;
}

.pagination {
  display: inline-flex;
  padding-left: 0;
  margin: 0;
  border-radius: 4px;
  justify-content: center;
}

.pagination > li {
  display: inline;
  margin: 0 5px;
}

.pagination > li > a,
.pagination > li > span {
  color: #333;
  background-color: #f0f4f8;
  border: none;
  position: relative;
  float: left;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  padding: 0;
  margin-left: 0;
  font-size: 16px;
  border-radius: 50% !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.pagination > li > a:hover {
  background-color: #e0e0e0;
  color: #333;
}

.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover {
  z-index: 3;
  color: #fff;
  background-color: #1a2456;
  border: none !important;
  border-color: #1a2456;
  cursor: default;
  border-radius: 50% !important;
  overflow: hidden;
}

.pagination > .disabled > span {
  color: #777;
  background-color: transparent;
  cursor: not-allowed;
  width: 40px;
  height: 40px;
}

/* Correções para responsividade */
@media (max-width: 767px) {
  .property-search-banner {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .banner-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }
  
  .property-search-banner h1 {
    font-size: 28px;
  }
  
  .property-search-banner img {
    max-width: 60px;
    margin-bottom: 10px;
  }
  
  /* Barra de busca com valor específico */
  .mls-search-bar {
    margin-top: -15px;
    padding: 0 5px;
  }
  
  /* Consertando o layout da barra de filtros */
  .filter-bar {
    flex-direction: column;
    padding: 10px 15px;
  }
  
  .filter-left {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .filter-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .sort-dropdown {
    font-size: 12px;
  }
  
  /* Ajustes no contador de resultados */
  .results-counter .col-md-12 {
    padding: 0 15px;
  }
  
  .properties-found, 
  .pagination-summary {
    width: 100%;
    float: none;
    text-align: center;
    margin-bottom: 5px;
  }
  
  .results-counter {
    margin-bottom: 15px;
  }
  
  /* Ajustes nos filtros avançados */
  .search-filter-box {
    padding: 15px;
    margin-left: 15px;
    margin-right: 15px;
  }
  
  .filter-row .col-md-3,
  .filter-row .col-md-4,
  .filter-row .col-md-8,
  .filter-row .col-md-9 {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .filter-row .col-xs-6 {
    width: 50%;
    float: left;
    padding: 0 5px;
  }
  
  .reset-btn {
    margin-top: 10px;
    display: block;
    text-align: center;
  }
  
  /* Ajustes nos cards de propriedades */
  .container-fluid {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  .row {
    margin-left: -5px;
    margin-right: -5px;
  }
  
  .col-md-4, .col-sm-6, .col-md-12 {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  .property-item {
    padding: 0 15px;
    margin-bottom: 10px;
    width: 100%;
  }
  
  .property-card {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
  
  .property-details {
    justify-content: flex-start;
  }
  
  .property-details .detail {
    flex: 0 0 48%;
    margin-right: 2%;
    margin-bottom: 8px;
  }
  
  .property-mls {
    flex-direction: column;
  }
  
  .property-mls span {
    margin-bottom: 3px;
  }
  
  /* Ajuste na paginação */
  .pagination > li {
    margin: 0 2px;
  }
  
  .pagination > li > a,
  .pagination > li > span {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  /* Reduzir espaço antes da paginação */
  .mls-pagination {
    margin-top: 5px;
  }
}

.property-tour-footer {
  background-color: #f9f9f9;
  padding: 10px 15px;
  margin-top: auto;
  text-align: center;
  width: 100%;
  border-top: 1px solid #eee;
}

.virtual-tour-link,
.virtual-tour-link:visited,
.virtual-tour-link:hover,
.virtual-tour-link:active {
  background-color: #ff9800;
  color: white;
  padding: 8px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
}

.virtual-tour-link.disabled,
.virtual-tour-link.disabled:visited {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.virtual-tour-link.full-width {
  width: 100%;
  display: block;
}

.virtual-tour-link i {
  margin-right: 5px;
}

/* Estilo para imagens quebradas nos cards de propriedade */
.property-image .image-placeholder {
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.property-image .broken-image {
  display: none !important;
}
</style>

  <section class="map">
    <div class="container-fluid">
      <div class="row">
      <div class="col-md-4" style="padding: 0 15px 0 0;">
        <h2>Parceiros</h2>
          
        <p>
          Insira as suas informações abaixo para que a nossa equipe entre em contato e disponha a você um leque de oportunidades.        </p>
            
        <div class="hidden-xs">
          <strong>Nome</strong>
          <br>
          <input name="name" placeholder="Digite seu nome completo">
        </div>
        
        <div class="hidden-xs">
          <strong>Email</strong>
          <br>
          <input name="email" placeholder="Digite seu email">
        </div>
        
        <div class="row visible-xs">
          <div class="col-xs-7">
            <button class="partners-mobile">
              Quero ser parceiro            </button>
          </div>
          <div class="col-xs-5 text-left">
            <div style="margin-left: -15px;">
              <a class="link-more link-more-blue" href="https://seuimovelnaflorida.com/en/parceiros/">
                 Todos os parceiros:              </a>
            </div>
          </div>
        </div>
          
        <div class="row hidden-xs">
          <div class="col-md-12">
            <strong>Telefone</strong>
          </div>
          <div class="col-md-12">
            <input type="tel" class="mobile-number-map" id="mobile-number" style="width: 100px;" readonly>
            <input class="change-phone-map" style="float: left; width: calc(100% - 145px); margin-left: 20px;">
            <input class="phone-map" type="hidden">
            
            <input name="phone" type="hidden">
            <div style="clear: both;"></div>

            <script>
              $("#mobile-number").intlTelInput();
            </script>
          </div>

          <div class="col-md-6 col-xs-7">
            <button class="send-email-map">
              Quero ser parceiro            </button>
          </div>
          
          <div class="col-md-6 hidden-xs">
            <div style="margin-top: 15px;margin-left: -15px;">
              <a class="link-more link-more-blue" href="https://seuimovelnaflorida.com/en/parceiros/">
                Todos os parceiros:              </a>
            </div>
          </div>
          <div class="col-xs-5 text-left visible-xs">
            <div style="margin-top: 15px;margin-left: -15px;">
              <a class="link-more link-more-blue" href="https://seuimovelnaflorida.com/en/parceiros/">
                Todos os parceiros:              </a>
            </div>
          </div>
        </div>
        
      </div>

	<div class="col-md-8 col-xs-12 map-mobile" style="position: relative;">
	  <div class="map-photo">
	    	    <div class="map-pin-description text-left" map="CAN" style="left: 100px; top: 150px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>2</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 60%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="CAN" style="left: 100px; top: 150px;">
	      <div class="progress" data-percentage="60">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>CAN</span>
		    <br>
		    3		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="USA" style="left: 90px; top: 220px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>2</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 90%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="USA" style="left: 90px; top: 220px;">
	      <div class="progress" data-percentage="90">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>USA</span>
		    <br>
		    28		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="MEX" style="left: 90px; top: 300px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>4</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 30%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="MEX" style="left: 90px; top: 300px;">
	      <div class="progress" data-percentage="30">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>MEX</span>
		    <br>
		    2		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="COL" style="left: 170px; top: 360px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>4</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 30%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="COL" style="left: 170px; top: 360px;">
	      <div class="progress" data-percentage="30">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>COL</span>
		    <br>
		    2		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="BRA" style="left: 280px; top: 380px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>2</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 90%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="BRA" style="left: 280px; top: 380px;">
	      <div class="progress" data-percentage="90">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>BRA</span>
		    <br>
		    88		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="URU" style="left: 260px; top: 460px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>4</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 30%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="URU" style="left: 260px; top: 460px;">
	      <div class="progress" data-percentage="30">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>URU</span>
		    <br>
		    2		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="ARG" style="left: 200px; top: 510px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>1</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 80%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="ARG" style="left: 200px; top: 510px;">
	      <div class="progress" data-percentage="80">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>ARG</span>
		    <br>
		    4		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="POR" style="left: 370px; top: 220px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>4</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 30%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="POR" style="left: 370px; top: 220px;">
	      <div class="progress" data-percentage="30">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>POR</span>
		    <br>
		    2		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="ESP" style="left: 410px; top: 190px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>3</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 20%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="ESP" style="left: 410px; top: 190px;">
	      <div class="progress" data-percentage="20">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>ESP</span>
		    <br>
		    1		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="IND" style="left: 700px; top: 300px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>3</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 20%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="IND" style="left: 700px; top: 300px;">
	      <div class="progress" data-percentage="20">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>IND</span>
		    <br>
		    1		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map="RUS" style="left: 700px; top: 100px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>2</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 30%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map="RUS" style="left: 700px; top: 100px;">
	      <div class="progress" data-percentage="30">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span>RUS</span>
		    <br>
		    1		  </div>
		</div>
	      </div>
	    </div>
	    	    <div class="map-pin-description text-left" map=" NZL" style="left: 940px; top: 510px;">
	      <div class="map-pin-close">
          <a>
            <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/map-close.svg">
          </a>
	      </div>
	      <div class="map-pin-frame">
          <p style="font-size: 10px; margin: 0;">
                        Restam <strong>3</strong> vagas na região
                      </p>
          <div class="progress-bar-inline">
            <div class="progress-bar-inline-item" style="width: 40%;"></div>
          </div>
          <hr>
          <a href="https://seuimovelnaflorida.com/en/parceiros/" style="font-size: 10px;">
            Quero ser parceiro            <i class="fa fa-arrow-right"></i>
          </a>
	      </div>
	    </div>
	    
	    <div class="map-pin" map=" NZL" style="left: 940px; top: 510px;">
	      <div class="progress" data-percentage="40">
		<span class="progress-left">
		  <span class="progress-bar"></span>
		</span>
		<span class="progress-right">
		  <span class="progress-bar"></span>
		</span>
		<div class="progress-value">
		  <div>
		    <span> NZL</span>
		    <br>
		    2		  </div>
		</div>
	      </div>
	    </div>
	    	  </div>
	</div>
      </div>
    </div>
  </section>
  
  <section class="modal-partners-mobile modal-mobile">
    <div class="menu-mobile-close">
      <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/mobile-modal-close.svg">
    </div>
    <div class="map" style="margin: 70px 5px 0 10px;">
      <div>
        <strong>Nome</strong>
        <br>
        <input name="name-mobile" placeholder="Digite seu nome completo">
      </div>
        
      <div>
        <strong>Email</strong>
        <br>
        <input name="email-mobile" placeholder="Digite seu email">
      </div>
          
      <div>
        <div>
          <strong>Telefone</strong>
        </div>
        <div>
          <input type="tel" id="mobile-number-partner" style="width: 100px;" readonly>
          <input class="phone-item" style="float: left; width: calc(100% - 150px);">
          
          <input name="phone-mobile" type="hidden">
          <div style="clear: both;"></div>

          <script>
            $("#mobile-number-partner").intlTelInput();
          </script>
        </div>

        <div>
          <button class="send-email-mobile">
            Quero ser parceiro          </button>
        </div>
      </div>
    </div>
  </section>
  
<script>
 $('.change-phone-map').on('keyup', function() {
     $('.phone-map').val($('.mobile-number-map').val() + ' ' + $(this).val());
   });
   
  $('.partners-mobile').click(function() {
    $('.modal-partners-mobile').show();
  });
  
  $('.modal-partners-mobile .menu-mobile-close').click(function() {
    $('.modal-partners-mobile').hide();
  });
  
  $('.map-pin-close a').click(function() {
    $('.map-pin-description').hide();
  });
  
  $('.map-pin').click(function() {
    var map = $(this).attr('map');
    $('.map-pin-description').hide();
    $('.map-pin-description[map=' + map + ']').show();
  });
  
  $('.send-email-mobile').click(function() {
    var nome = $.trim($('input[name=name-mobile]').val());
    var email = $.trim($('input[name=email-mobile]').val());
    var telefone = $.trim($('#mobile-number-partner').val() + ' ' + $('.phone-item').val());
   
        if (nome == '') {
      alert('Favor preencher o nome');
      return false;
    } 
    
    if (email == '') {
      alert('Favor preencher o email');
      return false;
    } 
    
    if ($('.phone-item').val() == '') {
      alert('Favor preencher o telefone');
      return false;
    }
        
    var parameters = 'name=' + nome + '&email=' + email + '&phone=' + telefone + '&form_type=full&sys_email=' + '';
    $('.iframe-email-map').attr('src', 'https://seuimovelnaflorida.com/wp-content/themes/golden-key/views/sendmail.php' + '?' + parameters);

      });
     
 $('.send-email-map').click(function() {
    var nome = $.trim($('.map input[name=name]').val());
    var email = $.trim($('.map input[name=email]').val());
    var telefone = $.trim($('.mobile-number-map').val() + ' ' + $('.change-phone-map').val());
   
        if (nome == '') {
      alert('Favor preencher o nome');
      return false;
    } 
    
    if (email == '') {
      alert('Favor preencher o email');
      return false;
    } 
    
    if ($('.change-phone-map').val() == '') {
      alert('Favor preencher o telefone');
      return false;
    }
        
    var parameters = 'name=' + nome + '&email=' + email + '&phone=' + telefone + '&form_type=full&sys_email=' + '';
    $('.iframe-email-map').attr('src', 'https://seuimovelnaflorida.com/wp-content/themes/golden-key/views/sendmail.php' + '?' + parameters);

      });
</script>

<div style="height: 0; overflow: hidden;">
  <iframe class="iframe-email-map"></iframe>
</div>  <footer>
    <div class="container-fluid container-footer">
      <div class="col-md-7 copyright hidden-xs">
        <div style="height: 25px;"></div>
          © 2026 Golden Key Real Estate - Todos os direitos reservados.      </div>
      <div class="col-xs-6 copyright visible-xs">
        © 2026 Golden Key Real Estate 
      </div>
      
      <div class="col-xs-6 col-md-5 copyright-right">
        <div class="row">
			
          <div class="col-md-4 text-left hidden-xs">
            <div>
              USA
            </div>
            <div>
              <img class="footer-phone" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/footer-phone.png"> P: 407.801.8283 
            </div>
            <div style="height: 5px;"></div>
            <div>
              <img class="footer-phone" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/footer-phone.png"> C: 407.575.7332
            </div>
          </div>
  
          <div class="col-md-4 text-left hidden-xs">
            <div>
              BRA
            </div>
            <div>
              <img class="footer-phone" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/footer-phone.png"> SP: +55 (11) 3181-7389
            </div>
            <div style="height: 5px;"></div>
            <div>
              <img class="footer-phone" src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/footer-phone.png"> +1 (407) 406-9190
            </div>
          </div>
          
          <div class="col-md-4 text-right">
            <div style="height: 25px;" class="hidden-xs"></div>
            <a href="https://www.instagram.com/goldenkeyrealsolutions" target="_blank">
              <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/instagram.png" style="max-height: 25px; max-width: 25px;">
            </a>
            <a href="https://www.youtube.com/channel/UCb7hfi4a-hHyNqjdVYjWY6A/videos" target="_blank">
              <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/footer-youtube.svg">
            </a>
            <a href="https://www.facebook.com/gleysonpersio/" target="_blank">
              <img src="https://seuimovelnaflorida.com/wp-content/themes/golden-key/img/footer-facebook.svg">
            </a>
          </div>
        </div>
      </div>
    </div>
  </footer>
<script>
// Definir uma imagem base64 para uso como fallback (cinza claro com texto "Imóvel")
var placeholderImageBase64 = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iMzAwIiBmaWxsPSIjZjVmNWY1Ij48cmVjdCB3aWR0aD0iNDAwIiBoZWlnaHQ9IjMwMCIgZmlsbD0iI2Y1ZjVmNSIvPjx0ZXh0IHg9IjUwJSIgeT0iNTAlIiBmb250LWZhbWlseT0iQXJpYWwsIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMjAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM5OTkiPkltw7N2ZWw8L3RleHQ+PC9zdmc+';

// Função para sanitizar URLs de imagens
function sanitizeImageUrl(url) {
  if (!url) return '';
  
  // Remover aspas no início e fim
  url = url.trim().replace(/^["']+|["']+$/g, '');
  
  // Garantir que a URL seja absoluta
  if (url.indexOf('://') === -1 && url.substring(0, 2) !== '//') {
    // Se não começar com protocolo, considerar URL relativa ao servidor
    return url;
  }
  
  return url;
}

// Função para tratar erros de imagem - DEVE estar no escopo global
function handleImageError(event) {
  window.useNextImage(event.target);
}

// Função para carregar a próxima imagem quando uma falha
// Esta função precisa ser global para ser acessada pelo onerror
window.useNextImage = function(imgElement) {
  // Tentar obter o array de imagens do elemento
  var allImages = [];
  
  try {
    if (imgElement.dataset && imgElement.dataset.allImages) {
      allImages = imgElement.dataset.allImages.split('|');
    }
  } catch (e) {
    console.error('Erro ao processar imagens:', e);
  }
  
  // Sanitizar todas as URLs do array
  allImages = allImages.map(sanitizeImageUrl);
  
  // Obter o índice atual
  var currentIndex = parseInt(imgElement.dataset.currentIndex || '0');
  
  // Incrementar índice
  var nextIndex = currentIndex + 1;
  
  // Se ainda houver uma imagem disponível, tentar a próxima
  if (nextIndex < allImages.length) {
    imgElement.dataset.currentIndex = nextIndex;
    imgElement.src = allImages[nextIndex];
    return true;
  } else {
    // Sem mais imagens, mostrar placeholder
    imgElement.style.display = 'none';
    
    // Verificar se o elemento já tem um placeholder
    if (!imgElement.parentNode.querySelector('.image-placeholder')) {
      var placeholder = document.createElement('div');
      placeholder.className = 'image-placeholder';
      placeholder.innerHTML = '<img src="' + placeholderImageBase64 + '" alt="Imóvel" style="width: 100%; height: 100%; object-fit: cover;">';
      imgElement.parentNode.appendChild(placeholder);
    }
    
    return false;
  }
};

jQuery(document).ready(function($) {
  // O filtro começa fechado por padrão
  $('.search-filter-box').hide();
  
  // Função para formatar números com separador de milhares
  function formatNumber(number) {
    return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  }
  
  // Alternar o filtro ao clicar no botão de abrir/fechar
  $('.open-filter-btn').click(function() {
    $('.search-filter-box').slideToggle(300);
    // Alternar entre OPEN e CLOSE
    if ($(this).text().includes('OPEN') || $(this).text().includes('ABRIR')) {
      $(this).html('FECHAR <i class="fas fa-minus"></i>');
    } else {
      $(this).html('ABRIR <i class="fas fa-plus"></i>');
    }
  });
  
  // Alternativa para abrir filtro ao clicar no botão principal
  $('.filter-properties-btn').click(function() {
    $('.search-filter-box').slideToggle(300);
    // Alternar entre OPEN e CLOSE no outro botão também
    if ($('.open-filter-btn').text().includes('OPEN') || $('.open-filter-btn').text().includes('ABRIR')) {
      $('.open-filter-btn').html('FECHAR <i class="fas fa-minus"></i>');
    } else {
      $('.open-filter-btn').html('ABRIR <i class="fas fa-plus"></i>');
    }
  });
  
  // Função para carregar propriedades
  function loadProperties(page = 1) {
    // Mostrar carregamento
    $('.loading-properties').show();
    $('.no-properties').hide();
    
    // Ocultar o contador de resultados e a paginação durante o carregamento
    $('.results-counter').hide();
    $('.mls-pagination').hide();
    
    // Limpar completamente o container de propriedades para evitar acúmulo de margens
    $('#properties-container .property-item').remove();
    $('#properties-container .property-row').remove();
    
    // Atualizar página atual
    $('#current-page').val(page);
    
    // Serializar o formulário
    var formData = $('#mls-search-form').serialize();
    
    // Fazer a requisição AJAX
    $.ajax({
      url: 'https://seuimovelnaflorida.com/wp-content/themes/golden-key/ajax/properties-ajax.php',
      type: 'POST',
      data: formData,
      dataType: 'json',
      success: function(response) {
        // Esconder carregamento
        $('.loading-properties').hide();
        
        if (response.success) {
          // Atualizar contadores
          $('.result-count-number').text(formatNumber(response.total));
          var totalPages = Math.ceil(response.total / 12);
          $('.total-pages').text(formatNumber(totalPages));
          $('.pagination-summary span:first').text(page);
          
          // Mostrar a área de contadores
          $('.results-counter').show();
          
          if (response.properties.length > 0) {
            // Renderizar propriedades
            var rowCounter = 0;
            var $row = $('<div class="row property-row" data-row="' + rowCounter + '"></div>');
            $('#properties-container').append($row);
            
            $.each(response.properties, function(index, property) {
              // Criar novo row a cada 3 itens
              if (index > 0 && index % 3 === 0) {
                rowCounter++;
                $row = $('<div class="row property-row" data-row="' + rowCounter + '"></div>');
                $('#properties-container').append($row);
              }
              
              // Sanitizar as URLs das imagens
              if (property.image) {
                property.image = sanitizeImageUrl(property.image);
              }
              
              if (property.all_images && Array.isArray(property.all_images)) {
                property.all_images = property.all_images.map(sanitizeImageUrl);
              }
              
              // Preparar array de imagens
              var allImages = [];
              if (property.image) {
                allImages.push(property.image);
              }
              if (property.all_images && Array.isArray(property.all_images)) {
                allImages = allImages.concat(property.all_images);
              }
              
              // Remover duplicatas do array
              allImages = [...new Set(allImages)];
              
              // Unir imagens em uma string usando | como separador para data attribute
              var allImagesString = allImages.join('|');
              
              // Traduzir o status
              var statusText = property.status;
              if (statusText.toLowerCase() === 'active' && 'pt' === 'pt') {
                statusText = 'Ativo';
              }
              
              // Definir texto para badge "New"
              var newText = 'pt' === 'pt' ? 'Novo' : 'New';
              
              // Converter SqFt para m² se o idioma for português
              var displaySqft = property.sqft;
              if ('pt' === 'pt' && property.sqft) {
                // Verificar se já está no formato m² ou ainda está em SqFt
                if (property.sqft.indexOf('SqFt') > -1) {
                  // Extrair o número da string
                  var sqftValue = parseInt(property.sqft.replace(/,/g, ''));
                  if (!isNaN(sqftValue)) {
                    // Converter para m² (1 sqft = 0.092903 m²) e formatar com separador de milhar
                    var m2Value = Math.round(sqftValue * 0.092903);
                    displaySqft = m2Value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".") + ' m²';
                  }
                }
              } else if ('pt' === 'en' && property.sqft) {
                // Para inglês, remover o SqFt e deixar apenas o número
                if (property.sqft.indexOf('SqFt') > -1) {
                  displaySqft = property.sqft.replace(' SqFt', '');
                }
              }
              
              // Traduzir o tipo de propriedade
              var propertyType = property.property_type || 'Residential';
              if ('pt' === 'pt') {
                if (propertyType === 'Residential') {
                  propertyType = 'Residencial';
                }
              }
              
              var propertyHtml = `
                <div class="col-md-4 col-sm-6 property-item">
                  <div class="property-card">
                    <a href="https://seuimovelnaflorida.com/en/detalhes-da-propriedade/?id=${property.id}" style="text-decoration: none; color: inherit; display: block;">
                      <div class="property-image">
                        ${allImages.length > 0 ? 
                          `<img src="${sanitizeImageUrl(allImages[0])}" 
                              alt="${property.address}" 
                              data-all-images="${allImagesString}" 
                              data-current-index="0" 
                              onerror="handleImageError(event)" 
                              style="width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; z-index: 1;">` :
                          
                          // Se não tiver nenhuma imagem
                          `<div class="image-placeholder"><img src="${placeholderImageBase64}" alt="Imóvel" style="width: 100%; height: 100%; object-fit: cover;"></div>`
                        }
                        <div class="property-price">
                          <span>${property.price}</span>
                        </div>
                        <div class="status-badge ${property.days <= 14 ? 'new' : 'active'}">
                          ${property.days <= 14 ? newText : statusText}
                        </div>
                      </div>
                      <div class="property-info">
                        <div class="property-address">
                          ${property.address}
                        </div>
                        <div class="property-city">
                          ${property.city}, ${property.state}
                        </div>
                        <div class="property-type">
                          ${propertyType}
                        </div>
                        <div class="property-subdivision">
                          <i class="fas fa-building" style="color: #1F77FF; margin-right: 5px;"></i>
                          <span>${property.subdivision || 'Sem condomínio'}</span>
                        </div>
                        <div class="property-details">
                          <div class="detail">
                            <i class="fas fa-bed"></i>
                            <span>${property.beds}</span>
                          </div>
                          <div class="detail">
                            <i class="fas fa-bath"></i>
                            <span>${property.baths}</span>
                          </div>
                          <div class="detail">
                            <i class="fas fa-expand-arrows-alt"></i>
                            <span>${displaySqft}</span>
                          </div>
                          <div class="detail">
                            <i class="fas fa-calendar-alt"></i>
                            <span>${property.built}</span>
                          </div>
                          <div class="detail">
                            <i class="fas fa-clock"></i>
                            <span>${property.days} dias</span>
                          </div>
                        </div>
                        <div class="property-mls">
                          <span>MLS# ${property.id}</span>
                          <span class="updated-text">Atualizado ${new Date().toLocaleDateString()}</span>
                        </div>
                      </div>
                    </a>
                    <div class="property-tour-footer">
                      ${property.virtual_tour ? 
                        `<a href="${sanitizeImageUrl(property.virtual_tour)}" target="_blank" class="virtual-tour-link full-width" onclick="event.stopPropagation()">
                           <i class="fas fa-video"></i> TOUR VIRTUAL                         </a>` : 
                        `<a href="#" class="virtual-tour-link disabled full-width" onclick="event.stopPropagation()">
                           <i class="fas fa-video"></i> TOUR VIRTUAL                         </a>`
                      }
                    </div>
                  </div>
                </div>
              `;
              
              $row.append(propertyHtml);
            });
            
            // Adicionar o handler para erros de imagem
            $('.property-image img').on('error', handleImageError);
            
            // Equalizar altura dos cards depois que eles são renderizados
            setTimeout(function() {
              equalizeCardHeights();
            }, 100);
            
            // Renderizar paginação
            renderPagination(response.total, page);
            
            // Mostrar a paginação
            $('.mls-pagination').show();
          } else {
            // Mostrar mensagem de nenhuma propriedade encontrada
            $('.no-properties').show();
            // Esconder a área de contadores e paginação quando não há resultados
            $('.results-counter').hide();
            $('.mls-pagination').hide();
          }
        } else {
          // Mostrar mensagem de erro
          alert(response.message || 'Erro ao carregar propriedades.');
        }
      },
      error: function() {
        // Esconder carregamento
        $('.loading-properties').hide();
        // Mostrar mensagem de erro
        alert('Erro ao conectar ao servidor. Por favor, tente novamente.');
      }
    });
  }
  
  // Função para equalizar a altura dos cards
  function equalizeCardHeights() {
    // Resetar alturas anteriores
    $('.property-card').css('height', 'auto');
    
    // Verificar se não é mobile antes de equalizar alturas
    if ($(window).width() > 767) {
      // Processar por linha
      $('.property-row').each(function() {
        var maxHeight = 0;
        
        // Encontrar altura máxima na linha
        $(this).find('.property-card').each(function() {
          var height = $(this).outerHeight();
          if (height > maxHeight) {
            maxHeight = height;
          }
        });
        
        // Aplicar altura máxima a todos os cards na linha
        if (maxHeight > 0) {
          $(this).find('.property-card').height(maxHeight);
        }
      });
    }
  }
  
  // Recalcular alturas quando a janela é redimensionada
  $(window).resize(function() {
    equalizeCardHeights();
  });
  
  // Função para renderizar a paginação
  function renderPagination(total, currentPage) {
    var pagesTotal = Math.ceil(total / 12); // 12 items per page
    var paginationHtml = '';
    
    if (pagesTotal > 1) {
      // Sempre mostrar a primeira página
      if (currentPage === 1) {
        paginationHtml += `<li class="active"><a href="#" data-page="1">1</a></li>`;
      } else {
        paginationHtml += `<li><a href="#" data-page="1">1</a></li>`;
      }
      
      // Mostrar no máximo 3 páginas no meio (total de 5 itens visíveis com primeira e última)
      var startPage = Math.max(2, currentPage - 1);
      var endPage = Math.min(pagesTotal - 1, startPage + 1);
      
      // Ajustar startPage se endPage estiver perto do fim
      if (endPage < startPage + 1 && startPage > 2) {
        startPage = Math.max(2, pagesTotal - 2);
      }
      
      // Adicionar reticências após primeira página se necessário
      if (startPage > 2) {
        paginationHtml += `<li class="disabled"><span>...</span></li>`;
      }
      
      // Mostrar as páginas intermediárias (no máximo 3)
      for (var i = startPage; i <= endPage; i++) {
        if (i === currentPage) {
          paginationHtml += `<li class="active"><a href="#" data-page="${i}">${i}</a></li>`;
        } else {
          paginationHtml += `<li><a href="#" data-page="${i}">${i}</a></li>`;
        }
      }
      
      // Adicionar reticências antes da última página se necessário
      if (endPage < pagesTotal - 1) {
        paginationHtml += `<li class="disabled"><span>...</span></li>`;
      }
      
      // Sempre mostrar a última página
      if (currentPage === pagesTotal) {
        paginationHtml += `<li class="active"><a href="#" data-page="${pagesTotal}">${pagesTotal}</a></li>`;
      } else {
        paginationHtml += `<li><a href="#" data-page="${pagesTotal}">${pagesTotal}</a></li>`;
      }
    }
    
    $('#pagination-container').html(paginationHtml);
    
    // Adicionar evento de clique na paginação
    $('#pagination-container a').click(function(e) {
      e.preventDefault();
      var page = $(this).data('page');
      loadProperties(page);
      // Rolar para o topo da seção de resultados
      $('html, body').animate({
        scrollTop: $('.results-counter').offset().top - 100
      }, 500);
    });
  }
  
  // Eventos
  
  // Submissão do formulário
  $('#mls-search-form').submit(function(e) {
    e.preventDefault();
    loadProperties(1);
  });
  
  // Ordenação
  $('.mls-sort-select').change(function() {
    $('#current-sort').val($(this).val());
    loadProperties($('#current-page').val());
  });
  
  // Resetar formulário
  $('#reset-form').click(function(e) {
    e.preventDefault();
    $('#mls-search-form')[0].reset();
    $('#current-page').val(1);
    $('#current-sort').val('price-desc');
    $('.mls-sort-select').val('price-desc');
    loadProperties(1);
  });
  
  // Carregar propriedades ao iniciar
  loadProperties(1);
  
  // Evitar que cliques nos links desabilitados façam qualquer coisa
  $(document).on('click', '.virtual-tour-link.disabled', function(e) {
    e.preventDefault();
  });
});
</script>{"id":6417,"date":"2025-05-08T16:18:27","date_gmt":"2025-05-08T16:18:27","guid":{"rendered":"http:\/\/seuimovelnaflorida.com\/busca-mls"},"modified":"2025-05-08T16:18:27","modified_gmt":"2025-05-08T16:18:27","slug":"busca-mls","status":"publish","type":"page","link":"https:\/\/seuimovelnaflorida.com\/en\/busca-mls\/","title":{"rendered":"Busca MLS"},"content":{"rendered":"\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-6417","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Busca MLS - Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/seuimovelnaflorida.com\/busca-mls\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Busca MLS - Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva\" \/>\n<meta property=\"og:url\" content=\"https:\/\/seuimovelnaflorida.com\/busca-mls\/\" \/>\n<meta property=\"og:site_name\" content=\"Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/seuimovelnaflorida.com\/busca-mls\/\",\"url\":\"https:\/\/seuimovelnaflorida.com\/busca-mls\/\",\"name\":\"Busca MLS - Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva\",\"isPartOf\":{\"@id\":\"\/#website\"},\"datePublished\":\"2025-05-08T16:18:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/seuimovelnaflorida.com\/busca-mls\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/seuimovelnaflorida.com\/busca-mls\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/seuimovelnaflorida.com\/busca-mls\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/seuimovelnaflorida.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Busca MLS\"}]},{\"@type\":\"WebSite\",\"@id\":\"\/#website\",\"url\":\"\/\",\"name\":\"Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva\",\"description\":\"Realtor\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Busca MLS - Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/seuimovelnaflorida.com\/busca-mls\/","og_locale":"en_US","og_type":"article","og_title":"Busca MLS - Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva","og_url":"https:\/\/seuimovelnaflorida.com\/busca-mls\/","og_site_name":"Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/seuimovelnaflorida.com\/busca-mls\/","url":"https:\/\/seuimovelnaflorida.com\/busca-mls\/","name":"Busca MLS - Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva","isPartOf":{"@id":"\/#website"},"datePublished":"2025-05-08T16:18:27+00:00","breadcrumb":{"@id":"https:\/\/seuimovelnaflorida.com\/busca-mls\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/seuimovelnaflorida.com\/busca-mls\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/seuimovelnaflorida.com\/busca-mls\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/seuimovelnaflorida.com\/"},{"@type":"ListItem","position":2,"name":"Busca MLS"}]},{"@type":"WebSite","@id":"\/#website","url":"\/","name":"Im\u00f3veis em Orlando, Miami, Florida - Casas e apartamentos - Gleyson Persio Silva","description":"Realtor","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/seuimovelnaflorida.com\/en\/wp-json\/wp\/v2\/pages\/6417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seuimovelnaflorida.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/seuimovelnaflorida.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/seuimovelnaflorida.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seuimovelnaflorida.com\/en\/wp-json\/wp\/v2\/comments?post=6417"}],"version-history":[{"count":0,"href":"https:\/\/seuimovelnaflorida.com\/en\/wp-json\/wp\/v2\/pages\/6417\/revisions"}],"wp:attachment":[{"href":"https:\/\/seuimovelnaflorida.com\/en\/wp-json\/wp\/v2\/media?parent=6417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}