﻿.knowledge-base {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

    .knowledge-base .article-grid {
        display: flex;
        flex-direction: column; 
        gap: 16px;
        padding: 10px 0;
    }

    .knowledge-base .kb-card {
        background: #ffffff;
        border-radius: 16px;
        border: 1px solid #f0f0f0;
        transition: all 0.3s ease;
        overflow: hidden;
    }
        .knowledge-base .kb-card:hover {
            transform: translateX(5px); 
            box-shadow: 0 5px 15px rgba(0,0,0,0.04);
            border-color: #e0e0e0;
        }

    .knowledge-base .kb-card-link {
        text-decoration: none;
        color: inherit;
        display: flex; 
        align-items: stretch;
    }

    .knowledge-base .kb-image {
        position: relative;
        width: 180px; 
        min-width: 180px;
        height: 140px; 
        overflow: hidden;
    }

        .knowledge-base .kb-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .knowledge-base .kb-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        background: rgba(255, 255, 255, 0.9);
        padding: 2px 8px;
        border-radius: 6px;
        font-size: 9px;
        font-weight: 700;
        color: #555;
        text-transform: uppercase;
    }

    .knowledge-base .kb-content {
        padding: 12px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center; 
        flex-grow: 1;
    }

    .knowledge-base .kb-title {
        margin: 0 0 6px 0;
        font-size: 17px; 
        line-height: 1.2;
        color: #111;
        font-weight: 700;
    }

    .knowledge-base .kb-description {
        font-size: 13px;
        line-height: 1.4;
        color: #666;
        margin: 0 0 10px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .knowledge-base .kb-meta {
        display: flex;
        gap: 15px;
        font-size: 11px;
        color: #ccc;
        font-weight: 500;
    }


@media (max-width: 500px) {
    .knowledge-base .kb-card-link {
        flex-direction: column; 
    }

    .knowledge-base .kb-image {
        width: 100%;
        height: 160px;
    }
}

body.dark-mode .knowledge-base .kb-card {
    background-color: var(--bc-color-dark2) !important; 
    border-color: #2c2c2c;
    box-shadow: none !important;
}

    body.dark-mode .knowledge-base .kb-card:hover {
        background-color: #252525 !important; 
        border-color: #444;
    }

body.dark-mode .knowledge-base .kb-title {
    color: #e0e0e0;
}

body.dark-mode .knowledge-base .kb-description {
    color: #aaaaaa;
}

body.dark-mode .knowledge-base .kb-badge {
    background: rgba(0, 0, 0, 0.6); 
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .knowledge-base .kb-meta {
    border-top-color: #2c2c2c;
    color: #666;
}

body.dark-mode .knowledge-base .kb-image img {
    opacity: 0.85;
}