<style>
   #preloader {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: #000; /* Cor de fundo preto */
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 9999;
   }
   #preloader {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: #000; /* Cor de fundo preto */
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 9999;
   opacity: 1; /* Inicialmente opaco */
   transition: opacity 1s; /* Adiciona uma transição suave */
   }
   #loader {
   border: 8px solid #f3f3f3;
   border-top: 8px solid #3498db;
   border-radius: 50%;
   width: 50px;
   height: 50px;
   animation: spin 2s linear infinite;
   }
   #logo {
   max-width: 350px; /* Defina o tamanho da sua logo */
   }
</style>

<!-- <div id="preloader">
   <img id="logo" src="<?php echo $config[0]->logo ?>">
</div> -->
<!-- Começa Aqui -->
<div class="main-content home">

   <?php if ($this->session->flashdata('msg')): ?> 					
   <div class="col-md-12 mt-3 mb-3">
      <div class="alert alert-<?= $this->session->flashdata('tipo'); ?> font alert-dismissible fade show" role="alert">
         <?= $this->session->flashdata('msg'); ?>
      </div>
   </div>
   <?php endif; ?>
   <div class="main_banner-wrapper mb-24">
      <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
         <div class="carousel-inner">
            <?php

               $active = true; 
               
               foreach ($banners as $banner) {

                   $class = $active ? 'active' : '';
                   echo '<div class="carousel-item ' . $class . '">';
                   echo '<a href="' . $banner->link . '"><img src="' . $banner->image . '" class="d-block w-100"></a>';
                   echo '</div>';
                   $active = false;
               }
               ?>
         </div>
      </div>
   </div>


   <div class="container-medium">
   <div class="main-sublinks-wrapper">
      <div class="eng-sublinks-2">
         <a href="<?= base_url(); ?>cassino" class="sublink w-inline-block" data-ix="hover-stroke-sublink">
            <div class="eng-stroke-icon-sublink mb-8">
               <div class="eng-icon-sublink">
                  <div class="icon-20"><i class="fa-solid fa-fire fa-lg"></i></div>
               </div>
               <div class="stroke-icon-sublink"></div>
            </div>
            <div class="white"><?php echo lang('popular_title'); ?></div>
         </a>
        <!-- <a href="<?= base_url(); ?>cassino/aovivo" class="sublink w-inline-block" data-ix="hover-stroke-sublink">
            <div class="eng-stroke-icon-sublink mb-8">
               <div class="eng-icon-sublink">
                  <div class="icon-20"></div>
               </div>
               <div class="stroke-icon-sublink"></div>
            </div>
            <div class="white"><?php echo lang('live_roulette'); ?></div>
         </a>-->
         <a href="<?= base_url(); ?>cassino" class="sublink w-inline-block" data-ix="hover-stroke-sublink">
            <div class="eng-stroke-icon-sublink mb-8">
               <div class="eng-icon-sublink">
                  <div class="icon-20"></div>
               </div>
               <div class="stroke-icon-sublink"></div>
            </div>
            <div class="white"><?php echo lang('casino'); ?></div>
         </a>
          <!--<a href="<?= base_url(); ?>cassino/aovivo" class="sublink w-inline-block" data-ix="hover-stroke-sublink">
            <div class="eng-stroke-icon-sublink mb-8">
               <div class="eng-icon-sublink">
                  <div class="icon-20"></div>
               </div>
               <div class="stroke-icon-sublink"></div>
            </div>
            <div class="white"><?php echo lang('live_casino'); ?></div>
         </a>
        <a href="<?= base_url(); ?>cassino/blackjack" class="sublink w-inline-block" data-ix="hover-stroke-sublink">
            <div class="eng-stroke-icon-sublink mb-8">
               <div class="eng-icon-sublink">
                  <div class="icon-20"></div>
               </div>
               <div class="stroke-icon-sublink"></div>
            </div>
            <div class="white"><?php echo lang('blackjack'); ?></div>
         </a>
         <a href="<?= base_url(); ?>cassino/bacara" class="sublink w-inline-block" data-ix="hover-stroke-sublink">
            <div class="eng-stroke-icon-sublink mb-8">
               <div class="eng-icon-sublink">
                  <div class="icon-20"></div>
               </div>
               <div class="stroke-icon-sublink"></div>
            </div>
            <div class="white"><?php echo lang('baccarat'); ?></div>
         </a>-->
        
         <a href="<?= base_url(); ?>cassino" class="sublink w-inline-block" data-ix="hover-stroke-sublink">
            <div class="eng-stroke-icon-sublink mb-8">
               <div class="eng-icon-sublink">
                  <div class="icon-20"></div>
               </div>
               <div class="stroke-icon-sublink"></div>
            </div>
            <div class="white"><?php echo lang('all_games'); ?></div>
         </a>
      </div>
   </div>
   <section id="best" class="main_search-wrapper no-mobile">
  
   <div>
      <form class="form-search" action="<?= base_url(); ?>cassino/buscar" method="post">
         <div class="eng-text-field-2 mb-16">
            <input type="text" class="input w-input" name="game" placeholder="Pesquisar">
            <div class="icon-field"></div>
         </div>
      </form>
   </div>
   </section>
   <section id="best" class="main_slots-wrapper">
      <div class="main_providers-wrapper mb-32">
         <div class="eng-title">
            <div class="left-title">
               <h4 class="icon-20 txt-yellow"></h4>
               <h4 class="white">Provedores</h4>
            </div>
            <a href="<?= base_url(); ?>cassino" class="link-more-games w-inline-block">
               <div>Ver todos</div>
               <div class="icon-12 txt-yellow"></div>
            </a>
         </div>
         <div class="providers_marquee-animate">
            <div class="providers_marquee-wrapper">
               <div class="w-dyn-list" data-ix="slide-providers">
                  <div role="list" class="slide_providers-wrapper w-dyn-items">
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/pgsoft')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://assets.website-files.com/6483631a773f6af2b4edabee/648482e06bff1a3a6f0c4142_6483573cb9f4c96d173ae194_pgsoft_logo.webp" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/pragmatic')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://assets.website-files.com/6483631a773f6af2b4edabee/648482e03bdb661f627e3a69_6467c128c29c3a41815fc059_6462efc30b20c32f4426868e_64304b388d4e76c1ec12f4b6_pragmaticplay.webp" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/ezugi')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://assets.website-files.com/6483631a773f6af2b4edabee/648482e0841d2b143a9b2513_6467c12720bde25bd0b5676f_6462efc30b20c32f44268616_64306dee11af0d16597fa258_ezugi_logo.webp" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/evolution')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://assets.website-files.com/6483631a773f6af2b4edabee/648482e06bff1a3a6f0c404d_6467c12761aea91fe8104131_6462efc30b20c32f4426868f_evolution_logo.webp" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/evoplay')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://assets.website-files.com/6483631a773f6af2b4edabee/648482e0d2d5dd77dbd85f05_6467c1275a178810791a07a4_6462efc30b20c32f44268690_64306dc511af0d5c527f9bc8_evoplay_logo.webp" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/habanero')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://kto.kgp-cdn.com/kto/2023/11/20134457/Habanero-654ce4d164e0d.svg" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/BOOONGO')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://kto.kgp-cdn.com/kto/2023/11/20134516/BoomingGames-654ce4c3b2a37.svg" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/PLAYSON')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://kto.kgp-cdn.com/kto/2023/11/20134634/Playson-Logo-654ce4871142a.svg" class="logo-provider"></a></div>
                     <div role="listitem" class="w-dyn-item"><a href="<?=base_url('cassino/provedor/REELKINGDOM')?>" class="eng-item-provider w-inline-block"><img loading="eager" alt="" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSPGDlLfUlrtictSLS7tbLJW_9Wy1uPmDlNH8aga3nbsQ&s" class="logo-provider"></a></div>
                  </div>
               </div>
            </div>
         </div>
      </div> 
       <div class="eng-title mb-8">
         <div class="left-title">
            <h4 class="txt-yellow"><i class="fa-solid fa-fire fa-lg"></i></h4>
            <h4 class="white"><?php echo lang('popular_title'); ?></h4>
         </div>
      </div>
      <div class="w-dyn-list">
         <div fs-cmsfilter-duration="50" fs-cmsload-mode="infinite" class="eng-slots-int _6 w-dyn-items" fs-cmsfilter-tagformat="category" fs-cmsfilter-element="list" role="list" fs-cmssort-element="list" fs-cmsload-element="list" fs-cmsfilter-showquery="true">
            <?php foreach ($populares as $p): ?>
            <div role="listitem" class="item-game w-dyn-item">
               <a href="<?php echo base_url('games/ver/'.$p->provider.'/'.$p->game_code); ?>" class="link-game w-inline-block" data-ix="hover-play-game">
                  <img loading="eager" img-slot-game="" src="<?php echo $p->banner; ?>" alt="" class="slot-game">
                  <div fs-cmsfilter-field="name" fs-cmssort-field="name" class="name-game"><?php echo $p->game_name; ?></div>
                  <div fs-cmsfilter-field="name" fs-cmssort-field="name" class="name-game"><?php echo $p->provider; ?></div>
                  <div class="eng-light-effetct w-condition-invisible" data-ix="light-effect-slot"><img src="https://assets.website-files.com/6483631a773f6af2b4edabab/64c2a7770457de14173a580e_reflect.webp" loading="eager" sizes="(max-width: 479px) 9vw, (max-width: 767px) 18.3671875px, (max-width: 991px) 2vw, (max-width: 1279px) 18.3671875px, 1vw" srcset="https://assets.website-files.com/6483631a773f6af2b4edabab/64c2a7770457de14173a580e_reflect-p-500.png 500w, https://assets.website-files.com/6483631a773f6af2b4edabab/64c2a7770457de14173a580e_reflect-p-800.png 800w, https://assets.website-files.com/6483631a773f6af2b4edabab/64c2a7770457de14173a580e_reflect.webp 1148w" alt="" class="reflect-slot" style="transform-style: preserve-3d; opacity: 0; transform: translateX(-150%) translateY(0px) translateZ(0px);"></div>
                  <div class="light-effect-slot w-condition-invisible"></div>
                  <div class="light-effect-slot-blur w-condition-invisible"></div>
               </a>
            </div>
            <?php endforeach; ?>
         </div>
         <div role="navigation" aria-label="List" class="w-pagination-wrapper pagination"></div>
      </div>
   </section>
  <!--   <div class="main_games-wrapper">
    <div class="eng-sublinks mb-32">
         <a href="<?= base_url(); ?>games/ver/PGSOFT/fortune-gods" class="btn-small w-inline-block">
            <div class="no-wrap">Fortune Gods</div>
         </a>
         <a href="<?= base_url(); ?>games/ver/PGSOFT/fortune-mouse" class="btn-small w-inline-block">
            <div class="no-wrap">Fortune Mouse</div>
         </a>
         <a href="<?= base_url(); ?>games/ver/PGSOFT/fortune-ox" class="btn-small w-inline-block">
            <div class="no-wrap">Fortune Ox</div>
         </a>
         <a href="<?= base_url(); ?>games/ver/PGSOFT/fortune-tiger" class="btn-small w-inline-block">
            <div class="no-wrap">Fortune Tiger</div>
         </a>
      </div>
   </div>-->
   <section id="cassino" class="main_slots-wrapper">
      <div class="eng-title mb-8">
         <div class="left-title">
            <h4 class="icon-20 txt-yellow"></h4>
            <h4 class="white"><?php echo lang('casino'); ?></h4>
         </div>
         <a href="<?= base_url(); ?>cassino" class="link-more-games w-inline-block">
            <div><?php echo lang('see_all'); ?></div>
            <div class="icon-12 txt-yellow"></div>
         </a>
      </div>
      <div class="w-dyn-list">
         <div fs-cmsfilter-duration="50" fs-cmsload-mode="infinite" class="eng-slots-int _6 w-dyn-items" fs-cmsfilter-tagformat="category" fs-cmsfilter-element="list" role="list" fs-cmssort-element="list" fs-cmsload-element="list" fs-cmsfilter-showquery="true">
            <?php foreach ($jogos as $p): ?>
            <div role="listitem" class="item-game w-dyn-item">
               <a href="<?php echo base_url('games/ver/'.$p->provider.'/'.$p->game_code); ?>" class="link-game w-inline-block" data-ix="hover-play-game">
                  <img loading="eager" img-slot-game="" src="<?php echo $p->banner; ?>" alt="" class="slot-game">
                  <div fs-cmsfilter-field="name" fs-cmssort-field="name" class="name-game"><?php echo $p->game_name; ?></div>
                  <div fs-cmsfilter-field="name" fs-cmssort-field="name" class="name-game"><?php echo $p->provider; ?></div>
               </a>
            </div>
            <?php endforeach; ?> 
         </div>
      </div>
   </section>
   <section id="ao-vivo" class="main_slots-wrapper">
      <div class="eng-title mb-8">
         <div class="left-title">
            <h4 class="icon-20 txt-yellow"></h4>
            <h4 class="white"><?php echo lang('live_casino'); ?></h4>
         </div>
         <a href="<?= base_url(); ?>cassino/aovivo" class="link-more-games w-inline-block">
            <div><?php echo lang('see_all'); ?></div>
            <div class="icon-12 txt-yellow"></div>
         </a>
      </div>
      <div class="w-dyn-list">
         <div fs-cmsfilter-duration="50" fs-cmsload-mode="infinite" class="eng-slots-int _6 w-dyn-items" fs-cmsfilter-tagformat="category" fs-cmsfilter-element="list" role="list" fs-cmssort-element="list" fs-cmsload-element="list" fs-cmsfilter-showquery="true">
            <?php foreach ($aovivo as $p): ?>
            <div role="listitem" class="item-game w-dyn-item">
               <a href="<?php echo base_url('games/ver/'.$p->provider.'/'.$p->game_code); ?>" class="link-game w-inline-block" data-ix="hover-play-game">
                  <img loading="eager" img-slot-game="" src="<?php echo $p->banner; ?>" alt="" class="slot-game">
                  <div fs-cmsfilter-field="name" fs-cmssort-field="name" class="name-game"><?php echo $p->game_name; ?></div>
                  <div fs-cmsfilter-field="name" fs-cmssort-field="name" class="name-game"><?php echo $p->provider; ?></div>
               </a>
               <div class="coming-soon-alert w-condition-invisible">Em breve!</div>
            </div>
            <?php endforeach; ?>
         </div>
      </div>
   </section>
</div>
<script>
   window.addEventListener('load', function () {
       var preloader = document.getElementById('preloader');
   
       setTimeout(function() {
           preloader.style.display = 'none';
       }, 5);
   });
</script>