/* Insights Frontend Styles */

/* Page Layout */
.insights-page {
    min-height: 100vh;
    background: #f8f9fa;
}

/* Navigation Section */
.insights-navigation {
    background-color: #e4e4e4;
    border-bottom: 1px solid #e9ecef;
    padding: 0px;
    width: 100%;
}

.insights-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
}

.nav-links {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 8px 16px;
    font-weight: 500;
}

.nav-link:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
    color: #212529;
    background-color: rgba(0, 0, 0, 0.08);
}

.nav-link i {
    font-size: 16px;
    opacity: 0.8;
}

/* Hide icons for all nav links except home */
.nav-link:not(.nav-link:first-child) i {
    display: none;
}

.nav-link span {
    font-size: 15px;
}

.article-count {
    font-size: 11px !important;
    opacity: 0.7;
    margin-left: 4px;
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 400;
}

.nav-link.active .article-count {
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
}

/* Breadcrumb Section */
.insights-breadcrumb {
    background-color: white;
    padding: 30px 0px 0px 0px;
    width: 100%;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    color: #6c757d;
    padding-left: 15px;
}

.breadcrumb-home {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb-home:hover {
    color: #007bff;
}

.breadcrumb-home i {
    font-size: 16px;
}

.separator {
    color: #adb5bd;
    margin: 0 5px;
}

/* Search Container */
.search-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    position: relative;
}

.sidebar-card .search-input-group {
    display: flex;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.sidebar-card .search-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #495057;
}

.sidebar-card .search-input-group input::placeholder {
    color: #6c757d;
}

.sidebar-card .search-input-group button {
    background: #148dc9;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-card .search-input-group button:hover {
    background: #0f7bb3;
    color: white;
}

/* Featured Articles */
.featured-articles {
    padding: 60px 0;
    background: white;
}

.featured-articles h2 {
    text-align: center;
    font-size: 2.5rem;
    margin: 0 0 50px 0;
    color: #495057;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-article {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.featured-article:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.featured-article .article-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.featured-article .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article .placeholder-image {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6c757d;
}

.featured-article .article-category {
    position: absolute;
    top: 15px;
    left: 15px;
}

.featured-article .article-category span {
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-article .article-content {
    padding: 25px;
}

.featured-article .article-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    line-height: 1.4;
}

.featured-article .article-content h3 a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-article .article-content h3 a:hover {
    color: #007bff;
}

.featured-article .article-content p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.featured-article .article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #6c757d;
}

.featured-article .article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Main Content */
.insights-content {
    padding: 60px 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar */
.insights-sidebar {
    background: white;
    border-radius: 15px;
    padding: 30px;
    height: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-widget {
    margin-bottom: 40px;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    color: #495057;
    font-weight: 600;
}

.category-list,
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.filter-list li {
    margin-bottom: 10px;
}

.category-list a,
.filter-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-list a:hover,
.filter-list a:hover {
    background: #f8f9fa;
    color: #495057;
}

.category-list a.active,
.filter-list a.active {
    background: #007bff;
    color: white;
}

.category-list .count {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #007bff;
    color: white;
}

/* Articles Main */
.articles-main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.article-card .article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-card .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card .placeholder-image {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #6c757d;
}

.article-card .article-category {
    position: absolute;
    top: 10px;
    left: 10px;
}

.article-card .article-category span {
    padding: 4px 8px;
    border-radius: 15px;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card .article-content {
    padding: 10px;
}

.article-card .article-content h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.article-card .article-content h3 a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card .article-content h3 a:hover {
    color: #007bff;
}

.article-card .article-content p {
    color: #6c757d;
    line-height: 1.5;
    margin: 0 0 15px 0;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #6c757d;
}

.article-card .article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover {
    background: #007bff;
    color: white;
}

.pagination-btn.active {
    background: #007bff;
    color: white;
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.no-articles i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.no-articles h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.no-articles p {
    margin: 0;
    font-size: 1rem;
}

/* Responsive Design - Desktop & Tablet (default styles above) */

/* Mobile Styles */
@media (max-width: 480px) {
    /* Navigation */
    .insights-navigation {
        position: static;
        padding: 0;
    }
    
    .insights-nav {
        flex-direction: row;
        gap: 8px;
    }
    
    .nav-links {
        justify-content: flex-start;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    
    .nav-link {
        padding: 8px 16px;
        font-size: 15px;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .nav-link i {
        font-size: 16px;
        opacity: 0.8;
    }
    
    .nav-link span {
        font-size: 13px;
    }
    
    .article-count {
        font-size: 11px !important;
        padding: 1px 4px;
        margin-left: 4px;
    }
    
    /* Breadcrumb */
    .breadcrumb-content {
        padding-left: 3px;
    }
    
    /* Search */
    .search-container {
        max-width: 100%;
        order: -1;
    }
    
    .search-input-group {
        height: 40px;
    }
    
    .search-input-group input {
        font-size: 14px;
        padding: 0 15px;
    }
    
    .search-input-group button {
        width: 40px;
    }
    
    /* Layout */
    .content-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .insights-sidebar {
        order: 2;
    }
    
    .articles-main {
        order: 1;
    }
    
    /* Featured Articles */
    .featured-articles {
        padding: 40px 0;
    }
    
    .featured-articles h2 {
        font-size: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Articles Grid */
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    /* Article Meta */
    .featured-article .article-meta,
    .article-card .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}