<?php
use Livewire\Component;
use App\Models\Post;
use Illuminate\Support\Str;
?>

<main class="max-w-7xl mx-auto px-4 md:px-6 py-8 font-odia">
    <!-- Breadcrumb -->
    <nav class="flex text-[10px] md:text-xs text-slate-400 mb-8 font-sans uppercase tracking-wider font-bold">
        <a href="<?php echo e(route('home')); ?>" class="hover:text-brand-blue"><?php echo e(__('nav.home')); ?></a>
        <span class="mx-2">/</span>
        <a href="<?php echo e(route('category', $post->category->slug)); ?>" class="hover:text-brand-blue"><?php echo e($post->category->name); ?></a>
        <span class="mx-2">/</span>
        <span class="text-slate-300 truncate"><?php echo e(Str::limit($post->title, 30)); ?></span>
    </nav>

    <div class="grid grid-cols-1 lg:grid-cols-12 gap-10">
        <!-- Main Content -->
        <article class="lg:col-span-8">
            <h1 class="text-3xl md:text-5xl font-black text-slate-900 leading-tight mb-8">
                <?php echo e($post->title); ?>

            </h1>
            
            <div class="flex flex-wrap items-center justify-between gap-6 border-y border-slate-100 py-6 mb-10">
                <div class="flex items-center gap-4">
                    <div class="w-10 h-10 bg-slate-100 rounded-sm border border-slate-200 flex-shrink-0 flex items-center justify-center">
                        <i class="fa-solid fa-user text-slate-300"></i>
                    </div>
                    <div>
                        <p class="text-sm font-bold text-slate-800 uppercase tracking-tight">ଆମ ପ୍ରତିନିଧି</p>
                        <p class="text-[10px] text-slate-400 font-sans uppercase font-bold tracking-wider">Updated: <?php echo e($post->updated_at->format('d M Y, h:i A')); ?></p>
                    </div>
                </div>
                <?php
                    $articleUrl   = urlencode(route('article', $post->slug));
                    $articleTitle = urlencode($post->title);
                ?>
                <div class="flex gap-2">
                    <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo e($articleUrl); ?>" target="_blank" rel="noopener"
                        class="w-8 h-8 rounded-sm bg-blue-600 text-white flex items-center justify-center hover:bg-blue-700 transition-colors"><i class="fa-brands fa-facebook-f text-xs"></i></a>
                    <a href="https://twitter.com/intent/tweet?url=<?php echo e($articleUrl); ?>&text=<?php echo e($articleTitle); ?>" target="_blank" rel="noopener"
                        class="w-8 h-8 rounded-sm bg-slate-900 text-white flex items-center justify-center hover:bg-black transition-colors"><i class="fa-brands fa-x-twitter text-xs"></i></a>
                    <a href="https://api.whatsapp.com/send?text=<?php echo e($articleTitle); ?>%20<?php echo e($articleUrl); ?>" target="_blank" rel="noopener"
                        class="w-8 h-8 rounded-sm bg-green-600 text-white flex items-center justify-center hover:bg-green-700 transition-colors"><i class="fa-brands fa-whatsapp text-xs"></i></a>
                    <button onclick="navigator.clipboard.writeText('<?php echo e(route('article', $post->slug)); ?>').then(() => this.innerHTML='<i class=\'fa-solid fa-check text-xs\'></i>')"
                        class="w-8 h-8 rounded-sm bg-slate-100 text-slate-500 border border-slate-200 flex items-center justify-center hover:bg-slate-200 transition-colors" title="Copy link"><i class="fa-solid fa-link text-xs"></i></button>
                </div>
            </div>

            <!-- Featured Image -->
            <figure class="mb-10">
                <img src="<?php echo e($post->featured_image ? (Str::startsWith($post->featured_image, 'http') ? $post->featured_image : asset('storage/'.$post->featured_image)) : 'https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?auto=format&fit=crop&q=80&w=1200'); ?>" class="w-full rounded-lg border border-slate-200" alt="<?php echo e($post->title); ?>">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($post->image_caption): ?>
                <figcaption class="text-[10px] text-slate-400 mt-3 italic text-center font-sans uppercase font-bold tracking-widest"><?php echo e($post->image_caption); ?></figcaption>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </figure>

            <!-- Article Body -->
            <div class="text-lg text-slate-700 leading-relaxed space-y-6 prose max-w-none">
                <?php echo $post->content; ?>

            </div>

        </article>

        <!-- Sidebar -->
        <aside class="lg:col-span-4 space-y-12">
            <!-- Related News -->
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($relatedPosts->count() > 0): ?>
            <div>
                <h3 class="text-sm font-bold mb-6 flex items-center gap-3 uppercase tracking-widest text-slate-900">
                    <span class="w-1 h-5 bg-brand-blue inline-block"></span>
                    <?php echo e(__('article.related')); ?>

                </h3>
                <div class="space-y-6">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $relatedPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rPost): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
                    <a href="<?php echo e(route('article', $rPost->slug)); ?>" class="group block">
                        <div class="aspect-video rounded-md overflow-hidden mb-3 border border-slate-100">
                            <img src="<?php echo e($rPost->featured_image ? (Str::startsWith($rPost->featured_image, 'http') ? $rPost->featured_image : asset('storage/'.$rPost->featured_image)) : 'https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?auto=format&fit=crop&q=80&w=400'); ?>" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300">
                        </div>
                        <h4 class="text-sm font-bold text-slate-800 font-odia leading-snug group-hover:text-brand-blue transition-colors">
                            <?php echo e($rPost->title); ?>

                        </h4>
                    </a>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </div>
            </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <!-- Trending Stories -->
            <div>
                <h3 class="text-sm font-bold mb-6 flex items-center gap-3 uppercase tracking-widest text-slate-900">
                    <span class="w-1 h-5 bg-brand-red inline-block"></span>
                    <?php echo e(__('ui.trending')); ?>

                </h3>
                <div class="space-y-5">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $trendingPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tPost): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
                    <a href="<?php echo e(route('article', $tPost->slug)); ?>" class="group flex gap-4 border-b border-slate-100 pb-4">
                        <span class="text-2xl font-black text-slate-200 font-sans flex-shrink-0"><?php echo e(str_pad($loop->iteration, 2, '0', STR_PAD_LEFT)); ?></span>
                        <div>
                            <h4 class="text-sm font-bold text-slate-800 font-odia leading-snug group-hover:text-brand-red transition-colors mb-1"><?php echo e($tPost->title); ?></h4>
                            <span class="text-[9px] font-bold text-slate-400 uppercase tracking-wider"><?php echo e($tPost->category->name); ?> | <?php echo e($tPost->created_at->diffForHumans()); ?></span>
                        </div>
                    </a>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </div>
            </div>
        </aside>
    </div>
</main><?php /**PATH D:\02-my freelance\00-DR_Padhi\DR_PADHI\storage\framework/views/livewire/views/b55a8553.blade.php ENDPATH**/ ?>