@php
  $nFotos = $fotosEmp->count();
  //dd($nFotos);
@endphp
@if ($nFotos > 0)
  <section class="page-section" id="fotoemp" >
  <div class="container">
{{--    <h1 class="font-weight-light text-center mt-4 mb-0">Galeria</h1>--}}
{{--    <hr class="mt-2 mb-5">--}}
    <div class="row text-center ">
        @foreach ($fotosEmp as $fotoEmp)
          @if ($nFotos === 4)
            <div class="col-lg-3 col-md-4 col-6">
          @elseif ($nFotos === 3)
            <div class="col-lg-4 col-md-4 col-6">
          @elseif($nFotos === 2)
            <div class="col-lg-6 col-md-6 col-6">
          @else
            <div class="col-lg-12 col-md-12 col-12">
          @endif
            <a class="d-block mb-4 h-100 fotoEmp">
              <img class="img-fluid img-thumbnail" src="{{$fotoEmp->caminho}}" alt=""
              data-toggle="modal" data-target="#modalemp{{$fotoEmp->id}}">
            </a>
          </div>
          {{-- modal --}}
          <div class="modal fade modalfotoemp" id="modalemp{{$fotoEmp->id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg" role="document">
              <!--Content-->
              <div class="modal-content">
                <div class="modal-header text-center text-uppercase">
                  {{$fotoEmp->titulo}}
                </div>
                <!--Body-->
                <div class="modal-body mb-0 p-0">
                  <center>
                    <img class="img-fluid img-thumbnail" src="{{$fotoEmp->caminho}}" alt="{{$fotoEmp->titulo}}">
                  </center>
                </div>
                <!--Footer-->
                <div class="modal-footer justify-content-center">
                <button type="button" class="btn btn-outline-primary btn-rounded btn-md ml-4" data-dismiss="modal">Fechar</button>
                </div>
              </div>
              <!--/.Content-->
            </div>
          </div>
        @endforeach
    </div>
  </div>


  </section>
@endif
