/* Temel yapı */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #eee;
    height: 100vh;
    overflow: hidden;
}

.kb-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.kb-sidebar {
    background-color: #1f1f1f;
    width: 240px;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    border-right: 2px solid #4caf50;
}

.kb-sidebar h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #76ff03;
    text-align: center;
    text-shadow: 0 0 8px #4caf50;
}

.kb-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-sidebar ul li {
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.kb-sidebar ul li.active,
.kb-sidebar ul li:hover {
    background-color: #4caf50;
    color: #121212;
}

/* Main içerik */
.kb-main {
    flex-grow: 1;
    padding: 30px 20px;
    overflow-y: auto;
    max-width: 1200px;
    margin: 0 auto;
}

/* Scrollbar özelleştirme */

/* WebKit tabanlı tarayıcılar */
.kb-main::-webkit-scrollbar {
    width: 8px; /* İnce scrollbar */
}

.kb-main::-webkit-scrollbar-track {
    background: #1f1f1f; /* Koyu arka plan */
    border-radius: 4px;
}

.kb-main::-webkit-scrollbar-thumb {
    background-color: rgba(76, 175, 80, 0.5); /* Yarı şeffaf yeşil */
    border-radius: 4px;
    border: 2px solid #1f1f1f; /* Kenar boşluğu efekti */
}

/* Firefox */
.kb-main {
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 175, 80, 0.5) #1f1f1f;
}

.kb-main h1 {
    margin-top: 0;
    font-size: 2rem;
    margin-bottom: 25px;
    color: #76ff03;
    text-shadow: 0 0 8px #4caf50;
}

/* Kart grid 4 sütun */
.kb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Kart - Aynı yükseklikte olması için flexbox ve sabit yükseklik eklendi */
.kb-kart {
    display: flex;
    flex-direction: column;
    background-color: #1f1f1f;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.7);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    height: 420px; /* Sabit yükseklik */
}

.kb-kart:hover {
    box-shadow: 0 0 20px #4caf50;
    transform: translateY(-6px);
}

.kb-resim-kapsul {
    position: relative;
    overflow: hidden;
    background-color: #000;
    text-align: center;
    height: 180px; /* Sabit yükseklik */
    flex-shrink: 0;
}

.kb-resim-kapsul img {
    max-width: 100%;
    height: 100%; /* kapsüle sığacak */
    object-fit: cover;
    display: block;
    filter: brightness(90%);
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.kb-kart:hover .kb-resim-kapsul img {
    transform: scale(1.05);
}

.kb-kategori-etiket {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background-color: #4caf50;
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(0,0,0,0.7);
}

/* Başlık - 2 satır sınırı ve taşmayı gizle */
.kb-baslik {
    display: block;
    margin: 15px 20px 8px;
    font-size: 1.3rem;
    color: #a5d6a7;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
    height: 48px; /* Yaklaşık 2 satır */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.kb-baslik:hover {
    color: #76ff03;
}

/* Açıklama - kalan alanı kapla, 5 satır sınırı */
.kb-aciklama {
    margin: 0 20px 20px;
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.4;
    flex-grow: 1; /* Kalan yüksekliği kapla */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* Detay sayfa düzeni */
.kb-detay .kb-resim-kapsul {
    margin-bottom: 15px;
    text-align: center;
    height: auto;        /* Sabit yükseklik kaldırıldı */
    overflow: visible;   /* Taşmayı gizleme */
}

.kb-detay .kb-resim-kapsul img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
    object-fit: contain; /* Kırpma yapmaz, tam gösterir */
}

.kb-icerik {
    line-height: 1.6;
    font-size: 1rem;
    color: #eee;
    margin-top: 20px;
}

.btn-return {
    background-color: #4caf50;
    color: #121212;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    font-weight: bold;
    display: inline-block;
    margin-top: 25px;
}

.btn-return:hover {
    background-color: #76ff03;
    color: #000;
}



/* Responsive */
@media (max-width: 1400px) {
    .kb-main {
        max-width: 1000px;
    }
    .kb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .kb-sidebar {
        width: 200px;
    }
    .kb-main {
        max-width: 700px;
    }
    .kb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .kb-container {
        flex-direction: column;
    }

    .kb-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid #4caf50;
    }

    .kb-main {
        padding: 20px;
        height: calc(100vh - 150px);
        max-width: 100%;
        margin: 0;
    }

    .kb-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.kb-sidebar ul li.anasayfa-link {
    background-color: #1e40af;
    color: white;
    font-weight: 700;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 10px 15px;
    transition: background-color 0.3s ease;
}

.kb-sidebar ul li.anasayfa-link:hover {
    background-color: #2563eb;
}

.kb-sidebar ul li.anasayfa-link a i.fa-home {
    font-size: 16px;
    vertical-align: middle;
    color: white;
}
