/* Blog List Styles */

.page-header {
    background: var(--gradient-brand);
    color: var(--color-text-on-brand);
    padding: var(--sp-10) var(--sp-5);
    text-align: center;
    margin-bottom: var(--sp-7);
}

.page-header h1 {
    margin: 0;
    font-size: var(--fs-3xl);
    color: inherit;
}

.blog-list-section {
    padding: var(--sp-7) var(--sp-5);
    background-color: var(--color-bg-soft);
}

.blog-list-section .container {
    max-width: var(--max-w-content);
    margin: 0 auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-6);
    margin-top: var(--sp-6);
}

.article-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base), box-shadow var(--t-base);
    border: 1px solid var(--color-border);
    /* Vertical flex so .article-footer can be pinned to the bottom regardless
       of excerpt length (cards in the same row stay aligned by the grid). */
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.article-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}

.article-card:hover .article-image {
    transform: scale(1.04);
}

.article-content {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    flex: 1;            /* fill remaining card height */
    min-height: 0;      /* let line-clamp on the excerpt actually shrink */
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-3);
    font-size: var(--fs-xs);
}

.article-category {
    background: var(--gradient-brand);
    color: var(--color-text-on-brand);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.article-date {
    color: var(--color-text-light);
}

.article-title {
    margin: var(--sp-3) 0;
    font-size: var(--fs-lg);
    line-height: var(--lh-snug);
}

.article-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--t-fast);
}

.article-title a:hover {
    color: var(--color-primary);
}

.article-excerpt {
    color: var(--color-text-muted);
    line-height: var(--lh-base);
    margin: var(--sp-3) 0;
    font-size: var(--fs-sm);
    /* Truncate at 3 lines with an ellipsis — long excerpts don't push the footer down. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;   /* pin to bottom of the card */
    padding-top: var(--sp-4);
    border-top: 1px solid var(--color-border);
}

.article-author {
    color: var(--color-text-light);
    font-size: var(--fs-sm);
}

.read-more {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-sm);
    transition: color var(--t-fast);
}

.read-more:hover {
    color: var(--color-primary-dark);
}

.no-articles {
    text-align: center;
    padding: var(--sp-10) var(--sp-5);
    color: var(--color-text-light);
}

.no-articles p {
    font-size: var(--fs-md);
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-4);
    }

    .page-header {
        padding: var(--sp-7) var(--sp-4);
    }

    .page-header h1 {
        font-size: var(--fs-2xl);
    }
}
