/**
 * Post Card Styles
 *
 * @package HomeProz
 */

// Archive Header
.archive-header {
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.archive-title {
    margin-bottom: 0;
}

// Posts Grid
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;

    @media (min-width: 768px) {
        grid-template-columns: repeat(2, 1fr);
    }

    @media (min-width: 1024px) {
        grid-template-columns: repeat(3, 1fr);
    }
}

// Post Card
.post-card {
    display: flex;
    flex-direction: column;
}

.post-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.post-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.25rem;
}

.post-card-header {
    margin-bottom: 0.75rem;
}

.post-card-meta {
    margin-bottom: 0.5rem;

    time {
        font-size: 0.8125rem;
        color: var(--color-text-muted);
    }
}

.post-card-title {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0;

    a {
        color: var(--color-text);
        text-decoration: none;

        &:hover {
            color: var(--color-accent-light);
        }
    }
}

.post-card-excerpt {
    flex-grow: 1;
    margin-bottom: 1rem;

    p {
        font-size: 0.9375rem;
        color: var(--color-text-muted);
        margin-bottom: 0;
        line-height: 1.6;
    }
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent-light);
    text-decoration: none;

    &:hover {
        color: var(--color-accent-hover);
    }

    svg {
        width: 16px;
        height: 16px;
    }
}

// Pagination
.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 0;
    flex-wrap: wrap;

    .page-numbers {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        height: 40px;
        padding: 0 0.75rem;
        background-color: var(--color-bg-card);
        border-radius: 0.25rem;
        color: var(--color-text-muted);
        text-decoration: none;
        font-size: 0.875rem;
        font-weight: 500;

        &.current {
            background-color: var(--color-accent);
            color: white;
        }

        &:hover:not(.current):not(.dots) {
            background-color: var(--color-border);
            color: var(--color-text);
        }

        &.dots {
            background: none;
            cursor: default;
        }
    }

    .prev,
    .next {
        padding: 0 1rem;
    }
}

// No posts message
.no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--color-text-muted);
}
