<div>

    
    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(optional($work->detail)->inner_hero_media): ?>
        <section class="w-full pt-8 lg:pt-4">
            <img src="<?php echo e(asset('storage/' . $work->detail->inner_hero_media)); ?>"
                 alt="<?php echo e($work->title); ?>"
                 class="w-full h-auto object-contain"
                 loading="lazy" />
        </section>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

    
    <section class="mx-auto max-w-8xl px-4 sm:px-6 lg:px-8">

        
        <div class="grid grid-cols-1 gap-10 py-10 md:grid-cols-2 md:gap-14 md:py-14">

            
            <div>
                <h2 class="text-2xl sm:text-6xl font-extrabold leading-tight">
    <?php
        $heading = $work->detail->intro_heading ?? $work->title;
        $words = explode(' ', trim($heading));

        if(count($words) > 2){
            $lastTwo = array_splice($words, -2);
            $firstPart = implode(' ', $words);
            $secondLine = implode(' ', $lastTwo);
        } else {
            $firstPart = '';
            $secondLine = implode(' ', $words);
        }
    ?>

    <?php echo $firstPart; ?>

    <span class="block"><?php echo e($secondLine); ?></span>
</h2>




            </div>

            
            <div class="text-zinc-700">

               
                <?php if(optional($work->detail)->intro_description): ?>
                    <p class="leading-relaxed text-[16px] lg:text-[18px] text-justify">
                        <?php echo e($work->detail->intro_description); ?>

                    </p>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>


                
                <?php
                    $services = $work->detail->services ?? null;
                    if (is_string($services)) {
                        $services = json_decode($services, true);
                    }
                ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!empty($services) && is_array($services)): ?>
                    <div class="mt-10">
                        <div class="text-[18px] font-bold text-zinc-900">
                            SERVICES
                        </div>

                        <ul class="mt-3 space-y-2 text-sm">
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li class="font-semibold text-zinc-900">
                                    <?php echo e($service); ?>

                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </ul>
                    </div>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            </div>
        </div>

       
<?php if(optional($work->detail)->inner_video): ?>
    <div class="pb-20">
        <div class="overflow-hidden rounded-md border border-black/10 bg-black">
            <div class="relative w-full aspect-video">

                
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(Str::contains($work->detail->inner_video, ['youtube.com', 'youtu.be'])): ?>
                    <?php
                        preg_match(
                            '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i',
                            $work->detail->inner_video,
                            $m
                        );
                        $videoId = $m[1] ?? null;
                    ?>

                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($videoId): ?>
                      <iframe
                        id="yt-player"
                        class="absolute inset-0 w-full h-full"
                        src="https://www.youtube-nocookie.com/embed/<?php echo e($videoId); ?>?autoplay=0&mute=0&controls=0&modestbranding=1&rel=0&fs=0&disablekb=1&playsinline=1&enablejsapi=1&iv_load_policy=3"
                        allow="autoplay; encrypted-media"
                        allowfullscreen>
                    </iframe>

                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                
                <?php elseif(Str::startsWith($work->detail->inner_video, 'works/')): ?>
                    <video controls loop playsinline class="w-full h-full object-cover">
                        <source src="<?php echo e(asset('storage/'.$work->detail->inner_video)); ?>" type="video/mp4">
                    </video>

                
                <?php else: ?>
                    <video controls loop playsinline class="w-full h-full object-cover">
                        <source src="<?php echo e($work->detail->inner_video); ?>" type="video/mp4">
                    </video>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            </div>
        </div>
    </div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>


    </section>

</div>
<?php /**PATH /home1/eggfirst/public_html/resources/views/livewire/work-detail.blade.php ENDPATH**/ ?>