<?php echo !defined("GUVENLIK") ? die("Vaoww! Bu ne cesaret?") : null;?><?php
$serviceayar = $db->prepare("select * from hizmet_ayar where id='1'");
$serviceayar->execute();
$serv = $serviceayar->fetch(PDO::FETCH_ASSOC);
$hizmetlimit = $serv[hizmet_limit];
?>
<?php
$num = 1;
$serviceliste = $db->prepare("select * from hizmet where durum='1' and dil='$_SESSION[dil]' and anasayfa='1' order by sira asc limit $hizmetlimit");
$serviceliste->execute();
?>
<?php if($serviceliste->rowCount() > 0) {?>

<style>
    .service-home-main-div{width:<?php if($serv[width]==1){?> 90%; <?php }else {?> 100% <?php }?> ; height: auto; overflow: hidden; background-color: #<?php echo $serv[back_color] ?>; padding: <?php echo $serv[padding] ?>px 0 <?php echo $serv[padding] ?>px 0; }

    .service-home-main-div .owl-dots button{outline: none !important;}

    .service-home-main-div .owl-theme .owl-dots .owl-dot.active span, .service-home-main-div  .owl-theme .owl-dots .owl-dot span {
        width: 15px;    height: 6px;    margin: 5px 4px;    background: rgba(0,0,0,0.2);    display: block;    -webkit-backface-visibility: visible;    transition: all .2s ease;    border-radius: 30px;
    }
    .service-home-main-div  .owl-dot.active span {   width: 30px !important; background:#<?php echo $ayar[dots_color] ?> !important;}
</style>
<section class="service-home-main-div <?php if($serv[tip] == 1) { ?>service-section <?php } else {?> service-style-three <?php }?>pt-100 pb-70">
    <div class="container modules-header-main-head" style="background:url(images/<?php echo $serv[divider] ?>.png) no-repeat center bottom;">
        <div class="section-head text-center">
            <h2 class="modules-header-main-baslik font-open-sans font-<?php echo $serv[font_weight] ?> font-spacing" style="color:#<?php echo $serv[baslik_color] ?>">
                <?php echo $diller['hizmetlerimiz']?></h2>
            <p class="modules-header-main-spot font-raleway font-light" style="color:#<?php echo $serv[spot_color] ?>; letter-spacing: 0.07em">
                <?php echo $diller['hizmetlerimiz-aciklamasi']?></p>
        </div>

            <?php if ($serv[tip] == 1) { ?>
                <div class="row">
                    <?php foreach ($serviceliste as $ser2) {  ?>
                        <div class="col-lg-4 col-md-6 col-sm-6">
                            <div class="service-card">
                                <i class="fa <?php echo $ser2[icon] ?>" style="color:#<?php echo $serv[icon_color] ?>"></i>
                                <h3 style="color:#<?php echo $serv[hizmet_color] ?>"><?php echo $ser2[baslik] ?></h3>
                                <p style="color:#<?php echo $serv[spot_color] ?>"><?php echo $ser2[spot] ?></p>
                                <?php
                                if($serv[detay_url] == 1) {  ?>
                                    <div class="theme-button">
                                        <a href="hizmet/<?php echo seo($ser2[id])?>/<?php echo seo($ser2[baslik]) ?>" style="color:#<?php echo $serv[hizmet_color] ?>" class="default-btn">Detaylar</a>
                                    </div>
                                <?php } ?>
                            </div>
                        </div>
                    <?php } ?>
                </div>
            <?php } ?>
            <?php 
            if ($serv[tip]==2) { ?>
                <div class="service-slider owl-carousel owl-theme">
                <?php foreach ($serviceliste as $ser2) {  ?>
                    <div class="service-item">
                        <i class="fa <?php echo $ser2[icon] ?>" style="color:#<?php echo $serv[icon_color] ?>"></i>
                        <h3 style="color:#<?php echo $serv[hizmet_color] ?>"><?php echo $ser2[baslik] ?></h3>
                        <p style="color:#<?php echo $serv[spot_color] ?>"><?php echo $ser2[spot] ?></p>
                        <?php
                        if($serv[detay_url] == 1) {  ?>
                            <div class="theme-button">
                                <a href="hizmet/<?php echo seo($ser2[id])?>/<?php echo seo($ser2[baslik]) ?>" style="color:#<?php echo $serv[hizmet_color] ?>" class="default-btn">Detaylar</a>
                            </div>
                        <?php } ?>
                    </div>
                <?php } ?>
            </div>
        <?php } ?>
    </div>
</section>
<?php } ?>
