/* --- BLOGS PAGE CSS --- */

/* Ensures the sidebar stays glued to the screen when scrolling on desktop */
@media (min-width: 992px) {
    .blog-sidebar-content {
        position: sticky;
        top: 100px; /* Accounts for the fixed header height */
    }
}

.sidebar-heading {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0c0e1b;
    margin-bottom: 20px;
}

/* Category List Styling */
.category-list {
    margin: 0;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #4a4a52;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: transparent;
}

.category-list a:hover {
    background-color: #f8fafc;
    color: #20b038; /* Vanguard Green */
}

/* Active Category State */
.category-list a.active {
    background-color: #e2e8f0;
    color: #0c0e1b;
    font-weight: 600;
}
.category-list a.active .badge {
    background-color: #ffffff !important;
}

.blog-search-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #6b7280;
    padding: 0;
    line-height: 1;
}

/* Sidebar CTA Block */
.sidebar-cta-card {
    background: linear-gradient(135deg, #0c0e1b 0%, #1e293b 100%); /* Vanguard Navy */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ensure blog cards naturally adapt to their grid column widths */
#mainBlogGrid .blog-card {
    width: 100%;
}

/* --- MOBILE RESPONSIVE TWEAKS --- */
@media (max-width: 991.98px) {
    /* Forces the offcanvas sidebar to be exactly 80% width on mobile */
    #blogSidebar.offcanvas-start {
        width: 80% !important;
    }
}





/* --- VANGUARD SOFT GREEN BADGE --- */
.vanguard-badge-soft {
    background-color: rgba(32, 176, 56, 0.1); /* 10% opacity Vanguard Green */
    color: #15803d; /* Dark green for readability */
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    /* Allows text to wrap neatly if the category name is long and screen is small */
    white-space: normal; 
    text-align: left;
    line-height: 1.3;
}

/* --- MOBILE TWEAKS FOR 2-COLUMN GRID --- */
@media (max-width: 767.98px) {
    /* Because there are 2 cards per row, we make the padding and text even tighter to look premium */
    #mainBlogGrid .blog-content {
        padding: 12px 10px;
    }
    
    #mainBlogGrid .blog-title {
        font-size: 13px; /* Smaller title to fit the 2x grid */
        line-height: 1.4;
        -webkit-line-clamp: 3;
        margin-bottom: 12px;
    }
    
    #mainBlogGrid .blog-author {
        font-size: 11px;
    }

    #mainBlogGrid .vanguard-badge-soft {
        font-size: 9px; /* Very compact badge for mobile */
        padding: 4px 6px !important;
    }
}





@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
