/* ==============================================
   BLOG LATEST POSTS — improx-group/assets/css/blog/latest-posts.css
   ============================================== */

.blog-posts-section {
    padding: var(--section-padding);
    background: var(--color-white);
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-12);
    align-items: flex-start;
}

/* ── Post grid ── */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

/* Re-uses .blog-card from home/latest-blog.css */

/* ── Sidebar ── */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
}

.sidebar-widget h3 {
    font-size: var(--font-size-base);
    color: var(--color-navy);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-primary);
}

.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    color: var(--color-navy-mid);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-cat-link:hover {
    background: var(--color-primary-muted);
    color: var(--color-primary);
}

.sidebar-cat-link .cat-count {
    background: var(--color-border);
    color: var(--color-muted);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    min-width: 24px;
    text-align: center;
}

/* Recent posts widget */
.recent-post-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-border-light);
}

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

.recent-post-info h4 {
    font-size: var(--font-size-sm);
    color: var(--color-navy);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
    margin-bottom: var(--space-1);
}

.recent-post-info h4 a {
    color: inherit;
    text-decoration: none;
}

.recent-post-info h4 a:hover {
    color: var(--color-primary);
}

.recent-post-info span {
    color: var(--color-muted);
    font-size: var(--font-size-xs);
}
