

<?php $__env->startSection('fullwidth'); ?><?php $__env->stopSection(); ?>

<?php $__env->startSection('meta_title', $category->name . ' - Kütüphane - Askeri Platform'); ?>
<?php $__env->startSection('meta_description', $category->description ?? $category->name . ' kategorisindeki askeri kariyer ve sınav içerikleri.'); ?>

<?php $__env->startSection('content'); ?>
<div style="max-width:1280px;margin:0 auto;padding:48px 24px;">
<style>
    .breadcrumb { font-size: 14px; color: #6b7280; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .breadcrumb a { color: #059669; text-decoration: none; }
    .breadcrumb a:hover { text-decoration: underline; }

    .category-header {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 32px;
        margin-bottom: 32px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .category-header-inner { display: flex; align-items: flex-start; gap: 20px; }
    .cat-big-icon { font-size: 48px; flex-shrink: 0; }
    .cat-header-title { font-size: 26px; font-weight: 800; color: #111827; margin-bottom: 8px; }
    .cat-header-desc { font-size: 15px; color: #6b7280; }
    .cat-header-meta { margin-top: 12px; display: flex; gap: 16px; font-size: 14px; color: #6b7280; }
    .cat-header-meta strong { color: #059669; }

    .subcats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
    .subcat-chip {
        padding: 8px 16px;
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        border-radius: 20px;
        text-decoration: none;
        color: #065f46;
        font-size: 13px;
        font-weight: 600;
        transition: all 0.2s;
    }
    .subcat-chip:hover { background: #dcfce7; border-color: #86efac; }

    .content-list { display: flex; flex-direction: column; gap: 12px; }
    .content-item {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 20px 24px;
        text-decoration: none;
        color: inherit;
        display: flex;
        align-items: center;
        gap: 16px;
        transition: all 0.2s;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }
    .content-item:hover {
        border-color: #059669;
        box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1);
        background: #f0fdf4;
    }
    .content-item-icon { font-size: 28px; flex-shrink: 0; }
    .content-item-body { flex: 1; min-width: 0; }
    .content-item-title { font-size: 16px; font-weight: 700; color: #111827; margin-bottom: 4px; }
    .content-item-meta { font-size: 13px; color: #9ca3af; display: flex; gap: 12px; }

    .type-badge {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .type-article { background: #dbeafe; color: #1e40af; }
    .type-table   { background: #fce7f3; color: #9d174d; }
    .type-list    { background: #fef3c7; color: #92400e; }
    .type-pdf     { background: #fee2e2; color: #991b1b; }
    .type-mixed   { background: #ede9fe; color: #5b21b6; }

    .empty-state { text-align: center; padding: 60px 24px; background: white; border: 1px dashed #e5e7eb; border-radius: 12px; }
    .empty-state-icon { font-size: 48px; margin-bottom: 16px; }
    .empty-state-text { font-size: 16px; color: #6b7280; }
</style>


<div class="breadcrumb">
    <a href="<?php echo e(route('library.index')); ?>">📚 Kütüphane</a>
    <span>›</span>
    <?php if($category->parent): ?>
        <a href="<?php echo e(route('library.category', $category->parent->slug)); ?>"><?php echo e($category->parent->name); ?></a>
        <span>›</span>
    <?php endif; ?>
    <span><?php echo e($category->name); ?></span>
</div>


<div class="category-header">
    <div class="category-header-inner">
        <div class="cat-big-icon"><?php echo e($category->icon ?? '📁'); ?></div>
        <div>
            <div class="cat-header-title"><?php echo e($category->name); ?></div>
            <?php if($category->description): ?>
                <div class="cat-header-desc"><?php echo e($category->description); ?></div>
            <?php endif; ?>
            <div class="cat-header-meta">
                <span><strong><?php echo e($contents->total()); ?></strong> içerik</span>
                <?php if($category->parent): ?>
                    <span>Üst Kategori: <strong><?php echo e($category->parent->name); ?></strong></span>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>


<?php if($category->children && $category->children->count() > 0): ?>
    <div class="subcats">
        <span style="font-size:14px;font-weight:600;color:#374151;align-self:center;">Alt Kategoriler:</span>
        <?php $__currentLoopData = $category->children; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $child): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <a href="<?php echo e(route('library.category', $child->slug)); ?>" class="subcat-chip">
                <?php echo e($child->icon ?? ''); ?> <?php echo e($child->name); ?>

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


<div class="content-list">
<?php $__empty_1 = true; $__currentLoopData = $contents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $content): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
    <a href="<?php echo e(route('library.show', [$category->slug, $content->slug])); ?>" class="content-item">
            <div class="content-item-icon">
                <?php echo e(match($content->type) {
                    'article' => '📄',
                    'table'   => '📊',
                    'list'    => '📋',
                    'pdf'     => '📕',
                    'mixed'   => '🗂️',
                    default   => '📄'
                }); ?>

            </div>
            <div class="content-item-body">
                <div class="content-item-title"><?php echo e($content->title); ?></div>
                <div class="content-item-meta">
                    <span>👁️ <?php echo e(number_format($content->views)); ?> görüntülenme</span>
                    <span><?php echo e($content->created_at->format('d.m.Y')); ?></span>
                </div>
            </div>
            <span class="type-badge type-<?php echo e($content->type); ?>">
                <?php echo e(match($content->type) {
                    'article' => 'Makale',
                    'table'   => 'Tablo',
                    'list'    => 'Liste',
                    'pdf'     => 'PDF',
                    'mixed'   => 'Karma',
                    default   => $content->type
                }); ?>

            </span>
        </a>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
    <div class="empty-state">
        <div class="empty-state-icon">📭</div>
        <div class="empty-state-text">Bu kategoride henüz içerik bulunmamaktadır.</div>
<?php endif; ?>
</div>


<?php if($contents->hasPages()): ?>
    <div style="margin-top:32px;display:flex;justify-content:center;">
        <?php echo e($contents->links()); ?>

    </div>
<?php endif; ?>

</div>
<?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\askeribilgiler\resources\views\library\category.blade.php ENDPATH**/ ?>