<?php $__env->startSection('title', ($article->seo_title ?: $article->title) . ' - ' . config('app.name')); ?>
<?php $__env->startSection('meta_description', $article->seo_description ?: ($article->excerpt ?: \Illuminate\Support\Str::limit(strip_tags($article->content), 150))); ?>
<?php $__env->startSection('og_type', 'article'); ?>
<?php if($article->featured_image_url): ?>
    <?php $__env->startSection('og_image', $article->featured_image_url); ?>
<?php endif; ?>

<?php $__env->startPush('styles'); ?>
<style>
    .article-wrap { width: min(1060px, calc(100% - 28px)); margin: 0 auto; }
    .article-shell { padding: 34px 0 60px; }
    .article-hero { background:#fff; border:1px solid #e2e8f0; border-radius:28px; overflow:hidden; box-shadow:0 18px 44px rgba(15,23,42,.07); }
    .article-hero img { width:100%; height:380px; object-fit:cover; display:block; }
    .article-copy { padding:28px; }
    .article-meta { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:12px; font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; color:#64748b; }
    .article-copy h1 { margin:0 0 12px; font-size:clamp(2rem,4vw,3.4rem); line-height:1.05; color:#0f172a; }
    .article-excerpt { margin:0; color:#475569; line-height:1.8; font-size:1.02rem; }
    .article-body { margin-top:24px; background:#fff; border:1px solid #e2e8f0; border-radius:24px; padding:28px; box-shadow:0 16px 34px rgba(15,23,42,.05); color:#1e293b; line-height:1.9; }
    .article-body p { margin:0 0 18px; }
    .article-related { margin-top:28px; }
    .article-related h3 { margin:0 0 14px; font-size:1.4rem; }
    .article-related-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:18px; }
    .article-related-card { background:#fff; border:1px solid #e2e8f0; border-radius:20px; overflow:hidden; text-decoration:none; color:#0f172a; box-shadow:0 14px 28px rgba(15,23,42,.05); }
    .article-related-card img { width:100%; height:160px; object-fit:cover; }
    .article-related-card div { padding:16px; }
    @media (max-width: 900px) {
        .article-hero img { height:260px; }
        .article-related-grid { grid-template-columns:1fr; }
    }
</style>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('seo'); ?>
<?php
    $articleSchema = [
        '@context' => 'https://schema.org',
        '@type' => 'Article',
        'headline' => $article->title,
        'description' => $article->seo_description ?: ($article->excerpt ?: \Illuminate\Support\Str::limit(strip_tags($article->content), 150)),
        'datePublished' => optional($article->published_at ?? $article->created_at)->toIso8601String(),
        'dateModified' => optional($article->updated_at)->toIso8601String(),
        'mainEntityOfPage' => url()->current(),
        'author' => [
            '@type' => 'Person',
            'name' => $article->author?->name ?: config('app.name'),
        ],
        'publisher' => [
            '@type' => 'Organization',
            'name' => config('app.name'),
        ],
        'image' => $article->featured_image_url ? [$article->featured_image_url] : [],
    ];
    $breadcrumbSchema = [
        '@context' => 'https://schema.org',
        '@type' => 'BreadcrumbList',
        'itemListElement' => [
            ['@type' => 'ListItem', 'position' => 1, 'name' => 'Home', 'item' => url('/')],
            ['@type' => 'ListItem', 'position' => 2, 'name' => 'Blogs', 'item' => route('blogs.index')],
            ['@type' => 'ListItem', 'position' => 3, 'name' => $article->title, 'item' => url()->current()],
        ],
    ];
?>
<script type="application/ld+json"><?php echo json_encode($articleSchema, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE); ?></script>
<script type="application/ld+json"><?php echo json_encode($breadcrumbSchema, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE); ?></script>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<section class="article-shell">
    <div class="article-wrap">
        <?php ($safeArticleContent = app(\App\Support\HtmlSanitizer::class)->sanitize($article->content)); ?>
        <article class="article-hero">
            <?php if($article->featured_image_url): ?>
                <img src="<?php echo e($article->featured_image_url); ?>" alt="<?php echo e($article->title); ?>">
            <?php endif; ?>
            <div class="article-copy">
                <div class="article-meta">
                    <span><?php echo e($article->category?->name); ?></span>
                    <span><?php echo e(optional($article->published_at)->format('d M Y')); ?></span>
                    <span>By <?php echo e($article->author?->name); ?></span>
                </div>
                <h1><?php echo e($article->title); ?></h1>
                <?php if($article->excerpt): ?>
                    <p class="article-excerpt"><?php echo e($article->excerpt); ?></p>
                <?php endif; ?>
            </div>
        </article>

        <div class="article-body">
            <?php echo $safeArticleContent; ?>

        </div>

        <?php if($relatedArticles->isNotEmpty()): ?>
            <div class="article-related">
                <h3>Related articles</h3>
                <div class="article-related-grid">
                    <?php $__currentLoopData = $relatedArticles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $related): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <a href="<?php echo e(route('blogs.show', $related->slug)); ?>" class="article-related-card">
                            <?php if($related->featured_image_url): ?>
                                <img src="<?php echo e($related->featured_image_url); ?>" alt="<?php echo e($related->title); ?>">
                            <?php endif; ?>
                            <div>
                                <strong><?php echo e($related->title); ?></strong>
                                <p style="margin:8px 0 0;color:#64748b;"><?php echo e($related->excerpt ?: \Illuminate\Support\Str::limit(strip_tags(app(\App\Support\HtmlSanitizer::class)->sanitize($related->content)), 110)); ?></p>
                            </div>
                        </a>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        <?php endif; ?>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.public', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\gps-migration\resources\views\blogs\show.blade.php ENDPATH**/ ?>