<footer class="bg-gray-100">
  <div class="wrapper py-12 md:py-20">
    <div class="grid grid-cols-1 md:grid-cols-3 gap-10">
      <div>
        <img class="w-1/3" src="<?= base_url('assets/site/images/company/transp-tempo-logomarca-resized.png') ?>" alt="<?= $companyInformations->fantasy_name ?>">
        <p class="text-sm text-dark mt-6"><?= $companyInformations->footer_text ?></p>
      </div>
      <div>
        <h3 class="uppercase text-dark font-semibold">Entre em contato</h3>
        <div class="mt-4 flex items-center">
          <i class="text-primary mr-4" data-feather="phone"></i>
          <div>
            <p class="text-sm"><?= $companyInformations->phone ?></p>
            <?php if (!empty($companyInformations->whatsapp)) : ?>
              <p class="text-sm"><?= $companyInformations->whatsapp ?></p>
            <?php endif ?>
          </div>
        </div>
        <div class="mt-4 flex items-center">
          <i class="text-primary mr-4" data-feather="mail"></i>
          <div>
            <a href="mailto:<?= $companyInformations->email ?>">
              <p class="text-sm"><?= $companyInformations->email ?></p>
            </a>
          </div>
        </div>
        <div class="mt-4 flex items-center">
          <i class="text-primary mr-4" data-feather="map-pin"></i>
          <div>
            <p class="text-sm"><?= $companyInformations->address ?></p>
          </div>
        </div>
      </div>
      <div>
        <?php if (isset($socialMedias) && is_array($socialMedias) && count($socialMedias) > 0) : ?>
        <h3 class="uppercase text-dark font-semibold">Redes sociais</h3>
        <div class="flex items-center flex-wrap mt-4">
          <?php if (!empty($companyInformations->whatsapp)) : ?>
            <a href="https://api.whatsapp.com/send?phone=<?= $companyInformations->whatsapp ?>&text=Olá, encontrei o contato de vocês no site" target="_blank">
              <div class="text-center border border-dark p-1 mr-2 grid place-items-center">
                <i class="text-2xl w-6 fab fa-whatsapp"></i>
              </div>
            </a>
          <?php endif ?>
          <?php foreach ($socialMedias as $socialMedia) : ?>
            <a href="<?= $socialMedia->link ?>" target="_blank">
              <div class="border border-dark p-1 mr-2">  
                <img class="w-6" src="<?= base_url('assets/uploads/images/social-medias/' . $socialMedia->icon) ?>" alt="<?= $socialMedia->title ?>">
              </div>
            </a>
          <?php endforeach ?>
        </div>
        <?php endif ?>
      </div>
    </div>
  </div>
  <div class="bg-gray-200 py-4">
    <div class="wrapper grid grid-cols-1 md:grid-cols-2">
      <div class="flex items-center">
        <p class="text-sm text-center">
          <span class="text-primary font-semibold"><?= $companyInformations->fantasy_name ?></span> -  Todos os direitos reservados.
        </p>
      </div>
      <div class="mt-4 md:mt-0 flex items-center justify-center md:justify-end">
        <a class="text-xs font-medium text-dark flex items-center" href="https://www.pontoagencia.com.br/" target="_blank">
          Desenvolvido por
          <img class="ml-2 w-10 rounded-full" src="<?= base_url('assets/site/images/company/logo-agencia-ponto-white.png') ?>" alt="Agência Ponto">
        </a>
      </div>
    </div>
  </div>
</footer>