@use 'design-system' as *;

.gridContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    column-gap: $spacing-size-4;
    row-gap: $spacing-size-6;
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--color-border-secondary);
    overflow: hidden;
}

.articleImage {
    width: 100%;

    margin-bottom: 0px;
    object-fit: cover;
    border-radius: var(--radius-md) 0px 0px;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: $spacing-size-4;
}

.articleTitle {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: flex-start;
    font-size: var(--text-fs-base);
}

.articleDescription {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6em;
    height: 3em;
}

.learnMoreLink {
    align-self: flex-start;
    margin-top: 12px;
    text-decoration: none;
    color: var(--color-text-secondary);
    opacity: 0.7;
    text-align: left;
    font-weight: var(--text-semibold);

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

.linkWrapper {
    all: unset;
    cursor: pointer;

    &:hover {
        h2,
        span {
            color: var(--color-link);
            opacity: 1;
        }
    }
}
