
<?php if (isset($component)) { $__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5 = $attributes; } ?>
<?php $component = App\View\Components\SiteLayout::resolve(['title' => ''.e($metaTitle ?? $page->title).'','metaDescription' => ''.e($metaDescription ?? Str::limit(strip_tags($page->content), 160)).'','themeCssVariables' => !empty($themeColors) ? collect($themeColors)->mapWithKeys(fn($v, $k) => ['--theme-'.$k => $v])->all() : null] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('site-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\SiteLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>

    
    <?php
        $seoScript = !empty($page->seo_meta) ? json_encode([
            '@context' => 'https://schema.org',
            '@type' => 'WebPage',
            'name' => $page->meta_title ?? $page->title,
            'description' => $page->meta_description ?? '',
            'datePublished' => $page->published_at?->toIso8601String(),
            'dateModified' => $page->updated_at->toIso8601String(),
            'author' => ['@type' => 'Organization', 'name' => config('app.name')],
        ], JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) : null;
    ?>
    <?php if($seoScript): ?>
        <?php echo '<script type="application/ld+json">' . $seoScript . '</script>'; ?>

    <?php endif; ?>

    
    <?php if(isset($isPreview)): ?>
        <div class="bg-yellow-500 text-white text-center py-2 text-sm">
            <i class="fas fa-eye mr-2"></i>
            <?php echo e(__('This is a preview. Changes are not yet published.')); ?>

        </div>
    <?php endif; ?>

    
    <div class="bg-gray-50 border-b border-gray-200">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3">
            <nav class="flex items-center space-x-2 text-sm text-gray-600" aria-label="Breadcrumb">
                <a href="<?php echo e(url('/')); ?>" class="hover:text-green-600 transition flex items-center">
                    <i class="fas fa-home mr-1"></i>Home
                </a>
                <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
                <span class="text-gray-900 font-medium"><?php echo e($page->title); ?></span>
            </nav>
        </div>
    </div>

    
    <?php if($page->content_blocks && count($page->content_blocks) > 0): ?>
        <?php $firstBlock = $page->content_blocks[0]; ?>
        <?php if($firstBlock['type'] === 'hero'): ?>
            <section class="relative min-h-[50vh] bg-gradient-to-br from-green-600 via-green-700 to-emerald-800 overflow-hidden">
                
                <?php if(!empty($firstBlock['background_image'])): ?>
                    <div class="absolute inset-0">
                        <img src="<?php echo e(asset('storage/' . $firstBlock['background_image'])); ?>" 
                             alt=""
                             class="w-full h-full object-cover opacity-30">
                    </div>
                <?php endif; ?>
                
                
                <div class="absolute inset-0 bg-black bg-opacity-20"></div>
                
                <div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 lg:py-24">
                    <div class="text-center">
                        <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-6">
                            <?php echo e($firstBlock['title'] ?? $page->title); ?>

                        </h1>
                        
                        <?php if(!empty($firstBlock['subtitle'])): ?>
                            <p class="text-xl md:text-2xl text-green-100 max-w-3xl mx-auto mb-8">
                                <?php echo e($firstBlock['subtitle']); ?>

                            </p>
                        <?php endif; ?>
                        
                        
                        <?php if(!empty($firstBlock['buttons'])): ?>
                            <div class="flex flex-wrap justify-center gap-4">
                                <?php $__currentLoopData = $firstBlock['buttons']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $button): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <a href="<?php echo e($button['url'] ?? '#'); ?>" 
                                       class="px-8 py-4 <?php echo e(($button['style'] ?? 'primary') === 'primary' ? 'bg-white text-green-700' : 'border-2 border-white text-white'); ?> font-semibold rounded-lg hover:bg-opacity-90 transition">
                                        <?php if(!empty($button['icon'])): ?>
                                            <i class="fas fa-<?php echo e($button['icon']); ?> mr-2"></i>
                                        <?php endif; ?>
                                        <?php echo e($button['label'] ?? 'Learn More'); ?>

                                    </a>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            </section>
        <?php else: ?>
            
            <section class="bg-gradient-to-r from-green-600 to-green-700 py-12">
                <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
                    <h1 class="text-4xl font-bold text-white mb-4"><?php echo e($page->title); ?></h1>
                    <?php if(!empty($page->meta_description)): ?>
                        <p class="text-green-100 text-lg max-w-5xl mx-auto"><?php echo e($page->meta_description); ?></p>
                    <?php endif; ?>
                </div>
            </section>
        <?php endif; ?>
    <?php endif; ?>

    
    <?php if($page->content_blocks): ?>
        <?php $__currentLoopData = array_slice($page->content_blocks, 1); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $block): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php $blockType = $block['type'] ?? 'text'; ?>
            
            
            <?php if($blockType === 'text'): ?>
                <section class="py-12 <?php echo e(($index % 2 === 0) ? 'bg-theme-body' : 'bg-theme-card'); ?>">
                    <div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
                        <?php if(!empty($block['title'])): ?>
                            <h2 class="text-3xl font-bold text-theme-heading mb-6"><?php echo e($block['title']); ?></h2>
                        <?php endif; ?>
                        <div class="prose prose-lg max-w-none text-theme-body">
                            <?php echo $block['content'] ?? ''; ?>

                        </div>
                    </div>
                </section>
            
            
            <?php elseif($blockType === 'image_text'): ?>
                <section class="py-12 <?php echo e(($index % 2 === 0) ? 'bg-theme-body' : 'bg-theme-card'); ?>">
                    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                        <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
                            <?php if(!empty($block['image'])): ?>
                                <div class="<?php echo e(($block['image_position'] ?? 'left') === 'right' ? 'lg:order-2' : ''); ?>">
                                    <img src="<?php echo e(asset('storage/' . $block['image'])); ?>" 
                                         alt="<?php echo e($block['image_alt'] ?? ''); ?>"
                                         class="rounded-lg shadow-xl w-full">
                                </div>
                            <?php endif; ?>
                            <div>
                                <?php if(!empty($block['title'])): ?>
                                    <h2 class="text-3xl font-bold text-theme-heading mb-4"><?php echo e($block['title']); ?></h2>
                                <?php endif; ?>
                                <div class="prose prose-lg text-theme-body">
                                    <?php echo $block['content'] ?? ''; ?>

                                </div>
                                <?php if(!empty($block['button'])): ?>
                                    <a href="<?php echo e($block['button']['url'] ?? '#'); ?>" 
                                       class="inline-block mt-6 px-6 py-3 bg-green-600 text-white font-semibold rounded-lg hover:bg-green-700 transition">
                                        <?php echo e($block['button']['label'] ?? 'Learn More'); ?>

                                    </a>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </section>
            
            
            <?php elseif($blockType === 'cards'): ?>
                <section class="py-12 bg-theme-body">
                    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                        <?php if(!empty($block['title'])): ?>
                            <h2 class="text-3xl font-bold text-theme-heading mb-8 text-center"><?php echo e($block['title']); ?></h2>
                        <?php endif; ?>
                        <div class="grid grid-cols-1 md:grid-cols-<?php echo e($block['columns'] ?? 3); ?> gap-6">
                            <?php $__currentLoopData = $block['cards'] ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $card): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="theme-card rounded-lg shadow-lg overflow-hidden hover:shadow-xl transition">
                                    <?php if(!empty($card['image'])): ?>
                                        <img src="<?php echo e(asset('storage/' . $card['image'])); ?>" 
                                             alt="<?php echo e($card['title'] ?? ''); ?>"
                                             class="w-full h-48 object-cover">
                                    <?php endif; ?>
                                    <div class="p-6">
                                        <?php if(!empty($card['icon'])): ?>
                                            <div class="w-12 h-12 rounded-lg bg-green-100 flex items-center justify-center mb-4">
                                                <i class="fas fa-<?php echo e($card['icon']); ?> text-green-600 text-xl"></i>
                                            </div>
                                        <?php endif; ?>
                                        <?php if(!empty($card['title'])): ?>
                                            <h3 class="text-xl font-semibold text-theme-heading mb-2"><?php echo e($card['title']); ?></h3>
                                        <?php endif; ?>
                                        <?php if(!empty($card['description'])): ?>
                                            <p class="text-theme-body"><?php echo e($card['description']); ?></p>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                </section>
            
            
            <?php elseif($blockType === 'gallery'): ?>
                <section class="py-12 bg-theme-card">
                    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                        <?php if(!empty($block['title'])): ?>
                            <h2 class="text-3xl font-bold text-theme-heading mb-8 text-center"><?php echo e($block['title']); ?></h2>
                        <?php endif; ?>
                        <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
                            <?php $__currentLoopData = $block['images'] ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="aspect-square rounded-lg overflow-hidden">
                                    <img src="<?php echo e(asset('storage/' . $image['path'])); ?>" 
                                         alt="<?php echo e($image['caption'] ?? ''); ?>"
                                         class="w-full h-full object-cover hover:scale-110 transition duration-300">
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                </section>
            
            
            <?php elseif($blockType === 'cta'): ?>
                <section class="py-16 bg-gradient-to-r from-green-600 to-green-700">
                    <div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
                        <?php if(!empty($block['title'])): ?>
                            <h2 class="text-3xl font-bold text-white mb-4"><?php echo e($block['title']); ?></h2>
                        <?php endif; ?>
                        <?php if(!empty($block['content'])): ?>
                            <p class="text-green-100 text-lg mb-8"><?php echo e($block['content']); ?></p>
                        <?php endif; ?>
                        <?php if(!empty($block['button'])): ?>
                            <a href="<?php echo e($block['button']['url'] ?? '#'); ?>" 
                               class="inline-block px-8 py-4 bg-white text-green-700 font-semibold rounded-lg hover:bg-green-50 transition">
                                <?php echo e($block['button']['label'] ?? 'Get Started'); ?>

                            </a>
                        <?php endif; ?>
                    </div>
                </section>
            
            
            <?php elseif($blockType === 'quote'): ?>
                <section class="py-12 bg-theme-body">
                    <div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
                        <blockquote class="relative p-8 bg-green-50 rounded-lg border-l-4 border-green-600">
                            <i class="fas fa-quote-left text-green-200 text-4xl absolute top-4 left-4"></i>
                            <p class="text-xl text-theme-heading italic relative z-10">
                                <?php echo e($block['quote'] ?? ''); ?>

                            </p>
                            <?php if(!empty($block['author'])): ?>
                                <footer class="mt-4 text-theme-body">
                                    — <strong><?php echo e($block['author']); ?></strong>
                                    <?php if(!empty($block['source'])): ?>
                                        , <?php echo e($block['source']); ?>

                                    <?php endif; ?>
                                </footer>
                            <?php endif; ?>
                        </blockquote>
                    </div>
                </section>
            
            
            <?php elseif($blockType === 'slider'): ?>
                <section class="py-12 bg-theme-card" 
                         x-data="{ current: 0, total: <?php echo e(count($block['slides'] ?? [])); ?> }">
                    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                        <?php if(!empty($block['title'])): ?>
                            <h2 class="text-3xl font-bold text-theme-heading mb-8 text-center"><?php echo e($block['title']); ?></h2>
                        <?php endif; ?>
                        
                        <div class="relative overflow-hidden rounded-lg">
                            <div class="flex transition-transform duration-500" 
                                 :style="'transform: translateX(-' + (current * 100) + '%)'">
                                <?php $__currentLoopData = $block['slides'] ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $slide): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="w-full flex-shrink-0">
                                        <div class="relative h-96">
                                            <img src="<?php echo e(asset('storage/' . $slide['image'])); ?>" 
                                                 alt="<?php echo e($slide['title'] ?? ''); ?>"
                                                 class="w-full h-full object-cover">
                                            <div class="absolute inset-0 bg-gradient-to-t from-black to-transparent"></div>
                                            <div class="absolute bottom-0 left-0 right-0 p-8 text-white">
                                                <h3 class="text-2xl font-bold mb-2"><?php echo e($slide['title'] ?? ''); ?></h3>
                                                <p><?php echo e($slide['description'] ?? ''); ?></p>
                                            </div>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                            
                            
                            <button @click="current = (current - 1 + total) % total"
                                    class="absolute left-4 top-1/2 -translate-y-1/2 bg-white bg-opacity-80 p-3 rounded-full hover:bg-opacity-100 transition">
                                <i class="fas fa-chevron-left"></i>
                            </button>
                            <button @click="current = (current + 1) % total"
                                    class="absolute right-4 top-1/2 -translate-y-1/2 bg-white bg-opacity-80 p-3 rounded-full hover:bg-opacity-100 transition">
                                <i class="fas fa-chevron-right"></i>
                            </button>
                        </div>
                    </div>
                </section>
            
            
            <?php else: ?>
                <section class="py-12 bg-theme-body">
                    <div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
                        <?php if(!empty($block['title'])): ?>
                            <h2 class="text-2xl font-bold text-theme-heading mb-4"><?php echo e($block['title']); ?></h2>
                        <?php endif; ?>
                        <div class="text-theme-body">
                            <?php echo $block['content'] ?? ''; ?>

                        </div>
                    </div>
                </section>
            <?php endif; ?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php endif; ?>

    
    <?php if(!$page->content_blocks || count($page->content_blocks) === 0): ?>
        <section class="py-24 text-center">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <i class="fas fa-file-alt text-6xl text-gray-300 mb-4"></i>
                <h2 class="text-2xl font-bold text-theme-heading"><?php echo e(__('Content Coming Soon')); ?></h2>
                <p class="text-theme-body mt-2"><?php echo e(__('This page is being updated. Please check back later.')); ?></p>
            </div>
        </section>
    <?php endif; ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5)): ?>
<?php $attributes = $__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5; ?>
<?php unset($__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5)): ?>
<?php $component = $__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5; ?>
<?php unset($__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5); ?>
<?php endif; ?>
<?php /**PATH /home/www/sshia.org/sshia/resources/views/publishing/show.blade.php ENDPATH**/ ?>