/**
 * TT Knowledge Base & Blog Styles
 * File: modules/addons/tt_knowledgebase/assets/css/tt-kb.css
 */

/* ==============================================
   GENERAL STYLES
   ============================================== */

.tt-kb-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.tt-kb-section {
    margin-bottom: 2rem;
}

.tt-kb-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: center;
}

.tt-kb-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 2rem;
}

/* ==============================================
   SEARCH STYLES
   ============================================== */

.tt-kb-search {
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
}

.tt-kb-search input[type="text"] {
    width: 100%;
    padding: 15px 20px 15px 50px;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tt-kb-search input[type="text"]:focus {
    border-color: #3498db;
    box-shadow: 0 2px 20px rgba(52, 152, 219, 0.2);
}

.tt-kb-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.2rem;
}

.tt-kb-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: #3498db;
    border: none;
    border-radius: 25px;
    color: white;
    padding: 0 25px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.tt-kb-search button:hover {
    background: #2980b9;
}

/* ==============================================
   CATEGORY GRID STYLES
   ============================================== */

.tt-kb-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tt-kb-category-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.tt-kb-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.tt-kb-category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #3498db;
    display: block;
}

.tt-kb-category-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.tt-kb-category-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tt-kb-category-count {
    font-size: 0.85rem;
    color: #95a5a6;
    font-weight: 500;
}

.tt-kb-category-count .count {
    color: #3498db;
    font-weight: 600;
}

/* ==============================================
   POPULAR ARTICLES STYLES
   ============================================== */

.tt-kb-popular {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.tt-kb-popular-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.tt-kb-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tt-kb-popular-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.tt-kb-popular-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.tt-kb-popular-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.tt-kb-popular-item-excerpt {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.tt-kb-popular-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #95a5a6;
}

.tt-kb-popular-item-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ==============================================
   ARTICLE STYLES
   ============================================== */

.tt-kb-article {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.tt-kb-article-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.tt-kb-article-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.3;
}

.tt-kb-article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.tt-kb-article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tt-kb-article-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #2c3e50;
}

/* ==============================================
   RESPONSIVE STYLES
   ============================================== */

@media (max-width: 768px) {
    .tt-kb-title {
        font-size: 2rem;
    }
    
    .tt-kb-categories {
        grid-template-columns: 1fr;
    }
    
    .tt-kb-popular-grid {
        grid-template-columns: 1fr;
    }
    
    .tt-kb-article {
        padding: 1.5rem;
    }
    
    .tt-kb-article-title {
        font-size: 1.8rem;
    }
}