/* Blog Sidebar Component Styles - Infinite Blog Inspired */

/* ============================================
   Sidebar Container - Sticky Positioning
   ============================================ */
.blog-sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* ============================================
   Card Styling - Infinite Blog Design
   ============================================ */
.blog-sidebar .card {
    border: 1px solid var(--border_color, #e9ecef);
    border-radius: 0;
    overflow: hidden;
    background-color: #ffffff;
    margin-bottom: 2rem;
}

/* ============================================
   Sidebar Title Styling
   ============================================ */
.blog-sidebar .card-header {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 6px 0;
    margin: 6px 1.25rem;
    position: relative;
}

.blog-sidebar .card-title {
    color: #003a89;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Accent line below title */
.blog-sidebar .card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50%;
    height: 2px;
    background-color: var(--primary_color, #ffcc1e);
    transition: all 0.3s ease;
}

/* Hover effect for the accent line */
.blog-sidebar .card:hover .card-header::after {
    width: 60%;
    opacity: 0.9;
}

.blog-sidebar .card-body {
    padding: 1.25rem;
}

/* ============================================
   Post Items in Sidebar
   ============================================ */
.sidebar-post-thumb {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 6px;
}

.sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-content {
    min-width: 0;
}

.sidebar-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text_color, #003a89);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   List Group Items
   ============================================ */
.blog-sidebar .list-group-item {
    border: none;
    border-bottom: 1px solid var(--border_color, #e9ecef);
    background-color: transparent;
}

.blog-sidebar .list-group-item:last-child {
    border-bottom: none;
}

.blog-sidebar .list-group-item-action:hover {
    background-color: var(--background_color, #f8f9fa);
}

.blog-sidebar .list-group-item a {
    color: inherit;
}

.blog-sidebar .list-group-item a:hover .sidebar-post-title {
    color: var(--primary_color, #ffcc1e);
}

/* ============================================
   Badges
   ============================================ */
.blog-sidebar .badge.bg-primary {
    background-color: var(--primary_color, #ffcc1e) !important;
    color: var(--text_color, #003a89) !important;
    font-weight: 500;
    font-size: 0.75rem;
}

.blog-sidebar .badge.bg-secondary {
    background-color: var(--secondary_color, #003a89) !important;
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.8rem;
}

.blog-sidebar .badge.bg-secondary:hover {
    background-color: var(--primary_color, #ffcc1e) !important;
    color: var(--text_color, #003a89) !important;
}

/* ============================================
   Categories List
   ============================================ */
.sidebar-category-name {
    color: var(--text_color, #003a89);
    font-weight: 500;
    font-size: 0.9rem;
}

.blog-sidebar .list-group-item a:hover .sidebar-category-name {
    color: var(--primary_color, #ffcc1e);
}

/* ============================================
   Text and Icons
   ============================================ */
.blog-sidebar .text-muted {
    color: var(--text_muted, #41618b) !important;
}

.blog-sidebar .small {
    font-size: 0.8rem;
}

/* Reduce eye icon size */
.blog-sidebar .fa-eye {
    font-size: 0.75rem;
}

/* ============================================
   Responsive Design
   ============================================ */
/* Hide sidebar on tablets and mobile */
@media (max-width: 991.98px) {
    .blog-sidebar {
        position: static;
        max-height: none;
        margin-top: 2rem;
    }
}

/* Mobile optimization */
@media (max-width: 767.98px) {
    .blog-sidebar .card {
        margin-bottom: 1.5rem;
    }
    
    .blog-sidebar .card-header {
        padding: 1px 0;
        margin: 1px 1rem;
    }
    
    .blog-sidebar .card-title {
        font-size: 1rem;
        letter-spacing: 0.5px;
        color: #003a89;
    }
    
    .blog-sidebar .card-header::after {
        width: 45%;
    }
    
    .blog-sidebar .card:hover .card-header::after {
        width: 55%;
    }
    
    .blog-sidebar .list-group-item {
        padding: 0.75rem 1rem;
    }
    
    .sidebar-post-thumb {
        width: 50px;
        height: 50px;
    }
    
    .sidebar-post-title {
        font-size: 0.8rem;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.blog-sidebar .gap-2 {
    gap: 0.5rem;
}

.blog-sidebar .gap-3 {
    gap: 1rem;
}

/* Ensure proper spacing between cards */
.blog-sidebar > .card:last-child {
    margin-bottom: 0;
}

/* ============================================
   Sidebar Bottom Spacing Fix
   - Keep consistent margin at the bottom of the sidebar
   - Applies when content is short so it doesn't butt against the footer
   ============================================ */
.blog-sidebar { 
    margin-bottom: 2rem; 
}
.blog-sidebar > .card:last-child { 
    margin-bottom: 2rem; 
}
@media (max-width: 991.98px) {
    .blog-sidebar { 
        margin-bottom: 2rem; 
    }
}

