/* AI Knowledge Common Styles */
#ai-knowledge-list,
#ai-knowledge-search-results {
    margin-top: 20px;
}

/* AI Knowledge Header */
#ai-knowledge-list .ai-knowledge-header,
#ai-knowledge-search-results .ai-knowledge-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

#ai-knowledge-list .ai-knowledge-header h2,
#ai-knowledge-search-results .ai-knowledge-header h2 {
    margin: 0;
}

/* Search Info */
#ai-knowledge-search-results .search-info {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

#ai-knowledge-search-results .search-info p {
    margin: 0;
    color: #666;
}

/* AI Knowledge Grid */
#ai-knowledge-list .custom-content .row,
#ai-knowledge-search-results .custom-content .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -7.5px;
}

/* Desktop: 4 colunas (25% cada) */
#ai-knowledge-list .custom-content .col-ai-knowledge,
#ai-knowledge-search-results .custom-content .col-ai-knowledge {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 7.5px;
    display: flex;
    margin-top: 20px;
}

/* AI Knowledge Items */
#ai-knowledge-list .ai-knowledge-item,
#ai-knowledge-search-results .ai-knowledge-item {
    /* margin-bottom: 30px; */
    padding: 15px;
    border-radius: 5px;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eee;
}

#ai-knowledge-list .ai-knowledge-item img,
#ai-knowledge-search-results .ai-knowledge-item img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block;
    border-radius: 4px;
}

#ai-knowledge-list .ai-knowledge-item p,
#ai-knowledge-search-results .ai-knowledge-item p {
    flex-grow: 1;
    margin-bottom: 10px;
}

#ai-knowledge-list .ai-knowledge-item h2,
#ai-knowledge-search-results .ai-knowledge-item h2 {
    margin-bottom: 10px;
    /* font-size: 16px; */
}

#ai-knowledge-list .ai-knowledge-item h2 a,
#ai-knowledge-search-results .ai-knowledge-item h2 a {
    text-decoration: none;
    color: inherit;
}

/* #ai-knowledge-list .ai-knowledge-item h2 a:hover,
#ai-knowledge-search-results .ai-knowledge-item h2 a:hover {
    text-decoration: underline;
} */

/* AI Knowledge Tags */
#ai-knowledge-list .ai-knowledge-tags,
#ai-knowledge-search-results .ai-knowledge-tags {
    margin: 10px 0;
}

#ai-knowledge-list .ai-knowledge-tags .tag,
#ai-knowledge-search-results .ai-knowledge-tags .tag {
    display: inline-block;
    background-color: #16605C;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* AI Knowledge Footer */
#ai-knowledge-list .ai-knowledge-footer,
#ai-knowledge-search-results .ai-knowledge-footer {
    margin-top: auto;
    text-align: right;
    padding-right: 10px;
}

#ai-knowledge-list .ai-knowledge-footer a,
#ai-knowledge-search-results .ai-knowledge-footer a {
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
}

#ai-knowledge-list .ai-knowledge-footer a:hover,
#ai-knowledge-search-results .ai-knowledge-footer a:hover {
    text-decoration: underline;
}

/* No Results */
#ai-knowledge-search-results .no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

#ai-knowledge-search-results .no-results h3 {
    margin-bottom: 15px;
    color: #333;
}

#ai-knowledge-search-results .no-results a {
    color: #007bff;
    text-decoration: none;
}

#ai-knowledge-search-results .no-results a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #ai-knowledge-list .ai-knowledge-header,
    #ai-knowledge-search-results .ai-knowledge-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    #ai-knowledge-list .ai-knowledge-header h2,
    #ai-knowledge-search-results .ai-knowledge-header h2 {
        text-align: left;
    }
    
    /* Mobile: 1 coluna (100%) */
    #ai-knowledge-list .custom-content .col-ai-knowledge,
    #ai-knowledge-search-results .custom-content .col-ai-knowledge {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    #ai-knowledge-list .ai-knowledge-item h2,
    #ai-knowledge-search-results .ai-knowledge-item h2 {
        font-size: 18px;
    }
    
    #ai-knowledge-list .ai-knowledge-footer,
    #ai-knowledge-search-results .ai-knowledge-footer {
        padding-right: 15px;
    }
}