/* assets/css/category.css - FINAL MODERN VERSION */

/* ----------------------------------------------------------------------
 * CATEGORY CSS - Modern Kategori ve Arşiv Görünümü
 * ---------------------------------------------------------------------- */

/* --- KATEGORİ BAŞLIK KARTI --- */
.category-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    
    /* ÖNEMLİ: Z-Index Sorununu Çözen Ayarlar */
    position: relative;
    z-index: 1; /* Çok düşük tutuldu */
    transform: none !important; /* Header'ın önüne geçmesini engeller */
    transition: none;
}

/* Breadcrumb Kısmı */
.cat-header-top {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--bg-surface);
    padding-bottom: 10px;
}

.cat-breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cat-breadcrumb a { color: var(--text-muted); transition: 0.2s; }
.cat-breadcrumb a:hover { color: var(--primary-color); }
.cat-breadcrumb .sep { margin: 0 8px; opacity: 0.4; }
.cat-breadcrumb .current { color: var(--primary-color); }

/* Alt Gövde (Başlık ve Butonlar) */
.cat-header-body {
    display: flex;
    justify-content: space-between; /* İki uca yasla */
    align-items: flex-end; /* Alt hizalama */
    gap: 20px;
}

.cat-info {
    flex: 1;
}

.cat-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0 0 5px 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

.cat-desc {
    color: var(--text-muted);
    font-size: 15px;
    margin: 5px 0 0 0;
    max-width: 750px;
}

/* Aksiyonlar (Sağ Taraf - Görünüm Butonları) */
.cat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.view-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.view-buttons {
    display: flex;
    background: var(--bg-surface);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.view-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover { color: var(--text-heading); }
.view-btn.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- GRID HABER KARTLARI --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.cat-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.cat-card-media {
    position: relative;
    padding-top: 56.25%; /* 16:9 Oran */
    overflow: hidden;
    background: var(--bg-surface);
}

.cat-card-media img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.cat-card:hover .cat-card-media img { transform: scale(1.05); }

.cat-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cat-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.cat-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
    color: var(--text-heading);
    /* Başlık taşmasını engelle */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card-summary {
    font-size: 14px;
    color: var(--text-body);
    margin: 0 0 15px;
    line-height: 1.5;
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-author {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    border-top: 1px solid var(--bg-surface);
    padding-top: 12px;
}

/* --- LİSTE GÖRÜNÜMÜ --- */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-view .cat-card-link {
    flex-direction: row;
    height: 200px;
}

.list-view .cat-card-media {
    width: 280px;
    padding-top: 0;
    height: 100%;
    flex-shrink: 0;
}

.list-view .cat-card-content {
    justify-content: center;
}

.list-view .cat-card-title { font-size: 22px; }

/* --- PAGINATION --- */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.page-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-body);
    font-weight: 600;
    transition: 0.2s;
}

.page-btn:hover, .page-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.dots { align-self: flex-end; padding: 0 5px; color: var(--text-muted); }

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.empty-state i { font-size: 40px; color: #cbd5e1; margin-bottom: 15px; display: block; }

/* --- RESPONSIVE (MOBİL DÜZELTMELERİ) --- */
@media (max-width: 768px) {
    .category-header-card {
        padding: 20px;
    }

    .cat-header-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* İSTEK: Mobilde Görünüm Butonlarını Gizle */
    .cat-actions {
        display: none !important;
    }

    .cat-title { font-size: 26px; }

    /* Mobilde List View -> Dikey Olmalı (Fallback) */
    /* Kullanıcı masaüstünde list view seçip mobile geçerse bozulmasın */
    .list-view .cat-card-link {
        flex-direction: column;
        height: auto;
    }
    
    .list-view .cat-card-media {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .list-view .cat-card-title { font-size: 18px; }
}